From 0145ba12ecb20583adda4e4b03dd5b7cfb15d1f4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 24 Feb 2015 13:57:44 +0100 Subject: Use time_t instead of long in several places Start converting some variables and return values to store times from long to time_t. Signed-off-by: Lukas Fleischer --- src/ui-day.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/ui-day.c') diff --git a/src/ui-day.c b/src/ui-day.c index c71feb7..c777704 100644 --- a/src/ui-day.c +++ b/src/ui-day.c @@ -155,7 +155,7 @@ static void update_desc(char **desc) static void update_rept(struct rpt **rpt, const long start) { int newtype, newfreq; - long newuntil; + time_t newuntil; char *freqstr = NULL, *timstr, *outstr; const char *msg_rpt_prefix = _("Enter the new repetition type:"); const char *msg_rpt_daily = _("(d)aily"); @@ -480,7 +480,7 @@ void ui_day_item_add(void) const char *enter_str = _("Press [Enter] to continue"); char item_time[LDUR] = ""; char item_mesg[BUFSIZ] = ""; - long apoint_start; + time_t apoint_start; unsigned heures, minutes; unsigned apoint_duration; unsigned end_h, end_m; @@ -680,7 +680,7 @@ void ui_day_item_repeat(void) int item_nb; struct day_item *p; struct recur_apoint *ra; - long until, date; + time_t until, date; if (day_item_count(0) <= 0) goto cleanup; @@ -744,8 +744,7 @@ void ui_day_item_repeat(void) until_date.dd = day; until_date.mm = month; until_date.yyyy = year; - until = - date2sec(until_date, lt.tm_hour, lt.tm_min); + until = date2sec(until_date, lt.tm_hour, lt.tm_min); if (until >= p->start) break; status_mesg(mesg_older, wrong_type_2); @@ -859,7 +858,7 @@ void ui_day_sel_move(int delta) void ui_day_draw(int n, WINDOW *win, int y, int hilt, void *cb_data) { struct date slctd_date = *ui_calendar_get_slctd_day(); - long date = date2sec(slctd_date, 0, 0); + time_t date = date2sec(slctd_date, 0, 0); struct day_item *item = day_get_item(n); int width = lb_apt.sw.w; -- cgit v1.2.3