www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/11/19:29:06

Xref: news2.mv.net comp.os.msdos.djgpp:8514
From: Sinan Unur <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Binary files and ^C chars-try again
Date: 11 Sep 1996 17:18:11 GMT
Organization: Cornell University
Lines: 32
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <516s8j$dh4@newsstand.cit.cornell.edu>
References: <3237032D DOT 258A AT ccfsun DOT nrl DOT navy DOT mil>
NNTP-Posting-Host: 128
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

John Moon <moon2 AT ccfsun DOT nrl DOT navy DOT mil> wrote:
>Let's try this again,
>
>This may be a dumb question, but
>when I try to read a ^C char in binary from a 
>file I get an EOF condition, no matter if I try
>to read further into the file or not. Is this a
>perversity of the djgpp stdlib? If so, what is the
>standard work-around? I have tried getc, fgetc, 
>fscanf, and fread, and they all do the same thing.
>Apparently, the 255 (EOF) char does the same thing so
>even if I get the file size and fseek past the
>offending character I don't know whether it was a
>^C or EOF.
>
>I am using go32 v 1.12.maint3
>
>Thanks for dispelling my ignorance,
>
>John Moon
>
>#define MAX 300
>
>main(argc,argv)
>    int argc;
>    char *argv[];
>{
>
are you sure you wrote this program and it compiled?

sinan.

- Raw text -


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