]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fccl_execute_on_string): Add 4th optional arg
authorKenichi Handa <handa@m17n.org>
Sat, 10 May 1997 03:37:01 +0000 (03:37 +0000)
committerKenichi Handa <handa@m17n.org>
Sat, 10 May 1997 03:37:01 +0000 (03:37 +0000)
CONTINUE.

src/ccl.c

index ff9a5cfa566812d488ec5e133f9df1a291a0c1c7..03c3924c32b4e7f9383331e948151e3ca730a968 100644 (file)
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1008,7 +1008,7 @@ As side effect, each element of REGISTER holds the value of\n\
 }
 
 DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string,
-       3, 3, 0,
+       3, 4, 0,
   "Execute CCL-PROGRAM with initial STATUS on STRING.\n\
 CCL-PROGRAM is a compiled code generated by `ccl-compile'.\n\
 Read buffer is set to STRING, and write buffer is allocated automatically.\n\
@@ -1018,9 +1018,12 @@ STATUS is a vector of [R0 R1 ... R7 IC], where\n\
 If R0..R7 are nil, they are initialized to 0.\n\
 If IC is nil, it is initialized to head of the CCL program.\n\
 Returns the contents of write buffer as a string,\n\
- and as side effect, STATUS is updated.")
-  (ccl_prog, status, str)
-     Lisp_Object ccl_prog, status, str;
+ and as side effect, STATUS is updated.\n\
+If optional 4th arg CONTINUE is non-nil, keep IC on read operation\n\
+when read buffer is exausted, else, IC is always set to the end of\n\
+CCL-PROGRAM on exit.")
+  (ccl_prog, status, str, contin)
+     Lisp_Object ccl_prog, status, str, contin;
 {
   Lisp_Object val;
   struct ccl_program ccl;
@@ -1054,7 +1057,7 @@ Returns the contents of write buffer as a string,\n\
   outbuf = (char *) xmalloc (outbufsize);
   if (!outbuf)
     error ("Not enough memory");
-  ccl.last_block = 1;
+  ccl.last_block = NILP (contin);
   produced = ccl_driver (&ccl, XSTRING (str)->data, outbuf,
                         XSTRING (str)->size, outbufsize, (int *)0);
   for (i = 0; i < 8; i++)