aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:24:04 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2014-05-18 11:24:04 +0200
commit7e76d617ab02a11ede98ebbf76f33b90662e55e5 (patch)
tree7ba137a66472168d9ff6daf063dbc7c31cdc5571 /src
parent4cd2fd36d5c8c92fd9c84af52c5cb2bd7ef0e4d6 (diff)
downloadcalcurse-7e76d617ab02a11ede98ebbf76f33b90662e55e5.tar.gz
calcurse-7e76d617ab02a11ede98ebbf76f33b90662e55e5.zip
Use an enum for the type field of day_item
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/calcurse.h26
1 files changed, 13 insertions, 13 deletions
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,