Use an enum for the type field of day_item

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-05-18 11:24:04 +02:00
parent 4cd2fd36d5
commit 7e76d617ab

View File

@ -372,11 +372,21 @@ union aptev_ptr {
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...). */
struct day_item {
int type; /* (recursive or normal) event or appointment */
long start; /* start time of the repetition occurrence */
union aptev_ptr item; /* pointer to the actual item */
enum day_item_type type;
long start;
union aptev_ptr item;
};
/* Available view for the calendar panel. */
@ -553,16 +563,6 @@ struct nbar {
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. */
enum getstr {
GETSTRING_VALID,