len = BYTES_BY_CHAR_HEAD (c);
while (i < len)
{
- c = (*readbyte) (-1, readcharfun);
+ buf[i++] = c = (*readbyte) (-1, readcharfun);
if (c < 0 || ! TRAILING_CODE_P (c))
{
- while (--i > 1)
+ for (i -= c < 0; 0 < --i; )
(*readbyte) (buf[i], readcharfun);
return BYTE8_TO_CHAR (buf[0]);
}
- buf[i++] = c;
}
return STRING_CHAR (buf);
}
buf[i++] = c;
while (i < len)
{
- c = (*readbyte) (-1, readcharfun);
+ buf[i++] = c = (*readbyte) (-1, readcharfun);
if (c < 0xA0)
{
- while (--i > 1)
+ for (i -= c < 0; 0 < --i; )
(*readbyte) (buf[i], readcharfun);
return BYTE8_TO_CHAR (buf[0]);
}
- buf[i++] = c;
}
if (len == 2)