
/*
   This software is copyright 1989 by John Dunning.  See the file
   'COPYLEFT.JRD' for the full copyright notice.
*/

/* error stuff */

#include <stdio.h>
#include "global.h"

#ifdef M6502
barf()
{
  int * arg;
  
  arg = &arg;		/* point at self */
  arg += arg[1] + 1;	/* add next word; arg count, plus 1 */
  fprintf(stderr, *arg, *--arg, *--arg, *--arg);
  fprintf(stderr, "\n");
  exit(1);
}

#else
barf(msg, arg1, arg2, arg3)
char * msg;
int arg1, arg2, arg3;
{
  list_line(1);
  printf("Error: ");
  printf(msg, arg1, arg2, arg3);
  printf("\n");
  errcount++;
}
#endif

