summaryrefslogtreecommitdiff
path: root/src/user/highway/vars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/highway/vars.c')
-rw-r--r--src/user/highway/vars.c28
1 files changed, 6 insertions, 22 deletions
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 <terminal/terminal.h>
+
+#include <knob/format.h>
#include <knob/block.h>
#include <knob/heap.h>
-#include <knob/user.h>
+
+#include <pland/pcrt.h>
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