summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-12-03 07:27:26 +0100
committerdefault <nobody@localhost>2022-12-03 07:27:26 +0100
commitaf6d31ff83bfe1eb6f4d37c5623e35f149e9aee5 (patch)
treeccce0075e128768e49832e7f14c80cf4de37a8cc /data.c
parent2614a8b3cbf55ab2a38ae2c81fe0081579495190 (diff)
New function timeline_simple_list().
Diffstat (limited to 'data.c')
-rw-r--r--data.c16
1 files changed, 12 insertions, 4 deletions
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);
}