X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=ids-dump.el;h=03ada62d6033657959b12710f760fdc5c18afb69;hb=e6da02a98b4932f8e4cfc1ebd21b71da4ec5b02b;hp=0f33074d10b8274d79020417b92d059d1f09b9c6;hpb=91cb2c63ba9fe507a44135fea304af49a2045acd;p=chise%2Fids.git diff --git a/ids-dump.el b/ids-dump.el index 0f33074..03ada62 100644 --- a/ids-dump.el +++ b/ids-dump.el @@ -52,6 +52,23 @@ (t (error 'wrong-type-argument range))) (setq ranges (cdr ranges))))) +(defun ids-dump-insert-94x94-ccs-ranges (ccs line-spec &rest ranges) + (let (range code max-code l) + (while ranges + (setq range (car ranges)) + (cond ((consp range) + (setq code (car range) + max-code (cdr range)) + (while (<= code max-code) + (setq l (logand code 255)) + (if (and (<= #x21 l)(<= l #x7E)) + (ids-dump-insert-line ccs line-spec code)) + (setq code (1+ code)))) + ((integerp range) + (ids-dump-insert-line ccs line-spec range)) + (t (error 'wrong-type-argument range))) + (setq ranges (cdr ranges))))) + (defun ids-dump-insert-daikanwa (start end) (let ((i start) mdh-alist @@ -110,8 +127,9 @@ (format "MH-%04d \t%c\t%s\n" (car cell) chr - (ids-format-list - (get-char-attribute chr 'ideographic-structure))))))) + (or (ids-format-list + (get-char-attribute chr 'ideographic-structure)) + "")))))) (defun ids-dump-insert-jis-x0208-1990 () (let ((row 16) @@ -263,6 +281,30 @@ '(#x2F800 . #x2FA1D))) ;;;###autoload +(defun ids-dump-cns11643-1 (filename) + (interactive "Fdump IDS-CNS-1 : ") + (ids-dump-range "IDS-CNS-1.txt" filename + #'ids-dump-insert-94x94-ccs-ranges + 'chinese-cns11643-1 "C1-%04X\t%c\t%s\n" + '(#x4421 . #x7D4B))) + +;;;###autoload +(defun ids-dump-cns11643-2 (filename) + (interactive "Fdump IDS-CNS-2 : ") + (ids-dump-range "IDS-CNS-2.txt" filename + #'ids-dump-insert-94x94-ccs-ranges + 'chinese-cns11643-2 "C2-%04X\t%c\t%s\n" + '(#x2121 . #x7244))) + +;;;###autoload +(defun ids-dump-cns11643-3 (filename) + (interactive "Fdump IDS-CNS-3 : ") + (ids-dump-range "IDS-CNS-3.txt" filename + #'ids-dump-insert-94x94-ccs-ranges + 'chinese-cns11643-3 "C3-%04X\t%c\t%s\n" + '(#x2121 . #x6246))) + +;;;###autoload (defun ids-dump-daikanwa-01 (filename) (interactive "Fdump IDS-Daikanwa-01 : ") (ids-dump-range "IDS-Daikanwa-01.txt" filename