diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-03-11 05:17:12 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-03-11 05:17:12 +0000 |
| commit | 70ca1d156ba8bb0aa1b3a925b89f935fe4dccfbe (patch) | |
| tree | 6c01d1849e98d53e54ba99af45425ab5cf3ea62e /src/filename_absolute.cxx | |
| parent | c5d30baf60c5b8acd81a6fa5dd5ea0b2392de10e (diff) | |
Fl_Value_Slider::draw_bg() didn't always apply the clipping
rectangle (STR #235)
fl_filename_relative() returned the wrong string if the absolute
pathname was equal to the current working directory (STR #224)
Fl_Help_Dialog didn't correctly restore the scroll position when
going forward/back in the link history if the file changed (STR
#218)
glutGetModifiers() did not mask off extra state bits, confusing
some GLUT-based applications (STR #213)
Fixed mouse capture problems on MacOS X (STR #209, STR #229)
Fl_Sys_Menu_Bar is now built into the library for MacOS X (STR
#229)
Fl_Menu_ now provides item_pathname() methods to get the
"pathname" of a menu item, e.g. "File/Quit" (STR #283)
Fl_Text_Display now provides cursor_color() methods to get and
set the cursor color (STR #271)
Fl_Scroll didn't honor FL_NO_BOX (STR #305)
FLUID declaration blocks didn't support public/private
definitions (STR #301)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_absolute.cxx')
| -rw-r--r-- | src/filename_absolute.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx index 6ce6d7042..5a70d9d77 100644 --- a/src/filename_absolute.cxx +++ b/src/filename_absolute.cxx @@ -1,5 +1,5 @@ // -// "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $" +// "$Id: filename_absolute.cxx,v 1.5.2.4.2.11 2004/03/11 05:17:12 easysw Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // @@ -132,6 +132,11 @@ fl_filename_relative(char *to, // O - Relative filename } #if defined(WIN32) || defined(__EMX__) + if (!strcasecmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + if (*from != *cwd) { // Not the same drive... strlcpy(to, from, tolen); @@ -139,6 +144,11 @@ fl_filename_relative(char *to, // O - Relative filename } for (slash = from + 2, newslash = cwd + 2; #else + if (!strcmp(from, cwd)) { + strlcpy(to, ".", tolen); + return (1); + } + for (slash = from, newslash = cwd; #endif // WIN32 || __EMX__ *slash != '\0' && *newslash != '\0'; @@ -176,5 +186,5 @@ fl_filename_relative(char *to, // O - Relative filename // -// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.10 2003/01/30 21:43:20 easysw Exp $". +// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.11 2004/03/11 05:17:12 easysw Exp $". // |
