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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user