summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-02 11:11:01 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-02 11:11:01 +0000
commita237472c70abda43511b988a519f9672d37dc652 (patch)
tree0ecd052f262d37e47e2d300a0d53faed0f0b55eb /FL
parent540739e6d79a9a3fa77deef3c326993da9b3dc07 (diff)
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
Diffstat (limited to 'FL')
-rw-r--r--FL/filename.H17
1 files changed, 14 insertions, 3 deletions
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 $".
//