}
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\
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;
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++)