changeset 17728:25d58ba29c1b

(Fccl_execute_on_string): Add 4th optional arg CONTINUE.
author Kenichi Handa <handa@m17n.org>
date Sat, 10 May 1997 03:37:01 +0000
parents 9d39361ce928
children 19b17b4f765d
files src/ccl.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/ccl.c	Sat May 10 03:37:01 1997 +0000
+++ b/src/ccl.c	Sat May 10 03:37:01 1997 +0000
@@ -1008,7 +1008,7 @@
 }
 
 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 @@
 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 @@
   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++)