1 ;;;; cross-compile-time-only replacements for unportable character
4 ;;;; This software is part of the SBCL system. See the README file for
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
13 (in-package "SB!IMPL")
15 (let ((ascii-standard-chars " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"))
16 (defun sb!xc
:code-char
(x)
17 (declare (type (or (integer 10 10) (integer 32 126)) x
))
20 (char ascii-standard-chars
(- x
32))))
21 (defun sb!xc
:char-code
(character)
22 (declare (type standard-char character
))
23 (if (char= character
#\Newline
)
25 (+ (position character ascii-standard-chars
) 32))))