summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@calcurse.org>2016-10-10 08:56:54 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2016-10-10 09:02:42 +0200
commit007a73f7a20e88b8e4a958ab9b7658bb7b96cd62 (patch)
tree124daaa79b8b071c8cca08a3eb5f9bac0acb3ff3 /src/utils.c
parent48bd82a0033c52a6cbf706311df3ba4412771455 (diff)
downloadcalcurse-007a73f7a20e88b8e4a958ab9b7658bb7b96cd62.zip
Replace parse_datetime() constants by named flags
Remove the magic constants used in the return value of parse_datetime() and use named flags instead. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 9727c74..9e325d9 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1132,10 +1132,10 @@ int parse_datetime(const char *string, long *ts)
new_date.mm = month;
new_date.yyyy = year;
*ts = date2sec(new_date, 0, 0) + get_item_time(*ts);
- ret |= 1;
+ ret |= PARSE_DATETIME_HAS_DATE;
} else if (parse_time(p, &hour, &minute) == 1) {
*ts = update_time_in_date(*ts, hour, minute);
- ret |= 2;
+ ret |= PARSE_DATETIME_HAS_TIME;
} else {
return 0;
}