Skip to content
Snippets Groups Projects
Commit bf3a3d8f authored by sds's avatar sds
Browse files

collect character names instead of the characters themselves (in case

the external format is not set up correctly to display such characters)
parent 529d16d0
No related branches found
No related tags found
No related merge requests found
...@@ -64,13 +64,13 @@ ...@@ -64,13 +64,13 @@
(loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i) (loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i)
unless (not (and (typep c 'standard-char) unless (not (and (typep c 'standard-char)
(not (standard-char-p c)))) (not (standard-char-p c))))
collect c)) collect (char-name c)))
(defun extended-char.3.body () (defun extended-char.3.body ()
(loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i) (loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i)
unless (not (and (typep c 'base-char) unless (not (and (typep c 'base-char)
(typep c 'extended-char))) (typep c 'extended-char)))
collect c)) collect (char-name c)))
(defun character.1.body () (defun character.1.body ()
(loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i) (loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i)
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
(eqlt (character c) c) (eqlt (character c) c)
(eqlt (character s) c) (eqlt (character s) c)
(eqlt (character (make-symbol s)) c)))) (eqlt (character (make-symbol s)) c))))
collect c)) collect (char-name c)))
(defun character.2.body () (defun character.2.body ()
(loop for x in *universe* (loop for x in *universe*
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
(defun characterp.2.body () (defun characterp.2.body ()
(loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i) (loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i)
unless (or (null c) (characterp c)) unless (or (null c) (characterp c))
collect c)) collect (char-name c)))
(defun characterp.3.body () (defun characterp.3.body ()
(loop for x in *universe* (loop for x in *universe*
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
;; returns NIL. Therefore, I've weakened the next line ;; returns NIL. Therefore, I've weakened the next line
;; (not (alphanumericp x)) ;; (not (alphanumericp x))
t)) t))
collect x)) collect (char-name x)))
(defun digit-char.1.body.old () (defun digit-char.1.body.old ()
(loop for r from 2 to 36 always (loop for r from 2 to 36 always
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
unless (or (not x) unless (or (not x)
(not (and (not (alphanumericp x)) (not (and (not (alphanumericp x))
(digit-char-p x)))) (digit-char-p x))))
collect x)) collect (char-name x)))
(defun digit-char-p.3.body () (defun digit-char-p.3.body ()
(loop for r from 2 to 35 (loop for r from 2 to 35
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
unless (or (not (characterp x)) unless (or (not (characterp x))
(find x +standard-chars+) (find x +standard-chars+)
(not (standard-char-p x))) (not (standard-char-p x)))
collect x)) collect (char-name x)))
(defun char-upcase.1.body () (defun char-upcase.1.body ()
(loop for x in *universe* (loop for x in *universe*
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
(and (and
(or (lower-case-p x) (eqlt u x)) (or (lower-case-p x) (eqlt u x))
(eqlt u (char-upcase u))))) (eqlt u (char-upcase u)))))
collect x)) collect (char-name x)))
(defun char-upcase.2.body () (defun char-upcase.2.body ()
(loop for i from 0 below (min 65536 char-code-limit) (loop for i from 0 below (min 65536 char-code-limit)
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
(and (and
(or (lower-case-p x) (eqlt u x)) (or (lower-case-p x) (eqlt u x))
(eqlt u (char-upcase u))))) (eqlt u (char-upcase u)))))
collect x)) collect (char-name x)))
(defun char-downcase.1.body () (defun char-downcase.1.body ()
(loop for x in *universe* (loop for x in *universe*
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
(and (and
(or (upper-case-p x) (eqlt u x)) (or (upper-case-p x) (eqlt u x))
(eqlt u (char-downcase u))))) (eqlt u (char-downcase u)))))
collect x)) collect (char-name x)))
(defun char-downcase.2.body () (defun char-downcase.2.body ()
(loop for i from 0 below (min 65536 char-code-limit) (loop for i from 0 below (min 65536 char-code-limit)
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
(and (and
(or (upper-case-p x) (eqlt u x)) (or (upper-case-p x) (eqlt u x))
(eqlt u (char-downcase u))))) (eqlt u (char-downcase u)))))
collect x)) collect (char-name x)))
(defun both-case-p.1.body () (defun both-case-p.1.body ()
(loop for x in *universe* (loop for x in *universe*
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
(lower-case-p x))) (lower-case-p x)))
(not (or (upper-case-p x) (not (or (upper-case-p x)
(lower-case-p x))))) (lower-case-p x)))))
collect x)) collect (char-name x)))
(defun both-case-p.2.body () (defun both-case-p.2.body ()
(loop for i from 0 below (min 65536 char-code-limit) (loop for i from 0 below (min 65536 char-code-limit)
...@@ -260,14 +260,14 @@ ...@@ -260,14 +260,14 @@
(lower-case-p x))) (lower-case-p x)))
(not (or (upper-case-p x) (not (or (upper-case-p x)
(lower-case-p x))))) (lower-case-p x)))))
collect x)) collect (char-name x)))
(defun char-code.2.body () (defun char-code.2.body ()
(loop for i from 0 below (min 65536 char-code-limit) (loop for i from 0 below (min 65536 char-code-limit)
for c = (code-char i) for c = (code-char i)
unless (or (not c) unless (or (not c)
(eqlt (char-code c) i)) (eqlt (char-code c) i))
collect c)) collect (char-name c)))
(defun char-int.2.fn () (defun char-int.2.fn ()
(declare (optimize (safety 3) (speed 1) (space 1))) (declare (optimize (safety 3) (speed 1) (space 1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment