From bce944d1498eaa3b6940ee234c863b3548a66b37 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 24 Jan 2021 12:00:11 -0500 Subject: graphics! --- src/user/highway/vars.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) (limited to 'src/user/highway/vars.c') diff --git a/src/user/highway/vars.c b/src/user/highway/vars.c index 6090b76..5f56621 100644 --- a/src/user/highway/vars.c +++ b/src/user/highway/vars.c @@ -1,6 +1,10 @@ +#include + +#include #include #include -#include + +#include struct no_null_sn { char *data; @@ -73,26 +77,6 @@ void del_var(struct no_null_sn name) { void dump_vars() { for (struct var_dict_node *node = var_dict_start; node; node = node->next) { - tell_user_sz("$"); - - char *buf = get_block(node->name.length + 1); - blockcpy(buf, node->name.data, node->name.length); - buf[node->name.length] = '\0'; - - tell_user_sz(buf); - - free_block(buf); - - tell_user_sz("$ = "); - - buf = get_block(node->value.length + 1); - blockcpy(buf, node->value.data, node->value.length); - buf[node->value.length] = '\0'; - - tell_user_sz(buf); - - free_block(buf); - - tell_user_sz("\n"); + term_addf_no_ww("$%ns$ = %ns\n", node->name.length, node->name.data, node->value.length, node->value.data); } } \ No newline at end of file -- cgit v1.2.3