diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-05-02 14:32:56 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-05-02 14:32:56 -0400 |
| commit | 0307f0efa3aaabc887212c9535fd22560902cebd (patch) | |
| tree | aff0444747807a0ec09ea183bfba11c2ef2225ec /util.h | |
| parent | cb1183751aa25069560923948a0a6de300e6ac9c (diff) | |
| download | volute-0307f0efa3aaabc887212c9535fd22560902cebd.zip | |
draw points on compressor map
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2,5 +2,14 @@ #define min(a, b) ((a < b) ? a : b) #define max(a, b) ((a > b) ? a : b) +#define expect(x) do { \ + if (!(x)) { \ + fprintf(stderr, "Fatal error: %s:%d: assertion '%s' failed\n", \ + __FILE__, __LINE__, #x); \ + abort(); \ + } \ + } while (0) + + void free_arr(void **arr, int n); int lsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *keyval, const void *datum)); |