diff options
| author | Tom Harley | 2019-10-03 02:42:28 +0100 |
|---|---|---|
| committer | Tom Harley | 2019-10-03 02:42:28 +0100 |
| commit | 64d093247985f759669b7726542291382c1e3fc5 (patch) | |
| tree | 4b8324373c4b267cd1affcab8a8ece20b920323b /error.h | |
| parent | Initial commit (diff) | |
| download | sinter-64d093247985f759669b7726542291382c1e3fc5.tar.gz sinter-64d093247985f759669b7726542291382c1e3fc5.zip | |
Support + and * operations
Diffstat (limited to 'error.h')
| -rw-r--r-- | error.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#ifndef _ERROR_H +#define _ERROR_H + +#include <stdio.h> +#include <stdlib.h> + +enum errcode { + OK = 0, + UNKNOWN_ID +}; + +#define error(v, ...) do { \ + fprintf(stderr, __VA_ARGS__); \ + exit(v); \ +} while (0) + +#endif /* _ERROR_H */ |
