ack/lang/occam/comp/report.c

38 lines
813 B
C
Raw Permalink Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1987-03-09 16:02:32 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
#include <stdlib.h>
1987-02-25 16:56:31 +00:00
#include <system.h>
1987-02-24 17:05:53 +00:00
1991-01-11 14:32:43 +00:00
extern int err, lineno;
1987-02-24 17:05:53 +00:00
extern char *curr_file;
/*VARARGS1*/
1987-02-24 17:05:53 +00:00
report(fmt, arg1, arg2, arg3) char *fmt;
{
1991-01-11 14:32:43 +00:00
fprint(STDERR, "%s (%d) F: ", curr_file, lineno);
1987-02-25 16:56:31 +00:00
fprint(STDERR, fmt, arg1, arg2, arg3);
fprint(STDERR,"\n");
1987-02-24 17:05:53 +00:00
err=1;
}
/*VARARGS1*/
1987-02-24 17:05:53 +00:00
warning(fmt, arg1, arg2, arg3) char *fmt, *arg1;
{
1991-01-11 14:32:43 +00:00
fprint(STDERR, "%s (%d) E: ", curr_file, lineno);
1987-02-25 16:56:31 +00:00
fprint(STDERR, fmt, arg1, arg2, arg3);
fprint(STDERR,"\n");
}
/*VARARGS1*/
1987-02-25 16:56:31 +00:00
fatal(fmt, arg1, arg2, arg3) char *fmt, *arg1;
{
1991-01-11 14:32:43 +00:00
fprint(STDERR, "%s (%d) X: ", curr_file, lineno);
1987-02-25 16:56:31 +00:00
fprint(STDERR, fmt, arg1, arg2, arg3);
fprint(STDERR,"\n");
exit(1);
1987-02-24 17:05:53 +00:00
}