added alhphasort
This commit is contained in:
@ -40,3 +40,9 @@ int sort_natural(const void *file0, const void *file1){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int sort_alpha(const void *file0, const void *file1){
|
||||
char *file_name0 = ((file*)file0)->file_name;
|
||||
char *file_name1 = ((file*)file1)->file_name;
|
||||
return strcmp(file_name0, file_name1);
|
||||
}
|
||||
|
@ -1,8 +1,13 @@
|
||||
#include <curses.h>
|
||||
#include <dirent.h>
|
||||
#include "defines.h"
|
||||
#ifndef SORTING_GUARD
|
||||
#define SORTING_GUARD
|
||||
#include "sorting.c"
|
||||
#endif
|
||||
|
||||
void sort_dir(unsigned long *dir_length_width, char *dir_content);
|
||||
int skip_hidden_files(const struct dirent *entry);
|
||||
void sort_dir(unsigned long *dir_length_width, char *dir_content);
|
||||
int sort_natural(const void *file0, const void *file1);
|
||||
int sort_alpha(const void *file0, const void *file1);
|
||||
|
||||
|
Reference in New Issue
Block a user