case CCL_STAT_SUSPEND_BY_DST:
result = CODING_FINISH_INSUFFICIENT_DST;
break;
+ case CCL_STAT_QUIT:
+ case CCL_STAT_INVALID_CMD:
+ result = CODING_FINISH_INTERRUPT;
+ break;
default:
result = CODING_FINISH_NORMAL;
break;
src += coding->consumed;
dst += inserted_byte;
+ if (result == CODING_FINISH_NORMAL)
+ {
+ src += len_byte;
+ break;
+ }
if (! encodep && result == CODING_FINISH_INCONSISTENT_EOL)
{
unsigned char *pend = dst, *p = pend - inserted_byte;
fake_multibyte = 1;
break;
}
+ if (result == CODING_FINISH_INTERRUPT)
+ {
+ /* The conversion procedure was interrupted by a user. */
+ fake_multibyte = 1;
+ break;
+ }
+ /* Now RESULT == CODING_FINISH_INSUFFICIENT_DST */
+ if (coding->consumed < 1)
+ {
+ /* It's quite strange to require more memory without
+ consuming any bytes. Perhaps CCL program bug. */
+ fake_multibyte = 1;
+ break;
+ }
if (first)
{
/* We have just done the first batch of conversion which was