Function: ccl-compile-write-read-repeat
ccl-compile-write-read-repeat is a byte-compiled function defined in
ccl.el.gz.
Signature
(ccl-compile-write-read-repeat CMD)
Documentation
Compile WRITE-READ-REPEAT statement.
Source Code
;; Defined in /usr/src/emacs/lisp/international/ccl.el.gz
(defun ccl-compile-write-read-repeat (cmd)
"Compile WRITE-READ-REPEAT statement."
(if (or (< (length cmd) 2) (> (length cmd) 3))
(error "CCL: Invalid number of arguments: %s" cmd))
(if (null ccl-loop-head)
(error "CCL: No outer loop: %s" cmd))
(let ((rrr (ccl-check-register (nth 1 cmd) cmd))
(arg (nth 2 cmd)))
(cond ((null arg)
(ccl-embed-code 'write-register-read-jump rrr ccl-loop-head))
((integerp arg)
(ccl-embed-code 'write-const-read-jump rrr arg ccl-loop-head))
((vectorp arg)
(let ((len (length arg))
(i 0))
(ccl-embed-code 'write-array-read-jump rrr ccl-loop-head)
(ccl-embed-data len)
(while (< i len)
(ccl-embed-data (aref arg i))
(setq i (1+ i)))))
(t
(error "CCL: Invalid argument %s: %s" arg cmd)))
(ccl-embed-code 'read-jump rrr ccl-loop-head))
t)