diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2019-05-22 09:04:36 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2020-04-28 07:32:44 -0400 |
commit | 3f7bd331c875dd889c4d69537b5408396b0e8f16 (patch) | |
tree | 898508766f51d497eafa57440d15b0d8e12e7a89 /src/pcal.c | |
parent | e9deb6fff3d56b166ab702828bd1a716c2bf567f (diff) | |
download | calcurse-3f7bd331c875dd889c4d69537b5408396b0e8f16.tar.gz calcurse-3f7bd331c875dd889c4d69537b5408396b0e8f16.zip |
Use "struct rpt" to shorten argument lists
Also, prepare for extension of the structure, shorten names and
rearrange comments.
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/pcal.c')
-rw-r--r-- | src/pcal.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -56,24 +56,22 @@ typedef void (*cb_dump_t) (FILE *, long, long, char *); */ static void foreach_date_dump(const long date_end, struct rpt *rpt, llist_t * exc, - long item_first_date, long item_dur, char *item_mesg, + long item_start, long item_dur, char *item_mesg, cb_dump_t cb_dump, FILE * stream) { long date, item_time; struct tm lt; time_t t; - t = item_first_date; + t = item_start; localtime_r(&t, <); lt.tm_hour = lt.tm_min = lt.tm_sec = 0; lt.tm_isdst = -1; date = mktime(<); - item_time = item_first_date - date; + item_time = item_start - date; while (date <= date_end && date <= rpt->until) { - if (recur_item_inday - (item_first_date, item_dur, exc, rpt->type, rpt->freq, - rpt->until, date)) { + if (recur_item_inday(item_start, item_dur, rpt, exc, date)) { (*cb_dump) (stream, date + item_time, item_dur, item_mesg); } |