aboutsummaryrefslogtreecommitdiff
path: root/xmalloc.h
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2020-08-04 22:28:16 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2020-08-04 22:28:16 +0000
commitf1fce96a1d8026474b2cd56a855fd001cfd108b6 (patch)
tree206fb3ee72c8cffb11ca9bfd2fc827c0c61a1ce5 /xmalloc.h
parentgrid: reflow: don't insert <width> spacer cells for *every* empty cell (diff)
config: handle allocation failure explicitly
Diffstat (limited to 'xmalloc.h')
-rw-r--r--xmalloc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmalloc.h b/xmalloc.h
new file mode 100644
index 00000000..d4e48f79
--- /dev/null
+++ b/xmalloc.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <stddef.h>
+#include <string.h>
+#include "macros.h"
+
+void *xmalloc(size_t size) XMALLOC;
+void *xcalloc(size_t nmemb, size_t size) XMALLOC;
+char *xstrdup(const char *str) XSTRDUP;
+char *xasprintf(const char *format, ...) PRINTF(1) XMALLOC;