Mail Archives: djgpp/1997/06/18/11:56:27
Javier Loureiro Varela wrote:
>
> Why this call doesn't read all file?
> fread(buffer, sizeof(unsigned char), 64000, file);
are you sure the file is smaller than 64,000 bytes?
>
> I open my file using:
> file = fopen(argv[1], "r");
is the file binary or text? if it is binary and the default mode is set
to text, then any ctrl-z in the file will be interpreted as EOF, and
you'll only be able to read up to that point. so, open the file in
binary mode.
--
Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************
- Raw text -