• R/O
  • SSH
  • HTTPS

unf: Commit


Commit MetaInfo

Revisão57 (tree)
Hora2012-01-05 13:36:54
Autorphjgt

Mensagem de Log

データ読み込み時のバグ修正

Mudança Sumário

Diff

--- branches/cl-unf/load-data.lisp (revision 56)
+++ branches/cl-unf/load-data.lisp (revision 57)
@@ -1,16 +1,15 @@
11 (in-package :unf)
22
33 (eval-when (:compile-toplevel)
4- (let ((*default-pathname-defaults*
5- (pathname (directory-namestring *compile-file-pathname*))))
4+ (let ((root (pathname (directory-namestring *compile-file-pathname*))))
65 (defun load-canonical-combining-class ()
76 (coerce
8- (with-open-file (in "data/canonical-combining-class.lisp")
7+ (with-open-file (in (merge-pathnames "data/canonical-combining-class.lisp" root))
98 (read in))
109 '(vector (unsigned-byte 8))))
1110
1211 (defun load-decomposition-mapping (type)
13- (let ((filepath (format nil "data/~(~A~)-decomposition-map.lisp" type)))
12+ (let ((filepath (merge-pathnames (format nil "data/~(~A~)-decomposition-map.lisp" type) root)))
1413 (map 'vector
1514 (lambda (o)
1615 (if (null o)
@@ -20,13 +19,13 @@
2019 (read in)))))
2120
2221 (defun load-illegal-char-list (form)
23- (coerce (with-open-file (in (format nil "data/~(~A~)-illegal-char.lisp" form))
22+ (coerce (with-open-file (in (merge-pathnames (format nil "data/~(~A~)-illegal-char.lisp" form) root))
2423 (read in))
2524 'bit-vector))
2625
2726 (defun load-canonical-composition-mapping ()
2827 (let ((map (make-hash-table :test #'equal)))
29- (loop FOR ((c1 . c2) . v) IN (with-open-file (in "data/canonical-composition-map.lisp")
28+ (loop FOR ((c1 . c2) . v) IN (with-open-file (in (merge-pathnames "data/canonical-composition-map.lisp" root))
3029 (read in))
3130 DO
3231 (setf (gethash (cons (code-char c1) (code-char c2)) map) (code-char v)))
Show on old repository browser