aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* (ENCODE_ISO_CHARACTER): Pay attention toKenichi Handa1998-01-301-48/+46
| | | | | | | | | | | CODING_FLAG_ISO_USE_ROMAN and CODING_FLAG_ISO_USE_OLDJIS. (code_convert_region1): New function. (Fdecode_coding_region): Call code_convert_region1. (Fencode_coding_region): Likewise. (code_convert_string1): New function. (Fdecode_coding_string): Call code_convert_string1. (Fencode_coding_string): Likewise. /
* (DECODE_SJIS_BIG5_CHARACTER): Don't have to increaseKenichi Handa1998-01-281-2/+1
| | | | | coding->produced_char here. (code_convert_region): Initialize LEN_BYTE correctly.
* Vselect_safe_coding_system_function): New variable.Kenichi Handa1998-01-221-960/+1771
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (coding_category_table): This variable deleted. (Vcoding_category_table): New variable. (coding_category_name): Add "coding-category-iso-7-tight". (detect_coding_iso2022): Check the mask CODING_FLAG_ISO_DESIGNATION in CODING->FLAGS. Check a new coding category coding-category-iso-7-tight. (DECODE_DESIGNATION): Decode only such designations that CODING can handle. (check_composing_code): New function. (decode_coding_iso2022): Decode only such characters that CODING can handle. (encode_coding_iso2022): Before and after encoding composite characters, reset designation and invocation status. (detect_coding_sjis): Delete unnecessary check. (detect_coding_big5): Likewise. (encode_designation_at_bol): Check the validity of requested designation register. (setup_coding_system): Set requested designation registers for non-supported charsets to CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION. Set mask CODING_FLAG_ISO_DESIGNATION in CODING->FLAGS. Code tuned for no-conversion and undecided. (detect_coding): Adjusted for the new variable Vcoding_category_table. (syms_of_coding): Initialize Vcoding_category_table and staticpro it. Register select-safe-coding-system as a Lisp variable. (DECODE_CHARACTER_ASCII): Update coding->produced_char; (DECODE_CHARACTER_DIMENSION1): Likewise. (Qraw_text, Qcoding_category): New variables. (syms_of_coding): Intern and staticpro them. (coding_system_table): New variable. (CHARSET_OK, SHIFT_OUT_OK): New macros. (detect_coding_iso2022): Detection algorithm improved. (decode_coding_iso2022): Arg CONSUMED deleted, and the meaning of return value changed. Update members produced, produced_char, consumed, consumed_char of the struct *coding. Pay attention to CODING_MODE_INHIBIT_INCONSISTENT_EOL. (encode_coding_iso2022): Likewise. (decode_coding_sjis_big5, encode_coding_sjis_big5): Likewise. (decode_eol, encode_eol): Likewise. (ENCODE_ISO_CHARACTER): Update coding->consumed_char. (DECODE_SJIS_BIG5_CHARACTER): Update coding->produced_char. (ENCODE_SJIS_BIG5_CHARACTER): Update coding->consumed_char. (detect_coding(detect_coding(detect_ITIES and SKIP. (detect_coding): Adjusted for the change of detect_coding_mask. Update coding->heading_ascii. (detect_eol_type): New arg SKIP. (detect_eol): Adjusted for the change of detect_eol_type. (ccl_codign_driver): New function. (decode_coding): Arg CONSUMED deleted, and the meaning of return value changed. Update members produced, produced_char, consumed, consumed_char of the struct *coding. (encode_coding): Likewise. (shrink_decoding_region, shrink_encoding_region): New function. (code_convert_region, code_convert_string): Completely rewritten. (detect_coding_sy(detect_coding_sy(detect_coding_sy(detect_coding_sy(detect_codiT. (Fdetect_coding_string): New function. (Fdecode_coding_region, Fencode_coding_region): Adjusted for the change of code_convert_region. (Fdecode_coding_string, Fencode_coding_string): Adjusted for the change of code_convert_string. (Fupdate_iso_coding_systems): New function. (init_coding_once): Initialize coding_system_table.
* Update copyright year.Richard M. Stallman1998-01-211-1/+1
|
* (code_convert_region): Always count chars insertedRichard M. Stallman1998-01-191-61/+62
| | | | | | | | in accord with value of enable-multilibyte-characters. (Fcoding_system_p): Doc fix. (Fcheck_coding_system): Doc fix. (Fterminal_coding_system): Doc fix. (Fkeyboard_coding_system): Doc fix.
* (code_convert_region): Delete duplicate local `zv_before'.Karl Heuer1998-01-181-1/+0
|
* (code_convert_string): Maybe use make_unibyte_string.Richard M. Stallman1998-01-091-5/+17
|
* (code_convert_region): Handle bytepos and charpos.Richard M. Stallman1998-01-011-36/+81
| | | | (Fdetect_coding_region): Likewise.
* (setup_coding_system): Do not setKenichi Handa1997-12-091-1/+3
| | | | | | Vlast_coding_system_used here. (decode_coding_sjis_big5): Decode Big5 text of CR only end-of-line correctly.
* (setup_coding_system): Initialize common_flags memberKenichi Handa1997-11-081-9/+38
| | | | | instead of require_flushing member of `*coding'. (code_convert_region): Fix previous change.
* (encode_designation_at_bol): Fix bug of finding graphicKenichi Handa1997-10-231-20/+67
| | | | | | | | | | | | | | | | | | | registers which should be designated at bol. (Qsafe_charset): New variable. (syms_of_coding): Initialize and staticpro it. (detect_coding_iso2022): Handle SS2 and SS3 correctly. (DECODE_ISO_CHARACTER): Recover from incorrect encoding in less dangerous way. (ENCODE_DESIGNATION): Get charset revision number by CODING_SPEC_ISO_REVISION_NUMBER. (setup_coding_system): Initialize the member safe_charsets from the coding systems's safe-charsets property. Initialize the member charset_revision_number of struct iso2022_spec. (ENCODE_ISO_CHARACTER_DIMENSION1): Adjusted for the change of `safe_charsets' member. (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise. (code_convert_region): Restore the current point after calling a function in coding->post_read_conversion.
* (Qcoding_system_spec): Deleted.Kenichi Handa1997-10-211-81/+67
| | | | | | | | | | | | | | (Vcoding_system_list, Vcoding_system_alist): New variables. (setup_coding_system): Adjusted for the change in mule.el. (detect_eol): Likewise. (Fcoding_system_spec): Changed to Lisp function in mule.el. (Fcoding_system_p): Do not call Fcoding_system_spec. (Fread_coding_system): Give Vcoding_system_alist to Fcompleting_read as the arg TABLE. (Fread_non_nil_coding_system): Likewise. Give Vcoding_system_history to Fcompleting_read as the arg HIST. (syms_of_coding): Deleted codes for Qcoding_system and Fcoding_system_spec. Set up new Lisp variables.
* (encode_designation_at_bol): Fix type of local vars C1, C2.Richard M. Stallman1997-09-091-1/+2
|
* (Fencode_coding_string, Fdecode_coding_string): Doc fixes.Richard M. Stallman1997-09-081-4/+4
|
* (Ffind_operation_coding_system): If a function inKenichi Handa1997-09-051-2/+10
| | | | | XXX-coding-system-alist returns a coding system (instead of cons of coding systems), return cons of it.
* (Fread_coding_system): New optional arg DEFAULT_CODING_SYSTEM.Richard M. Stallman1997-09-051-5/+9
|
* (Qcoding_system_history): New variable.Richard M. Stallman1997-09-041-2/+7
| | | | | (syms_of_coding): Initialize it. (Fread_coding_system): Use Qcoding_system_history.
* (setup_coding_system, Ffind_operation_coding_system)Richard M. Stallman1997-09-041-6/+12
| | | | | (Fdetect_coding_region, Fread_coding_system): Don't initialize a Lisp_Object.
* (detect_coding_mask): Re-work previous change.Richard M. Stallman1997-09-041-2/+2
| | | | (detect_eol): Fix use of == instead of -.
* (detect_coding_mask): Add in CODING_CATEGORY_MASK_RAW_TEXTRichard M. Stallman1997-09-021-0/+1
| | | | in the detect_coding_iso2022 case.
* (detect_eol): Do not select no-conversion even if EOLKenichi Handa1997-08-281-2/+2
| | | | | | | format of raw-text file is inconsistent. Just read it by raw-text-unix. (Fdetect_coding_region): Do not select no-conversion even if EOL format of raw-text file is inconsistent.
* (Qno_conversion, Qundecided): New variables.Kenichi Handa1997-08-281-42/+87
| | | | | | | | | | | | | | | | | | (syms_of_coding): Initialize and staticpro them. (coding_category_name): Include "coding-category-raw-test". (setup_coding_system): Handle coding_type_raw_text. (detect_coding_mask): Include CODING_CATEGORY_MASK_RAW_TEXT in the return value instead of CODING_CATEGORY_MASK_BINARY. (detect_coding): Do not check the case that `mask' is 0, which never happens now. (detect_eol_type): If EOL format is inconsistent, return CODING_EOL_INCONSISTENT. (detect_eol): If EOL format of raw-text file is inconsistent, detect it as no-conversion. (decode_coding): Handle coding_type_raw_text. (encode_coding): Likewise. (Fdetect_coding_region): Ajusted for the above changes. (shrink_conversion_area): Handle coding_type_raw_text.
* (Fread_non_nil_coding_system): Supply the argKenichi Handa1997-08-261-2/+2
| | | | | INHERIT-INPUT-METHOD to Fcompleting_read. (Fread_coding_system): Likewise.
* (detect_eol): If the coding system an alias, getKenichi Handa1997-08-221-2/+5
| | | | eol-type from the base of it.
* (CODING_FLAG_ISO_LATIN_EXTRA): New macro.Kenichi Handa1997-08-161-17/+46
|
* (Fset_terminal_coding_system_internal): SetKenichi Handa1997-08-101-109/+116
| | | | | | | CODING_FLAG_ISO_SAFE in terminal_coding.flags. (ENCODE_ISO_CHARACTER_DIMENSION1): Check CODING_SPEC_ISO_EXPECTED_CHARSETS. (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise.
* (ENCODE_ISO_CHARACTER_DIMENSION1): Pay attention toKenichi Handa1997-08-101-112/+177
| | | | | | | | | | | | | CODING_FLAG_ISO_SAFE. (ENCODE_ISO_CHARACTER_DIMENSION2): Likewise. (safe_terminal_coding): New variable. (Fset_safe_terminal_coding_system_internal): New function. (init_coding_once): Initilize safe_terminal_coding. (syms_of_coding): Declare set-safe-terminal-coding-system as a Lisp function. (Vmicrosoft_code_table): New variable. (syms_of_coding): Declare it as a Lisp variable and initialize it. (detect_coding_mask): Pay attention to Vmicrosoft_code_table.
* (syms_of_coding): Doc syntax fixes.Richard M. Stallman1997-08-061-2/+2
|
* (detect_eol_type): Fix previous change.Kenichi Handa1997-08-061-1/+1
|
* (detect_eol_type): If EOL representation does notRichard M. Stallman1997-08-051-8/+23
| | | | seem consistent, use no conversion.
* (detect_coding_iso2022): Do not exclude posibility ofKenichi Handa1997-08-041-20/+41
| | | | | | 7-bit encoding when designation to G1 occurs. If CSI, SS2, or SS3 is found, return CODING_CATEGORY_MASK_ISO_8_ELSE. (Fdetect_coding_region): Doc-string modified.
* (detect_coding_mask): Include CODING_CATEGORY_MASK_BINARY in theRichard M. Stallman1997-08-041-9/+15
| | | | | | return value if any 8-bit code is found. Doc fix.
* (encode_coding_iso2022): When source data ends not atKenichi Handa1997-08-011-4/+6
| | | | | | | character boundardy, set data in coding->carryover correctly, and set SRC to SRC_END. (encode_coding_sjis_big5): Likewise. (encode_coding): Don't set coding->carryover_size to 0.
* (encode_coding_iso2022): Write out invalid multibyteKenichi Handa1997-07-311-6/+46
| | | | | | forms in a buffer as is. (detect_coding_mask): If ISO_CODE_CSI appears in an invalid sequence, ignore it.
* (syms_of_coding): Doc fix.Richard M. Stallman1997-07-221-3/+7
|
* (Ffind_operation_coding_system): Use Ffboundp toRichard M. Stallman1997-07-181-1/+1
| | | | check for a function entry.
* (detect_coding_iso2022): Distinguish coding-category-iso-7-else andKenichi Handa1997-07-151-22/+41
| | | | coding-category-iso-8-else.
* Comment changes.Richard M. Stallman1997-07-131-60/+58
|
* (Ffind_coding_system): Use call1, not call2.Richard M. Stallman1997-07-121-1/+1
|
* (Qemacs_mule, inhibit_eol_conversion): New variables.Kenichi Handa1997-07-071-11/+40
| | | | | | | | | | | | (setup_coding_system): If inhibit_eol_conversion is 0, set coding->eol_type to CODING_EOL_LF. (syms_of_coding): Initialize and staticpro Qemacs_mule. Change error-message property of coding-system-error. Declare inhibit-eol-conversion as Lisp variable. (system_eol_type): New variable. (init_coding_once): Initialize it. (ENCODE_SJIS_BIG5_CHARACTER): Bug in encoding a BIG5 character fixed.
* Fix bugs with inappropriate mixing of Lisp_Object with int.Richard M. Stallman1997-07-041-3/+6
|
* (Vstandard_character_unification_table_for_decode):Kenichi Handa1997-07-021-50/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Name changed from Vstandard_character_unification_table_for_read. (Vstandard_character_unification_table_for_encode): Name changed from Vstandard_character_unification_table_for_write. (Qcharacter_unification_table_for_decode): New variable. (Qcharacter_unification_table_for_encode): New variable. (decode_coding_iso2022): Adjusted for the above name change. (encode_coding_iso2022): Likewise. (ENCODE_ISO_CHARACTER): Bug of handling return value of unify_char fixed. (DECODE_SJIS_BIG5_CHARACTER): New macro. (decode_coding_sjis_big5): Handle character unificatoin table. Use macro DECODE_SJIS_BIG5_CHARACTER. (encode_coding_sjis_big5): Handle character unificatoin table. Use macro ENCODE_SJIS_BIG5_CHARACTER. (setup_coding_system): Handle members character_unification_table_for_decode and character_unification_table_for_encode of the variable coding. (Ffind_operation_coding_system): Renamed from Ffind_coding_system. (syms_of_coding): Initialize and staticpro Qcharacter_unification_table_for_decode and Qcharacter_unification_table_for_decode. Declare Ffind_operation_coding_system as Lisp functions. Declare Vstandard_character_unification_table_for_decode and Vstandard_character_unification_table_for_encode as Lisp variables.
* (syms_of_coding): Change initial values of eol_mnemonic_... variables.Richard M. Stallman1997-07-021-4/+4
|
* (detect_coding_iso2022): Initilize mask correctly.Kenichi Handa1997-06-181-5/+4
|
* Change copyright notices.Richard M. Stallman1997-06-161-3/+2
|
* (Vcoding_system_alist): Deleted.Kenichi Handa1997-06-091-38/+88
| | | | | | | | | | (Qcoding_system_spec): Renamed from Qcoding_system_vector. (Vdefault_process_coding_system, Vfile_coding_system_alist, Vprocess_coding_system_alist, Vnetwork_coding_system_alist): New variables. (Ffind_coding_system): Adjusted for the above change. (syms_of_coding): Declare them as lisp variables. (Fcheck_coding_system): Pass list as DATA argument to Fsignal.
* (encode_invocation_designation): Use macroKenichi Handa1997-05-281-24/+16
| | | | | | | | | | CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION. (encode_designation_at_bol, setup_coding_system): Likewise. Fset_terminal_coding_system_internal): Renamed from Fset_terminal_coding_system. Make it non-interactive. Do not call Fredraw_display (). (Fset_keyboard_coding_system_internal): Renamed from Fset_keyboard_coding_system. Make it non-interactive.
* Name change through the code:Kenichi Handa1997-05-161-58/+60
| | | | | | | | | | coding-category-internal => coding-category-emacs-mule, XXX_coding_internal => XXX_coding_emacs_mule, coding_type_internal => coding_type_emacs_mule, coding_type_automatic => coding_type_undecided, CODING_CATEGORY_MASK_INTERNAL => CODING_CATEGORY_MASK_EMACS_MULE, CODING_CATEGORY_IDX_INTERNAL => CODING_CATEGORY_IDX_EMACS_MULE, CODING_EOL_AUTOMATIC => CODING_EOL_UNDECIDED.
* (Valternate_charset_table): The valiable deleted.Kenichi Handa1997-05-101-95/+152
| | | | | | | | | | | | | | | | | | | | | | | (Venable_character_unification, Vstandard_character_unification_table_for_read, Vstandard_character_unification_table_for_write, Qcharacter_unification_table): New variables. (syms_of_coding): Initialize and declare them. (DECODE_ISO_CHARACTER): Modified to handle a character unification table instead of Valternate_charset_table. (DECODE_DESIGNATION): Delete handling of Valternate_charset_table. (decode_coding_iso2022): Handle a character unification table. (ENCODE_ISO_CHARACTER): New macro. (encode_designation_at_bol): Handle a character unification table. Do not return -1 even if end-of-line is not in the current run. (encode_coding_iso2022): Handle a character unification table. Call macro ENCODE_ISO_CHARACTER instead of calling ENCODE_ISO_CHARACTER_DIMENSION1 and ENCODE_ISO_CHARACTER_DIMENSION2 directly. Check the size of carryover before copying it to destination. (setup_coding_system): Initialize the member character_unification_table of the struct coding system to Qnil. (Fset_keyboard_coding_system): Doc string augmented.
* (Fread_coding_system, Fread_non_nil_coding_system):Richard M. Stallman1997-05-101-7/+9
| | | | Pass new arg to Fcompleting_read.