12 static char sccsid
[] = "@(#)scheck.c 7.15";
20 scheck(string
, format
)
28 register char * result
;
32 if (string
== NULL
|| format
== NULL
)
34 fbuf
= imalloc(2 * strlen(format
) + 4);
39 while ((*tp
++ = c
= *fp
++) != '\0') {
49 while (isascii(*fp
) && isdigit(*fp
))
51 if (*fp
== 'l' || *fp
== 'h')
55 while (*fp
!= '\0' && *fp
!= ']');
56 if ((*tp
++ = *fp
++) == '\0')
62 if (sscanf(string
, fbuf
, &dummy
) != 1)
63 result
= (char *) format
;