summaryrefslogtreecommitdiff
path: root/src/xmalloc.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-11-15 19:37:48 +0000
committerPhil Jones <philj56@gmail.com>2021-11-15 19:37:48 +0000
commit49c7405b6a88e56bb69e12189adb719927343e07 (patch)
tree72c7691e746563cc1396c5b555659c813572c12e /src/xmalloc.h
parent108df42e561b7e81ba09a8c278a562129e651bb6 (diff)
Multiple smaller changes.
- Remove the background image and libpng dependency - Add a prompt - Add xmalloc with out-of-memory handling - Add beginnings of a rofi-like run cache
Diffstat (limited to 'src/xmalloc.h')
-rw-r--r--src/xmalloc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xmalloc.h b/src/xmalloc.h
new file mode 100644
index 0000000..a661004
--- /dev/null
+++ b/src/xmalloc.h
@@ -0,0 +1,14 @@
+#ifndef XMALLOC_H
+#define XMALLOC_H
+
+#include <stdlib.h>
+
+__attribute__((malloc))
+void *xmalloc(size_t size);
+
+__attribute__((malloc))
+void *xcalloc(size_t nmemb, size_t size);
+
+void *xrealloc(void *ptr, size_t size);
+
+#endif /* XMALLOC_H */