report.c 765 B

1234567891011121314151617181920212223242526272829303132
  1. /* $Header$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. #include <system.h>
  7. extern int err, yylineno;
  8. extern char *curr_file;
  9. report(fmt, arg1, arg2, arg3) char *fmt;
  10. {
  11. fprint(STDERR, "%s (%d) F: ", curr_file, yylineno);
  12. fprint(STDERR, fmt, arg1, arg2, arg3);
  13. fprint(STDERR,"\n");
  14. err=1;
  15. }
  16. warning(fmt, arg1, arg2, arg3) char *fmt, *arg1;
  17. {
  18. fprint(STDERR, "%s (%d) E: ", curr_file, yylineno);
  19. fprint(STDERR, fmt, arg1, arg2, arg3);
  20. fprint(STDERR,"\n");
  21. }
  22. fatal(fmt, arg1, arg2, arg3) char *fmt, *arg1;
  23. {
  24. fprint(STDERR, "%s (%d) X: ", curr_file, yylineno);
  25. fprint(STDERR, fmt, arg1, arg2, arg3);
  26. fprint(STDERR,"\n");
  27. exit(1);
  28. }