Slimelite BBS

EOF

Back to R25C

From Matthew Probert · 1996-04-05 22:01 · #75243 in R25C

 -=> Quoting Alistair Green to All <=-

 AG> Hi All

 AG> I have recently been writing a program that involves reading ascii
 AG> files one  byte at a time. This is fine until I reach a section of the
 AG> code in the file  that is recognised as the EOF, even though it is not
 AG> the end of the file. The 
 AG> program then doesn't see any more of the file. I was wondering if
 AG> anyone knows 
 AG> of a way to get round this problem. Any help would be much
 AG> appreciated. 
 AG> Thanks

Open the file in BINARY mode:


eg:
        fopen(filename,"rb");

Then the EOF marker (^Z) is treated like anyother character.

Matthew Probert
Servile Software

PS

See also the Servile Info Journals I have posted to this conference for 
further hints, tips and source code....

... Servile Software
___ Blue Wave/QWK v2.12

--- WILDMAIL!/WC v4.12 
 * Origin: Ooh! BBS, London [MULTILINES]  0181-395-3108  (2:254/233.0)