summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-05 21:57:44 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-05 21:57:44 +0400
commitd59f97cc66de35dd9c8616136548d93cc1dd7f05 (patch)
tree4abb1443121764e20bb7f2e465048961d382543a /util.c
parentec65333610b477e49d66be4e8c21fcc1139c70d2 (diff)
directory layout changed and Makefile updated
Diffstat (limited to 'util.c')
-rw-r--r--util.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/util.c b/util.c
deleted file mode 100644
index 96b82c9..0000000
--- a/util.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "util.h"
-
-void
-die(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-
- if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
- fputc(' ', stderr);
- perror(NULL);
- } else {
- fputc('\n', stderr);
- }
-
- exit(1);
-}
-
-void *
-ecalloc(size_t nmemb, size_t size)
-{
- void *p;
-
- if (!(p = calloc(nmemb, size)))
- die("calloc:");
- return p;
-}