Re: [warzone2100-dev] Endianness function reorganization proposal
On Mon, Jun 21, 2010 at 7:37 AM, Safety0ff safety0ff@gmail.com wrote: endian_* word (defined in endian_hack.h, inline functions that swap using pointers, used ~511 times) This will go away once we replace the current savegame format. I think we should rename endian_hack.h to wz_endian.h and turn it into the single header that provides all the declarations to deal with endian swapping (for network and other code.) What do you guys think? I am not sure I see a benefit. Anyways, even if you disagree with doing the above, SDL_swap* should be removed in favor of the PHYSFS_swap* and hton* ntoh* ( for nettypes.c). I'm ok with that. - Per ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
[warzone2100-dev] Endianness function reorganization proposal
Hey all, We currently have 4 different ways of dealing with endianess ( 5 before r11002), they are: PHYSFS_swap* ( declared in physfs.h, used 39 times ) SDL_swap*( declared in SDL_endian.h, used 15 times) System networking functions hton* ntoh* ( declared in netinet/in.h, arpa/inet.h, winsock2.h, etc. used 53 times) endian_* word (defined in endian_hack.h, inline functions that swap using pointers, used ~511 times) I think we should rename endian_hack.h to wz_endian.h and turn it into the single header that provides all the declarations to deal with endian swapping (for network and other code.) What do you guys think? Anyways, even if you disagree with doing the above, SDL_swap* should be removed in favor of the PHYSFS_swap* and hton* ntoh* ( for nettypes.c). ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev