diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-01-01 19:19:47 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-01-01 19:19:47 +0100 |
commit | e56374fa85ab5cac4c9a4b264ea994c750a2bae0 (patch) | |
tree | 8fa4e2c1f2ccd482b55b27df6549d09047ad050c /common/err.h | |
parent | 6ec67846ffadb5bd1be13d5a7ea3abcf67f1c536 (diff) | |
download | uwu-lang-e56374fa85ab5cac4c9a4b264ea994c750a2bae0.tar.xz |
Use uwu-common as submodule
Diffstat (limited to 'common/err.h')
-rw-r--r-- | common/err.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/common/err.h b/common/err.h deleted file mode 100644 index b9faf11..0000000 --- a/common/err.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _COMMON_ERR_H_ -#define _COMMON_ERR_H_ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> - -static inline void error(const char *format, ...) -{ - va_list args; - va_start(args, format); - vfprintf(stderr, format, args); - va_end(args); - exit(1); -} - -static inline void syserror(const char *call, FILE *file) -{ - perror(call); - - if (file) - fclose(file); - - exit(1); -} - -#endif |