aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/util.c
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2021-04-22 08:55:35 -0700
committerNicholas Noll <nbnoll@eml.cc>2021-04-22 08:55:35 -0700
commit5d3642b8ef920316693031d2ea34b9def0b1abc5 (patch)
tree8100890ed5b2e4ecdbde09615e0820346ccc3f41 /sys/cmd/rc/util.c
parente30f8b22069bec1a3fb68f089a9a7198671eb09a (diff)
chore: rm unfinished projects
Diffstat (limited to 'sys/cmd/rc/util.c')
-rw-r--r--sys/cmd/rc/util.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/sys/cmd/rc/util.c b/sys/cmd/rc/util.c
deleted file mode 100644
index 02b3611..0000000
--- a/sys/cmd/rc/util.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include "rc.h"
-
-void *
-emalloc(uintptr n)
-{
- void *p = malloc(n);
- if (!p)
- panic("can't malloc %d bytes", n);
-
- return p;
-}
-
-void *
-erealloc(void *p, uintptr n)
-{
- void *new = realloc(p, n);
- if (!new)
- panic("can't realloc %d bytes", n);
-
- return new;
-}
-
-void
-efree(void *p)
-{
- if (p)
- free(p);
- else
- pfmt(errio, "free <nil>\n");
-}
-
-void
-panic(char *s, int n)
-{
- pfmt(errio, "rc: ");
- pfmt(errio, s, n);
- pchr(errio, '\n');
- flush(&errio);
- abort();
-}