Index: mule-ccl.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/mule-ccl.c,v retrieving revision 1.13.2.7 diff -u -r1.13.2.7 mule-ccl.c --- mule-ccl.c 1999/11/04 23:50:13 1.13.2.7 +++ mule-ccl.c 1999/11/09 03:37:11 @@ -688,11 +688,20 @@ ccl->status = CCL_STAT_INVALID_CMD; \ goto ccl_error_handler; \ } \ - else \ - for (i = 0; i < len; i++) \ - Dynarr_add(destination, \ - (XINT (ccl_prog[ic + (i / 3)]) \ - >> ((2 - (i % 3)) * 8)) & 0xFF); \ + else \ + { \ + Bufbyte work[MAX_EMCHAR_LEN]; \ + for (i = 0; i < len; i++) \ + { \ + int ch = (XINT (ccl_prog[ic + (i / 3)]) \ + >> ((2 - (i % 3)) * 8)) & 0xFF; \ + int len = ( ch < ( conversion_mode == CCL_MODE_ENCODING ? \ + 256 : 128 ) ) ? \ + simple_set_charptr_emchar (work, ch) : \ + non_ascii_set_charptr_emchar (work, ch); \ + Dynarr_add_many (destination, work, len); \ + } \ + } \ } while (0) /* Read one byte from the current input buffer into Rth register. */ @@ -1838,7 +1847,7 @@ 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, CCL_MODE_DECODING); for (i = 0; i < 8; i++) XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]); XSETINT (XVECTOR_DATA (status)[8], ccl.ic);