1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 03:11:54 -07:00
Commit graph

387 commits

Author SHA1 Message Date
Kenichi Handa
3aef54f3ce (detect_coding): Fix previous change. 2004-09-14 07:55:26 +00:00
Kenichi Handa
6cb21a4f62 (detect_coding_utf_16): Don't set detect_info->found if
BOM is not found.
(detect_coding): Optimization for ISO-2022 when no 8-bit data is
found.
(detect_coding_system): Likewise.
2004-09-13 00:41:15 +00:00
Kenichi Handa
ea29edf291 (setup_coding_system): Set coding->common_flags
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.
2004-04-28 12:52:51 +00:00
Kenichi Handa
3dbe78594e (detect_coding): Delete unused variables.
(detect_coding_system): Likewise.
2004-04-20 11:26:43 +00:00
Kenichi Handa
f03caae0b7 (encode_coding_utf_8): Fix handling of raw-byte char.
(consume_chars): Fix handling of 8-bit bytes in unibyte source.
2004-04-20 02:46:38 +00:00
Kenichi Handa
988b37597a (Ffind_coding_systems_region_internal): Include raw-text and
no-conversion in the result.
2004-04-14 12:37:29 +00:00
Kenichi Handa
9ffd559c49 Sync to HEAD.
(emacs_mule_char): Check invalid code more regidly.
2004-04-12 23:17:27 +00:00
Kenichi Handa
134b954969 (DECODE_DESIGNATION): Set chars_96 to -1 instead of
goto invalid_code.
(decode_coding_iso_2022): Fix handling of invalid designation.
2004-03-30 13:09:38 +00:00
Kenichi Handa
f6cbaf43e3 Add many prototypes for static functions. 2004-03-11 11:21:39 +00:00
Kenichi Handa
2170c8f05b (get_translation_table): Allow max_lookup to be NULL.
(decode_coding): Call get_translation_table with max_lookup NULL.
(Ffind_coding_systems_region_internal): Likewise.
(Funencodable_char_position, Fcheck_coding_systems_region):
Likewise.
2004-03-11 08:46:07 +00:00
Kenichi Handa
09ee6fdda7 (get_translation_table): New arg max_lookup. Caller changed.
(LOOKUP_TRANSLATION_TABLE): Pay attention that table may be a list.
2004-03-11 07:07:41 +00:00
Kenichi Handa
e6a54062d3 (get_translation_table): Declare it as Lisp_Object.
(LOOKUP_TRANSLATION_TABLE): New macro.
(produce_chars): Use LOOKUP_TRANSLATION_TABLE instead of
CHAR_TABLE_REF.
(consume_chars): Likewise.
2004-03-11 05:54:58 +00:00
Kenichi Handa
433f7f87b7 (get_translation): Fix previous change.
(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.
2004-03-11 02:18:12 +00:00
Kenichi Handa
69a80ea334 (MAX_ANNOTATION_LENGTH): Adjusted for the change of
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.
2004-03-10 23:11:18 +00:00
Kenichi Handa
6e76ae9103 *** empty log message *** 2004-03-09 02:30:13 +00:00
Kenichi Handa
0e219d5467 (detect_coding_emacs_mule): Fix counting of encoded
byte sequence.
(detect_coding_ccl): Fix setting of the variable valids.
2004-03-08 23:15:42 +00:00
Kenichi Handa
29f7ffd042 (decode_coding_utf_16): Fix handling of surrogate pare. 2004-03-04 07:49:18 +00:00
Kenichi Handa
75e2a25314 (detect_coding_iso_2022): Fix handling of SS2 and SS3.
(detect_coding): Treat '\0' as normal ASCII byte..
(detect_coding_system): Likewise.
2004-01-29 01:25:50 +00:00
Kenichi Handa
c687637047 (decode_coding_sjis): Fix comment. 2004-01-28 11:03:31 +00:00
Kenichi Handa
57a47f8a14 (decode_coding_sjis): Handle 4th charset (typically JISX0212).
(encode_coding_sjis): Likewise.
2004-01-27 12:11:41 +00:00
Kenichi Handa
a6f87d34c8 (QCmnemonic, QCdefalut_char)
(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.
2004-01-27 02:21:37 +00:00
Kenichi Handa
2b917a06a6 (Fdefine_coding_system_internal): Fix previous change. 2004-01-25 07:50:35 +00:00
Kenichi Handa
6e07c25f90 (Fdefine_coding_system_internal): Fix previous change. 2004-01-25 07:44:22 +00:00
Kenichi Handa
7d64c6ad61 (get_translation_table): New function.
(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.
2004-01-25 07:30:47 +00:00
Kenichi Handa
8e921c4b65 (decode_coding_sjis): Check the first byte rigidly. 2004-01-24 09:13:19 +00:00
Kenichi Handa
065e359516 (Qinsufficient_source, Qinconsistent_eol)
(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;
2003-12-29 07:52:49 +00:00
Kenichi Handa
d8c9fb8826 (detect_coding): Fix previous change.
(detect_coding_system): Likewise.
2003-12-02 06:57:17 +00:00
Kenichi Handa
24a73b0a86 (enum iso_code_class_type): Delete ISO_carriage_return.
(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.
2003-12-02 01:40:27 +00:00
Kenichi Handa
5c99c2e685 (Fdefine_coding_system_internal): Fix previous change. 2003-11-24 02:21:55 +00:00
Kenichi Handa
2bc515e458 (Fdefine_coding_system_internal): Fix checking of ascii compatibility. 2003-11-23 02:17:20 +00:00
Kenichi Handa
eccb681519 (encode_coding_emacs_mule): Resync charset_list to
Vemacs_mule_charset_list.
2003-11-22 11:39:53 +00:00
Kenichi Handa
1fa663f9b9 (encode_coding_emacs_mule): Emit bytes with MSB. 2003-11-22 11:20:05 +00:00
Andreas Schwab
fba4576f02 (produce_chars): Revert last change. 2003-10-06 22:30:26 +00:00
Kenichi Handa
d6925f388c (Fdefine_coding_system_alias): Update Vcoding_system_list. 2003-10-06 11:21:31 +00:00
Kenichi Handa
0b5670c996 (consume_chars): If coding->src_object is nil, don't check annotation. 2003-10-01 04:40:19 +00:00
Dave Love
3e13962556 (inhibit_pre_post_conversion): Removed (unused).
(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.
2003-09-29 17:59:52 +00:00
Dave Love
a31810840d (Fread_coding_system): Fix arg of XSETSTRING.
(Fset_coding_system_priority): Doc fix.
2003-09-17 19:21:10 +00:00
Kenichi Handa
8f924df7df *** empty log message *** 2003-09-08 12:53:41 +00:00
Kenichi Handa
463f5630a5 New directory 2003-09-08 11:56:09 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Kenichi Handa
85478bc688 (decode_coding_iso2022): Initialized local variable c2.
(decode_coding_sjis_big5): Likewise.
2003-08-28 08:19:07 +00:00
Stefan Monnier
6ed0af6782 (run_pre_post_conversion_on_str): Use delete_all_overlays. 2003-07-22 19:06:12 +00:00
Stefan Monnier
6663843311 Include intervals.h for Fset_text_properties. 2003-07-09 20:25:02 +00:00
Stefan Monnier
d2394df5b5 (run_pre_post_conversion_on_str): Use new type for overlays_(before|after). 2003-07-09 14:52:55 +00:00
Kenichi Handa
7487494c9d (decode_coding_sjis): Check bytes more rigidly. 2003-07-09 02:16:17 +00:00
Kenichi Handa
01378f4987 * coding.c (QCcategory): New variable.
(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.
2003-06-06 02:13:40 +00:00
Kenichi Handa
ff563fced5 (Fset_coding_system_priority): Doc fix. Update values
of codng-category-XXX, and coding-category-list.
(syms_of_coding): Set all elements of Vcoding_category_table and
their symbol values.
2003-06-05 23:21:22 +00:00
Kenichi Handa
d3e4cb56a3 (decode_coding_iso_2022): Fix handling of invalid
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.
2003-06-05 12:34:31 +00:00
Kenichi Handa
a84f151963 _buffer_size): If coding->type is
coding_type_ccl, double magnification on CRLF encoding.
2003-06-04 12:43:09 +00:00
Dave Love
ecf488bc25 (Qutf_8): New.
(syms_of_coding): Intern it.
2003-06-02 18:49:29 +00:00