aboutsummaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2019-12-08 17:26:52 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2020-04-28 07:32:44 -0400
commitdc161b3b67c6290b52d0ec33e690ada53faada43 (patch)
treed5aa3bc4579a2bd9926408484098a833c4d704a0 /src/calcurse.h
parenteda28d3fef5a2a841fa41c620fc976ce11d824b1 (diff)
downloadcalcurse-dc161b3b67c6290b52d0ec33e690ada53faada43.tar.gz
calcurse-dc161b3b67c6290b52d0ec33e690ada53faada43.zip
User interface for recurrence rules
The function update_rept() is extended with editing of the three recurrence rule lists for BYMONTH, BYMONTHDAY and BYDAY. The integers of the bymonth and bymonthday lists are edited directly as integers, while those of the bywday list are mapped to localized weekday names (as they appear in the calendar panel) with an optional integer prefix (in RFC5545 style: 1MO, -2SA). The RFC5545 (icalendar) requirement that the start day must be the first occurrence and must match the recurrence rule, is met by testing that an occurrence indeed appears on the start day, in these circumstances: - when a recurrent item is loaded from file - when the recurrence rule of an item is edited interactively - when a recurrent appointment gets a new start time - when a recurrent appointment is moved Copy and paste of a recurrent item will only retain the basic recurrence properties of type, frequency, until and exception days. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r--src/calcurse.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h
index 6b3905b..dab1543 100644
--- a/src/calcurse.h
+++ b/src/calcurse.h
@@ -407,6 +407,16 @@ struct rpt {
llist_t exc; /* EXDATE's */
};
+/* Types of integers in rrule lists. */
+typedef enum {
+ BYMONTH,
+ BYDAY_W,
+ BYDAY_M,
+ BYDAY_Y,
+ BYMONTHDAY,
+ NOLL
+} int_list_t;
+
/* Recurrent appointment definition. */
struct recur_apoint {
struct rpt *rpt; /* recurrence rule */
@@ -1042,6 +1052,8 @@ void pcal_export_data(FILE *);
/* recur.c */
extern llist_ts_t recur_alist_p;
extern llist_t recur_elist;
+void recur_free_int_list(llist_t *);
+void recur_int_list_dup(llist_t *, llist_t *);
void recur_free_exc_list(llist_t *);
void recur_exc_dup(llist_t *, llist_t *);
int recur_str2exc(llist_t *, char *);