delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/14/02:57:11

From: michael AT weiser DOT saale-net DOT de (Michael Weiser)
Subject: Re: B19: fread bug (NT and 95)
14 Sep 1998 02:57:11 -0700 :
Message-ID: <35fe5111.36061453.cygnus.gnu-win32@mail.weiser.saale-net.de>
References: <35FB1C33 DOT A3E966F4 AT entelchile DOT net>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hello Salumax, you wrote:
>   I found a bug with the fread instruction... In the C codes that I
>wrote, the fread instruction, not reads all the bytes of the image that
>I try to read... For example, when I execute the program "hola.c" that I
>include with this e-mail, and I try to read the image "lenna.dat" (64
>kb), hola.exe only reads 28 bytes of lenna.dat. What's the matter ?...
Just try to open the file in binary mode ("rb"). Perhaps there's a ^Z
at byte 29 of your file which causes fread to stop. Alternatively you
can mount all your drives in binary mode which causes cygwin32 to
assume "b" if no mode is given explicitly.
-- 
bye, Michael
-
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