From a36a6bcd305806536230995599d69e1f30ccbab0 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 17 Jan 2022 21:45:28 +0000 Subject: Implement text data --- print.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'print.c') diff --git a/print.c b/print.c index 15e5f2a..da60c7b 100644 --- a/print.c +++ b/print.c @@ -81,6 +81,8 @@ pparray(Array *a) free(arrstr); }else if(a->type == AtypeInt) elemstrs[i] = runesmprint("%lld", a->intdata[i]); + else if(a->type == AtypeRune) + elemstrs[i] = runesmprint("%C", a->runedata[i]); else if(a->type == AtypeFloat){ char *fmt = smprint("%%.%df", printprecision); elemstrs[i] = runesmprint(fmt, a->floatdata[i]); @@ -124,7 +126,13 @@ pparray(Array *a) char *fmt = smprint("%%%s%dS", align, widths[x]); Rune *line = strline(elemstrs[i], y); Rune *padded = runesmprint(fmt, line); - Rune *spacing = boxing ? L"│" : (x == lastdim-1) ? L"" : L" "; + Rune *spacing; + if(boxing) + spacing = L"│"; + else if(x == lastdim - 1 || a->type == AtypeRune) + spacing = L""; + else + spacing = L" "; rowstrs[row] = runesmprint("%S%S%S", tmp, padded, spacing); free(tmp); free(fmt); -- cgit v1.2.3