diff options
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: misc.h,v 1.7 2001/05/11 14:59:56 markus Exp $ */ | 1 | /* $OpenBSD: misc.h,v 1.8 2001/05/19 19:43:57 stevesk Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -34,6 +34,30 @@ int a2port(const char *s); | |||
34 | char *cleanhostname(char *host); | 34 | char *cleanhostname(char *host); |
35 | char *colon(char *cp); | 35 | char *colon(char *cp); |
36 | 36 | ||
37 | /* | ||
38 | * Convert a time string into seconds; format is | ||
39 | * a sequence of: | ||
40 | * time[qualifier] | ||
41 | * | ||
42 | * Valid time qualifiers are: | ||
43 | * <none> seconds | ||
44 | * s|S seconds | ||
45 | * m|M minutes | ||
46 | * h|H hours | ||
47 | * d|D days | ||
48 | * w|W weeks | ||
49 | * | ||
50 | * Examples: | ||
51 | * 90m 90 minutes | ||
52 | * 1h30m 90 minutes | ||
53 | * 2d 2 days | ||
54 | * 1w 1 week | ||
55 | * | ||
56 | * Return -1 if time string is invalid. | ||
57 | */ | ||
58 | |||
59 | long convtime(const char *s); | ||
60 | |||
37 | /* function to assist building execv() arguments */ | 61 | /* function to assist building execv() arguments */ |
38 | typedef struct arglist arglist; | 62 | typedef struct arglist arglist; |
39 | struct arglist { | 63 | struct arglist { |