]>
git.saurik.com Git - apple/icu.git/blob - icuSources/tools/tzcode/scheck.c
2 ** This file is in the public domain, so clarified as of
3 ** 2006-07-17 by Arthur David Olson.
11 scheck(const char *const string
, const char *const format
)
14 register const char * fp
;
17 register const char * result
;
21 if (string
== NULL
|| format
== NULL
)
23 fbuf
= malloc(2 * strlen(format
) + 4);
30 ** Copy directives, suppressing each conversion that is not
31 ** already suppressed. Scansets containing '%' are not
32 ** supported; e.g., the conversion specification "%[%]" is not
33 ** supported. Also, multibyte characters containing a
34 ** non-leading '%' byte are not supported.
36 while ((*tp
++ = c
= *fp
++) != '\0') {
44 } while (is_digit(c
));
53 if ((*tp
++ = *fp
++) == '\0')
60 if (sscanf(string
, fbuf
, &dummy
) != 1)