From 6e7360ee71772a15457c93f0f17e31e6eedd340b Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 28 Feb 2024 09:04:21 -0800 Subject: [PATCH] Improved stack printing --- src/devices/system.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/devices/system.c b/src/devices/system.c index 3912382..dfde335 100644 --- a/src/devices/system.c +++ b/src/devices/system.c @@ -44,10 +44,9 @@ system_load(Uxn *u, char *filename) } static void -system_print(Stack *s, char *name) +system_print(Stack *s) { Uint8 i; - fprintf(stderr, "%s ", name, s->ptr); for(i = s->ptr - 7; i != s->ptr + 1; i++) fprintf(stderr, "%02x%c", s->dat[i], i == 0 ? '|' : ' '); fprintf(stderr, "< \n"); @@ -64,8 +63,8 @@ system_error(char *msg, const char *err) void system_inspect(Uxn *u) { - system_print(&u->wst, "WST"); - system_print(&u->rst, "RST"); + fprintf(stderr, "WST "), system_print(&u->wst); + fprintf(stderr, "RST "), system_print(&u->rst); } int