version 1.22 | | version 1.23 |
---|
| | |
/* | | /* |
* static char *rcsid_style_c = | | * static char *rcsid_style_c = |
* "$Id: style.c,v 1.22 2005/08/12 13:46:34 ryo_saeba Exp $"; | | * "$Id: style.c,v 1.23 2005/10/29 22:03:43 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
#endif /* win32 */ | | #endif /* win32 */ |
| | |
| | |
| | static int pointer_strcmp(const void *p1, const void *p2) |
| | { |
| | const char *s1 = *(const char **)p1; |
| | const char *s2 = *(const char **)p2; |
| | |
| | return(strcmp(s1, s2)); |
| | } |
| | |
/* This is our own version of scandir/select_regular_files/sort. | | /* This is our own version of scandir/select_regular_files/sort. |
* To support having subdirectories in styles, we need to know | | * To support having subdirectories in styles, we need to know |
* if in fact the directory we read is a subdirectory. However, | | * if in fact the directory we read is a subdirectory. However, |
| | |
} | | } |
(void) closedir (dp); | | (void) closedir (dp); |
| | |
qsort(rn, entries, sizeof(char*), (int(*)(const void*, const void*))strcmp); | | qsort(rn, entries, sizeof(char*), pointer_strcmp); |
| | |
*namelist = rn; | | *namelist = rn; |
return entries; | | return entries; |