1 #pragma ident "%Z%%M% %I% %E% SMI"
3 /* static char elsieid[] = "@(#)scheck.c 8.17"; */
10 scheck(string
, format
)
11 const char * const string
;
12 const char * const format
;
15 register const char *fp
;
18 register const char *result
;
22 if (string
== NULL
|| format
== NULL
)
24 fbuf
= imalloc((int)(2 * strlen(format
) + 4));
29 while ((*tp
++ = c
= *fp
++) != '\0') {
41 if (*fp
== 'l' || *fp
== 'h')
45 while (*fp
!= '\0' && *fp
!= ']');
46 if ((*tp
++ = *fp
++) == '\0')
52 if (sscanf(string
, fbuf
, &dummy
) != 1)
53 result
= (char *)format
;