/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996,1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef lint
#endif
/* Import. */
#include "port_before.h"
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "port_after.h"
#ifdef SPRINTF_CHAR
#else
#endif
/* Forward. */
/* Macros. */
#define T(x) if ((x) < 0) return (-1); else (void)NULL
/* Public. */
int
char *p;
x = 0;
if (weeks) {
x++;
}
if (days) {
x++;
}
if (hours) {
x++;
}
if (mins) {
x++;
}
x++;
}
if (x > 1) {
int ch;
}
}
int
ttl = 0;
tmp = 0;
digits = 0;
dirty = 0;
goto einval;
tmp *= 10;
digits++;
continue;
}
if (digits == 0)
goto einval;
switch (ch) {
case 'S': break;
default: goto einval;
}
tmp = 0;
digits = 0;
dirty = 1;
}
if (digits > 0) {
if (dirty)
goto einval;
else
} else if (!dirty)
goto einval;
return (0);
return (-1);
}
/* Private. */
static int
return (-1);
return (0);
}
/*! \file */