mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-26 16:48:46 +00:00
structure fixes, xmake, gitignore
This commit is contained in:
parent
23835d92fd
commit
6c39c65076
16 changed files with 1404 additions and 87 deletions
29
byterun/include/runtime.h
Normal file
29
byterun/include/runtime.h
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue