From efd782699b63038a36bf68eaa1230d2d10bd9b38 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 12 Apr 2008 21:14:03 +0000 Subject: Yet another style for source code. GNU style now used (I am fed up with tabs...) --- src/recur.h | 128 ++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 69 insertions(+), 59 deletions(-) (limited to 'src/recur.h') diff --git a/src/recur.h b/src/recur.h index 0027652..dd81724 100755 --- a/src/recur.h +++ b/src/recur.h @@ -1,4 +1,4 @@ -/* $calcurse: recur.h,v 1.18 2008/04/09 20:38:29 culot Exp $ */ +/* $calcurse: recur.h,v 1.19 2008/04/12 21:14:03 culot Exp $ */ /* * Calcurse - text-based organizer @@ -27,75 +27,85 @@ #ifndef CALCURSE_RECUR_H #define CALCURSE_RECUR_H -typedef enum { RECUR_NO, - RECUR_DAILY, - RECUR_WEEKLY, - RECUR_MONTHLY, - RECUR_YEARLY, - RECUR_TYPES -} recur_types_t; +typedef enum +{ RECUR_NO, + RECUR_DAILY, + RECUR_WEEKLY, + RECUR_MONTHLY, + RECUR_YEARLY, + RECUR_TYPES +} +recur_types_t; -struct days_s { - struct days_s *next; - long st; /* beggining of the considered day, in seconds */ +struct days_s +{ + struct days_s *next; + long st; /* beggining of the considered day, in seconds */ }; -struct rpt_s { - int type; /* repetition type, see RECUR_* defines */ - int freq; /* repetition frequence */ - long until; /* ending date for repeated event */ +struct rpt_s +{ + int type; /* repetition type, see RECUR_* defines */ + int freq; /* repetition frequence */ + long until; /* ending date for repeated event */ }; -typedef struct recur_apoint_llist_node { - struct recur_apoint_llist_node *next; - struct rpt_s *rpt; /* information about repetition */ - struct days_s *exc; /* days when the item should not be repeated */ - long start; /* beggining of the appointment */ - long dur; /* duration of the appointment */ - char state; /* 8 bits to store item state */ - char *mesg; /* appointment description */ - char *note; /* note attached to appointment */ -} recur_apoint_llist_node_t; +typedef struct recur_apoint_llist_node +{ + struct recur_apoint_llist_node *next; + struct rpt_s *rpt; /* information about repetition */ + struct days_s *exc; /* days when the item should not be repeated */ + long start; /* beggining of the appointment */ + long dur; /* duration of the appointment */ + char state; /* 8 bits to store item state */ + char *mesg; /* appointment description */ + char *note; /* note attached to appointment */ +} +recur_apoint_llist_node_t; -typedef struct recur_apoint_llist { - recur_apoint_llist_node_t *root; - pthread_mutex_t mutex; -} recur_apoint_llist_t; +typedef struct recur_apoint_llist +{ + recur_apoint_llist_node_t *root; + pthread_mutex_t mutex; +} +recur_apoint_llist_t; -struct recur_event_s { - struct recur_event_s *next; - struct rpt_s *rpt; /* information about repetition */ - struct days_s *exc; /* days when the item should not be repeated */ - int id; /* event type */ - long day; /* day at which event occurs */ - char *mesg; /* event description */ - char *note; /* note attached to event */ +struct recur_event_s +{ + struct recur_event_s *next; + struct rpt_s *rpt; /* information about repetition */ + struct days_s *exc; /* days when the item should not be repeated */ + int id; /* event type */ + long day; /* day at which event occurs */ + char *mesg; /* event description */ + char *note; /* note attached to event */ }; extern recur_apoint_llist_t *recur_alist_p; extern struct recur_event_s *recur_elist; -int recur_apoint_llist_init(void); -char recur_def2char(recur_types_t); -int recur_char2def(char); -recur_apoint_llist_node_t *recur_apoint_scan(FILE *, struct tm, struct tm, - char, int, struct tm, char *, - struct days_s *, char); -struct recur_event_s *recur_event_scan(FILE *, struct tm, int, char, - int, struct tm, char *, struct days_s *); -void recur_save_data(FILE *); -unsigned recur_item_inday(long, struct days_s *, int, - int, long, long); -void recur_event_erase(long, unsigned, unsigned, - erase_flag_e); -void recur_apoint_erase(long, unsigned, unsigned, - erase_flag_e); -void recur_repeat_item(conf_t *); -struct days_s *recur_exc_scan(FILE *); -struct notify_app_s *recur_apoint_check_next(struct notify_app_s *, - long, long); -recur_apoint_llist_node_t *recur_get_apoint(long, int); -struct recur_event_s *recur_get_event(long, int); -void recur_apoint_switch_notify(long, int); +int recur_apoint_llist_init (void); +char recur_def2char (recur_types_t); +int recur_char2def (char); +recur_apoint_llist_node_t *recur_apoint_scan (FILE *, struct tm, struct tm, + char, int, struct tm, char *, + struct days_s *, char); +struct recur_event_s *recur_event_scan (FILE *, struct tm, int, char, + int, struct tm, char *, + struct days_s *); +void recur_save_data (FILE *); +unsigned recur_item_inday (long, struct days_s *, int, int, + long, long); +void recur_event_erase (long, unsigned, unsigned, + erase_flag_e); +void recur_apoint_erase (long, unsigned, unsigned, + erase_flag_e); +void recur_repeat_item (conf_t *); +struct days_s *recur_exc_scan (FILE *); +struct notify_app_s *recur_apoint_check_next (struct notify_app_s *, + long, long); +recur_apoint_llist_node_t *recur_get_apoint (long, int); +struct recur_event_s *recur_get_event (long, int); +void recur_apoint_switch_notify (long, int); #endif /* CALCURSE_RECUR_H */ -- cgit v1.2.3-54-g00ecf