From f6ca4ed80a79408ab55b4a27b73eaa0f32a86410 Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Sat, 21 Jun 2025 16:42:49 +0200 Subject: Rename list_management to data_management --- include/data_management.h | 35 +++++++++++++++++++++++++++++++++++ include/list_management.h | 35 ----------------------------------- include/options.h | 2 +- include/output.h | 2 +- 4 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 include/data_management.h delete mode 100644 include/list_management.h (limited to 'include') diff --git a/include/data_management.h b/include/data_management.h new file mode 100644 index 0000000..e5d1581 --- /dev/null +++ b/include/data_management.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: Apache-2.0 */ + +/* Copyright 2025 Thorsten Töpper + * + * vim:ts=4:sw=4:expandtab + */ + +#ifndef LIST_MANAGEMENT_H +#define LIST_MANAGEMENT_H + +#include + +/* === DEFINITIONS === */ + +struct list_node { + struct list_node *next; + char fname[256]; + struct stat ln_stat; +}; + +struct list_head { + struct list_node *first; +}; + +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); + +struct list_head *get_data_from_directory(char *path); +int insert_sorted_by_size(struct list_head *list, struct list_node *node); +int insert_sorted_by_time(struct list_head *list, struct list_node *node); + + +#endif + diff --git a/include/list_management.h b/include/list_management.h deleted file mode 100644 index e5d1581..0000000 --- a/include/list_management.h +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 */ - -/* Copyright 2025 Thorsten Töpper - * - * vim:ts=4:sw=4:expandtab - */ - -#ifndef LIST_MANAGEMENT_H -#define LIST_MANAGEMENT_H - -#include - -/* === DEFINITIONS === */ - -struct list_node { - struct list_node *next; - char fname[256]; - struct stat ln_stat; -}; - -struct list_head { - struct list_node *first; -}; - -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); - -struct list_head *get_data_from_directory(char *path); -int insert_sorted_by_size(struct list_head *list, struct list_node *node); -int insert_sorted_by_time(struct list_head *list, struct list_node *node); - - -#endif - diff --git a/include/options.h b/include/options.h index 4fb3c82..cfc9246 100644 --- a/include/options.h +++ b/include/options.h @@ -11,7 +11,7 @@ #include #include "output.h" -#include "list_management.h" +#include "data_management.h" diff --git a/include/output.h b/include/output.h index beb9559..35640fe 100644 --- a/include/output.h +++ b/include/output.h @@ -8,7 +8,7 @@ #define OUTPUT_H #include -#include "list_management.h" +#include "data_management.h" #define LOGERR(...) {fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__);} -- cgit v1.2.3-70-g09d2