From: Hans U. N. <gp...@n-...> - 2005-03-17 15:13:17
|
"Jan Patera" <pa...@pi...> writes: > I never remember which is little-endian and which is big-endian. Same with me :-) > And I must admit I didn't decipher the _be_ and _le_ letter in the > function names :-( > > In any case Lutz's code was wrong: > ============== > static int > cmp_be_func (const void *elem1, const void *elem2) > { > return cmp_func ((const unsigned char *) elem1, > (const unsigned char *) elem2, > EXIF_BYTE_ORDER_INTEL); > } > > static int > cmp_le_func (const void *elem1, const void *elem2) > { > return cmp_func ((const unsigned char *) elem1, > (const unsigned char *) elem2, > EXIF_BYTE_ORDER_MOTOROLA); > } > > ============== > data->priv->order == EXIF_BYTE_ORDER_INTEL ? cmp_le_func : cmp_be_func > ============== > > Are you saying I should have changed bodies of cmp_le_func & cmp_be_func > instead? I would have renamed the definition of the functions and exchanged "be" and "le" :-) But, after seeing the complete code in question, I'd just do away completely with "be" and "le", and call it "cmp_intel_func" and "cmp_motorola_func". OK, let's wait for the CVS server to come back online. Uli |