mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-18 11:50:38 -08:00
merge trunk
This commit is contained in:
commit
c194970e15
294 changed files with 8085 additions and 4708 deletions
63
src/coding.c
63
src/coding.c
|
|
@ -920,65 +920,18 @@ record_conversion_result (struct coding_system *coding,
|
|||
|
||||
|
||||
/* Store multibyte form of the character C in P, and advance P to the
|
||||
end of the multibyte form. This is like CHAR_STRING_ADVANCE but it
|
||||
never calls MAYBE_UNIFY_CHAR. */
|
||||
|
||||
#define CHAR_STRING_ADVANCE_NO_UNIFY(c, p) \
|
||||
do { \
|
||||
if ((c) <= MAX_1_BYTE_CHAR) \
|
||||
*(p)++ = (c); \
|
||||
else if ((c) <= MAX_2_BYTE_CHAR) \
|
||||
*(p)++ = (0xC0 | ((c) >> 6)), \
|
||||
*(p)++ = (0x80 | ((c) & 0x3F)); \
|
||||
else if ((c) <= MAX_3_BYTE_CHAR) \
|
||||
*(p)++ = (0xE0 | ((c) >> 12)), \
|
||||
*(p)++ = (0x80 | (((c) >> 6) & 0x3F)), \
|
||||
*(p)++ = (0x80 | ((c) & 0x3F)); \
|
||||
else if ((c) <= MAX_4_BYTE_CHAR) \
|
||||
*(p)++ = (0xF0 | (c >> 18)), \
|
||||
*(p)++ = (0x80 | ((c >> 12) & 0x3F)), \
|
||||
*(p)++ = (0x80 | ((c >> 6) & 0x3F)), \
|
||||
*(p)++ = (0x80 | (c & 0x3F)); \
|
||||
else if ((c) <= MAX_5_BYTE_CHAR) \
|
||||
*(p)++ = 0xF8, \
|
||||
*(p)++ = (0x80 | ((c >> 18) & 0x0F)), \
|
||||
*(p)++ = (0x80 | ((c >> 12) & 0x3F)), \
|
||||
*(p)++ = (0x80 | ((c >> 6) & 0x3F)), \
|
||||
*(p)++ = (0x80 | (c & 0x3F)); \
|
||||
else \
|
||||
(p) += BYTE8_STRING ((c) - 0x3FFF80, p); \
|
||||
} while (0)
|
||||
end of the multibyte form. This used to be like CHAR_STRING_ADVANCE
|
||||
without ever calling MAYBE_UNIFY_CHAR, but nowadays we don't call
|
||||
MAYBE_UNIFY_CHAR in CHAR_STRING_ADVANCE. */
|
||||
|
||||
#define CHAR_STRING_ADVANCE_NO_UNIFY(c, p) CHAR_STRING_ADVANCE(c, p)
|
||||
|
||||
/* Return the character code of character whose multibyte form is at
|
||||
P, and advance P to the end of the multibyte form. This is like
|
||||
STRING_CHAR_ADVANCE, but it never calls MAYBE_UNIFY_CHAR. */
|
||||
|
||||
#define STRING_CHAR_ADVANCE_NO_UNIFY(p) \
|
||||
(!((p)[0] & 0x80) \
|
||||
? *(p)++ \
|
||||
: ! ((p)[0] & 0x20) \
|
||||
? ((p) += 2, \
|
||||
((((p)[-2] & 0x1F) << 6) \
|
||||
| ((p)[-1] & 0x3F) \
|
||||
| ((unsigned char) ((p)[-2]) < 0xC2 ? 0x3FFF80 : 0))) \
|
||||
: ! ((p)[0] & 0x10) \
|
||||
? ((p) += 3, \
|
||||
((((p)[-3] & 0x0F) << 12) \
|
||||
| (((p)[-2] & 0x3F) << 6) \
|
||||
| ((p)[-1] & 0x3F))) \
|
||||
: ! ((p)[0] & 0x08) \
|
||||
? ((p) += 4, \
|
||||
((((p)[-4] & 0xF) << 18) \
|
||||
| (((p)[-3] & 0x3F) << 12) \
|
||||
| (((p)[-2] & 0x3F) << 6) \
|
||||
| ((p)[-1] & 0x3F))) \
|
||||
: ((p) += 5, \
|
||||
((((p)[-4] & 0x3F) << 18) \
|
||||
| (((p)[-3] & 0x3F) << 12) \
|
||||
| (((p)[-2] & 0x3F) << 6) \
|
||||
| ((p)[-1] & 0x3F))))
|
||||
P, and advance P to the end of the multibyte form. This used to be
|
||||
like STRING_CHAR_ADVANCE without ever calling MAYBE_UNIFY_CHAR, but
|
||||
nowadays STRING_CHAR_ADVANCE doesn't call MAYBE_UNIFY_CHAR. */
|
||||
|
||||
#define STRING_CHAR_ADVANCE_NO_UNIFY(p) STRING_CHAR_ADVANCE(p)
|
||||
|
||||
/* Set coding->source from coding->src_object. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue