path: root/src/ui-day.c
diff options
authorLukas Fleischer <lfleischer@calcurse.org>2019-01-14 06:01:21 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2019-01-14 06:21:34 +0100
commit03340db72e8c92f84d4a2425a1a5b74ce76f2df4 (patch)
tree201cba607fe49ecad3c641d25a5bb93de8f775a9 /src/ui-day.c
parent51f17fb9c6f80a0caa878d38e7a9ee5715722686 (diff)
Use time_t for system time values
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/ui-day.c')
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui-day.c b/src/ui-day.c
index 979ecc0..9d76775 100644
--- a/src/ui-day.c
+++ b/src/ui-day.c
@@ -66,7 +66,7 @@ void ui_day_set_selitem(struct day_item *day)
* for validation of the new end time.
* If move = 0, the new end time is calculated by the caller.
-static int day_edit_time(int start, int duration, int move)
+static time_t day_edit_time(time_t start, long duration, int move)
const char *msg_time = _("Enter start date [%s] and/or time ([hh:mm] or [hhmm]):");
const char *enter_str = _("Press [Enter] to continue");
@@ -105,9 +105,9 @@ static int day_edit_time(int start, int duration, int move)
* when the new start time is known.
* If move = 1, duration is fixed, but passed on for validation of new end time.
-static void update_start_time(long *start, long *dur, int move)
+static void update_start_time(time_t *start, long *dur, int move)
- long newtime;
+ time_t newtime;
const char *msg_wrong_time =
_("Invalid time: start time must come before end time!");
const char *msg_enter = _("Press [Enter] to continue");
@@ -133,7 +133,7 @@ static void update_start_time(long *start, long *dur, int move)
/* Request the user to enter a new end time or duration. */
-static void update_duration(long *start, long *dur)
+static void update_duration(time_t *start, long *dur)
const char *msg_time =
_("Enter end date (and/or time) or duration ('?' for input formats):");
@@ -144,7 +144,7 @@ static void update_duration(long *start, long *dur)
const char *enter_str = _("Press [Enter] to continue");
const char *fmt_msg_1 = _("Invalid time or duration.");
const char *fmt_msg_2 = _("Invalid date: end time must come after start time.");
- long end;
+ time_t end;
unsigned newdur;
char *timestr, *outstr;