Date: Thu, 13 Jun 1996 23:02:15 +0400 (MSD) From: "Alexander V. Lukyanov" Message-Id: <199606131902.XAA04130@video.yars.free.net> To: acmq AT coe DOT ufrj DOT br, djgpp AT delorie DOT com Subject: Re: Behavior of fscanf in V2 > 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