From c8c2ecf18f5b41c514e17fa856b73e4aa66790d8 Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Mon, 23 Jun 2008 13:47:03 +0000 Subject: [PATCH] Some cleanups from Paul Foley: o Not that it really matters, since they're not printed and case-insensitive on read, but the control character names should really be upper-case o Also cleans up some anachronistic mention of character fonts and bits. --- code/char.lisp | 87 +++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/code/char.lisp b/code/char.lisp index 025e3fa1d..834944c52 100644 --- a/code/char.lisp +++ b/code/char.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/char.lisp,v 1.15 2004/08/27 12:28:29 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/char.lisp,v 1.16 2008/06/23 13:47:03 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -58,40 +58,40 @@ "This is the alist of (character-name . character) for characters with long names. The first name in this list for a given character is used on typeout and is the preferred form for input.")))) - (frob ((#x00 ("Null" "^@" "Nul")) - (#x01 ("^A" "Soh")) - (#x02 ("^B" "Stx")) - (#x03 ("^C" "Etx")) - (#x04 ("^D" "Eot")) - (#x05 ("^E" "Enq")) - (#x06 ("^F" "Ack")) - (#x07 ("Bell" "^g" "Bel")) - (#x08 ("Backspace" "^h" "Bs")) - (#x09 ("Tab" "^i" "Ht")) - (#x0A ("Newline" "Linefeed" "^j" "Lf" "Nl" )) - (#x0B ("Vt" "^k")) - (#x0C ("Page" "^l" "Form" "Formfeed" "Ff" "Np")) - (#x0D ("Return" "^m" "Cr")) - (#x0E ("^N" "So")) - (#x0F ("^O" "Si")) - (#x10 ("^P" "Dle")) - (#x11 ("^Q" "Dc1")) - (#x12 ("^R" "Dc2")) - (#x13 ("^S" "Dc3")) - (#x14 ("^T" "Dc4")) - (#x15 ("^U" "Nak")) - (#x16 ("^V" "Syn")) - (#x17 ("^W" "Etb")) - (#x18 ("^X" "Can")) - (#x19 ("^Y" "Em")) - (#x1A ("^Z" "Sub")) - (#x1B ("Escape" "^[" "Altmode" "Esc" "Alt")) - (#x1C ("Fs" "^\\")) - (#x1D ("Gs" "^]")) - (#x1E ("Rs" "^^")) - (#x1F ("Us" "^_")) - (#x20 ("Space" "Sp")) - (#x7f ("Rubout" "Delete" "Del"))))) + (frob ((#x00 ("Null" "^@" "NUL")) + (#x01 ("^A" "SOH")) + (#x02 ("^B" "STX")) + (#x03 ("^C" "ETX")) + (#x04 ("^D" "EOT")) + (#x05 ("^E" "ENQ")) + (#x06 ("^F" "ACK")) + (#x07 ("Bell" "^g" "BEL")) + (#x08 ("Backspace" "^h" "BS")) + (#x09 ("Tab" "^i" "HT")) + (#x0A ("Newline" "Linefeed" "^j" "LF" "NL" )) + (#x0B ("VT" "^k")) + (#x0C ("Page" "^l" "Form" "Formfeed" "FF" "NP")) + (#x0D ("Return" "^m" "RET" "CR")) + (#x0E ("^N" "SO")) + (#x0F ("^O" "SI")) + (#x10 ("^P" "DLE")) + (#x11 ("^Q" "DC1")) + (#x12 ("^R" "DC2")) + (#x13 ("^S" "DC3")) + (#x14 ("^T" "DC4")) + (#x15 ("^U" "NAK")) + (#x16 ("^V" "SYN")) + (#x17 ("^W" "ETB")) + (#x18 ("^X" "CAN")) + (#x19 ("^Y" "EM" "EOM")) + (#x1A ("^Z" "SUB")) + (#x1B ("Escape" "^[" "Altmode" "ESC" "Alt")) + (#x1C ("IS4" "FS" "^\\")) + (#x1D ("IS3" "GS" "^]")) + (#x1E ("IS2" "RS" "^^")) + (#x1F ("IS1" "US" "^_")) + (#x20 ("Space" "SP" "SPC")) + (#x7f ("Rubout" "Delete" "DEL"))))) ;;;; Accessor functions: @@ -302,7 +302,7 @@ ;;; Equal-Char-Code is used by the following functions as a version of char-int -;;; which loses font, bits, and case info. +;;; which loses case info. (defmacro equal-char-code (character) `(let ((ch (char-code ,character))) @@ -312,7 +312,7 @@ (defun char-equal (character &rest more-characters) "Returns T if all of its arguments are the same character. - Font, bits, and case are ignored." + Case is ignored." (do ((clist more-characters (cdr clist))) ((atom clist) T) (unless (= (equal-char-code (car clist)) @@ -322,7 +322,7 @@ (defun char-not-equal (character &rest more-characters) "Returns T if no two of its arguments are the same character. - Font, bits, and case are ignored." + Case is ignored." (do* ((head character (car list)) (list more-characters (cdr list))) ((atom list) T) @@ -336,7 +336,7 @@ (defun char-lessp (character &rest more-characters) "Returns T if its arguments are in strictly increasing alphabetic order. - Font, bits, and case are ignored." + Case is ignored." (do* ((c character (car list)) (list more-characters (cdr list))) ((atom list) T) @@ -347,7 +347,7 @@ (defun char-greaterp (character &rest more-characters) "Returns T if its arguments are in strictly decreasing alphabetic order. - Font, bits, and case are ignored." + Case is ignored." (do* ((c character (car list)) (list more-characters (cdr list))) ((atom list) T) @@ -358,7 +358,7 @@ (defun char-not-greaterp (character &rest more-characters) "Returns T if its arguments are in strictly non-decreasing alphabetic order. - Font, bits, and case are ignored." + Case is ignored." (do* ((c character (car list)) (list more-characters (cdr list))) ((atom list) T) @@ -369,7 +369,7 @@ (defun char-not-lessp (character &rest more-characters) "Returns T if its arguments are in strictly non-increasing alphabetic order. - Font, bits, and case are ignored." + Case is ignored." (do* ((c character (car list)) (list more-characters (cdr list))) ((atom list) T) @@ -399,8 +399,7 @@ (defun digit-char (weight &optional (radix 10)) "All arguments must be integers. Returns a character object that represents a digit of the given weight in the specified radix. Returns - NIL if no such character exists. The character will have the specified - font attributes." + NIL if no such character exists." (declare (type (integer 2 36) radix) (type unsigned-byte weight)) (and (typep weight 'fixnum) (>= weight 0) (< weight radix) (< weight 36) -- GitLab