structure fixes, xmake, gitignore

This commit is contained in:
ProgramSnail 2024-10-31 00:54:04 +03:00
parent 23835d92fd
commit 6c39c65076
16 changed files with 1404 additions and 87 deletions

29
byterun/include/runtime.h Normal file
View file

@ -0,0 +1,29 @@
#pragma once
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <regex.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <time.h>
#define WORD_SIZE (CHAR_BIT * sizeof(int))
inline void vfailure(char *s, va_list args) {
fprintf(stderr, "*** FAILURE: ");
vfprintf(stderr, s,
args); // vprintf (char *, va_list) <-> printf (char *, ...)
exit(255);
}
inline void failure(char *s, ...) {
va_list args;
va_start(args, s);
vfailure(s, args);
}