/[cxml]/closure-common/utf8.lisp
ViewVC logotype

Contents of /closure-common/utf8.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Sun Oct 21 17:07:38 2007 UTC (6 years, 6 months ago) by dlichteblau
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
hax:%want-strings-p
1 ;;; copyright (c) 2005 David Lichteblau <david@lichteblau.com>
2 ;;; License: Lisp-LGPL (See file COPYING for details).
3 ;;;
4 ;;; Rune emulation for the UTF-8-compatible DOM implementation.
5 ;;; Used only with 8 bit characters on non-unicode Lisps.
6
7 (in-package :utf8-runes)
8
9 (deftype rune () 'character)
10 (deftype rod () '(vector rune))
11 (deftype simple-rod () '(simple-array rune))
12
13 (defun rod= (r s)
14 (string= r s))
15
16 (defun rod-string (rod &optional default)
17 (declare (ignore default))
18 rod)
19
20 (defun string-rod (string)
21 string)
22
23 (defun make-rod (size)
24 (make-string size :element-type 'rune))
25
26 (defun rune-reader (stream subchar arg)
27 (runes::rune-char (runes::rune-reader stream subchar arg)))
28
29 (defun rod-reader (stream subchar arg)
30 (runes::rod-string (runes::rod-reader stream subchar arg)))
31
32 (setf closure-common-system:*utf8-runes-readtable*
33 (let ((rt (copy-readtable)))
34 (set-dispatch-macro-character #\# #\/ 'rune-reader rt)
35 (set-dispatch-macro-character #\# #\" 'rod-reader rt)
36 rt))

  ViewVC Help
Powered by ViewVC 1.1.5