viscal

cairo/gtk vi-like timeblocking calendar
git clone git://jb55.com/viscal
Log | Files | Refs | README | LICENSE

commit 49cd98fb49aac77490e8c0d80fce9f369d2a2cca
parent 4cfc13a859422b5a35f7baf85af0828dfdc76397
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 19 Nov 2021 13:07:26 -0800

sort debugging

Diffstat:
Mviscal.c | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/viscal.c b/viscal.c @@ -439,6 +439,16 @@ static void edit_mode(struct cal *cal, int flags) } +static void print_flags(struct cal *cal) +{ + int i; + + printf("flags: "); + for (i = 0; i < cal->nevents; i++) { + printf("%d ", cal->events[i].flags); + } + printf("\n"); +} static void events_for_view(struct cal *cal, time_t start, time_t end) { @@ -468,9 +478,13 @@ static void events_for_view(struct cal *cal, time_t start, time_t end) } } + print_flags(cal); + printf("DEBUG sorting\n"); qsort(cal->events, cal->nevents, sizeof(struct event), sort_event); + print_flags(cal); + // useful for selecting a new event after insertion if (cal->select_after_sort) { for (i = 0; i < cal->nevents; i++) {