]>
git.saurik.com Git - apple/system_cmds.git/blob - zic.tproj/scheck.c
009ef1ec82003c234a2522a79ae8b283ba144443
3 static const char elsieid
[] = "@(#)scheck.c 8.15";
4 #endif /* !defined lint */
5 #endif /* !defined NOID */
8 static const char rcsid
[] =
9 "$FreeBSD: src/usr.sbin/zic/scheck.c,v 1.7 2001/07/18 11:27:04 dd Exp $";
17 scheck(string
, format
)
18 const char * const string
;
19 const char * const format
;
22 register const char * fp
;
25 register char * result
;
30 if (string
== NULL
|| format
== NULL
)
32 fbuf
= imalloc((int) (2 * strlen(format
) + 4));
37 while ((*tp
++ = c
= *fp
++) != '\0') {
49 if (*fp
== 'l' || *fp
== 'h')
53 while (*fp
!= '\0' && *fp
!= ']');
54 if ((*tp
++ = *fp
++) == '\0')
60 if (sscanf(string
, fbuf
, &dummy
) != 1)
61 result
= (char *) format
;