
#include <varargs.h>
#include <stdio.h>

extern char *argv0;

void
yyerror(va_alist)
va_dcl
{
    va_list ap;
    char *path,
    *fmt,
    buff[256];
    extern int linenum;

    va_start(ap);
    path = va_arg(ap, char *);
    fmt = va_arg(ap, char *);
    (void)sprintf(buff, "Error near line %d of\n\t\"%s\":  %s",
		  linenum, path, fmt);
    fprintf(stderr, "%s: %s\n", argv0, buff);
    va_end(ap);
}

