2 * $FreeBSD: src/usr.sbin/zic/scheck.c,v 1.4 1999/08/28 01:21:19 peter Exp $
9 scheck(const char * const string
, const char * const format
)
19 if (string
== NULL
|| format
== NULL
)
21 fbuf
= malloc(2 * strlen(format
) + 4);
28 ** Copy directives, suppressing each conversion that is not
29 ** already suppressed. Scansets containing '%' are not
30 ** supported; e.g., the conversion specification "%[%]" is not
31 ** supported. Also, multibyte characters containing a
32 ** non-leading '%' byte are not supported.
34 while ((*tp
++ = c
= *fp
++) != '\0') {
42 } while (is_digit(c
));
51 if ((*tp
++ = *fp
++) == '\0')
58 if (sscanf(string
, fbuf
, &dummy
) != 1)