- Moved utility functions from the "runes" package to the "cxml" package to

avoid name conflicts with functions from "glisp" of the same name.
- Renamed defsubst to definline for the same reason.

(This is a commit to the cxml repository, not the main closure repository.
If you don't want cxml commit messages on the closure list, please complain
to me and I'll change it.)
This commit is contained in:
dlichteblau
2005-03-25 18:16:56 +00:00
parent 0a7fe86e1c
commit 11249740d9
12 changed files with 107 additions and 199 deletions

View File

@ -24,35 +24,35 @@
(in-package :runes)
(deftype rune () 'base-char)
(deftype rod () 'base-string)
(deftype simple-rod () 'simple-string)
(deftype rune () 'character)
(deftype rod () '(vector character))
(deftype simple-rod () '(simple-array character))
(defsubst rune (rod index)
(definline rune (rod index)
(char rod index))
(defun (setf rune) (new rod index)
(setf (char rod index) new))
(defsubst %rune (rod index)
(definline %rune (rod index)
(aref (the simple-string rod) (the fixnum index)))
(defsubst (setf %rune) (new rod index)
(definline (setf %rune) (new rod index)
(setf (aref (the simple-string rod) (the fixnum index)) new))
(defun rod-capitalize (rod)
(string-upcase rod))
(defsubst code-rune (x) (code-char x))
(defsubst rune-code (x) (char-code x))
(definline code-rune (x) (code-char x))
(definline rune-code (x) (char-code x))
(defsubst rune= (x y)
(definline rune= (x y)
(char= x y))
(defun rune-downcase (rune)
(char-downcase rune))
(defsubst rune-upcase (rune)
(definline rune-upcase (rune)
(char-upcase rune))
(defun rune-upper-case-letter-p (rune)
@ -70,13 +70,13 @@
(defun rod-upcase (rod)
(string-upcase rod))
(defsubst white-space-rune-p (char)
(definline white-space-rune-p (char)
(or (char= char #\tab)
(char= char #.(code-char 10)) ;Linefeed
(char= char #.(code-char 13)) ;Carriage Return
(char= char #\space)))
(defsubst digit-rune-p (char &optional (radix 10))
(definline digit-rune-p (char &optional (radix 10))
(digit-char-p char radix))
(defun rod (x)
@ -100,7 +100,7 @@
(defun rod-equal (x y)
(string-equal x y))
(defsubst make-rod (size)
(definline make-rod (size)
(make-string size))
(defun char-rune (char)
@ -134,9 +134,6 @@
(defun rodp (object)
(stringp object))
(defun really-rod-p (object)
(stringp object))
(defun rod-subseq (source start &optional (end (length source)))
(unless (stringp source)
(error "~S is not of type ~S." source 'rod))