aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | (setup_coding_system): If coding_system is nil, useKenichi Handa2004-10-121-3/+20
| | | | | | | | | | | | | | | | Qundecided. (Fterminal_coding_system): Return nil if terminal coding system is `undecided'. (syms_of_coding): Define coding-system `undecided' here. Setup terminal_coding as `undecided'.
* | (detect_coding): Fix previous change.Kenichi Handa2004-09-141-1/+1
| |
* | (detect_coding_utf_16): Don't set detect_info->found ifKenichi Handa2004-09-131-84/+113
| | | | | | | | | | | | | | BOM is not found. (detect_coding): Optimization for ISO-2022 when no 8-bit data is found. (detect_coding_system): Likewise.
* | (setup_coding_system): Set coding->common_flagsKenichi Handa2004-04-281-2/+14
| | | | | | | | | | | | | | | | correctly for raw-text. (consume_chars): On encoding unibyte text by raw-text, don't check multibyte form. (encode_coding): On encoding by raw-text, never use translation tables.
* | (detect_coding): Delete unused variables.Kenichi Handa2004-04-201-3/+1
| | | | | | | | (detect_coding_system): Likewise.
* | (encode_coding_utf_8): Fix handling of raw-byte char.Kenichi Handa2004-04-201-4/+6
| | | | | | | | (consume_chars): Fix handling of 8-bit bytes in unibyte source.
* | (Ffind_coding_systems_region_internal): Include raw-text andKenichi Handa2004-04-141-1/+1
| | | | | | | | no-conversion in the result.
* | Sync to HEAD.Kenichi Handa2004-04-121-11/+28
| | | | | | | | (emacs_mule_char): Check invalid code more regidly.
* | (DECODE_DESIGNATION): Set chars_96 to -1 instead ofKenichi Handa2004-03-301-41/+73
| | | | | | | | | | goto invalid_code. (decode_coding_iso_2022): Fix handling of invalid designation.
* | Add many prototypes for static functions.Kenichi Handa2004-03-111-45/+84
| |
* | (get_translation_table): Allow max_lookup to be NULL.Kenichi Handa2004-03-111-23/+27
| | | | | | | | | | | | | | (decode_coding): Call get_translation_table with max_lookup NULL. (Ffind_coding_systems_region_internal): Likewise. (Funencodable_char_position, Fcheck_coding_systems_region): Likewise.
* | (get_translation_table): New arg max_lookup. Caller changed.Kenichi Handa2004-03-111-51/+77
| | | | | | | | (LOOKUP_TRANSLATION_TABLE): Pay attention that table may be a list.
* | (get_translation_table): Declare it as Lisp_Object.Kenichi Handa2004-03-111-5/+32
| | | | | | | | | | | | | | (LOOKUP_TRANSLATION_TABLE): New macro. (produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of CHAR_TABLE_REF. (consume_chars): Likewise.
* | (get_translation): Fix previous change.Kenichi Handa2004-03-111-43/+68
| | | | | | | | | | | | | | (encode_coding): Don't call translate_chars. (consume_chars): New arg translation_table. Caller changed. (translate_chars): Deleted. (syms_of_coding): Make translation-table's number of extra slots 2.
* | (MAX_ANNOTATION_LENGTH): Adjusted for the change ofKenichi Handa2004-03-101-104/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | annotation data format. (ADD_ANNOTATION_DATA, ADD_COMPOSITION_DATA, ADD_CHARSET_DATA): Change arguments FROM and TO to single argument NCHARS. Caller changed. (decode_coding_utf_8): Pay attention to coding->charbuf_used. (decode_coding_utf_16, decode_coding_emacs_mule) (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5) (decode_coding_ccl, decode_coding_charset): Likewise. (get_translation): New function. (produce_chars): New arguments translation_table and last_block. Translate characters here. Return number of carryover chars. Caller changed. (produce_composition): New argument pos. Caller changed. Adjusted for the change of annotation data format. (produce_charset, produce_annotation): Likewise. (decode_coding): Don't call translate_chars.
* | *** empty log message ***Kenichi Handa2004-03-091-1/+1
| |
* | (detect_coding_emacs_mule): Fix counting of encodedKenichi Handa2004-03-081-5/+11
| | | | | | | | | | byte sequence. (detect_coding_ccl): Fix setting of the variable valids.
* | (decode_coding_utf_16): Fix handling of surrogate pare.Kenichi Handa2004-03-041-1/+1
| |
* | (detect_coding_iso_2022): Fix handling of SS2 and SS3.Kenichi Handa2004-01-291-13/+8
| | | | | | | | | | (detect_coding): Treat '\0' as normal ASCII byte.. (detect_coding_system): Likewise.
* | (decode_coding_sjis): Fix comment.Kenichi Handa2004-01-281-1/+1
| |
* | (decode_coding_sjis): Handle 4th charset (typically JISX0212).Kenichi Handa2004-01-271-22/+46
| | | | | | | | (encode_coding_sjis): Likewise.
* | (QCmnemonic, QCdefalut_char)Kenichi Handa2004-01-271-12/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (QCdecode_translation_table, QCencode_translation_table) (QCpost_read_conversion, QCpre_write_conversion): New variables. (get_translation_table): Return a list of translation tables if necessary. (decode_coding): Call get_translation_table with ENCODEP 0. (char_encodable_p): If translation_table is non-nil, always call translate_char. (Fdefine_coding_system_internal): Accept list of translation tables as :encode-translation-table and :decode-translation-table. (Fcoding_system_put): New function. (syms_of_coding): Declare new symbols. Defsubr Scoding_system_put.
* | (Fdefine_coding_system_internal): Fix previous change.Kenichi Handa2004-01-251-4/+7
| |
* | (Fdefine_coding_system_internal): Fix previous change.Kenichi Handa2004-01-251-3/+1
| |
* | (get_translation_table): New function.Kenichi Handa2004-01-251-22/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | (translate_chars): Fix the bug of skipping annotation data. (decode_coding): Utilze get_translation_table. (encode_coding): Likewise. (char_encodable_p): Translate char if necessary. (Funencodable_char_position): Likewise. (Ffind_coding_systems_region_internal): Setup translation table for encode in a coding system attribute vector in advance. (Fcheck_coding_systems_region): Likewise. (Fdefine_coding_system_internal): Allow a symbol as translation table. For shift-jis type coding system, allow 4th charset.
* | (decode_coding_sjis): Check the first byte rigidly.Kenichi Handa2004-01-241-0/+2
| |
* | (Qinsufficient_source, Qinconsistent_eol)Kenichi Handa2003-12-291-144/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Qinvalid_source, Qinterrupted, Qinsufficient_memory): New variables. (Vlast_code_conversion_error): New variables. (syms_of_coding): DEFSYM or DEFVAR_LISP them. (ONE_MORE_BYTE): Record error if any instead of signaling an error. If non-ASCII multibyte char is found, return the negative value of the code. All callers changed to check it. (ONE_MORE_BYTE_NO_CHECK): Likewise. (record_conversion_result): New function. All codes setting coding->result are changed to call this function. (detect_coding_utf_8): Don't use the local variable incomplete. (decode_coding_utf_8): Likewise. (emacs_mule_char): Change the second arg to `const'. (detect_coding_emacs_mule): Don't use the local variable incomplete. (detect_coding_sjis): Likewise. (detect_coding_big5): Likewise. (decode_coding): Fix of flushing out unprocessed data. (make_conversion_work_buffer): Fix making of a work buffer. (decode_coding_object): Return coding->dst_object;
* | (detect_coding): Fix previous change.Kenichi Handa2003-12-021-6/+0
| | | | | | | | (detect_coding_system): Likewise.
* | (enum iso_code_class_type): Delete ISO_carriage_return.Kenichi Handa2003-12-021-395/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (CODING_GET_INFO): Delete argument eol_type. Callers changed. (decode_coding_utf_8): Don't do eol converion. (detect_coding_utf_16): Check coding->src_chars, not coding->src_bytes. Add heuristics for those that have no signature. (decode_coding_emacs_mule): Don't do eol converion. (decode_coding_iso_2022): Likewise. (decode_coding_sjis): Likewise. (decode_coding_big5): Likewise. (decode_coding_charset): Likewise. (adjust_coding_eol_type): Return a new coding system. (detect_coding): Don't detect eol. Fix for utf-16 detection. (decode_eol): In case of CRLF->LF conversion, use del_range_2 on each change. (decode_coding): Pay attention to undo_list. Do eol convesion for all types of coding-systems (if necessary). (Vcode_conversion_work_buf_list): Delete it. (Vcode_conversion_reused_workbuf): Renamed from Vcode_conversion_reused_work_buf. (Vcode_conversion_workbuf_name): New variable. (reused_workbuf_in_use): New variable. (make_conversion_work_buffer): Delete the arg DEPTH. (code_conversion_restore): Argument changed to cons. (code_conversion_save): Delete the argument BUFFER. Callers changed. (detect_coding_system): New argument src_chars. Callers changed. Fix for utf-16 detection. (init_coding_once): Don't use ISO_carriage_return. (syms_of_coding): Initialized Vcode_conversion_workbuf_name and reused_workbuf_in_use.
* | (Fdefine_coding_system_internal): Fix previous change.Kenichi Handa2003-11-241-21/+2
| |
* | (Fdefine_coding_system_internal): Fix checking of ascii compatibility.Kenichi Handa2003-11-231-4/+7
| |
* | (encode_coding_emacs_mule): Resync charset_list toKenichi Handa2003-11-221-0/+5
| | | | | | | | Vemacs_mule_charset_list.
* | (encode_coding_emacs_mule): Emit bytes with MSB.Kenichi Handa2003-11-221-1/+2
| |
* | (produce_chars): Revert last change.Andreas Schwab2003-10-061-2/+2
| |
* | (Fdefine_coding_system_alias): Update Vcoding_system_list.Kenichi Handa2003-10-061-4/+5
| |
* | (consume_chars): If coding->src_object is nil, don't check annotation.Kenichi Handa2003-10-011-7/+12
| |
* | (inhibit_pre_post_conversion): Removed (unused).Dave Love2003-09-291-14/+5
| | | | | | | | | | | | | | (alloc_destination, produce_chars): Use EMACS_INT for byte/char counts. (coding_inherit_eol_type): Remove unused attrs. (detect_coding): Cast arg of detect_eol.
* | (Fread_coding_system): Fix arg of XSETSTRING.Dave Love2003-09-171-2/+4
| | | | | | | | (Fset_coding_system_priority): Doc fix.
* | *** empty log message ***Kenichi Handa2003-09-081-5240/+6500
|\ \
| * | (decode_coding_sjis): Check bytes more rigidly.Kenichi Handa2003-07-091-1/+3
| | |
| * | * coding.c (QCcategory): New variable.Kenichi Handa2003-06-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | (syms_of_coding): Defsym it. Set all elements of Vcoding_category_table and their symbol values. (Fset_coding_system_priority): Doc fix. Update symbol qvalues of coding-category-XXX, and coding-category-list. (Fdefine_coding_system_internal): Add category in the plist.
| * | (Fset_coding_system_priority): Doc fix. Update valuesKenichi Handa2003-06-051-1/+20
| | | | | | | | | | | | | | | | | | of codng-category-XXX, and coding-category-list. (syms_of_coding): Set all elements of Vcoding_category_table and their symbol values.
| * | (decode_coding_iso_2022): Fix handling of invalidKenichi Handa2003-06-051-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | bytes. (raw_text_coding_system): Check NILP (coding_system). (coding_inherit_eol_type): Check NILP (coding_system) and NILP (parent). (consume_chars): Fix for the case of raw-text.
| * | (setup_coding_system): If coding hasKenichi Handa2003-05-291-1/+23
| | | | | | | | | | | | | | | | | | | | | post-read-conversion or pre-write-conversion, set CODING_REQUIRE_DECODING_MASK and CODING_REQUIRE_ENCODING_MASK respectively. (decode_coding_gap): Run post-read-conversion if any.
| * | (make_conversion_work_buffer): Change the work bufferKenichi Handa2003-05-291-3/+3
| | | | | | | | | | | | name to the same one as that of Emacs 21.
| * | (detected_mask): Delete unused variable.Kenichi Handa2003-05-281-77/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (decode_coding_iso_2022): Pay attention to the byte sequence of CTEXT extended segment, and retain those bytes as is. (decode_coding_ccl): Delete unused variable `valids'. (setup_coding_system): Delete unused variable `category'. (consume_chars): Delete unused variable `category'. Make it work for non-multibyte case. (make_conversion_work_buffer): Argument changed. (saved_coding): Delete unused variable. (code_conversion_restore): Don't check saved_coding->destination. (code_conversion_save): New function. (decode_coding_gap, encode_coding_gap): Call code_conversion_save instead of record_unwind_protect. (decode_coding_object, encode_coding_object): Likewise. Recover PT. (detect_coding_system): Delete unused variable `mask'. (Fdefine_coding_system_internal): Delete unsed vaiable id;
| * | (Fdefine_coding_system_internal): Fix for the case thatKenichi Handa2003-05-201-1/+16
| | | | | | | | | | | | coding_type is Qcharset.
| * | (Qsignature, Qendian): Delete these variables.Kenichi Handa2003-05-061-35/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (syms_of_coding): Don't initialize them. (CATEGORY_MASK_UTF_16_AUTO): New macro. (detect_coding_utf_16): Add CATEGORY_MASK_UTF_16_AUTO in detect_info->found. (decode_coding_utf_16): Don't detect BOM here. (encode_coding_utf_16): Produce BOM if CODING_UTF_16_BOM (coding) is NOT utf_16_without_bom. (setup_coding_system): For a coding system of type utf-16, check if the attribute :endian is Qbig or not (not nil or not), and set CODING_REQUIRE_DETECTION_MASK if BOM detection is required. (detect_coding): If coding type is utf-16 and BOM detection is required, detect it. (Fdefine_coding_system_internal): For a coding system of type utf-16, check if the attribute :endian is Qbig or not (not nil or not).
| * | (coding_set_source): Fix for the case that the currentKenichi Handa2003-05-061-13/+8
| | | | | | | | | | | | | | | | | | buffer is different from coding->src_object. (decode_coding_object): Don't use the conversion work buffer if DST_OBJECT is a buffer.
| * | (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)Kenichi Handa2003-03-281-10/+5
| | | | | | | | | | | | | | | | | | | | | (Qutf_16_le): Remove these variables. (syms_of_coding): Don't DEFSYM them. (decode_coding_utf_16): Fix handling of BOM. (encode_coding_utf_16): Fix handling of BOM.