Exemplo n.º 1
0
Arquivo: common.c Projeto: pauley/pcc
/*
 * nonfatal error message
 * the routine where is different for pass 1 and pass 2;
 * it tells where the error took place
 */
void
uerror(char *s, ...)
{
	va_list ap;

	va_start(ap, s);
	WHERE('u');
	vfprintf(stderr, s, ap);
	fprintf(stderr, "\n");
	va_end(ap);
	incerr();
}
Exemplo n.º 2
0
Arquivo: common.c Projeto: pauley/pcc
/*
 * warning
 */
void
werror(char *s, ...)
{
	va_list ap;

	va_start(ap, s);
	WHERE('w');
	fprintf(stderr, "warning: ");
	vfprintf(stderr, s, ap);
	fprintf(stderr, "\n");
	va_end(ap);
	if (warniserr)
		incerr();
}
Exemplo n.º 3
0
/*
 * Deal with gcc warnings.
 */
void
warner(int type, ...)
{
	va_list ap;
	char *w;

	if (TESTBIT(warnary, type) == 0)
		return; /* no warning */
	if (TESTBIT(werrary, type)) {
		w = "error";
		incerr();
	} else
		w = "warning";

	va_start(ap, type);
	fprintf(stderr, "%s:%d: %s: ", ftitle, lineno, w);
	vfprintf(stderr, warntxt[type], ap);
	fprintf(stderr, "\n");
	va_end(ap);
}