[NUT-devel] Freeze NUT

Oded Shimon ods15 at ods15.dyndns.org
Thu Jun 1 18:25:24 CEST 2006


On Thu, Jun 01, 2006 at 06:19:32PM +0200, Luca Barbato wrote:
> Oded Shimon wrote:
> > I say go back to 4 byte method, and explicitly say to the spec it must be 
> > 4 bytes, and even remove the 'length' field...
> 
> hm, using the string to int is a BAD hack and could be quite enjoyable
> if you have the right endianess...
> 
> how many time you have to do this comparison?

Doesn't really have anything to do with the int hack, just code 
complexity.

int fourcc_len;
char * fourcc;

where fourcc is malloced is much annoying/harder to handle than simply

char fourcc[4];


If we decide we are only going to use 4 bytes, then I can use the latter 
for implementation, and to prevent a redundant sanity check seeing that 
the fourcc is indeed 4 bytes, the length can be remove from the file.

- ods15



More information about the NUT-devel mailing list