*
************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include <simgear_config.h>
+#endif
+
#include <errno.h>
#include <string.h>
#include <stdio.h>
errno = 0;
while (1) {
- fgets(buffer, 256, infile);
+ if (0 == fgets(buffer, 256, infile))
+ break;
if (feof(infile)) {
break;
}