comparison src/character.c @ 105661:bac26aa40069

Remove leftover table unibyte_to_multibyte_table. * character.c (unibyte_to_multibyte_table): Remove. (Funibyte_char_to_multibyte): Use MAKE_CHAR_MULTIBYTE. * charset.c (init_charset_once): Don't init unibyte_to_multibyte_table. * character.h (UNIBYTE_TO_CHAR): New macro. (MAKE_CHAR_MULTIBYTE): Use it. (unibyte_to_multibyte_table, unibyte_char_to_multibyte): Remove. * xdisp.c (get_next_display_element): USE ASCII_CHAR_P. (message_dolog, set_message_1): * search.c (Freplace_match): * editfns.c (Fcompare_buffer_substrings): * fns.c (Fcompare_strings): Use MAKE_CHAR_MULTIBYTE. (concat): * insdel.c (copy_text, count_size_as_multibyte): Use ASCII_CHAR_P and BYTE8_TO_CHAR. * term.c (produce_glyphs): * syntax.c (skip_chars): Use BYTE8_TO_CHAR. * regex.c (RE_CHAR_TO_MULTIBYTE): * cmds.c (internal_self_insert): * buffer.h (FETCH_CHAR_AS_MULTIBYTE): Use UNIBYTE_TO_CHAR.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 18 Oct 2009 03:08:32 +0000
parents 1896419e9422
children 68dd71358159
comparison
equal deleted inserted replaced
105660:c79f335459cf 105661:bac26aa40069
84 Lisp_Object Vscript_representative_chars; 84 Lisp_Object Vscript_representative_chars;
85 85
86 static Lisp_Object Qchar_script_table; 86 static Lisp_Object Qchar_script_table;
87 87
88 Lisp_Object Vunicode_category_table; 88 Lisp_Object Vunicode_category_table;
89
90 /* Mapping table from unibyte chars to multibyte chars. */
91 int unibyte_to_multibyte_table[256];
92
93 89
94 90
95 /* If character code C has modifier masks, reflect them to the 91 /* If character code C has modifier masks, reflect them to the
96 character code if possible. Return the resulting code. */ 92 character code if possible. Return the resulting code. */
97 93
323 319
324 CHECK_CHARACTER (ch); 320 CHECK_CHARACTER (ch);
325 c = XFASTINT (ch); 321 c = XFASTINT (ch);
326 if (c >= 0x100) 322 if (c >= 0x100)
327 error ("Not a unibyte character: %d", c); 323 error ("Not a unibyte character: %d", c);
328 if (c >= 0x80) 324 MAKE_CHAR_MULTIBYTE (c);
329 c = BYTE8_TO_CHAR (c);
330 return make_number (c); 325 return make_number (c);
331 } 326 }
332 327
333 DEFUN ("multibyte-char-to-unibyte", Fmultibyte_char_to_unibyte, 328 DEFUN ("multibyte-char-to-unibyte", Fmultibyte_char_to_unibyte,
334 Smultibyte_char_to_unibyte, 1, 1, 0, 329 Smultibyte_char_to_unibyte, 1, 1, 0,