delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/05/05:12:51

From: massey AT surefirev DOT com (Todd Massey)
Subject: B19 problem with fread() and buffering
5 Sep 1998 05:12:51 -0700 :
Message-ID: <3.0.3.32.19980904184440.00ba7d50.cygnus.gnu-win32@appr>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I call fread with a sizeof of 4 and a count of 315 after reading
500 bytes out of a file and I only get back a count of 42 and then
the FILE* fp->_flags == 1188, when I called fread() it fp_uflags was 1156, so
for some reason it thinks it reached end of file.  Now this is a binary
file and I use fopen() to open it .. I would expect it to work just fine
the routine that wrote out the file used fwrite in the B19 stuff.. 

So the real question is.. am I over running some buffer? 

Any ideas?

Thanks,
Todd

    /\     Todd Massey                 <massey AT surefirev DOT com> 
   /\//    SureFire Verification Inc.  <http://www.surefirev.com>
  /\///\   1671 Dell Ave, Campbell, CA 95008 -- 408-374-4100 x102
 _\///\/        Formerly Silicon Sorcery
  \//\/    Check out the Scuba Divers Review Site
    \/     ---->   www.scuba-divers.com 
 

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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