3 * $FreeBSD: src/usr.sbin/zic/scheck.c,v 1.4 1999/08/28 01:21:19 peter Exp $
4 * $DragonFly: src/usr.sbin/zic/scheck.c,v 1.4 2008/10/19 20:15:58 swildner Exp $
11 scheck(const char * const string, const char * const format)
21 if (string == NULL || format == NULL)
23 fbuf = imalloc((int) (2 * strlen(format) + 4));
28 while ((*tp++ = c = *fp++) != '\0') {
40 if (*fp == 'l' || *fp == 'h')
44 while (*fp != '\0' && *fp != ']');
45 if ((*tp++ = *fp++) == '\0')
51 if (sscanf(string, fbuf, &dummy) != 1)
52 result = (char *) format;