Refactor edit of exception days

The patch contains no functional changes, but is a necessary
precondition for extensions of update_rept() (in ui-day.c) with further
recurrence rules.

The reason is that recurrence parameters must be treated as a whole: if
an edit session is cancelled at any point, no value should change, and
all parameters should remain as they were. Hence, the new values must
only be set after all of them have been determined. This was not the
case for the list of exception days, but as long as it was treated last,
it did not matter.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lars Henriksen
2019-10-22 07:30:04 +02:00
committed by Lukas Fleischer
parent bf3dba2ae2
commit 23eb51456a
3 changed files with 34 additions and 24 deletions

View File

@@ -1033,7 +1033,9 @@ void pcal_export_data(FILE *);
/* recur.c */
extern llist_ts_t recur_alist_p;
extern llist_t recur_elist;
int recur_update_exc(llist_t *, char *);
void recur_free_exc_list(llist_t *);
void recur_exc_dup(llist_t *, llist_t *);
int recur_str2exc(llist_t *, char *);
char *recur_exc2str(llist_t *);
struct recur_event *recur_event_dup(struct recur_event *);
struct recur_apoint *recur_apoint_dup(struct recur_apoint *);