From e976174d618097f5d5825fda68d241a0420875ff Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 31 Jan 2006 16:22:06 +0000 Subject: FLUID didn't handle loading .fl files with international characters properly with all compilers (STR #1150) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4781 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 +++ fluid/file.cxx | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index ec4a9cade..13908aa05 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.8 + - FLUID didn't handle loading .fl files with + international characters properly with all compilers + (STR #1150) - Fl_Spinner's minimum() and maximum() "get" methods were misspelled (STR #1146) - The largefile support changes in 1.1.7 broke binary diff --git a/fluid/file.cxx b/fluid/file.cxx index fe41fc4b3..eb985c915 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -101,7 +101,7 @@ void write_string(const char *format, ...) { if (needspace) fputc(' ',fout); vfprintf(fout, format, args); va_end(args); - needspace = !isspace(format[strlen(format)-1]); + needspace = !isspace(format[strlen(format)-1] & 255); } // start a new line and indent it for a given nesting level: @@ -246,7 +246,7 @@ const char *read_word(int wantbrace) { continue; } else if (x == '\n') { lineno++; - } else if (!isspace(x)) { + } else if (!isspace(x & 255)) { break; } } @@ -287,7 +287,7 @@ const char *read_word(int wantbrace) { int length = 0; for (;;) { if (x == '\\') {x = read_quoted(); if (x<0) continue;} - else if (x<0 || isspace(x) || x=='{' || x=='}' || x=='#') break; + else if (x<0 || isspace(x & 255) || x=='{' || x=='}' || x=='#') break; buffer[length++] = x; expand_buffer(length); x = getc(fin); @@ -519,7 +519,7 @@ int read_fdesign_line(const char*& name, const char*& value) { x = getc(fin); if (x < 0) return 0; if (x == '\n') {length = 0; continue;} // no colon this line... - if (!isspace(x)) { + if (!isspace(x & 255)) { buffer[length++] = x; expand_buffer(length); } @@ -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)) break; + if (x < 0 || x == '\n' || !isspace(x & 255)) break; } // read the value: -- cgit v1.2.3