aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-05-22 09:04:36 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2020-04-28 07:32:44 -0400
commit3f7bd331c875dd889c4d69537b5408396b0e8f16 (patch)
tree898508766f51d497eafa57440d15b0d8e12e7a89 /src/notify.c
parente9deb6fff3d56b166ab702828bd1a716c2bf567f (diff)
downloadcalcurse-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/notify.c')
-rw-r--r--src/notify.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/notify.c b/src/notify.c
index 3d19511..a24beb2 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -505,8 +505,7 @@ void notify_check_repeated(struct recur_apoint *i)
current_time = time(NULL);
pthread_mutex_lock(&notify_app.mutex);
if (recur_item_find_occurrence
- (i->start, i->dur, &i->exc, i->rpt->type, i->rpt->freq,
- i->rpt->until, get_today(), &real_app_time)) {
+ (i->start, i->dur, i->rpt, &i->exc, get_today(), &real_app_time)) {
if (!notify_app.got_app) {
if (real_app_time - current_time <= DAYINSEC)
update_notify = 1;
@@ -547,12 +546,10 @@ int notify_same_recur_item(struct recur_apoint *i)
time_t item_start;
/* Tomorrow? */
- recur_item_find_occurrence(i->start, i->dur, &i->exc, i->rpt->type,
- i->rpt->freq, i->rpt->until,
+ recur_item_find_occurrence(i->start, i->dur, i->rpt, &i->exc,
NEXTDAY(get_today()), &item_start);
/* Today? */
- recur_item_find_occurrence(i->start, i->dur, &i->exc, i->rpt->type,
- i->rpt->freq, i->rpt->until,
+ recur_item_find_occurrence(i->start, i->dur, i->rpt, &i->exc,
get_today(), &item_start);
pthread_mutex_lock(&notify_app.mutex);
if (notify_app.got_app && item_start == notify_app.time)