diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-05 23:09:36 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2005-03-05 23:09:36 +0000 |
| commit | 9b5555d142d7bbd6913bc13f1d397e638ed46697 (patch) | |
| tree | b5375a7a7c147138d9c84e732774645775b0b0d8 | |
| parent | e6399f8f3711bc8757d0bb4b59af3fe7d52290a7 (diff) | |
fl_filename_relative() didn't compare drive letters in a
case-insensitive way (STR #741)
src/filename_absolute.cxx:
- fl_filename_relative(): use tolower() when comparing drive
letters.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/filename_absolute.cxx | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -2,6 +2,8 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745) + - fl_filename_relative() didn't compare drive letters in + a case-insensitive way (STR #741) - Fixed menu item width calculations with symbols (STR #740) - The keyboard shortcut handling code did not handle diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 9a65ddb0a..bec93c1d3 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -137,7 +137,7 @@ fl_filename_relative(char *to, // O - Relative filename return (1); } - if (*from != *cwd) { + if (tolower(*from & 255) != tolower(*cwd & 255)) { // Not the same drive... strlcpy(to, from, tolen); return 0; @@ -155,7 +155,7 @@ fl_filename_relative(char *to, // O - Relative filename slash ++, newslash ++) if (isdirsep(*slash) && isdirsep(*newslash)) continue; #if defined(WIN32) || defined(__EMX__) || defined(__APPLE__) - else if (tolower(*slash) != tolower(*newslash)) break; + else if (tolower(*slash & 255) != tolower(*newslash & 255)) break; #else else if (*slash != *newslash) break; #endif // WIN32 || __EMX__ || __APPLE__ |
