aboutsummaryrefslogtreecommitdiffstats
path: root/src/recur.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-06-10 21:48:16 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2019-06-16 15:03:02 -0400
commitcc86516f64fefc565c5b2477b4696085a297e5a0 (patch)
tree598dcf21dac39daf111edb643c39d9606c5d512d /src/recur.c
parentf37473717108863ffc9ade89c478e119977088f4 (diff)
downloadcalcurse-cc86516f64fefc565c5b2477b4696085a297e5a0.tar.gz
calcurse-cc86516f64fefc565c5b2477b4696085a297e5a0.zip
Treat recurrence item parameters as a unit
An edit session, and in particular, a cancelled edit session should encompass all parameters. Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/recur.c')
-rw-r--r--src/recur.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/recur.c b/src/recur.c
index 46f669d..fc1d538 100644
--- a/src/recur.c
+++ b/src/recur.c
@@ -106,8 +106,9 @@ char *recur_exc2str(llist_t *exc)
* Update the list of exceptions from a string of days. Any positive number of
* spaces are allowed before, between and after the days.
*/
-void recur_update_exc(llist_t *exc, char *days)
+int recur_update_exc(llist_t *exc, char *days)
{
+ int updated = 0;
char *d;
time_t t = get_today();
llist_t nexc;
@@ -131,8 +132,10 @@ void recur_update_exc(llist_t *exc, char *days)
}
free_exc_list(exc);
exc_dup(exc, &nexc);
+ updated = 1;
cleanup:
free_exc_list(&nexc);
+ return updated;
}
struct recur_event *recur_event_dup(struct recur_event *in)