Commit graph

584 commits

Author SHA1 Message Date
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
6eced09c3d (decode_coding_emacs_mule): Handle insufficent source correctly. 2004-03-09 12:27:26 +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
Eli Zaretskii
38b92c4260 UTF-8 is now RFC3629. 2004-03-07 19:54:13 +00:00
Kenichi Handa
29f7ffd042 (decode_coding_utf_16): Fix handling of surrogate pare. 2004-03-04 07:49:18 +00:00
Kenichi Handa
09721b316c (coding_restore_composition): Check invalid
composition data more rigidly.
2004-02-02 12:09:36 +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
Luc Teirlinck
de1d1a4051 (Fcheck_coding_system): Further doc fix. 2003-12-28 19:54:24 +00:00
Luc Teirlinck
303cdc2dfd (Fcheck_coding_system): Doc fix. 2003-12-28 19:47:58 +00:00
Kenichi Handa
47dc91adce (decode_coding_iso2022): Fix for preserving UTF-8
encoding sequence.
2003-12-03 08:23:53 +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
Stefan Monnier
316d4bf9e2 (coding_restore_composition): Lisp_Object/int mixup. 2003-11-17 23:23:15 +00:00
Kenichi Handa
4307d5349e (coding_allocate_composition_data): Reset
coding->composing to COMPOSITION_NO.
(coding_restore_composition): Detect invalid composition data.
Give Fstring and Fvector a Lispy integer, not C int.
2003-11-07 05:55:43 +00:00
Kenichi Handa
c2164d91db (Fcoding_system_p): Return t for auto-loading coding system. 2003-10-07 23:35:01 +00:00
Kenichi Handa
a362520d43 (Qcoding_system_define_form): New variable.
(syms_of_coding): Intern and staticpro it.
(Fcheck_coding_system): Try to autoload the definition of
CODING-SYSTEM.
2003-10-07 01:29:12 +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
Kenichi Handa
fd3ae0b9de (DECODE_EMACS_MULE_COMPOSITION_CHAR): If coding->flags
is nonzero, accept multibyte form of eight-bit-control chars.
(decode_composition_emacs_mule): Likewise.
(decode_coding_emacs_mule): Likewise.
(encode_coding_emacs_mule): If coding->flags is nonzero, produce
multibyte form of eight-bit-control chars.
2003-05-31 00:56:42 +00:00
Kenichi Handa
b671ed5e8e (ccl_coding_driver): Set ccl->eight_bit_control
property before calling ccl_driver.
2003-05-30 07:57:48 +00:00
Kenichi Handa
5e5c78beb4 (setup_coding_system): If coding has
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.
2003-05-29 13:17:04 +00:00