Initial commit

This commit is contained in:
Mid
2023-08-27 19:48:06 +03:00
commit 945bb2a672
33 changed files with 2751 additions and 0 deletions

19
src/reporting.c Normal file
View File

@@ -0,0 +1,19 @@
#include"reporting.h"
#include<stdarg.h>
#include<stdio.h>
#include<stdlib.h>
/* Abort immediately on first error (for now) */
void stahp(int row, int column, const char *error, ...) {
va_list l;
va_start(l, error);
fprintf(stderr, "error %i:%i: ", row, column);
vfprintf(stderr, error, l);
fputc('\n', stderr);
va_end(l);
exit(1);
}