diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-26 21:37:56 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-26 21:40:29 +0900 |
| commit | a70bc7804c4c1cb07976d684b64b5a2fe3b68f93 (patch) | |
| tree | c1689b04c232e61c0b7833756a9655636b00463c /src/std.h | |
| parent | b3b3c8bcd07e644fdba9167f927ad8dee4a255db (diff) | |
| download | ducc-a70bc7804c4c1cb07976d684b64b5a2fe3b68f93.tar.gz ducc-a70bc7804c4c1cb07976d684b64b5a2fe3b68f93.tar.zst ducc-a70bc7804c4c1cb07976d684b64b5a2fe3b68f93.zip | |
refactor: preprocessing using helper functions
Diffstat (limited to 'src/std.h')
| -rw-r--r-- | src/std.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -36,6 +36,13 @@ char* strndup(const char*, size_t); char* strstr(const char*, const char*); int system(const char*); +#define assert(x) \ + do { \ + if (!(x)) { \ + fatal_error("%s:%d: assertion failed", __FILE__, __LINE__); \ + } \ + } while (0) + #include <stdarg.h> int vfprintf(FILE*, const char*, va_list); |
