Mercurial > emacs
comparison src/msdos.c @ 24001:fce0e760c4ab
(IT_write_glyphs): Move constant expression out of the loop.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 06 Jan 1999 10:08:24 +0000 |
parents | 35ba3fe1ad69 |
children | 7e59f6e590da |
comparison
equal
deleted
inserted
replaced
24000:2de7db40964d | 24001:fce0e760c4ab |
---|---|
693 | 693 |
694 struct coding_system *coding = CODING_REQUIRE_ENCODING (&terminal_coding) | 694 struct coding_system *coding = CODING_REQUIRE_ENCODING (&terminal_coding) |
695 ? &terminal_coding | 695 ? &terminal_coding |
696 : &safe_terminal_coding; | 696 : &safe_terminal_coding; |
697 | 697 |
698 /* Do we need to consider conversion of unibyte characters to | |
699 multibyte? */ | |
700 int convert_unibyte_characters | |
701 = NILP (current_buffer->enable_multibyte_characters) | |
702 && unibyte_display_via_language_environment; | |
703 | |
698 if (str_len == 0) return; | 704 if (str_len == 0) return; |
699 | 705 |
700 screen_buf = screen_bp = alloca (str_len * 2); | 706 screen_buf = screen_bp = alloca (str_len * 2); |
701 screen_buf_end = screen_buf + str_len * 2; | 707 screen_buf_end = screen_buf + str_len * 2; |
702 | 708 |
727 requested display via language environment. */ | 733 requested display via language environment. */ |
728 ch = FAST_GLYPH_CHAR (g); | 734 ch = FAST_GLYPH_CHAR (g); |
729 /* We only want to convert unibyte characters to multibyte | 735 /* We only want to convert unibyte characters to multibyte |
730 in unibyte buffers! Otherwise, the 8-bit code might come | 736 in unibyte buffers! Otherwise, the 8-bit code might come |
731 from the display table set up to display foreign characters. */ | 737 from the display table set up to display foreign characters. */ |
732 if (NILP (current_buffer->enable_multibyte_characters) | 738 if (SINGLE_BYTE_CHAR_P (ch) && convert_unibyte_characters |
733 && unibyte_display_via_language_environment | |
734 && SINGLE_BYTE_CHAR_P (ch) | |
735 && (ch >= 0240 | 739 && (ch >= 0240 |
736 || (ch >= 0200 && !NILP (Vnonascii_translation_table)))) | 740 || (ch >= 0200 && !NILP (Vnonascii_translation_table)))) |
737 ch = unibyte_char_to_multibyte (ch); | 741 ch = unibyte_char_to_multibyte (ch); |
738 | 742 |
739 /* Invalid characters are displayed with a special glyph. */ | 743 /* Invalid characters are displayed with a special glyph. */ |