Bug#1986: stdio broken? Strange behaviour of fgets() and scanf()
> Maybe that's it. Maybe 'fgets' is interfering with how scanf works.
> Does it still fail if you remove the 'fgets' from the for loop?
Yes, it still fails. I tried removing the #define from the start of the
string to be matched, though, and it no longer fails. OTOH, the original
program (which is too long to reproduce here) which reads a file largely
consisting of #define SYMBOL VALUE lines also fails, reading to the end
of the file and then carrying on reading nothing.
Steve Early
sde1000@cam.ac.uk
Reply to: