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_win32.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/scandir_win32.c') diff --git a/src/scandir_win32.c b/src/scandir_win32.c index acfe24b35..33598f8d6 100644 --- a/src/scandir_win32.c +++ b/src/scandir_win32.c @@ -1,5 +1,5 @@ /* - * "$Id: scandir_win32.c,v 1.11.2.4.2.3 2002/04/29 19:40:51 easysw Exp $" + * "$Id: scandir_win32.c,v 1.11.2.4.2.4 2002/05/02 11:11:01 easysw Exp $" * * WIN32 scandir function for the Fast Light Tool Kit (FLTK). * @@ -32,9 +32,9 @@ struct dirent { char d_name[1]; }; -int scandir(const char *dirname, struct dirent ***namelist, - int (*select)(struct dirent *), - int (*compar)(struct dirent **, struct dirent **)) { +int fl_scandir(const char *dirname, struct dirent ***namelist, + int (*select)(struct dirent *), + int (*compar)(struct dirent **, struct dirent **)) { int len; char *findIn, *d; WIN32_FIND_DATA find; @@ -101,12 +101,8 @@ int scandir(const char *dirname, struct dirent ***namelist, return nDir; } -int alphasort (struct dirent **a, struct dirent **b) { - return strcmp ((*a)->d_name, (*b)->d_name); -} - #endif /* - * End of "$Id: scandir_win32.c,v 1.11.2.4.2.3 2002/04/29 19:40:51 easysw Exp $". + * End of "$Id: scandir_win32.c,v 1.11.2.4.2.4 2002/05/02 11:11:01 easysw Exp $". */ -- cgit v1.2.3