aboutsummaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
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/apoint.c
parent51f17fb9c6f80a0caa878d38e7a9ee5715722686 (diff)
downloadcalcurse-03340db72e8c92f84d4a2425a1a5b74ce76f2df4.tar.gz
calcurse-03340db72e8c92f84d4a2425a1a5b74ce76f2df4.zip
Use time_t for system time values
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/apoint.c')
-rw-r--r--src/apoint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/apoint.c b/src/apoint.c
index c195559..5a9802a 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -98,7 +98,7 @@ static int apoint_cmp(struct apoint *a, struct apoint *b)
return strcmp(a->mesg, b->mesg);
}
-struct apoint *apoint_new(char *mesg, char *note, long start, long dur,
+struct apoint *apoint_new(char *mesg, char *note, time_t start, long dur,
char state)
{
struct apoint *apt;
@@ -117,14 +117,14 @@ struct apoint *apoint_new(char *mesg, char *note, long start, long dur,
return apt;
}
-unsigned apoint_inday(struct apoint *i, long *start)
+unsigned apoint_inday(struct apoint *i, time_t *start)
{
return (date_cmp_day(i->start, *start) == 0 ||
(date_cmp_day(i->start, *start) < 0 &&
date_cmp_day(i->start + i->dur - 1, *start) >= 0));
}
-void apoint_sec2str(struct apoint *o, long day, char *start, char *end)
+void apoint_sec2str(struct apoint *o, time_t day, char *start, char *end)
{
struct tm lt;
time_t t;
@@ -278,7 +278,7 @@ void apoint_delete(struct apoint *apt)
LLIST_TS_UNLOCK(&alist_p);
}
-static int apoint_starts_after(struct apoint *apt, long *time)
+static int apoint_starts_after(struct apoint *apt, time_t *time)
{
return apt->start > *time;
}
@@ -287,7 +287,7 @@ static int apoint_starts_after(struct apoint *apt, long *time)
* Look in the appointment list if we have an item which starts before the item
* stored in the notify_app structure (which is the next item to be notified).
*/
-struct notify_app *apoint_check_next(struct notify_app *app, long start)
+struct notify_app *apoint_check_next(struct notify_app *app, time_t start)
{
llist_item_t *i;
@@ -324,7 +324,7 @@ void apoint_switch_notify(struct apoint *apt)
LLIST_TS_UNLOCK(&alist_p);
}
-void apoint_paste_item(struct apoint *apt, long date)
+void apoint_paste_item(struct apoint *apt, time_t date)
{
struct tm t;