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>
This commit is contained in:
committed by
Lukas Fleischer
parent
e9deb6fff3
commit
3f7bd331c8
@@ -505,8 +505,7 @@ void notify_check_repeated(struct recur_apoint *i)
|
||||
current_time = time(NULL);
|
||||
pthread_mutex_lock(¬ify_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(¬ify_app.mutex);
|
||||
if (notify_app.got_app && item_start == notify_app.time)
|
||||
|
||||
Reference in New Issue
Block a user