From 0d5141bbdd20f02c796365453581a4849debeca5 Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Tue, 8 Jul 2025 23:40:24 +0200 Subject: Minor non-functional changes --- README.md | 10 +++++++--- src/data_management.c | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0741634..f800ed5 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,15 @@ accepted. Currently at max 80 bytes of the format string are processed. | `M` | modification time | | `n` | file name | | `p` | permissions | -| `s` | size | -| `T` | type | -| `t` | time defined by `--time-field` | +| `s` | size in bytes or kB (base 1024) | +| `T` | type (file, directory, link etc.) | +| `t` | time as defined by `--time-field` | | `U` | user name | | `u` | user id | +The time stamps in `t`, `A`, `C`, `M` are by default only the daily time, +`--long-timestamp` / `-t` needs to be set to activate the full timestamp +including date and timezone. TODO ==== @@ -52,3 +55,4 @@ TODO - option with lowest priority: nice formatting, do the whole formatting in memory and based on the length information gathered put it into a visual table. +- configuration file in ${HOME}/.config/ ? diff --git a/src/data_management.c b/src/data_management.c index eec36ce..e27b9cd 100644 --- a/src/data_management.c +++ b/src/data_management.c @@ -102,6 +102,7 @@ inline int insert_sorted_by_size(struct list_head *list, struct list_node *node) return -3; } + inline int insert_sorted_by_time(struct list_head *list, struct list_node *node) { if (list == NULL) { LOGERR("ERROR: No list given.\n"); return -1; } if (node == NULL) { LOGERR("ERROR: No node given.\n"); return -2; } @@ -192,6 +193,7 @@ inline struct list_head *create_list_sort_reversed(struct list_head *list) { return lh; } + /* This function contains the only time critical code. The loop over * the directory content. */ @@ -255,7 +257,7 @@ struct list_head *get_data_from_directory(char *path) { free(fullpath); closedir(dir); - DBGTRC("Finished reading data from directory\n"); + DBGTRC("DEBUG: Finished reading data from directory\n"); while (lnstack != NULL) { tmp = lnstack; -- cgit v1.2.3-70-g09d2