refactoring bin2h/bin2c