version 1.14, 2004/06/17 22:09:11 |
version 1.15, 2006/04/26 03:01:48 |
|
|
}; |
}; |
|
|
static char **scp; /* scanner - pointer at arglist */ |
static char **scp; /* scanner - pointer at arglist */ |
static char scc; /* scanner - count of remaining arguments */ |
static int scc; /* scanner - count of remaining arguments */ |
static char *sct; /* scanner - next char pointer in current argument */ |
static char *sct; /* scanner - next char pointer in current argument */ |
static int need; /* scanner - need to advance to next argument */ |
static int need; /* scanner - need to advance to next argument */ |
static char *sc_token; /* scanner - token buffer */ |
static char *sc_token; /* scanner - token buffer */ |
|
|
switch (token()) { |
switch (token()) { |
case WEEKS: |
case WEEKS: |
delay *= 7; |
delay *= 7; |
|
/* FALLTHROUGH */ |
case DAYS: |
case DAYS: |
delay *= 24; |
delay *= 24; |
|
/* FALLTHROUGH */ |
case HOURS: |
case HOURS: |
delay *= 60; |
delay *= 60; |
|
/* FALLTHROUGH */ |
case MINUTES: |
case MINUTES: |
if (expectplur != sc_tokplur) |
if (expectplur != sc_tokplur) |
fprintf(stderr, "%s: pluralization is wrong\n", |
fprintf(stderr, "%s: pluralization is wrong\n", |
|
|
*/ |
*/ |
case TEATIME: |
case TEATIME: |
hr += 4; |
hr += 4; |
|
/* FALLTHROUGH */ |
case NOON: |
case NOON: |
hr += 12; |
hr += 12; |
|
/* FALLTHROUGH */ |
case MIDNIGHT: |
case MIDNIGHT: |
if (runtime.tm_hour >= hr) { |
if (runtime.tm_hour >= hr) { |
runtime.tm_mday++; |
runtime.tm_mday++; |
|
|
runtime.tm_min = 0; |
runtime.tm_min = 0; |
token(); |
token(); |
/* fall through to month setting */ |
/* fall through to month setting */ |
|
/* FALLTHROUGH */ |
default: |
default: |
if (month(&runtime) != 0) |
if (month(&runtime) != 0) |
return (-1); |
return (-1); |