outbufsize = (ccl.buf_magnification
? str_bytes * ccl.buf_magnification + 256
: str_bytes + 256);
- outp = outbuf = xmalloc (outbufsize);
+ outp = outbuf = xmalloc_atomic (outbufsize);
consumed_chars = consumed_bytes = 0;
produced_chars = 0;
ASET (status, i, make_number (ccl.reg[i]));
ASET (status, 8, make_number (ccl.ic));
- if (NILP (unibyte_p))
- val = make_multibyte_string ((char *) outbuf, produced_chars,
- outp - outbuf);
- else
- val = make_unibyte_string ((char *) outbuf, produced_chars);
+ val = make_specified_string ((const char *) outbuf, produced_chars,
+ outp - outbuf, NILP (unibyte_p));
xfree (outbuf);
return val;
void
syms_of_ccl (void)
{
+#include "ccl.x"
+
staticpro (&Vccl_program_table);
Vccl_program_table = Fmake_vector (make_number (32), Qnil);
to `define-translation-hash-table'. The vector is indexed by the table id
used by CCL. */);
Vtranslation_hash_table_vector = Qnil;
-
- defsubr (&Sccl_program_p);
- defsubr (&Sccl_execute);
- defsubr (&Sccl_execute_on_string);
- defsubr (&Sregister_ccl_program);
- defsubr (&Sregister_code_conversion_map);
}