summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 298b318)
raw | patch | inline | side by side (parent: 298b318)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 16 Feb 2003 12:31:58 +0000 (12:31 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 16 Feb 2003 12:31:58 +0000 (12:31 +0000) |
src/parsetime.c | patch | blob | history |
diff --git a/src/parsetime.c b/src/parsetime.c
index 9ad9c551e93d277bba5de320b0bafd30534a7849..0c2f3f92af771ea2fead9d3cca953e729c2c748c 100644 (file)
--- a/src/parsetime.c
+++ b/src/parsetime.c
/*
- * expect() gets a token and complins if it's not the token we want
+ * expect2() gets a token and complins if it's not the token we want
*/
static char *
-expect(int desired, char *complain_fmt, ...)
+expect2(int desired, char *complain_fmt, ...)
{
va_list ap;
va_start( ap, complain_fmt );
va_end( ap );
return TIME_OK;
-} /* expect */
+} /* expect2 */
/*
if( doop >= 0 )
{
op = doop;
- try(expect(NUMBER,"There should be number after '%c'", op == PLUS ? '+' : '-'));
+ try(expect2(NUMBER,"There should be number after '%c'", op == PLUS ? '+' : '-'));
prev_multiplier = -1; /* reset months-minutes guessing mechanics */
}
/* if doop is < 0 then we repeat the previous op
return TIME_OK;
}
if (sc_tokid == COLON ) {
- try(expect(NUMBER,
+ try(expect2(NUMBER,
"Parsing HH:MM syntax, expecting MM as number, got none"));
minute = atoi(sc_token);
if (minute > 59) {
/* do month mday [year]
*/
mon = (sc_tokid-JAN);
- try(expect(NUMBER,
+ try(expect2(NUMBER,
"the day of the month should follow month name"));
mday = atol(sc_token);
if (token() == NUMBER) {
if (mon <= 31 && (sc_tokid == SLASH || sc_tokid == DOT)) {
int sep;
sep = sc_tokid;
- try(expect(NUMBER,"there should be %s number after '%c'",
+ try(expect2(NUMBER,"there should be %s number after '%c'",
sep == DOT ? "month" : "day", sep == DOT ? '.' : '/'));
mday = atol(sc_token);
if (token() == sep) {
- try(expect(NUMBER,"there should be year number after '%c'",
+ try(expect2(NUMBER,"there should be year number after '%c'",
sep == DOT ? '.' : '/'));
year = atol(sc_token);
token();