/* error.c */

#include "picasm.h"

void error(m,n,o,p)
	char *m;
	char *n;
	char *o;
	char *p;
{
	switch(lexstack[last_lexlevel].type)
	{
		case LEXFILE:	printf("!!! %s:line %d: %s%s%s%s !!!\n",
					lexstack[last_lexlevel].filename,
					lexstack[last_lexlevel].lineno, m,n,o,p);
				break;

		case LEXMACRO:	printf("!!! %s: %s%s%s%s !!!\n",
					lexstack[last_lexlevel].filename, m,n,o,p);
				break;

		default:	printf("Internal compiler error\n");
				break;
	}

	exit(1);
}

/* ... The End ... */
