(enum pvec_type): New member PVEC_SUB_CHAR_TABLE.
(XSUB_CHAR_TABLE, XSETSUB_CHAR_TABLE): New macros.
(CHAR_TABLE_ORDINARY_SLOTS, CHAR_TABLE_SINGLE_BYTE_SLOTS,
SUB_CHAR_TABLE_ORDINARY_SLOTS, SUB_CHAR_TABLE_STANDARD_SLOTS):
Deleted.
(CHAR_TABLE_REF, CHAR_TABLE_SET): Adjusted for the new char table
structure.
(CHAR_TABLE_TRANSLATE): Just call char_table_translate.
(CHARTAB_SIZE_BITS_0, CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2,
CHARTAB_SIZE_BITS_3): New macros.
(chartab_size): Extern it.
(struct Lisp_Char_Table): Re-designed.
(struct Lisp_Sub_Char_Table): New structure.
(HASH_KEY, HASH_VALUE): Moved from fns.c.
(CHARACTERBITS): Defined as 22.
(GLYPH_MASK_FACE, GLYPH_MASK_CHAR): Adjusted for the above change.
(SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE.
(GC_SUB_CHAR_TABLE_P): New macro.
(Fencode_coding_string, Fdecode_coding_string): EXFUN Updated.
(code_convert_string_norecord): Extern deleted.
(init_character_once, syms_of_character, init_charset,
syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them.
Include "character.h".
(read_multibyte): New arg NBYTES.
(read_escape): The meaning of returned *BYTEREP changed.
(to_multibyte): Deleted.
(read1): Adjuted the handling of char table and string.
* print.c: Include "character.h" instead of "charset.h".
(print_string): Convert 8-bit raw bytes to octal form by
string_escape_byte8.
(print_object): Adjusted for the new multibyte form.  Print 8-bit
raw bytes always in octal form.  Handle sub char table correctly.
Include "character.h" instead of "charset.h".
(read_process_output): Adjusted for the new code-conversion API.
(send_process): Likewise.
(BASE_PURESIZE): Increased.
* regex.c: Include "character.h" instead of "charset.h".
(BYTE8_TO_CHAR, CHAR_BYTE8_P) [not emacs]: New dummy macros.
(regex_compile): Accept a range whose starting and ending
character have different leading bytes.
(analyse_first): Adjusted for the above change.
Include "character.h" instead of "charset.h".
(search_buffer, boyer_moore): Adjusted for the new multibyte form.
(Freplace_match): Adjusted for the change of
multibyte_char_to_unibyte.
Include "character.h" instead of "charset.h".
(syntax_parent_lookup): Deleted.
(Fmodify_syntax_entry): Accept a cons as CHAR.
(skip_chars): Adjusted for the new multibyte form.
(init_syntax_once): Call char_table_set_range instead of directly
accessing the structure of a char table.
(SET_RAW_SYNTAX_ENTRY): Call CHAR_TABLE_SET.
(SYNTAX_ENTRY_FOLLOW_PARENT): Macro deleted.
(SET_RAW_SYNTAX_ENTRY_RANGE): New macro.
(SYNTAX_ENTRY_INT): Call CHAR_TABLE_REF.
Include "buffer.h" and "character.h".
(encode_terminal_code): Adjusted for the new code-conversion API.
(write_glyphs): Likewise.
(produce_glyphs): Call CHAR_WIDTH instead of CHARSET_WIDTH.
(x_new_font): Adjusted for the change of FS_LOAD_FONT.
Include "character.h".
(get_next_display_element): Adjusted for the new multibyte form.
(disp_char_vector): Adjusted for the new char table structure.
(decode_mode_spec_coding): Adjusted for the new structure of
coding system.
(decode_mode_spec): Adjusted for the new code-conversion API.
Include "character.h" instead of "charset.h".
(load_face_font): Adjusted for the change of choose_face_font and
FS_LOAD_FONT.
(generate_ascii_font): New function.
(set_lface_from_font_name): Adjusted for the change of
FS_LOAD_FONT.
(set_font_frame_param): Adjusted for the change of
choose_face_font.
(free_realized_face): Make it public.
(free_realized_faces_for_fontset): Renamed from
free_realized_multibyte_face.  Free also faces realized for ASCII.
(choose_face_font): Argments changed.  Adjusted for the change of
fontset_font_pattern and FS_LOAD_FONT.
Include "character.h".
(x_encode_text): Adjusted for the new code-conversion API.
Don't bind multibyte characters to self-insert-command here.  It's
done in mule-conf.el
(set-case-syntax-offset): Variable deleted.
(set-case-syntax-1): Function deleted.  Callers changed.
(set-case-syntax-delims): Don't check byte length of characters.
(isearch-mode-map): Call set-char-table-range to bind
characters to isearch-printing-char.
Don't load "international/utf-8".  Don't call
update-coding-systems-internal.  Bind coding-system-for-write to
`utf-8' while writing fns-XXX.el.  Call clear-charset-maps before
dumping.
(emacs-version): Set to "22.0.0".
(regexp-opt-charset): Adjusted for the
change of map-char-table.