summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authorGravatar default2022-12-03 07:27:26 +0100
committerGravatar default2022-12-03 07:27:26 +0100
commitaf6d31ff83bfe1eb6f4d37c5623e35f149e9aee5 (patch)
treeccce0075e128768e49832e7f14c80cf4de37a8cc /data.c
parentShow stray parents in the origin. (diff)
downloadsnac2-af6d31ff83bfe1eb6f4d37c5623e35f149e9aee5.tar.gz
snac2-af6d31ff83bfe1eb6f4d37c5623e35f149e9aee5.tar.xz
snac2-af6d31ff83bfe1eb6f4d37c5623e35f149e9aee5.zip
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)
839} 839}
840 840
841 841
842d_char *timeline_list(snac *snac, const char *idx_name, int max) 842d_char *timeline_simple_list(snac *snac, const char *idx_name, int max)
843/* returns a timeline */ 843/* returns a timeline (with all entries) */
844{ 844{
845 int c_max; 845 int c_max;
846 846
@@ -851,8 +851,16 @@ d_char *timeline_list(snac *snac, const char *idx_name, int max)
851 if (max > c_max) 851 if (max > c_max)
852 max = c_max; 852 max = c_max;
853 853
854 xs *idx = xs_fmt("%s/%s.idx", snac->basedir, idx_name); 854 xs *idx = xs_fmt("%s/%s.idx", snac->basedir, idx_name);
855 xs *list = index_list_desc(idx, max); 855
856 return index_list_desc(idx, max);
857}
858
859
860d_char *timeline_list(snac *snac, const char *idx_name, int max)
861/* returns a timeline (only top level entries) */
862{
863 xs *list = timeline_simple_list(snac, idx_name, max);
856 864
857 return timeline_top_level(list); 865 return timeline_top_level(list);
858} 866}