- /* Scan all single-byte characters from start of string. */
- for (i = 0; i < len;)
- {
- c = SREF (obj, i);
-
- if (multibyte && c >= 0x80)
- /* A multibyte character can't be handled in this
- simple loop. */
- break;
- if (inword && flag != CASE_CAPITALIZE_UP)
- c = DOWNCASE (c);
- else if (!UPPERCASEP (c)
- && (!inword || flag != CASE_CAPITALIZE_UP))
- c = UPCASE1 (c);
- /* If this char won't fit in a single-byte string.
- fall out to the multibyte case. */
- if (multibyte ? ! ASCII_BYTE_P (c)
- : ! SINGLE_BYTE_CHAR_P (c))
- break;
-
- SSET (obj, i, c);
- if ((int) flag >= (int) CASE_CAPITALIZE)
- inword = SYNTAX (c) == Sword;
- i++;
- }