Rev 4874 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4874 | Rev 4921 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | /* There's a leftover lone high surrogate. Write out the CESU-8 value |
79 | /* There's a leftover lone high surrogate. Write out the CESU-8 value |
80 | of the surrogate and proceed to convert the given character. Note |
80 | of the surrogate and proceed to convert the given character. Note |
81 | to return extra 3 bytes. */ |
81 | to return extra 3 bytes. */ |
82 | wchar_t tmp; |
82 | wchar_t tmp; |
83 | tmp = (state->__value.__wchb[0] << 16 | state->__value.__wchb[1] << 8) |
83 | tmp = (state->__value.__wchb[0] << 16 | state->__value.__wchb[1] << 8) |
84 | - 0x10000 >> 10 | 0xd80d; |
84 | - (0x10000 >> 10 | 0xd80d); |
85 | *s++ = 0xe0 | ((tmp & 0xf000) >> 12); |
85 | *s++ = 0xe0 | ((tmp & 0xf000) >> 12); |
86 | *s++ = 0x80 | ((tmp & 0xfc0) >> 6); |
86 | *s++ = 0x80 | ((tmp & 0xfc0) >> 6); |
87 | *s++ = 0x80 | (tmp & 0x3f); |
87 | *s++ = 0x80 | (tmp & 0x3f); |
88 | state->__count = 0; |
88 | state->__count = 0; |
89 | ret = 3; |
89 | ret = 3; |