X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fmule-ccl.c;h=6bf60e914e2429210365a3d583dcf0170fefd40b;hb=5550b5b91e953696b468934fd97770824224c3ee;hp=ab4cd67dbf0a94a125463f572f4e99166d714ca6;hpb=44e716ef11bd794a51f8c5b56c4f3f10a7dbf217;p=chise%2Fxemacs-chise.git.1 diff --git a/src/mule-ccl.c b/src/mule-ccl.c index ab4cd67..6bf60e9 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -447,8 +447,7 @@ Lisp_Object Vccl_program_table; else \ { \ Bufbyte work[MAX_EMCHAR_LEN]; \ - int len = ( ch < ( conversion_mode == CCL_MODE_ENCODING ? \ - 256 : 128 ) ) ? \ + int len = ( ch < 256 ) ? \ simple_set_charptr_emchar (work, ch) : \ non_ascii_set_charptr_emchar (work, ch); \ Dynarr_add_many (destination, work, len); \ @@ -518,7 +517,7 @@ struct ccl_prog_stack }; int -ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed, int conversion_mode) +ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed) { int *reg = ccl->reg; int ic = ccl->ic; @@ -845,7 +844,7 @@ ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_ case CCL_MOD: reg[rrr] = i % j; break; case CCL_AND: reg[rrr] = i & j; break; case CCL_OR: reg[rrr] = i | j; break; - case CCL_XOR: reg[rrr] = i ^ j; break; + case CCL_XOR: reg[rrr] = i ^ j;; break; case CCL_LSH: reg[rrr] = i << j; break; case CCL_RSH: reg[rrr] = i >> j; break; case CCL_LSH8: reg[rrr] = (i << 8) | j; break; @@ -979,7 +978,7 @@ As side effect, each element of REGISTER holds the value of : 0); ccl_driver (&ccl, (CONST unsigned char *)0, (unsigned_char_dynarr *)0, - 0, (int *)0, CCL_MODE_ENCODING); + 0, (int *)0); QUIT; if (ccl.status != CCL_STAT_SUCCESS) error ("Error in CCL program at %dth code", ccl.ic); @@ -1036,7 +1035,7 @@ CCL-PROGRAM on exit. outbuf = Dynarr_new (unsigned_char); ccl.last_block = NILP (contin); produced = ccl_driver (&ccl, XSTRING_DATA (str), outbuf, - XSTRING_LENGTH (str), (int *)0, CCL_MODE_ENCODING); + XSTRING_LENGTH (str), (int *)0); for (i = 0; i < 8; i++) XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]); XSETINT (XVECTOR_DATA (status)[8], ccl.ic); @@ -1098,14 +1097,6 @@ Return index number of the registered CCL program. void syms_of_mule_ccl (void) { - DEFSUBR (Fccl_execute); - DEFSUBR (Fccl_execute_on_string); - DEFSUBR (Fregister_ccl_program); -} - -void -vars_of_mule_ccl (void) -{ staticpro (&Vccl_program_table); Vccl_program_table = Fmake_vector (make_int (32), Qnil); @@ -1122,6 +1113,10 @@ The code point in the font is set in CCL registers R1 and R2 If the font is single-byte font, the register R2 is not used. */ ); Vfont_ccl_encoder_alist = Qnil; + + DEFSUBR (Fccl_execute); + DEFSUBR (Fccl_execute_on_string); + DEFSUBR (Fregister_ccl_program); } #endif /* emacs */