If your compiler has the __packed keyword then you could use:
__packed int *ip;
...
ip = (__packed int *)&buf[i];
and the compiler should know to treat the alignment carefully.
But, it's inefficient.
Ed KoffemanMessage
RE: [lpc2000] Re: For C Experts
2006-03-30 by Ed Koffeman