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
This commit is contained in:
parent
e976174d61
commit
e6bbd2d525
@ -3,7 +3,7 @@
|
||||
//
|
||||
// Spinner widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// 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
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# FLTK configuration utility.
|
||||
#
|
||||
# Copyright 2000-2005 by Bill Spitzak and others.
|
||||
# Copyright 2000-2006 by Bill Spitzak and others.
|
||||
# Original version Copyright 2000 by James Dean Palmer
|
||||
# Adapted by Vincent Penne and Michael Sweet
|
||||
#
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user