diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-05 09:06:18 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-10-06 12:37:06 +0200 |
commit | 0acbc06c4308576c50e7c4929f35fd09ff069ac7 (patch) | |
tree | afb7dd5fd516484e37b09b790030ba83fc75d1f8 /src/calcurse.h | |
parent | d874f7ff974934aa9e8265e0deb7c03a2dab235c (diff) | |
download | calcurse-0acbc06c4308576c50e7c4929f35fd09ff069ac7.zip |
src/utils.c: Introduce parse_{time,duration}()
These helpers can be used in a fashion similar to parse_date(). In
addition to check_time(), parse_time() and parse_duration() support
short forms such as "23:" (instead of "23:00") and ":45" (instead of
"00:45").
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.h')
-rw-r--r-- | src/calcurse.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/calcurse.h b/src/calcurse.h index 3214271..5a8bfe9 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -904,6 +904,8 @@ const char *get_tempdir (void); char *new_tempfile (const char *, int); int parse_date (const char *, enum datefmt, int *, int *, int *, struct date *); +int parse_time (const char *, unsigned *, unsigned *); +int parse_duration (const char *, unsigned *); void str_toupper (char *); void file_close (FILE *, const char *); void psleep (unsigned); |