]> git.eshelyaron.com Git - emacs.git/commitdiff
(ccl-embed-data): Make ccl-program-vector
authorKenichi Handa <handa@m17n.org>
Wed, 9 Aug 2000 09:02:46 +0000 (09:02 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 9 Aug 2000 09:02:46 +0000 (09:02 +0000)
longer if necessary.
(ccl-embed-code): Call ccl-embed-data to store CODE in
ccl-program-vector.

lisp/international/ccl.el

index 3f987fda740034e1cfdecbeaa7ecc28958712a3e..e357e367cf7b20c280b0d3f01a110a8139e569f1 100644 (file)
 (defun ccl-embed-data (data &optional ic)
   (if ic
       (aset ccl-program-vector ic data)
+    (let ((len (length ccl-program-vector)))
+      (if (>= ccl-current-ic len)
+         (let ((new (make-vector (* len 2) nil)))
+           (while (> len 0)
+             (setq len (1- len))
+             (aset new len (aref ccl-program-vector len)))
+           (setq ccl-program-vector new))))
     (aset ccl-program-vector ccl-current-ic data)
     (setq ccl-current-ic (1+ ccl-current-ic))))
 
                          (logior (ash (get reg2 'ccl-register-number) 8)
                                  (ash data 11))
                        (ash data 8)))))
-    (aset ccl-program-vector ccl-current-ic code)
-    (setq ccl-current-ic (1+ ccl-current-ic))))
+    (ccl-embed-data code)))
 
 ;; extended ccl command format
 ;;     |- 14-bit -|- 3-bit --|- 3-bit --|- 3-bit --|- 5-bit -|