From d68d0f39ab7675745e7d177f6774736f7ec58783 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Wed, 1 Dec 2021 00:31:01 +0100 Subject: Replace readline with own implementation for integration --- util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 util.h (limited to 'util.h') diff --git a/util.h b/util.h new file mode 100644 index 0000000..b34da36 --- /dev/null +++ b/util.h @@ -0,0 +1,12 @@ +#pragma once + +#include + +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#define MIN(a, b) ((a) > (b) ? (b) : (a)) +#define ARRLEN(x) (sizeof(x)/sizeof((x)[0])) + +#define ASSERT(x) assert((x), __FILE__, __LINE__, #x) + +int strnwidth(const char *s, int n); +void assert(int cond, const char *file, int line, const char *condstr); -- cgit v1.2.3-71-gd317