diff options
| author | Kenichi Handa | 1999-12-15 00:21:15 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-12-15 00:21:15 +0000 |
| commit | c7cba11dec7232f8598a97001e6b4d52d7701849 (patch) | |
| tree | aa1105d970ca8adf206f4a6af1cfa716814fc26c /src | |
| parent | aa9b6dd66b99ae283e373fe72e6dc006c1509541 (diff) | |
| download | emacs-c7cba11dec7232f8598a97001e6b4d52d7701849.tar.gz emacs-c7cba11dec7232f8598a97001e6b4d52d7701849.zip | |
(encode_terminal_code): Delete codes for a composite
character. Adjusted for the change of CHAR_STRING.
(produce_glyphs): When called, it->what can be IT_COMPOSITION.
Delete codes for a composite character.
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/src/term.c b/src/term.c index fc6fa103187..7900643dfdc 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -926,7 +926,7 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed) | |||
| 926 | unsigned char *dst_start = dst, *dst_end = dst + dst_len; | 926 | unsigned char *dst_start = dst, *dst_end = dst + dst_len; |
| 927 | register GLYPH g; | 927 | register GLYPH g; |
| 928 | unsigned int c; | 928 | unsigned int c; |
| 929 | unsigned char workbuf[4], *buf; | 929 | unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *buf; |
| 930 | int len; | 930 | int len; |
| 931 | register int tlen = GLYPH_TABLE_LENGTH; | 931 | register int tlen = GLYPH_TABLE_LENGTH; |
| 932 | register Lisp_Object *tbase = GLYPH_TABLE_BASE; | 932 | register Lisp_Object *tbase = GLYPH_TABLE_BASE; |
| @@ -950,13 +950,6 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed) | |||
| 950 | c = ' '; | 950 | c = ' '; |
| 951 | g = MAKE_GLYPH (sf, c, GLYPH_FACE (sf, g)); | 951 | g = MAKE_GLYPH (sf, c, GLYPH_FACE (sf, g)); |
| 952 | } | 952 | } |
| 953 | if (COMPOSITE_CHAR_P (c)) | ||
| 954 | { | ||
| 955 | /* If C is a composite character, we can display | ||
| 956 | only the first component. */ | ||
| 957 | g = cmpchar_table[COMPOSITE_CHAR_ID (c)]->glyph[0], | ||
| 958 | c = GLYPH_CHAR (sf, g); | ||
| 959 | } | ||
| 960 | if (c < tlen) | 953 | if (c < tlen) |
| 961 | { | 954 | { |
| 962 | /* G has an entry in Vglyph_table, | 955 | /* G has an entry in Vglyph_table, |
| @@ -965,8 +958,11 @@ encode_terminal_code (src, dst, src_len, dst_len, consumed) | |||
| 965 | c = GLYPH_CHAR (sf, g); | 958 | c = GLYPH_CHAR (sf, g); |
| 966 | } | 959 | } |
| 967 | if (GLYPH_SIMPLE_P (tbase, tlen, g)) | 960 | if (GLYPH_SIMPLE_P (tbase, tlen, g)) |
| 968 | /* We set the multi-byte form of C at BUF. */ | 961 | { |
| 969 | len = CHAR_STRING (c, workbuf, buf); | 962 | /* We set the multi-byte form of C at WORKBUF. */ |
| 963 | len = CHAR_STRING (c, workbuf); | ||
| 964 | buf = workbuf; | ||
| 965 | } | ||
| 970 | else | 966 | else |
| 971 | { | 967 | { |
| 972 | /* We have a string in Vglyph_table. */ | 968 | /* We have a string in Vglyph_table. */ |
| @@ -1780,11 +1776,15 @@ produce_glyphs (it) | |||
| 1780 | { | 1776 | { |
| 1781 | /* If a hook is installed, let it do the work. */ | 1777 | /* If a hook is installed, let it do the work. */ |
| 1782 | xassert (it->what == IT_CHARACTER | 1778 | xassert (it->what == IT_CHARACTER |
| 1779 | || it->what == IT_COMPOSITION | ||
| 1783 | || it->what == IT_IMAGE | 1780 | || it->what == IT_IMAGE |
| 1784 | || it->what == IT_STRETCH); | 1781 | || it->what == IT_STRETCH); |
| 1785 | 1782 | ||
| 1786 | /* Nothing but characters are supported on terminal frames. */ | 1783 | /* Nothing but characters are supported on terminal frames. For a |
| 1787 | xassert (it->what == IT_CHARACTER); | 1784 | composition sequence, it->c is the first character of the |
| 1785 | sequence. */ | ||
| 1786 | xassert (it->what == IT_CHARACTER | ||
| 1787 | || it->what == IT_COMPOSITION); | ||
| 1788 | 1788 | ||
| 1789 | if (it->c >= 040 && it->c < 0177) | 1789 | if (it->c >= 040 && it->c < 0177) |
| 1790 | { | 1790 | { |
| @@ -1829,17 +1829,13 @@ produce_glyphs (it) | |||
| 1829 | } | 1829 | } |
| 1830 | else | 1830 | else |
| 1831 | { | 1831 | { |
| 1832 | /* A multi-byte character. The display width is a per character | 1832 | /* A multi-byte character. The display width is fixed for all |
| 1833 | value for characters of set CHARSET_COMPOSITION; otherwise | 1833 | characters of the set. Some of the glyphs may have to be |
| 1834 | it is fixed for all characters of the set. Some of the | 1834 | ignored because they are already displayed in a continued |
| 1835 | glyphs may have to be ignored because they are already | 1835 | line. */ |
| 1836 | displayed in a continued line. */ | ||
| 1837 | int charset = CHAR_CHARSET (it->c); | 1836 | int charset = CHAR_CHARSET (it->c); |
| 1838 | 1837 | ||
| 1839 | if (charset == CHARSET_COMPOSITION) | 1838 | it->pixel_width = CHARSET_WIDTH (charset); |
| 1840 | it->pixel_width = cmpchar_table[COMPOSITE_CHAR_ID (it->c)]->width; | ||
| 1841 | else | ||
| 1842 | it->pixel_width = CHARSET_WIDTH (charset); | ||
| 1843 | it->nglyphs = it->pixel_width; | 1839 | it->nglyphs = it->pixel_width; |
| 1844 | 1840 | ||
| 1845 | if (it->glyph_row) | 1841 | if (it->glyph_row) |