diff options
Diffstat (limited to 'src/userland.cpp')
| -rw-r--r-- | src/userland.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/userland.cpp b/src/userland.cpp index 25b1492290..6c56bceaa0 100644 --- a/src/userland.cpp +++ b/src/userland.cpp @@ -2,9 +2,23 @@ // src-self-hosted/stage1.zig #include "userland.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +void stage2_translate_c(void) { + const char *msg = "stage0 called stage2_translate_c"; + stage2_panic(msg, strlen(msg)); +} -void stage2_translate_c(void) {} void stage2_zen(const char **ptr, size_t *len) { - *ptr = nullptr; - *len = 0; + const char *msg = "stage0 called stage2_zen"; + stage2_panic(msg, strlen(msg)); +} + +void stage2_panic(const char *ptr, size_t len) { + fwrite(ptr, 1, len, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + abort(); } |
