(dump-cns-11643-1-to-ucs-table): New function.
[chise/tomoyo-tools.git] / char-db-dump.el
index f8ca125..f3aec36 100644 (file)
@@ -1,9 +1,9 @@
 ;;; char-db-dump.el --- Dump utility of char-spec files
 
-;; Copyright (C) 2002,2003 MORIOKA Tomohiko
+;; Copyright (C) 2002,2003,2004 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
-;; Keywords: Ideographs, Character Database, UTF-2000, UCS, Unicode
+;; Keywords: Ideographs, Character Database, CHISE, UCS, Unicode
 
 ;; This file is a part of tomoyo-tools.
 
   (dolist (range char-db-ucs-range-file-list)
     (write-char-range-data-to-file
      (car range) (nth 1 range)
-     (expand-file-name (nth 2 range) "/var/tmp")
+     (expand-file-name (nth 2 range) directory)
      (nth 3 range)(nth 4 range))))
 
 
 ;;;###autoload
+(defun char-db-dump-ruimoku6 (directory)
+  (interactive "DDump ruimoku6 : ")
+  (let ((coding-system-for-write char-db-file-coding-system)
+       (code #xE000)
+       chr)
+    (with-temp-buffer
+      (insert (format ";; -*- coding: %s -*-\n"
+                     char-db-file-coding-system))
+      (while (<= code #xE8FF)
+       (when (setq chr (decode-char '=ruimoku-v6 code 'defined-only))
+         (insert-char-data chr))
+       (setq code (1+ code)))
+      (write-region (point-min)(point-max)
+                   (expand-file-name "ruimoku6.el" directory)))))
+
+
+;;;###autoload
 (defun char-db-dump (directory)
   (interactive "DDirectory to dump : ")
   (char-db-dump-ideographs directory)
-  (char-db-dump-non-ideographs directory))
+  (char-db-dump-non-ideographs directory)
+  (char-db-dump-ruimoku6 directory))
 
 
 ;;; @ End.