From 2c904ff1737e34008f7a6c5d4b072d87a45a3fbc Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 19 Nov 2024 13:41:52 -0500 Subject: Go back to stringifying integers/num32s/bytes without the type constructor. --- stdlib/bytes.c | 2 +- stdlib/integers.c | 2 +- stdlib/nums.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'stdlib') diff --git a/stdlib/bytes.c b/stdlib/bytes.c index 694173b9..0119cb49 100644 --- a/stdlib/bytes.c +++ b/stdlib/bytes.c @@ -14,7 +14,7 @@ PUREFUNC public Text_t Byte$as_text(const Byte_t *b, bool colorize, const TypeIn { (void)type; if (!b) return Text("Byte"); - return Text$format(colorize ? "\x1b[36mByte\x1b[m(\x1b[35m0x%02X\x1b[m)" : "Byte(0x%02X)", *b); + return Text$format(colorize ? "\x1b[35m0x%02X\x1b[m" : "0x%02X", *b); } public Text_t Byte$hex(Byte_t byte, bool uppercase, bool prefix) { diff --git a/stdlib/integers.c b/stdlib/integers.c index 1973fa34..48ab6019 100644 --- a/stdlib/integers.c +++ b/stdlib/integers.c @@ -376,7 +376,7 @@ public const TypeInfo_t Int$info = { public Text_t KindOfInt ## $as_text(const c_type *i, bool colorize, const TypeInfo_t *type) { \ (void)type; \ if (!i) return Text(#KindOfInt); \ - return Text$format(colorize ? "\x1b[36m" #KindOfInt "\x1b[m(\x1b[35m" fmt "\x1b[m)" : #KindOfInt "(" fmt ")", *i); \ + return Text$format(colorize ? "\x1b[35m" fmt "\x1b[m" : fmt, *i); \ } \ public PUREFUNC int32_t KindOfInt ## $compare(const c_type *x, const c_type *y, const TypeInfo_t *type) { \ (void)type; \ diff --git a/stdlib/nums.c b/stdlib/nums.c index 8a210d7e..a9cb0a6d 100644 --- a/stdlib/nums.c +++ b/stdlib/nums.c @@ -93,7 +93,7 @@ public const TypeInfo_t Num$info = { public PUREFUNC Text_t Num32$as_text(const float *f, bool colorize, const TypeInfo_t *type) { (void)type; if (!f) return Text("Num32"); - return Text$format(colorize ? "\x1b[36mNum32(\x1b[35m%.8g\x1b[33;2m\x1b[m)" : "Num32(%.8g)", (double)*f); + return Text$format(colorize ? "\x1b[35m%.8g\x1b[33;2m\x1b[m" : "%.8g", (double)*f); } public PUREFUNC int32_t Num32$compare(const float *x, const float *y, const TypeInfo_t *type) { -- cgit v1.2.3