diff options
| author | Eli Zaretskii | 1999-12-30 11:21:53 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1999-12-30 11:21:53 +0000 |
| commit | 04ee4f45e1368119d95c98453b2f755728d50f81 (patch) | |
| tree | 10a6551a52b1dfc87dc004b7cb62791d5de19960 /src | |
| parent | 23bdfc9af669002b44b41982432f7118b1fd3b12 (diff) | |
| download | emacs-04ee4f45e1368119d95c98453b2f755728d50f81.tar.gz emacs-04ee4f45e1368119d95c98453b2f755728d50f81.zip | |
(IT_write_glyphs): Track last changes to struct glyph.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/msdos.c | 35 |
2 files changed, 27 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7ee522538fa..1ff7ba5ae8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 1999-12-30 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * msdos.c (IT_write_glyphs): Track last changes to struct glyph. | ||
| 4 | |||
| 1 | 1999-12-29 Eli Zaretskii <eliz@is.elta.co.il> | 5 | 1999-12-29 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 6 | ||
| 3 | * dispnew.c (mode_line_string): Support MS-DOS frames. | 7 | * dispnew.c (mode_line_string): Support MS-DOS frames. |
diff --git a/src/msdos.c b/src/msdos.c index b1cbb6b5580..cd969127fe1 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -782,11 +782,6 @@ IT_write_glyphs (struct glyph *str, int str_len) | |||
| 782 | int cf, chlen, enclen; | 782 | int cf, chlen, enclen; |
| 783 | unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *buf; | 783 | unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *buf; |
| 784 | unsigned ch; | 784 | unsigned ch; |
| 785 | register GLYPH g = GLYPH_FROM_CHAR_GLYPH (*str); | ||
| 786 | |||
| 787 | /* Find the actual glyph to display by traversing the entire | ||
| 788 | aliases chain for this glyph. */ | ||
| 789 | GLYPH_FOLLOW_ALIASES (tbase, tlen, g); | ||
| 790 | 785 | ||
| 791 | /* Glyphs with GLYPH_MASK_PADDING bit set are actually there | 786 | /* Glyphs with GLYPH_MASK_PADDING bit set are actually there |
| 792 | only for the redisplay code to know how many columns does | 787 | only for the redisplay code to know how many columns does |
| @@ -798,19 +793,35 @@ IT_write_glyphs (struct glyph *str, int str_len) | |||
| 798 | } | 793 | } |
| 799 | else | 794 | else |
| 800 | { | 795 | { |
| 796 | register GLYPH g = GLYPH_FROM_CHAR_GLYPH (*str); | ||
| 797 | int glyph_not_in_table = 0; | ||
| 798 | |||
| 799 | if (g < 0 || g >= tlen) | ||
| 800 | { | ||
| 801 | /* This glyph doesn't have an entry in Vglyph_table. */ | ||
| 802 | ch = str->u.ch; | ||
| 803 | glyph_not_in_table = 1; | ||
| 804 | } | ||
| 805 | else | ||
| 806 | { | ||
| 807 | /* This glyph has an entry in Vglyph_table, so process | ||
| 808 | any aliases before testing for simpleness. */ | ||
| 809 | GLYPH_FOLLOW_ALIASES (tbase, tlen, g); | ||
| 810 | ch = FAST_GLYPH_CHAR (g); | ||
| 811 | } | ||
| 812 | |||
| 801 | /* Convert the character code to multibyte, if they | 813 | /* Convert the character code to multibyte, if they |
| 802 | requested display via language environment. */ | 814 | requested display via language environment. We only want |
| 803 | ch = FAST_GLYPH_CHAR (g); | 815 | to convert unibyte characters to multibyte in unibyte |
| 804 | /* We only want to convert unibyte characters to multibyte | 816 | buffers! Otherwise, the 8-bit value in CH came from the |
| 805 | in unibyte buffers! Otherwise, the 8-bit code might come | 817 | display table set up to display foreign characters. */ |
| 806 | from the display table set up to display foreign characters. */ | ||
| 807 | if (SINGLE_BYTE_CHAR_P (ch) && convert_unibyte_characters | 818 | if (SINGLE_BYTE_CHAR_P (ch) && convert_unibyte_characters |
| 808 | && (ch >= 0240 | 819 | && (ch >= 0240 |
| 809 | || (ch >= 0200 && !NILP (Vnonascii_translation_table)))) | 820 | || (ch >= 0200 && !NILP (Vnonascii_translation_table)))) |
| 810 | ch = unibyte_char_to_multibyte (ch); | 821 | ch = unibyte_char_to_multibyte (ch); |
| 811 | 822 | ||
| 812 | /* Invalid characters are displayed with a special glyph. */ | 823 | /* Invalid characters are displayed with a special glyph. */ |
| 813 | if (! GLYPH_CHAR_VALID_P (ch)) | 824 | if (! CHAR_VALID_P (ch, 0)) |
| 814 | { | 825 | { |
| 815 | g = !NILP (Vdos_unsupported_char_glyph) | 826 | g = !NILP (Vdos_unsupported_char_glyph) |
| 816 | ? Vdos_unsupported_char_glyph | 827 | ? Vdos_unsupported_char_glyph |
| @@ -824,7 +835,7 @@ IT_write_glyphs (struct glyph *str, int str_len) | |||
| 824 | if (cf != screen_face) | 835 | if (cf != screen_face) |
| 825 | IT_set_face (cf); /* handles invalid faces gracefully */ | 836 | IT_set_face (cf); /* handles invalid faces gracefully */ |
| 826 | 837 | ||
| 827 | if (GLYPH_SIMPLE_P (tbase, tlen, g)) | 838 | if (glyph_not_in_table || GLYPH_SIMPLE_P (tbase, tlen, g)) |
| 828 | { | 839 | { |
| 829 | /* We generate the multi-byte form of CH in WORKBUF. */ | 840 | /* We generate the multi-byte form of CH in WORKBUF. */ |
| 830 | chlen = CHAR_STRING (ch, workbuf); | 841 | chlen = CHAR_STRING (ch, workbuf); |