From 3b0ea80811a1c939e0b1b97e0f8e34dabd54717f Mon Sep 17 00:00:00 2001 From: El-BG-1970 Date: Wed, 16 Mar 2022 19:52:55 +0100 Subject: better compartimentalization --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4a953a1..73127d5 100644 --- a/main.c +++ b/main.c @@ -79,7 +79,7 @@ int main(int argc, char **argv) { char *e; Date td = today(); Date tm = tomorrow(td); - Date nw = nextweek(td); + Date end = nextmonth(td); Date last_date = (struct Date){ -1, -1, -1 }; for (int i = 0; i < idx; i++) { if (!eql(agenda[i].date, last_date)) { @@ -92,7 +92,7 @@ int main(int argc, char **argv) { printf("\n%s [TODAY]:\n", e); else if (eql(last_date, tm)) printf("\n%s [TOMORROW]:\n", e); - else if (smaller(last_date, nw)) + else if (smaller(last_date, end)) printf("\n%s:\n", e); free(e); } else { @@ -100,7 +100,7 @@ int main(int argc, char **argv) { } } e = format_entry(agenda[i]); - if (zero(agenda[i].date) || smaller(agenda[i].date, nw)) puts(e); + if (zero(agenda[i].date) || smaller(agenda[i].date, end)) puts(e); free(e); } -- cgit v1.2.3