]> code.delx.au - gnu-emacs/blobdiff - lisp/international/titdic-cnv.el
*** empty log message ***
[gnu-emacs] / lisp / international / titdic-cnv.el
index 13c88a05de379a35b0d17bc019bb415cd06dbb2c..12beba682f7550beb18f4490fd2a1053cf5202c8 100644 (file)
@@ -1,7 +1,10 @@
 ;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package -*- coding:iso-2022-7bit; -*-
 
 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
+;;   Licensed to the Free Software Foundation.
+;; Copyright (C) 2003
+;;   National Institute of Advanced Industrial Science and Technology (AIST)
+;;   Registration Number H13PRO009
 
 ;; Keywords: Quail, TIT, cxterm
 
@@ -163,17 +166,17 @@ and radicals is as below:
 
  first radical:
  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
\e$APD\e(B \e$AZ"\e(B \e$AJ,\e(B \e$AX<\e(B \e$A;p\e(B \e$A?Z\e(B \e$A^P\e(B \e$Ac_\e(B \e$AZ%\e(B \e$A\3\e(B \e$AXi\e(B \e$AD>\e(B \e$Alj\e(B \e$Ab;\e(B \e$ATB\e(B \e$Afy\e(B \e$AJ/\e(B \e$AMu\e(B \e$A0K\e(B \e$AX/\e(B \e$AHU\e(B \e$AeA\e(B \e$Aak\e(B \e$AVq\e(B \e$AR;\e(B \e$AHK\e(B 
\e$APD\e(B \e$AZ"\e(B \e$AJ,\e(B \e$AX<\e(B \e$A;p\e(B \e$A?Z\e(B \e$A^P\e(B \e$Ac_\e(B \e$AZ%\e(B \e$A\3\e(B \e$AXi\e(B \e$AD>\e(B \e$Alj\e(B \e$Ab;\e(B \e$ATB\e(B \e$Afy\e(B \e$AJ/\e(B \e$AMu\e(B \e$A0K\e(B \e$AX/\e(B \e$AHU\e(B \e$AeA\e(B \e$Aak\e(B \e$AVq\e(B \e$AR;\e(B \e$AHK\e(B
  last radical:
  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
\e$ASV\e(B \e$AI=\e(B \e$AMA\e(B \e$A56\e(B \e$AZb\e(B \e$A?Z\e(B \e$ARB\e(B \e$Aqb\e(B \e$A4s\e(B \e$A6!\e(B \e$A[L\e(B \e$Ala\e(B \e$AJ.\e(B \e$A4u\e(B \e$AXg\e(B \e$ACE\e(B \e$A=q\e(B \e$AX-\e(B \e$AE.\e(B \e$ARR\e(B \e$A`m\e(B \e$AP!\e(B \e$A3'\e(B \e$A3f\e(B \e$A_.\e(B \e$A27\e(B 
\e$ASV\e(B \e$AI=\e(B \e$AMA\e(B \e$A56\e(B \e$AZb\e(B \e$A?Z\e(B \e$ARB\e(B \e$Aqb\e(B \e$A4s\e(B \e$A6!\e(B \e$A[L\e(B \e$Ala\e(B \e$AJ.\e(B \e$A4u\e(B \e$AXg\e(B \e$ACE\e(B \e$A=q\e(B \e$AX-\e(B \e$AE.\e(B \e$ARR\e(B \e$A`m\e(B \e$AP!\e(B \e$A3'\e(B \e$A3f\e(B \e$A_.\e(B \e$A27\e(B
 
 \\<quail-translation-docstring>")
 
     ("chinese-tonepy" "\e$A5wF4\e(B"
      "Pinyin base input method for Chinese charset GB2312 (`chinese-gb2312').
 
-Pinyin is the standared roman transliteration method for Chinese.
+Pinyin is the standard roman transliteration method for Chinese.
 For the details of Pinyin system, see the documentation of the input
 method `chinese-py'.
 
@@ -217,7 +220,7 @@ SPC, 6, 3, 4, or 7 specifing a tone (SPC:\e$(0?v(N\e(B, 6:\e$(0Dm(N\e(B, 3:\e$(0&9Vy\e
    dirname))
 
 ;; This value is nil if we are processing phrase dictionary.
-(defconst tit-dictionary t)
+(defvar tit-dictionary t)
 (defvar tit-encode nil)
 (defvar tit-default-encode "GB")
 
@@ -331,7 +334,7 @@ SPC, 6, 3, 4, or 7 specifing a tone (SPC:\e$(0?v(N\e(B, 6:\e$(0Dm(N\e(B, 3:\e$(0&9Vy\e
        (princ (buffer-substring pos (point)))
        (princ "\n")
        (forward-line 1)))
-  
+
     (princ "\n;;; End of the header of original TIT dictionary.\n\n")
     (princ ";;; Code:\n\n(require 'quail)\n\n")
 
@@ -473,7 +476,7 @@ the generated Quail package is saved."
          (set-buffer-multibyte nil)
          (let ((coding-system-for-read 'no-conversion))
            (insert-file-contents (expand-file-name filename)))
-       
+
          ;; Decode the buffer contents from the encoding specified by a
          ;; value of the key "ENCODE:".
          (if (not (search-forward "\nBEGIN" nil t))
@@ -506,7 +509,7 @@ the generated Quail package is saved."
          (tit-process-header filename)
          (widen)
 
-         ;; Process the body part.
+         ;; Process the body part
          (tit-process-body))))))
 
 ;;;###autoload
@@ -558,7 +561,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;; Alist of input method names and the corresponding information.
 ;; Each element has this form:
 ;;   (INPUT-METHOD-NAME                ;; Name of the input method.
-;;    INPUT-METHOD-TITLE       ;; Title string of the input method 
+;;    INPUT-METHOD-TITLE       ;; Title string of the input method
 ;;    DICFILE                  ;; Name of the source dictionary file.
 ;;    CODING                   ;; Coding system of the dictionary file.
 ;;    QUAILFILE                        ;; Name of the Quail package file.
@@ -568,7 +571,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 
 (defvar quail-misc-package-ext-info
   '(("chinese-b5-tsangchi" "\e$(06A\e(BB"
-     "cangjie-table.b5" big5 "tsang-b5.el" 
+     "cangjie-table.b5" big5 "tsang-b5.el"
      tsang-b5-converter
      "\
 ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw>
@@ -578,7 +581,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;; # this notice is preserved.")
 
     ("chinese-b5-quick" "\e$(0X|\e(BB"
-     "cangjie-table.b5" big5 "quick-b5.el" 
+     "cangjie-table.b5" big5 "quick-b5.el"
      quick-b5-converter
      "\
 ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw>
@@ -619,21 +622,21 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;;
 ;;
 ;;             Copyright (C) 1999, Rui He, herui@cs.duke.edu
-;;                           
-;; 
+;;
+;;
 ;;                  CCE(Console Chinese Environment) 0.32
-;;        
-;; CCE is free software; you can redistribute it and/or modify it under the 
-;; terms of the GNU General Public License as published by the Free Software 
-;; Foundation; either version 1, or (at your option) any later version.  
-;; 
-;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY 
-;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
-;; FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
-;; details.  
-;; 
+;;
+;; CCE is free software; you can redistribute it and/or modify it under the
+;; terms of the GNU General Public License as published by the Free Software
+;; Foundation; either version 1, or (at your option) any later version.
+;;
+;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY
+;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+;; FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+;; details.
+;;
 ;; You should have received a copy of the GNU General Public License along with
-;; CCE; see the file COPYING.  If not, write to the Free Software Foundation, 
+;; CCE; see the file COPYING.  If not, write to the Free Software Foundation,
 ;; 675 Mass Ave, Cambridge, MA 02139, USA.")
 
     ("chinese-ziranma" "\e$AWTH;\e(B"
@@ -648,33 +651,23 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;;
 ;;
 ;;             Copyright (C) 1999, Rui He, herui@cs.duke.edu
-;;                           
-;; 
+;;
+;;
 ;;                  CCE(Console Chinese Environment) 0.32
-;;        
-;; CCE is free software; you can redistribute it and/or modify it under the 
-;; terms of the GNU General Public License as published by the Free Software 
-;; Foundation; either version 1, or (at your option) any later version.  
-;; 
-;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY 
-;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
-;; FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
-;; details.  
-;; 
+;;
+;; CCE is free software; you can redistribute it and/or modify it under the
+;; terms of the GNU General Public License as published by the Free Software
+;; Foundation; either version 1, or (at your option) any later version.
+;;
+;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY
+;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+;; FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+;; details.
+;;
 ;; You should have received a copy of the GNU General Public License along with
-;; CCE; see the file COPYING.  If not, write to the Free Software Foundation, 
+;; CCE; see the file COPYING.  If not, write to the Free Software Foundation,
 ;; 675 Mass Ave, Cambridge, MA 02139, USA.")
 
-    ("chinese-b5-quick" "\e$(0X|\e(BB"
-     "cangjie-table.b5" big5 "quick-b5.el" 
-     quick-b5-converter
-     "\
-;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw>
-;; #
-;; # Permission to copy and distribute both modified and
-;; # unmodified versions is granted without royalty provided
-;; # this notice is preserved.")
-
     ("chinese-ctlau" "\e$AAuTA\e(B"
      "CTLau.html" cn-gb-2312 "CTLau.el"
      ctlau-gb-converter
@@ -686,17 +679,17 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;; It contains the following copyright notice:
 ;;
 ;; # Copyright (C) 1988-2001  Fung Fung Lee (lee@umunhum.stanford.edu)
-;; # 
+;; #
 ;; # This program is free software; you can redistribute it and/or
 ;; # modify it under the terms of the GNU General Public License
 ;; # as published by the Free Software Foundation; either version 2
 ;; # of the License, or any later version.
-;; # 
+;; #
 ;; # This program is distributed in the hope that it will be useful,
 ;; # but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; # GNU General Public License for more details.
-;; # 
+;; #
 ;; # You should have received a copy of the GNU General Public License
 ;; # along with this program; if not, write to the Free Software Foundation,
 ;; # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.")
@@ -712,17 +705,17 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 ;; It contains the following copyright notice:
 ;;
 ;; # Copyright (C) 1988-2001  Fung Fung Lee (lee@umunhum.stanford.edu)
-;; # 
+;; #
 ;; # This program is free software; you can redistribute it and/or
 ;; # modify it under the terms of the GNU General Public License
 ;; # as published by the Free Software Foundation; either version 2
 ;; # of the License, or any later version.
-;; # 
+;; #
 ;; # This program is distributed in the hope that it will be useful,
 ;; # but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;; # GNU General Public License for more details.
-;; # 
+;; #
 ;; # You should have received a copy of the GNU General Public License
 ;; # along with this program; if not, write to the Free Software Foundation,
 ;; # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.")
@@ -750,7 +743,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
    [Q \e$(0'D\e(B] [W \e$(0(q\e(B] [E \e$(0'V\e(B] [R \e$(0&H\e(B] [T \e$(0'>\e(B] [Y \e$(0&4\e(B] [U \e$(0&U\e(B] [I \e$(0'B\e(B] [O \e$(0&*\e(B] [P \e$(0'A\e(B]
 
     [A \e$(0'K\e(B] [S \e$(0&T\e(B] [D \e$(0'N\e(B] [F \e$(0'W\e(B] [G \e$(0&I\e(B] [H \e$(0*M\e(B] [J \e$(0&3\e(B] [L \e$(0&d\e(B]
-       
+
       [Z  ] [X \e$(0[E\e(B] [C \e$(01[\e(B] [V \e$(0&M\e(B] [B \e$(0'M\e(B] [N \e$(0&_\e(B] [M \e$(0&"\e(B]
 
 \\\\<quail-translation-docstring>\"\n"
@@ -762,8 +755,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
    [Q \e$(GEC\e(B] [W \e$(GFp\e(B] [E \e$(GEU\e(B] [R \e$(GDG\e(B] [T \e$(GE=\e(B] [Y \e$(GD3\e(B] [U \e$(GDT\e(B] [I \e$(GEA\e(B] [O \e$(GD)\e(B] [P \e$(GE@\e(B]
 
     [A \e$(GEJ\e(B] [S \e$(GDS\e(B] [D \e$(GEM\e(B] [F \e$(GEV\e(B] [G \e$(GDH\e(B] [H \e$(GHL\e(B] [J \e$(GD2\e(B] [L \e$(GDc\e(B]
-       
-      [Z  ] [X \e$(GyE\e(B] [C \e$(GOZ\e(B] [V \e$(GDL\e(B] [B \e$(GEL\e(B] [N \e$(GD^\e(B] [M \e$(GD!\e(B] 
+
+      [Z  ] [X \e$(GyE\e(B] [C \e$(GOZ\e(B] [V \e$(GDL\e(B] [B \e$(GEL\e(B] [N \e$(GD^\e(B] [M \e$(GD!\e(B]
 
 \\\\<quail-translation-docstring>\"\n"
                      fulltitle fulltitle)))
@@ -858,7 +851,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"."
 
 Pinyin base input method for Chinese charset GB2312 (`chinese-gb2312').
 
-Pinyin is the standared roman transliteration method for Chinese.
+Pinyin is the standard roman transliteration method for Chinese.
 Pinyin uses a sequence of Latin alphabetic characters for each Chinese
 character.  The sequence is made by the combination of the initials
 \(the beginning sounds) and finals (the ending sounds).
@@ -1101,7 +1094,7 @@ To input symbols and punctuations, type `/' followed by one of `a' to
  the Cantonese romanization of the respective radical (\e$(0?f5}\e(B)."))
 
 (defun miscdic-convert (filename &optional dirname)
-  "Convert a dictionary file FILENAME into a Quail package. 
+  "Convert a dictionary file FILENAME into a Quail package.
 Optional argument DIRNAME if specified is the directory name under which
 the generated Quail package is saved."
   (interactive "FInput method dictionary file: ")
@@ -1170,7 +1163,8 @@ to store generated Quail packages."
       (if (string= (car command-line-args-left) "-dir")
          (progn
            (setq command-line-args-left (cdr command-line-args-left))
-           (setq dir (car command-line-args-left))))
+           (setq dir (car command-line-args-left))
+           (setq command-line-args-left (cdr command-line-args-left))))
       (setq filename (car command-line-args-left)
            command-line-args-left (cdr command-line-args-left))
       (if (file-directory-p filename)