aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/rc/util.c
diff options
context:
space:
mode:
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();
-}