From 7e76d617ab02a11ede98ebbf76f33b90662e55e5 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 18 May 2014 11:24:04 +0200 Subject: Use an enum for the type field of day_item Signed-off-by: Lukas Fleischer --- src/calcurse.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/calcurse.h b/src/calcurse.h index adcd506..b33bbf5 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -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, -- cgit v1.2.3-70-g09d2