Mail Archives: djgpp/1998/08/03/12:48:51
Goh Yong Kwang (s6606555 AT mercury DOT np DOT ac DOT sg) wrote:
: I have some binary data files that are generated by a 16-bit DOS program
: which treat an int as 2 bytes.
: Now I want to use DJGPP to write a program to read them but DJGPP thinks
: that an int should be 4 bytes (32-bits) huge.
: The difference in size of int will cause the program to read the data
: files incorrectly. Is there any easy way to make DJGPP treat int as 2
: bytes?
No.
But you could write the code that reads it to use type 'short' instead,
then once you've got it into the short assign it to an int.
Fred
--
---- Fred Smith -- fredex AT fcshome DOT stoneham DOT ma DOT us -----------------------------
"Not everyone who says to me, 'Lord, Lord,' will enter the kingdom of
heaven, but only he who does the will of my Father who is in heaven."
------------------------------ Matthew 7:21 (niv) -----------------------------
- Raw text -