diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-01-31 16:22:06 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2006-01-31 16:22:06 +0000 |
| commit | e976174d618097f5d5825fda68d241a0420875ff (patch) | |
| tree | 82308fa52f7e149ee803181c05a5cfc9695ba39c | |
| parent | 192e0ed3bd893771b0ba27d421731b0a4cbec3f5 (diff) | |
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
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | fluid/file.cxx | 10 |
2 files changed, 8 insertions, 5 deletions
@@ -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: |
