summaryrefslogtreecommitdiff
path: root/src/filename_absolute.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-12-19 18:15:34 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-12-19 18:15:34 +0000
commit329b4127f6801d04ca0cdfadaf60f1265e8268c6 (patch)
treef7bcaf1fc7d2a37782c66b5e0d87e910e53ca156 /src/filename_absolute.cxx
parent9f601ccb7356adc26bf375de9744e39cdf531b25 (diff)
Multiple bug fixes from Sebastien:
- Fl_GIF_Image and Fl_PNG_Image didn't close the file before calling Fl::error(). - Fl_Help_View didn't clear the line array in Fl_Help_Block, and Fl_Help_Block::font and ::size were not used. - Fl_Shared_Image::get() didn't return NULL if the image could not be loaded. - Switched to more efficient code for Fl_Tiled_Image::color_average() and ::desaturate(). - Don't delete children in Fl_Text_Display since the group will do it. - Fixes to filename_isdir(), filename_absolute(), and filename_relative(). - Was using numbers instead of define constants for some OpenGL stuff under WIN32. - Wasn't exporting threading functions under WIN32. - The Fl_Widget destructor now removes from the parent to avoid a Purify error since the old widget would be referenced by the parent when it was destroyed; this has no apparent performance impact since Fl_Group::clear() sets children_ to 0, making Fl_Group::remove() very fast... - WIN32 font enumeration datatype fixes... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_absolute.cxx')
-rw-r--r--src/filename_absolute.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/filename_absolute.cxx b/src/filename_absolute.cxx
index 2eeca49e3..a7ed164c9 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.3 2001/12/11 16:03:12 easysw Exp $"
+// "$Id: filename_absolute.cxx,v 1.5.2.4.2.4 2001/12/19 18:15:34 easysw Exp $"
//
// Filename expansion routines for the Fast Light Tool Kit (FLTK).
//
@@ -68,6 +68,7 @@ int filename_absolute(char *to, int tolen, const char *from) {
if (!a) {
strncpy(to, from, tolen - 1);
to[tolen - 1] = '\0';
+ delete[] temp;
return 0;
}
#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__)
@@ -134,7 +135,11 @@ filename_relative(char *to, // O - Relative filename
*slash != '\0' && *newslash != '\0';
slash ++, newslash ++)
if (isdirsep(*slash) && isdirsep(*newslash)) continue;
+#if defined(WIN32) || defined(__EMX__) || defined(__APPLE__)
+ else if (tolower(*slash) != tolower(*newslash)) break;
+#else
else if (*slash != *newslash) break;
+#endif // WIN32 || __EMX__ || __APPLE__
while (!isdirsep(*slash) && slash > from) slash --;
@@ -167,5 +172,5 @@ filename_relative(char *to, // O - Relative filename
//
-// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.3 2001/12/11 16:03:12 easysw Exp $".
+// End of "$Id: filename_absolute.cxx,v 1.5.2.4.2.4 2001/12/19 18:15:34 easysw Exp $".
//