2 ** This file is in the public domain, so clarified as of
3 ** 2006-07-17 by Arthur David Olson.
8 static char elsieid
[] = "@(#)scheck.c 8.19";
9 #endif /* !defined lint */
10 #endif /* !defined NOID */
17 scheck(string
, format
)
18 const char * const string
;
19 const char * const format
;
22 register const char * fp
;
25 register const char * result
;
29 if (string
== NULL
|| format
== NULL
)
31 fbuf
= imalloc((int) (2 * strlen(format
) + 4));
36 while ((*tp
++ = c
= *fp
++) != '\0') {
48 if (*fp
== 'l' || *fp
== 'h')
52 while (*fp
!= '\0' && *fp
!= ']');
53 if ((*tp
++ = *fp
++) == '\0')
59 if (sscanf(string
, fbuf
, &dummy
) != 1)
60 result
= (char *) format
;