Use an enum for the type field of day_item
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
4cd2fd36d5
commit
7e76d617ab
@ -372,11 +372,21 @@ union aptev_ptr {
|
|||||||
struct recur_event *rev;
|
struct recur_event *rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Available types of items. */
|
||||||
|
enum day_item_type {
|
||||||
|
DAY_HEADING = 1,
|
||||||
|
RECUR_EVNT,
|
||||||
|
EVNT,
|
||||||
|
DAY_SEPARATOR,
|
||||||
|
RECUR_APPT,
|
||||||
|
APPT
|
||||||
|
};
|
||||||
|
|
||||||
/* Generic item description (to hold appointments, events...). */
|
/* Generic item description (to hold appointments, events...). */
|
||||||
struct day_item {
|
struct day_item {
|
||||||
int type; /* (recursive or normal) event or appointment */
|
enum day_item_type type;
|
||||||
long start; /* start time of the repetition occurrence */
|
long start;
|
||||||
union aptev_ptr item; /* pointer to the actual item */
|
union aptev_ptr item;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Available view for the calendar panel. */
|
/* Available view for the calendar panel. */
|
||||||
@ -553,16 +563,6 @@ struct nbar {
|
|||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Available types of items. */
|
|
||||||
enum day_item_type {
|
|
||||||
DAY_HEADING = 1,
|
|
||||||
RECUR_EVNT,
|
|
||||||
EVNT,
|
|
||||||
DAY_SEPARATOR,
|
|
||||||
RECUR_APPT,
|
|
||||||
APPT
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Return codes for the getstring() function. */
|
/* Return codes for the getstring() function. */
|
||||||
enum getstr {
|
enum getstr {
|
||||||
GETSTRING_VALID,
|
GETSTRING_VALID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user