Print a character or escape sequence usable in character constants, after preprocessing.
(pprint-c-char cchar bytes) → new-bytes
Function:
(defun pprint-c-char (cchar bytes) (declare (xargs :guard (and (c-char-p cchar) (byte-listp bytes)))) (let ((__function__ 'pprint-c-char)) (declare (ignorable __function__)) (c-char-case cchar :char (b* (((unless (grammar-character-p cchar.code)) (raise "Internal error: bad character code ~x0." cchar.code))) (pprint-char cchar.code bytes)) :escape (pprint-escape cchar.escape bytes))))
Theorem:
(defthm byte-listp-of-pprint-c-char (b* ((new-bytes (pprint-c-char cchar bytes))) (byte-listp new-bytes)) :rule-classes :rewrite)