From d3f962c37601c8bf8cfa42f2670ee6c1c59c0d7a Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 22 Apr 2018 20:08:38 +0200 Subject: [PATCH] mes: display: Display escaped characters. * module/mes/display.mes (display): Display escaped characters. --- module/mes/display.mes | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/module/mes/display.mes b/module/mes/display.mes index 65c9b0ec..9c1e099f 100644 --- a/module/mes/display.mes +++ b/module/mes/display.mes @@ -54,9 +54,27 @@ (cond ((and write? (or (eq? x #\") (eq? x #\\))) (write-char #\\ port) (write-char x port)) + ((and write? (eq? x #\nul)) + (write-char #\\ port) + (write-char #\0 port)) + ((and write? (eq? x #\alarm)) + (write-char #\\ port) + (write-char #\a port)) + ((and write? (eq? x #\backspace)) + (write-char #\\ port) + (write-char #\b port)) + ((and write? (eq? x #\tab)) + (write-char #\\ port) + (write-char #\t port)) ((and write? (eq? x #\newline)) (write-char #\\ port) (write-char #\n port)) + ((and write? (eq? x #\vtab)) + (write-char #\\ port) + (write-char #\v port)) + ((and write? (eq? x #\page)) + (write-char #\\ port) + (write-char #\f port)) (#t (write-char x port)))) (define (d x cont? sep) -- 2.31.1