Newsgroups: comp.os.msdos.djgpp From: rer AT wlv DOT iipo DOT gtegsc DOT com (Ethan Rohrer) Subject: help: read()ing from files containing 0x1A Sender: news AT wlbr DOT iipo DOT gtegsc DOT com (Steven M. Schultz) Organization: GTE Government Systems, Thousand Oaks CA USA Message-ID: Date: Fri, 2 May 1997 20:01:02 GMT Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hello all, I am trying to port some code from my UNIX account to my DOS machine. My program reads a binary file using a open()/read()/close() sequence. It worked like a champ in my UNIX account. Now, under DJGPP, I find that read() stops reading when it encounters the EOF character (0x1A), which just happens to occur every here and there in my binary files... So I've got three questions: (1) why doesn't this work under DJGPP? (2) why does this work under UNIX? and most importantly... (3) how do I make it do what I want? (read the entire file, regardless of those 0x1A characters) I'd appreciate any pointers (except NULL), thanks Ethan rer AT wlv DOT iipo DOT gtegsc DOT com