From 5365f8fa8d6ebfbf3ba92816abe55a99feff6f25 Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Wed, 22 Jul 2026 09:09:18 -0400 Subject: clean up --- snag/util.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 snag/util.h (limited to 'snag/util.h') diff --git a/snag/util.h b/snag/util.h deleted file mode 100644 index fbf9018..0000000 --- a/snag/util.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef UTIL_H -#define UTIL_H - -#include -#include - -// utility for errors -#if DEBUG - #define log(fmt, ...) _log(__LINE__, __FILE__, fmt, ##__VA_ARGS__) - void _log(int line, const char* file, const char* format, ...) __attribute__((format(printf, 3, 4))); - - #define die(fmt, ...) _die(__LINE__, __FILE__, fmt, ##__VA_ARGS__) - void _die(int line, const char* file, const char* format, ...) __attribute__((format(printf, 3, 4))); -#else - #define log(fmt, ...) _log(fmt, ##__VA_ARGS__) - void _log(const char* format, ...) __attribute__((format(printf, 1, 2))); - - #define die(fmt, ...) _die(fmt, ##__VA_ARGS__) - void _die(const char* format, ...) __attribute__((format(printf, 1, 2))); -#endif -void* emalloc(size_t size, char* alloc_reason); - -// string functions -char* vastrcat_(int dummy, ...); -#define vastrcat(...) vastrcat_(0, __VA_ARGS__, NULL) - -#endif -- cgit v1.2.3