summary refs log tree commit diff
path: root/mscan.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-03-13 15:49:30 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-03-13 15:49:30 +0100
commit14a12635bdfdf2ecd3c4609eb3527593e12de4a0 (patch)
treeec5e2607a23d5601ba3940706a35291d966dd22e /mscan.c
parent0370a28d493d29baa75412141a50a86f70ecba08 (diff)
downloadmblaze-14a12635bdfdf2ecd3c4609eb3527593e12de4a0.tar.gz
mblaze-14a12635bdfdf2ecd3c4609eb3527593e12de4a0.tar.xz
mblaze-14a12635bdfdf2ecd3c4609eb3527593e12de4a0.zip
mscan: don't print C0 control symbols
Diffstat (limited to 'mscan.c')
-rw-r--r--mscan.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mscan.c b/mscan.c
index 992148d..f03d73c 100644
--- a/mscan.c
+++ b/mscan.c
@@ -45,6 +45,10 @@ u8putstr(FILE *out, char *s, ssize_t l, int pad)
 			putc(*s, out);
 			s++;
 			l--;
+		} else if ((unsigned)*s < 32 || *s == 127) {  // C0
+			fprintf(out, "%lc", *s == 127 ? 0x2421 : 0x2400+*s);
+			s++;
+			l--;
 		} else {
 			wchar_t wc;
 			int r = mbtowc(&wc, s, 4);