[sane-devel] [SANE2 proposal] Error handling

Matto Marjanovic maddog@mir.com
Sat, 29 Nov 2003 19:00:57 -0500

 >If you want to save memory (4 bytes :) ) then use 
 >typedef SANE_Status
 >  short code;
 >  short backend-code;
 >} SANE_Status;
 >which is still 32 bits long.

[Chiming in from the void...]

That's 32 bits long *only* if the structure is packed, which generally 
 requires a special #pragma or __attribute__ (depending on the compiler).
 Otherwise, structure elements are generally aligned on word (i.e. 32-bit)

Such a structure still needs to be marshalled/unmarshalled over the 
 network interface; there is the packing/unpacking issue, and the usual
 endian issue.

-matt m.