summaryrefslogtreecommitdiff
path: root/src/ui-day.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2015-02-24 13:57:44 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2015-02-24 13:57:47 +0100
commit0145ba12ecb20583adda4e4b03dd5b7cfb15d1f4 (patch)
treea5bb2e6ff27635b7274f97f04b8a7c616a2ebf3b /src/ui-day.c
parent892d6edccd8d94b24cf4740638fa07c9762650fc (diff)
downloadcalcurse-0145ba12ecb20583adda4e4b03dd5b7cfb15d1f4.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/ui-day.c')
-rw-r--r--src/ui-day.c11
1 files changed, 5 insertions, 6 deletions
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;