aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThorsten Töpper <atsutane@freethoughts.de>2025-06-20 01:45:13 +0200
committerThorsten Töpper <atsutane@freethoughts.de>2025-06-20 01:45:13 +0200
commit49997ac30b46c42a0366423cb2048f8257774805 (patch)
tree6ff70c9eecf1276a64360840d697516400e3dcb1 /include
parent522ff099416b66868ef5782b6548d28917369b47 (diff)
downloaddir_monitor-49997ac30b46c42a0366423cb2048f8257774805.tar.gz
dir_monitor-49997ac30b46c42a0366423cb2048f8257774805.tar.bz2
Store everything from lstat()
Diffstat (limited to 'include')
-rw-r--r--include/list_management.h12
-rw-r--r--include/options.h1
2 files changed, 4 insertions, 9 deletions
diff --git a/include/list_management.h b/include/list_management.h
index a62fe45..9753c13 100644
--- a/include/list_management.h
+++ b/include/list_management.h
@@ -8,27 +8,21 @@
#ifndef LIST_MANAGEMENT_H
#define LIST_MANAGEMENT_H
-#include <time.h>
+#include <sys/stat.h>
/* === DEFINITIONS === */
-/* off_t is defined in different headers, on Linux with glibc,
- * stdio.h, unistd.h and types.h
- * output.h requires this struct definition therefore off_t
- * becomes implicitly defined through stdio.h as every source
- * file includes output.h */
struct list_node {
struct list_node *next;
- off_t fsize;
char fname[256];
- time_t ftime; /* can be creation, access or modification */
+ struct stat ln_stat;
};
struct list_head {
struct list_node *first;
};
-struct list_node *create_node(char *fname, long int fsize, time_t ftime);
+struct list_node *create_node(char *fname, struct stat *ln_stat);
struct list_head *create_list_sort_reversed(struct list_head *list);
void destroy_list(struct list_head *list);
int insert_sorted_by_size(struct list_head *list, struct list_node *node);
diff --git a/include/options.h b/include/options.h
index 7f26f4d..4fb3c82 100644
--- a/include/options.h
+++ b/include/options.h
@@ -30,6 +30,7 @@ extern bool option_sort_reverse_order;
extern enum esort_type option_sort_type;
extern bool option_show_hidden_entries;
extern bool option_timestamp_long;
+extern char option_time_field;
int parse_arguments(int argc, char **argv);