From 721f0e189741787de50645fed4d365b9088b269e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 15 Jul 2021 20:07:18 -0700 Subject: Cleanup --- bb.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bb.c') diff --git a/bb.c b/bb.c index 8a21d98..803acb1 100644 --- a/bb.c +++ b/bb.c @@ -34,6 +34,12 @@ #define BB_VERSION "0.30.0" #define MAX_BINDINGS 1024 #define SCROLLOFF MIN(5, (winsize.ws_row-4)/2) +#define ONSCREEN (winsize.ws_row - 3) + +#define new(t) memcheck(calloc(1, sizeof(t))) +#define xcalloc(a,b) memcheck(calloc(a,b)) +#define xrealloc(a,b) memcheck(realloc(a,b)) +#define clean_err(...) do { cleanup(); err(1, __VA_ARGS__); } while (0) // Functions void bb_browse(bb_t *bb, int argc, char *argv[]); -- cgit v1.2.3