diff options
| author | peter <peter@pmikkelsen.com> | 2026-08-20 20:54:43 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-08-20 20:54:43 +0000 |
| commit | 86feda786f115cb4468957f00b8968b986ed7c54 (patch) | |
| tree | 31228cf73674178764cd6376d483e76212181707 /src/bin/aplwc_repl.h | |
| parent | f5d445afa10ed7ba03b0ea9a5274f11904220700 (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.h | 23 |
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 */ |