# HG changeset patch # User Kenichi Handa # Date 863235421 0 # Node ID 25d58ba29c1bf2e90f869aeca78c7ab62cbcc6ad # Parent 9d39361ce928884ce7121bc4d1b51ddecf5f76c8 (Fccl_execute_on_string): Add 4th optional arg CONTINUE. diff -r 9d39361ce928 -r 25d58ba29c1b src/ccl.c --- 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++)