diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-01-31 19:00:08 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-01-31 19:00:08 +0000 |
| commit | e6bbd2d525bba8a40bb483263199624c1414b863 (patch) | |
| tree | dbb4ddf42fd56565f2350e25097185582c635eaa /fluid | |
| parent | e976174d618097f5d5825fda68d241a0420875ff (diff) | |
Update copyrights.
Also check for feof() when the character returned by getc is < 0
to work around a bug in Cygwin.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/file.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fluid/file.cxx b/fluid/file.cxx index eb985c915..603bcdf95 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -8,7 +8,7 @@ // They are somewhat similar to tcl, using matching { and } // to quote strings. // -// Copyright 1998-2005 by Bill Spitzak and others. +// Copyright 1998-2006 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -238,7 +238,7 @@ const char *read_word(int wantbrace) { // skip all the whitespace before it: for (;;) { x = getc(fin); - if (x < 0) { // eof + if (x < 0 && feof(fin)) { // eof return 0; } else if (x == '#') { // comment do x = getc(fin); while (x >= 0 && x != '\n'); @@ -517,7 +517,7 @@ int read_fdesign_line(const char*& name, const char*& value) { // find a colon: for (;;) { x = getc(fin); - if (x < 0) return 0; + if (x < 0 && feof(fin)) return 0; if (x == '\n') {length = 0; continue;} // no colon this line... if (!isspace(x & 255)) { buffer[length++] = x; @@ -531,7 +531,7 @@ int read_fdesign_line(const char*& name, const char*& value) { // skip to start of value: for (;;) { x = getc(fin); - if (x < 0 || x == '\n' || !isspace(x & 255)) break; + if ((x < 0 && feof(fin)) || x == '\n' || !isspace(x & 255)) break; } // read the value: |
