static int error(char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
static int error(char *fmt, ...)
{
int res;
static int shown=0;
va_list ap;
if (!shown) {
fprintf(stderr, "Notice: Configuration file is %s\n", filename);
shown++;
}
res = fprintf(stderr, "line %d: ", lineno);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
errcnt++;
return res;
}
static int error(char *fmt, ...)
{
int res;
static int shown=0;
va_list ap;
if (!shown) {
fprintf(stderr, "Notice: Configuration file is %s\n", filename);
shown++;
}
res = fprintf(stderr, "line %d: ", lineno);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
errcnt++;
return res;
}