aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Doc fixes.Karl Heuer1998-06-201-1/+1
|
* (encode_eol): Fix typo that prevented converting to MacRichard M. Stallman1998-06-161-7/+5
| | | | | | line endings. Always update dst_bytes to number of bytes actually copied. (decode_eol): Fix value of coding->produced when decoding Unix line endings (in case this function is ever used for that).
* (detect_coding_system): Always return a list of HIGHEST is zero.Kenichi Handa1998-06-131-5/+7
| | | | | (Fdetect_coding_region): Doc-string adjusted for the above change. (Fdetect_coding_string): Likewise.
* (code_convert_string_norecord): New function.Karl Heuer1998-06-031-0/+22
| | | | Does encoding or decoding but doesn't set Vlast_coding_system_used.
* (detect_coding_mask): Initilize local variable C.Kenichi Handa1998-06-021-0/+1
|
* (detect_coding_system): Treat CODING_EOL_INCONSISTENTRichard M. Stallman1998-05-261-2/+3
| | | | like CODING_EOL_UNDECIDED.
* (ascii_skip_code): New variable.Kenichi Handa1998-05-251-36/+53
| | | | | | | | | | | | (detect_coding_mask): Skip ASCII codes at the head according to ascii_skip_code. (coding_priorities): New variable. (Fset_coding_priority_internal): New function. (detect_coding): Call set_coding_mask with coding_priorities as arg CODING. (init_coding_once): Initialize ascii_skip_code. (syms_of_coding): Declare set-coding-priority-internal as a Lisp function.
* Change term "character translation table" to "translation table".Kenichi Handa1998-05-221-49/+43
|
* (shrink_decoding_region): No short cut byKenichi Handa1998-05-211-3/+3
| | | | coding->heading_ascii if eol conversion is necessary.
* Change terms unify/unification toKenichi Handa1998-05-181-147/+161
| | | | | | | | | | | | translate/translation respectively throughtout the file. (encode_coding_iso2022): Fix bug in encoding a text ending by a composite character. (check_composing_code): If we are decoding the last block of data, return 0 even if the source doesn't end by an escape sequence which terminates the current composing sequence. (decode_coding_iso2022): Decode correctly even if the source doesn't end by an escape sequence which terminates the current composing sequence.
* (code_convert_region1): Set Vlast_coding_system_used.Richard M. Stallman1998-05-101-6/+20
| | | | | | (code_convert_string1): Likewise. (Fdecode_coding_region, Fencode_coding_region): Doc fixes. (Fdecode_coding_string, Fencode_coding_string): Doc fixes.
* (detect_coding_mask): Check also coding-category-binary.Richard M. Stallman1998-05-091-6/+9
|
* (encode_coding_iso2022): Don't skip a code following some invalid code.Richard M. Stallman1998-05-041-11/+8
|
* (encode_coding_iso2022): If encoding a last block,Kenichi Handa1998-05-011-11/+8
| | | | reset graphic planes and registers.
* (setup_coding_system): Properly check for nil.Andreas Schwab1998-04-291-2/+2
|
* (shrink_decoding_region): Do not consider LF as asciiRichard M. Stallman1998-04-241-2/+18
| | | | | | | if preceded by CR, since that confuses eol decoding. (code_convert_region): When conversion fails with CODING_FINISH_INSUFFICIENT_SRC, was overwriting src with garbage from dst instead of copying from src to dst.
* (setup_coding_system): For a type 4 coding system,Kenichi Handa1998-04-201-4/+10
| | | | FLAGS member of coding spec is a cons of CCL program symbols.
* (code_convert_region): If point in the conversionKenichi Handa1998-04-151-0/+3
| | | | region, move it to FROM in advance.
* (syms_of_coding): Declare and define inherit-process-coding-system.Eli Zaretskii1998-04-151-0/+9
|
* (code_convert_region): Fix mixing of Lisp_Object andAndreas Schwab1998-04-141-1/+2
| | | | int.
* Fix -Wimplicit warnings.Andreas Schwab1998-04-141-0/+5
|
* (code_convert_region): Call adjust_after_insert alsoAndreas Schwab1998-04-141-1/+5
| | | | in unibyte mode.
* (code_convert_string): Give decode_coding correct byteKenichi Handa1998-04-141-1/+1
| | | | length of source text.
* (CHARSET_OK): Don't reject safe charsets.Kenichi Handa1998-04-021-5/+8
| | | | | (DECODE_DESIGNATION): Likewise. (check_composing_code): Likewise.
* (code_convert_region): Handle skipped ASCII charactersKenichi Handa1998-03-301-52/+64
| | | | | | | at the head and tail of conversion region correctly when adjusting position keepers. Call adjust_after_insert to record undo info and adjust markers when we don't have to change byte sequence of a buffer.
* (code_convert_region): Call adjust_before_replaceRichard M. Stallman1998-03-281-3/+5
| | | | in the no-conversion case. Adjust GPT, ZV and Z in chars.
* (shrink_decoding_region): If EOL_CONVERSION is nonzero,Kenichi Handa1998-03-241-4/+4
| | | | don't skip `\r' (instead of `\n').
* (code_convert_string): Use make_string_from_bytes.Richard M. Stallman1998-03-211-2/+2
|
* Use STRING_BYTES and SET_STRING_BYTES.Richard M. Stallman1998-03-211-5/+6
|
* (code_convert_region): The 6th arg name is changed toKenichi Handa1998-03-161-15/+23
| | | | | REPLACE. Even if there's no need of code conversion, call adjust_after_replace to handle bytes combining.
* (code_convert_region): Adjusted for the change ofKenichi Handa1998-03-121-104/+24
| | | | adjust_after_replace.
* (code_convert_region): Fix previous change. AdjustedRichard M. Stallman1998-03-101-26/+50
| | | | for the change of adjust_after_replace (see insdel.c change above).
* (code_convert_region): Fix previous change.Kenichi Handa1998-03-041-1/+1
|
* (code_convert_region): Handle the case that codesKenichi Handa1998-03-041-2/+44
| | | | 0240..0377 are generated just after a multibyte character.
* Reorder args in callers of del_range_2.Karl Heuer1998-02-271-1/+1
|
* (decode_coding_iso2022): Update coding->fake_multibyte.Kenichi Handa1998-02-201-160/+382
| | | | | | | | | | | | | | | | | (ENCODE_SINGLE_SHIFT_2, ENCODE_SINGLE_SHIFT_3, encode_coding_iso2022, decode_coding_sjis_big5, encode_coding_sjis_big5, decode_eol, encode_eol, decode_coding, encode_coding): Likewise. (shrink_decoding_region, shrink_encoding_region): Do not skip non-ASCII code in any cases. Bug fix for getting starting address from BEG. (code_convert_region): Sync character positions correctly by paying attention to coding->fake_multibyte. (code_convert_string): Set number of character and bytes just processed in members of CODING. (code_convert_string): Adjusted for the change of code_convert_region. (code_convert_region1): Likewise.
* (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
|