Break sorting out into a common file so formats and modes use the same

code. Also add -O for sorting to the list commands. From Dane Jensen in
GitHub issue 4813.
This commit is contained in:
nicm
2026-02-02 10:08:30 +00:00
parent 66011fe48b
commit 3c3d9ce3a9
19 changed files with 946 additions and 674 deletions

13
paste.c
View File

@@ -30,19 +30,6 @@
* string!
*/
struct paste_buffer {
char *data;
size_t size;
char *name;
time_t created;
int automatic;
u_int order;
RB_ENTRY(paste_buffer) name_entry;
RB_ENTRY(paste_buffer) time_entry;
};
static u_int paste_next_index;
static u_int paste_next_order;
static u_int paste_num_automatic;