aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii1999-01-06 10:08:24 +0000
committerEli Zaretskii1999-01-06 10:08:24 +0000
commit52d38ab2d9c8b6300f03ef539fa6b5320379a92b (patch)
tree36af21996373311ba20e357f09ef2ec449dcc471
parent110201c8f711c8452d50640afeccd6a33000d473 (diff)
downloademacs-52d38ab2d9c8b6300f03ef539fa6b5320379a92b.tar.gz
emacs-52d38ab2d9c8b6300f03ef539fa6b5320379a92b.zip
(IT_write_glyphs): Move constant expression out of the loop.
-rw-r--r--src/msdos.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/msdos.c b/src/msdos.c
index 9b70fbea74e..7abe41a6124 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -695,6 +695,12 @@ IT_write_glyphs (GLYPH *str, int str_len)
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);
@@ -729,9 +735,7 @@ IT_write_glyphs (GLYPH *str, int str_len)
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);