From e4586d1572fe52fa16f5a6538f215e7d45c898af Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 22 Jan 2007 11:14:29 +0000 Subject: Removed 'optimization' for fl_filename_isdir which would break the original purpose of the fuction (testing the *existence* of a directory). But I did not want to lose the performance in the directory chooser where I *know* that a directory exists, just not if it is a file or directory, so I added the function fl_filename_isdir_quick() to do just that. Please verify that the new version works as expected, especially with regard to the directory chooser. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/filename.H | 1 + documentation/functions.html | 34 ++++++++++++++++++++++++++++++++-- src/Fl_File_Browser.cxx | 2 +- src/Fl_File_Chooser2.cxx | 12 ++++++------ src/filename_isdir.cxx | 24 +++++++++++++++++++----- 5 files changed, 59 insertions(+), 14 deletions(-) diff --git a/FL/filename.H b/FL/filename.H index cc86472fe..199824bde 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -40,6 +40,7 @@ FL_EXPORT int fl_filename_absolute(char *to, int tolen, const char *from); FL_EXPORT int fl_filename_relative(char *to, int tolen, const char *from); FL_EXPORT int fl_filename_match(const char *name, const char *pattern); FL_EXPORT int fl_filename_isdir(const char *name); +FL_EXPORT int fl_filename_isdir_quick(const char *name); # ifdef __cplusplus /* diff --git a/documentation/functions.html b/documentation/functions.html index 35c285aa9..c7d8b9e9f 100644 --- a/documentation/functions.html +++ b/documentation/functions.html @@ -58,11 +58,11 @@ A.
  • fl_draw_image
  • fl_draw_image_mono
  • fl_draw_pixmap
  • +
  • fl_draw_symbol