Mail Archives: djgpp/1996/06/13/15:05:52
> while (fscanf(archive,"%s",str1)!=EOF) {...}
>
> to read all the nonblank lines in a file. "str1" receives the first item
> as a string of characters, and is used to define what are the other items
> that are read by other fscanf statements.
> When the end of the file is reached, fscanf returns EOF and the loop
> terminates.
> In djgpp V2 this is apparently not happening. fscanf reads again and again
> an empty line after the last item read...
> Exactly the same code works with the other compilers.
> Is this some bug, or am I doing something "nonstandard"?
Yes, this is a known bug. If you want to try fixed version of stdio
(somewhat beta), download modified source files from
http://video.yars.free.net/~lav/djgpp/modified.zip
> Antonio Carlos M. de Queiroz
- Raw text -