summaryrefslogtreecommitdiff
path: root/src/scandir.c
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 /src/scandir.c
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 'src/scandir.c')
-rw-r--r--src/scandir.c10
1 files changed, 3 insertions, 7 deletions
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