3 static char elsieid[] = "@(#)scheck.c 8.15";
4 #endif /* !defined lint */
5 #endif /* !defined NOID */
9 * $FreeBSD: src/usr.sbin/zic/scheck.c,v 1.4 1999/08/28 01:21:19 peter Exp $
10 * $DragonFly: src/usr.sbin/zic/scheck.c,v 1.2 2003/06/17 04:30:05 dillon Exp $
17 scheck(string, format)
18 const char * const string;
19 const char * const format;
22 register const char * fp;
25 register char * result;
30 if (string == NULL || format == NULL)
32 fbuf = imalloc((int) (2 * strlen(format) + 4));
37 while ((*tp++ = c = *fp++) != '\0') {
49 if (*fp == 'l' || *fp == 'h')
53 while (*fp != '\0' && *fp != ']');
54 if ((*tp++ = *fp++) == '\0')
60 if (sscanf(string, fbuf, &dummy) != 1)
61 result = (char *) format;