DEADSOFTWARE

Добавлен счёт строк
[dsw-obn.git] / src / oberon-common.c
index 01f2c9e5aab0ab553f2c527349c5731d4802daa4..997b7d250bc9d8f8fe5b21af8ac50513f824b7e7 100644 (file)
@@ -2,8 +2,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 
-#include "../include/oberon.h"
-
 #include "oberon-internals.h"
 
 void
@@ -11,12 +9,9 @@ oberon_error(oberon_context_t * ctx, const char * fmt, ...)
 {
         va_list ptr;
         va_start(ptr, fmt);
-        printf("error: ");
+        printf("%s: (%i:%i) ", ctx -> loc.source, ctx -> loc.line, ctx -> loc.col);
         vprintf(fmt, ptr);
         printf("\n");
-        printf("  code_index = %i\n", ctx -> code_index);
-        printf("  c          = %c\n", ctx -> c);
-        printf("  token      = %i\n", ctx -> token);
         va_end(ptr);
         exit(1);
 }