From ab3b1799ad12cbdc289786a6de5283a17986ec4b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 9 Aug 2000 09:02:46 +0000 Subject: [PATCH] (ccl-embed-data): Make ccl-program-vector longer if necessary. (ccl-embed-code): Call ccl-embed-data to store CODE in ccl-program-vector. --- lisp/international/ccl.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el index 3f987fda740..e357e367cf7 100644 --- a/lisp/international/ccl.el +++ b/lisp/international/ccl.el @@ -246,6 +246,13 @@ (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)))) @@ -302,8 +309,7 @@ (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 -| -- 2.39.2