diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-07-15 20:07:18 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-07-15 20:07:18 -0700 |
| commit | 721f0e189741787de50645fed4d365b9088b269e (patch) | |
| tree | d936ebf99ad4fa77ad9b78c833bffb06ead99080 /bb.c | |
| parent | aa9b815dd51e949933edfe43ac1622c26d8d8da0 (diff) | |
Cleanup
Diffstat (limited to 'bb.c')
| -rw-r--r-- | bb.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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[]); |
