From a237472c70abda43511b988a519f9672d37dc652 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 2 May 2002 11:11:01 +0000 Subject: Update fl_filename_list() to accept a sort function to use, and export fl_alphasort, fl_casealphasort, fl_casenumericsort, and fl_numericsort. Still need to document this and provide hooks in the file chooser and browsers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/filename.H | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'FL') diff --git a/FL/filename.H b/FL/filename.H index fdcdd73d0..419f59a19 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -1,5 +1,5 @@ // -// "$Id: filename.H,v 1.11.2.4.2.5 2002/03/25 21:08:41 easysw Exp $" +// "$Id: filename.H,v 1.11.2.4.2.6 2002/05/02 11:11:00 easysw Exp $" // // Filename header file for the Fast Light Tool Kit (FLTK). // @@ -69,10 +69,21 @@ struct dirent {char d_name[1];}; # endif -FL_EXPORT int fl_filename_list(const char *d, struct dirent ***list); +extern "C" { + FL_EXPORT int fl_alphasort(dirent **, dirent **); + FL_EXPORT int fl_casealphasort(dirent **, dirent **); + FL_EXPORT int fl_casenumericsort(dirent **, dirent **); + FL_EXPORT int fl_numericsort(dirent **, dirent **); + + typedef int (Fl_File_Sort_F)(dirent **, dirent **); +} + +FL_EXPORT int fl_filename_list(const char *d, struct dirent ***list, + Fl_File_Sort_F *sort = fl_numericsort); + #endif // -// End of "$Id: filename.H,v 1.11.2.4.2.5 2002/03/25 21:08:41 easysw Exp $". +// End of "$Id: filename.H,v 1.11.2.4.2.6 2002/05/02 11:11:00 easysw Exp $". // -- cgit v1.2.3