aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-06-06 12:30:48 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-06-06 12:30:48 -0700
commite02e1403b432f8cd6d07ebbdd235627f20f01cfb (patch)
treee479b02d2ede4d34270889a8c2d1f627f3701e1e /sys/cmd
parenteeb5831bb4d62c35eca6db333137a9b8bf682e6e (diff)
small changes to exposure of allocation functions
Diffstat (limited to 'sys/cmd')
-rw-r--r--sys/cmd/cc/cc.c18
-rw-r--r--sys/cmd/cc/lex.c18
-rw-r--r--sys/cmd/rules.mk4
3 files changed, 38 insertions, 2 deletions
diff --git a/sys/cmd/cc/cc.c b/sys/cmd/cc/cc.c
index 3246292..3602643 100644
--- a/sys/cmd/cc/cc.c
+++ b/sys/cmd/cc/cc.c
@@ -54,6 +54,24 @@ getstr(string key, int *ok)
return idx;
}
+static
+void
+·free(void* _, void* ptr) {
+ return free(ptr);
+}
+
+static
+void *
+·alloc(void* _, uint n, ulong size) {
+ return malloc(n*size);
+}
+
+static
+void *
+·calloc(void* _, uint n, ulong size) {
+ return calloc(n, size);
+}
+
static
int
morestrtab(StrTab *tab, int n)
diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c
index 1396358..0963fb9 100644
--- a/sys/cmd/cc/lex.c
+++ b/sys/cmd/cc/lex.c
@@ -791,6 +791,24 @@ Nospace:
#define PTR_HASH(p) (uintptr)(p)
#define PTR_EQUAL(p1, p2) ((uintptr)(p1) == (uintptr)(p2))
+static
+void
+·free(void* _, void* ptr) {
+ return free(ptr);
+}
+
+static
+void *
+·alloc(void* _, uint n, ulong size) {
+ return malloc(n*size);
+}
+
+static
+void *
+·calloc(void* _, uint n, ulong size) {
+ return calloc(n, size);
+}
+
static
int
moresymtab(SymTab *tab, int n)
diff --git a/sys/cmd/rules.mk b/sys/cmd/rules.mk
index 1a6bd88..d23396c 100644
--- a/sys/cmd/rules.mk
+++ b/sys/cmd/rules.mk
@@ -14,8 +14,8 @@ include $(DIR)/rules.mk
# DIR := $(d)/rc
# include $(DIR)/rules.mk
-DIR := $(d)/dwm
-include $(DIR)/rules.mk
+# DIR := $(d)/dwm
+# include $(DIR)/rules.mk
DIR := $(d)/term
include $(DIR)/rules.mk