Mail Archives: djgpp/1998/10/09/21:25:39
Sigurdur Smarason wrote:
>
> I'm trying to find a way to set the endianess for file i/o but I
> don't seem to be able to find any documentation on it. Does anybody know
> where I should go to find more info on the matter ?
You can't change the endianness, a file is just a bunch of bytes. If
you have multi-byte values (i.e. words) that you want to store, you must
figure that out yourself. The `htonl' and `ntohl' functions may be
helpful if what you want doesn't happen to match the CPU's spec.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -