From af6d31ff83bfe1eb6f4d37c5623e35f149e9aee5 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 3 Dec 2022 07:27:26 +0100 Subject: New function timeline_simple_list(). --- data.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'data.c') diff --git a/data.c b/data.c index a2242e8..12ba447 100644 --- a/data.c +++ b/data.c @@ -839,8 +839,8 @@ d_char *timeline_top_level(d_char *list) } -d_char *timeline_list(snac *snac, const char *idx_name, int max) -/* returns a timeline */ +d_char *timeline_simple_list(snac *snac, const char *idx_name, int max) +/* returns a timeline (with all entries) */ { int c_max; @@ -851,8 +851,16 @@ d_char *timeline_list(snac *snac, const char *idx_name, int max) if (max > c_max) max = c_max; - xs *idx = xs_fmt("%s/%s.idx", snac->basedir, idx_name); - xs *list = index_list_desc(idx, max); + xs *idx = xs_fmt("%s/%s.idx", snac->basedir, idx_name); + + return index_list_desc(idx, max); +} + + +d_char *timeline_list(snac *snac, const char *idx_name, int max) +/* returns a timeline (only top level entries) */ +{ + xs *list = timeline_simple_list(snac, idx_name, max); return timeline_top_level(list); } -- cgit v1.2.3