From cb5373dd8df1c51a380ad2bfa7853a3197d192c1 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 10 May 1997 03:37:01 +0000 Subject: [PATCH] (Fccl_execute_on_string): Add 4th optional arg CONTINUE. --- src/ccl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ccl.c b/src/ccl.c index ff9a5cfa566..03c3924c32b 100644 --- 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++) -- 2.39.5