2 * This file is in the public domain, so clarified as of
3 * 2006-07-17 by Arthur David Olson.
9 #include "postgres_fe.h"
15 scheck(const char *string
, const char *format
)
25 if (string
== NULL
|| format
== NULL
)
27 fbuf
= imalloc((int) (2 * strlen(format
) + 4));
32 while ((*tp
++ = c
= *fp
++) != '\0')
46 if (*fp
== 'l' || *fp
== 'h')
51 while (*fp
!= '\0' && *fp
!= ']');
52 if ((*tp
++ = *fp
++) == '\0')
58 if (sscanf(string
, fbuf
, &dummy
) != 1)
59 result
= (char *) format
;