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 --- src/scandir.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/scandir.c') diff --git a/src/scandir.c b/src/scandir.c index 5eabafa41..1e52da9d2 100644 --- a/src/scandir.c +++ b/src/scandir.c @@ -49,9 +49,9 @@ USA. */ #endif int -scandir (const char *dir, struct dirent ***namelist, - int (*select)(struct dirent *), - int (*compar)(struct dirent **, struct dirent **)) +fl_scandir(const char *dir, struct dirent ***namelist, + int (*select)(struct dirent *), + int (*compar)(struct dirent **, struct dirent **)) { DIR *dp = opendir (dir); struct dirent **v = NULL; @@ -120,9 +120,5 @@ scandir (const char *dir, struct dirent ***namelist, return i; } -int alphasort (struct dirent **a, struct dirent **b) { - return strcmp ((*a)->d_name, (*b)->d_name); -} - #endif #endif -- cgit v1.2.3