Mail Archives: djgpp/1999/08/14/15:59:04
Chris Holmes wrote:
> > I don't see how, because it's doing the exact same thing in a more obsure way.
> > I was trying to say that if the file was stored on a big-endian machine, then using
> > a little-endian like DJGPP to read the file in the way I mentioned wouldn't work.
> The difference is that you're telling the compiler to do the magic
> here, so if you compiled it on a big-endian compiler, then it should
> do it right. I'm just trying to save some time spent recoding.
> Chris
But, your code did the same thing, it casted it as a short* (which you stored in a
temporary variable) and then augmented it with an offset. You code would do the EXACT
same thing as mine on any and all machines. Both mechanisms were interpreting the int in
a 'native' way. What I was trying to say, was that if the file was saved in a big-endian
machine and you were using a little-endian machine... both of our codes would not work.
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT HotMail DOT com
ICQ: 32959047
- Raw text -