summaryrefslogtreecommitdiff
path: root/tree/src/dmenu/dmenu-5.4/util.c
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-03-01 11:37:31 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-03-01 11:37:31 -0800
commite01b84a6698f5060fd7dea789fc0ffa872f26b15 (patch)
treeda1d4369048833f0496ae51d400d118f30c499bd /tree/src/dmenu/dmenu-5.4/util.c
parent6d8430971dada74478a0cd2c9eca2272a105b744 (diff)
remove tree
Diffstat (limited to 'tree/src/dmenu/dmenu-5.4/util.c')
-rw-r--r--tree/src/dmenu/dmenu-5.4/util.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/tree/src/dmenu/dmenu-5.4/util.c b/tree/src/dmenu/dmenu-5.4/util.c
deleted file mode 100644
index 8e26a51..0000000
--- a/tree/src/dmenu/dmenu-5.4/util.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "util.h"
-
-void
-die(const char *fmt, ...)
-{
- va_list ap;
- int saved_errno;
-
- saved_errno = errno;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-
- if (fmt[0] && fmt[strlen(fmt)-1] == ':')
- fprintf(stderr, " %s", strerror(saved_errno));
- fputc('\n', stderr);
-
- exit(1);
-}
-
-void *
-ecalloc(size_t nmemb, size_t size)
-{
- void *p;
-
- if (!(p = calloc(nmemb, size)))
- die("calloc:");
- return p;
-}