www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/02/23:15:41

From: Goh Yong Kwang <s6606555 AT mercury DOT np DOT ac DOT sg>
Newsgroups: comp.os.msdos.djgpp
Subject: How to make DJGPP treat an int as 16-bit in size.
Date: Mon, 3 Aug 1998 09:50:26 +0800
Organization: Ngee Ann Polytechnic, Singapore
Lines: 19
Message-ID: <Pine.SOL.3.91.980803094454.23337A-100000@mercury>
NNTP-Posting-Host: mercury.np.ac.sg
Mime-Version: 1.0
NNTP-Posting-User: s6606555
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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?

Thanks in advance!

----------------------------------
Many regards,
Goh Yong Kwang
96606555
3K
----------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019