From a4b8ef38b1d7a26b4e6bfa966f021a237bf16ce1 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 23 Aug 2025 18:20:43 -0400 Subject: Lots of cleanups --- src/stdlib/print.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/stdlib/print.c') diff --git a/src/stdlib/print.c b/src/stdlib/print.c index 476ddd7b..8e2dd862 100644 --- a/src/stdlib/print.c +++ b/src/stdlib/print.c @@ -1,4 +1,5 @@ // This file defines some of the helper functions used for printing values +#include #include #include #include @@ -170,6 +171,7 @@ public int _print_char(FILE *f, char c) if (name != NULL) return fputs(name, f); else if (isprint(c)) + return fputc('\'', f) + fputc(c, f) + fputc('\'', f); else return (fputs("'\\x", f) + _print_hex(f, hex((uint64_t)c, .digits=2, .no_prefix=true, .uppercase=true)) -- cgit v1.2.3