varargs in panic()

This commit is contained in:
dick 1989-10-04 16:04:02 +00:00
parent d75369dd40
commit 6ea0fa77db

View file

@ -106,13 +106,22 @@ rep_loc(id)
} }
} }
/* VARARGS1 */ /* VARARGS */
panic(fmt, args) panic(va_alist) /* fmt, args */
char *fmt; va_dcl
{ {
fprint(ERROUT, "PANIC, lint, pass2: line %d: ", LineNr); va_list ap;
doprnt(ERROUT, fmt, &args);
fprint(ERROUT, "\n"); va_start(ap);
{
char *fmt = va_arg(ap, char *);
fprint(ERROUT, "PANIC, lint, pass2: line %d: ", LineNr);
doprnt(ERROUT, fmt, ap);
fprint(ERROUT, "\n");
}
va_end(ap);
exit(1); exit(1);
} }