🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.programmer
Article #1183

Reading files...

#1183
From: Neal Ensor
Date: Thu, 02 May 1991 20:15
11 lines
1013 bytes
I was just wondering if any C programmers might be able to tell me this...
I want to read a file (in binary mode) which includes 0x1A's (EOF markers)
into a buffer... How do I do this??  fread() and fgetc() will NOT read EOF's
and feof() says the file is at end-of-file on the first EOF.  Can this be
done easily?  (This EOF problem may not happen very often, just wondering
if there might be a way to read in EOFS in a file, stopping at a set buffer
length...)

Please respond in e-mail to ensor@utk.cs.edu...
Thanks...
  /\/eal Ensor.
Technical Details
Message-ID: <1991May2.201506.166@cs.utk.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!emory!utkcs2!ensor
References: <1991May2.051321.7820@gmuvax2.gmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!emory!utkcs2!ensor
From: ensor@cs.utk.edu (Neal Ensor)
Newsgroups: comp.sys.ibm.pc.programmer
Subject: Reading files...
Message-ID: <1991May2.201506.166@cs.utk.edu>
Date: 2 May 91 20:15:06 GMT
References: <1991May2.051321.7820@gmuvax2.gmu.edu>
Sender: usenet@cs.utk.edu (USENET News Poster)
Organization: University of Tennessee, Knoxville - CS Department
Lines: 11