summaryrefslogtreecommitdiff
path: root/src/bin/aplwc_repl.h
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-20 20:54:43 +0000
committerpeter <peter@pmikkelsen.com>2026-08-20 20:54:43 +0000
commit86feda786f115cb4468957f00b8968b986ed7c54 (patch)
tree31228cf73674178764cd6376d483e76212181707 /src/bin/aplwc_repl.h
parentf5d445afa10ed7ba03b0ea9a5274f11904220700 (diff)
Get full coverage of aplwc-repl.
This required wrapping malloc so that it can fail under our control. FossilOrigin-Name: a27ccb5f02994393a518419bae15fd26ff0016c734d96350ae2137a1d3c0937c
Diffstat (limited to 'src/bin/aplwc_repl.h')
-rw-r--r--src/bin/aplwc_repl.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/aplwc_repl.h b/src/bin/aplwc_repl.h
new file mode 100644
index 0000000..c189b77
--- /dev/null
+++ b/src/bin/aplwc_repl.h
@@ -0,0 +1,23 @@
+#ifndef APLWC_REPL_H
+#define APLWC_REPL_H
+
+#include <assert.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <aplwc.h>
+#include <aplwc_macros.h>
+
+/* util.c */
+unsigned long getenv_ulong(const char *, unsigned long);
+
+/* wrappers.c */
+void *wrapped_malloc(size_t);
+void wrapped_free(void *);
+#define malloc(size) wrapped_malloc(size)
+#define free(ptr) wrapped_free(ptr)
+
+#endif /* APLWC_REPL_H */