diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-07-25 00:47:01 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-07-25 00:47:01 +0200 |
| commit | 40d8eb449ed072b47bfbe953a191708f761c53a0 (patch) | |
| tree | 63ed15404eb3acd99a9ca0f77654b2c97efe54d9 /util.h | |
| parent | 29894d56e144223629e558070cbc52080e21342e (diff) | |
| download | tis100-40d8eb449ed072b47bfbe953a191708f761c53a0.tar.gz tis100-40d8eb449ed072b47bfbe953a191708f761c53a0.zip | |
Reimplement value passing and improve curses ui
Diffstat (limited to 'util.h')
| -rw-r--r-- | util.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,7 +1,17 @@ #pragma once +#include <stddef.h> + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) < (b) ? (b) : (a)) +#define ABS(a) ((a) > 0 ? (a) : -(a)) + __attribute__((noreturn)) __attribute__((format(printf, 1, 2))) void die(const char *fmt, ...); +size_t strdcpy(char *dst, const char *src, size_t n); +size_t strdcat(char *dst, const char *src, size_t n); + extern const char *progname; +extern void (*cleanup)(void); |
