2 ** This file is in the public domain, so clarified as of
3 ** 2006-07-17 by Arthur David Olson.
8 static const char elsieid[] = "@(#)scheck.c 8.19";
9 #endif /* !defined lint */
10 #endif /* !defined NOID */
13 static const char rcsid[] =
22 scheck(string, format)
23 const char * const string;
24 const char * const format;
27 register const char * fp;
30 register const char * result;
34 if (string == NULL || format == NULL)
36 fbuf = imalloc((int) (2 * strlen(format) + 4));
41 while ((*tp++ = c = *fp++) != '\0') {
53 if (*fp == 'l' || *fp == 'h')
57 while (*fp != '\0' && *fp != ']');
58 if ((*tp++ = *fp++) == '\0')
64 if (sscanf(string, fbuf, &dummy) != 1)
65 result = (char *) format;