This commit is contained in:
root committed 2026-07-19 21:40:21 +02:00
1 parent a29805cad2
commit 4b1c8c0de4
5 files changed
+148 -45

No files matched your search

+9
View File
@@ -16,6 +16,13 @@ typedef enum {
octal_permissions = 2
} permission_mode_t;
typedef enum {
sort_by_name = 0,
sort_by_extension = 1,
sort_by_time = 2,
sort_by_size = 3
} sorting_mode_t;
typedef struct {
bool show_all;
bool show_almost_all;
@@ -24,8 +31,10 @@ typedef struct {
bool group_directories;
bool human_readable;
bool long_view;
bool reverse_order;
bool tree_view;
permission_mode_t permission_mode;
sorting_mode_t sorting_mode;
char* path;
} arguments_t;
+6 -5
View File
@@ -1,13 +1,14 @@
#ifndef __SORTING_H
#define __SORTING_H
#include <stdbool.h>
#include "type_definitions.h"
#include "arguments.h"
int compare_entries( const void* operand_a, const void* operand_b );
int compare_entries_casesensitive(
const void* operand_a,
const void* operand_b
int sort_entries(
arguments_t* args,
directory_entry_t** const entry_table,
int num_entries
);
int group_directories( directory_entry_t** entry_table, int num_entries );
#endif