??? 03/24/10 03:17 Read: times |
#174453 - Someone already wrote up a good way.... Responding to: ???'s previous message |
http://www.ibm.com/developer...tml?ca=drs-
Totally gets rid of endianess without knowledge of compiler whatsoever except it can make the program take longer to compute. Use Listing 6 to figure out endianess and then have the program call separate methods to reverse endianess. Alas, there is no easy way to make the code extremely legible without having multiple ifdefs sprinkled throughout the code (something the C language lacks). This would only make the code run faster, but if time is of no issue, using the above method is perfectly fine. |