New time format: "1h30m7s".

This is fairly flexible, so you could say 10s1h, or even 1h1h1h (which is
equivalent to 3h).  Time parsing is now implemented by a single function, so
there should be no inconsistencies.

The old [[HH:]MM:]SS syntax is still supported, but not used in prompts.
This commit is contained in:
Felicity Tarnell 2014-03-08 12:18:22 +00:00
parent c0df452c04
commit 34712e643c
6 changed files with 119 additions and 129 deletions

2
ui.h
View file

@ -30,7 +30,7 @@ void drawheader (void);
void drawentries (void);
wchar_t *prompt (wchar_t const *, wchar_t const *, history_t *);
int prduration (wchar_t *prompt, int *h, int *m, int *s);
time_t prduration (wchar_t *prompt, time_t def);
int yesno (wchar_t const *);
void errbox (wchar_t const *, ...);
void verrbox (wchar_t const *, va_list);