added blackmagic (funcptr/string modifiers on actions)

This commit is contained in:
nova
2025-07-06 07:03:45 +02:00
parent 88beeffafe
commit 322a1495c0
5 changed files with 64 additions and 39 deletions

View File

@ -14,6 +14,8 @@ extern unsigned int file_modifiers;
extern unsigned int color_count;
extern color *colors;
unsigned long file_offset;
int (*order_func)() = sort_natural;
char* concat(const char *s1, const char *s2){
const size_t len1 = strlen(s1);
@ -128,7 +130,8 @@ void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_conten
free(file);
}
}
qsort(dir_content, *dir_file_count, sizeof(file), sort_natural);
qsort(dir_content, *dir_file_count, sizeof(file), order_func);
for (i = 0; i < *dir_file_count; i++) {
free(entry[i]);