1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-31 01:20:37 -08:00
Commit graph

362 commits

Author SHA1 Message Date
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
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
Kenichi Handa
857dccb041 (make_conversion_work_buffer): Change the work buffer
name to the same one as that of Emacs 21.
2003-05-29 02:18:56 +00:00
Kenichi Handa
103e0180b3 *** empty log message *** 2003-05-28 23:27:28 +00:00
Kenichi Handa
4776e6380a (detected_mask): Delete unused variable.
(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;
2003-05-28 11:37:09 +00:00
Stefan Monnier
f1ce3dcf39 (find_safe_codings): Remove unused var `i'. 2003-05-25 17:41:21 +00:00
Andreas Schwab
58f9937928 (find_safe_codings): Fix last change. 2003-05-24 20:11:55 +00:00
Kenichi Handa
0eecad4333 (ENCODE_UNSAFE_CHARACTER): Adjusted for the name change
of CODING_REPLACEMENT_CHARACTER.
(decode_coding_iso2022): If CODING_FLAG_ISO_SAFE, set
CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in coding->mode, and
check this flag on encoding.
(encode_coding_sjis_big5): Check
CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag of coding->mode.
(Fset_terminal_coding_system_internal): Set
CODING_MODE_INHIBIT_UNENCODABLE_CHAR flag in terminal_coding.mode
instead of setting CODING_FLAG_ISO_SAFE flag in
terminal_coding.flags.
2003-05-22 05:53:23 +00:00
Kenichi Handa
4187a77da7 (Fdefine_coding_system_internal): Fix for the case that
coding_type is Qcharset.
2003-05-20 13:05:14 +00:00
Kenichi Handa
439ad9ea83 (decode_coding_string): Handle post-read-conversion
even if the coding doesn't require decoding.
2003-05-19 13:02:39 +00:00
Dave Love
7c695ab92f (Vlast_coding_system_used): Doc fix. 2003-05-08 17:49:05 +00:00
Kenichi Handa
b49a1807a9 (Qsignature, Qendian): Delete these variables.
(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).
2003-05-06 12:28:11 +00:00
Kenichi Handa
2cb2605761 (coding_set_source): Fix for the case that the current
buffer is different from coding->src_object.
(decode_coding_object): Don't use the conversion work buffer if
DST_OBJECT is a buffer.
2003-05-06 08:16:37 +00:00
Kenichi Handa
b666620cdd (coding_system_accept_latin_extra_p): Delete this
function.
(find_safe_codings): Pay attention to
the property tranlsation-table-for-encode of each codings.
(syms_of_coding): Give Qtranslation_table the extra slot number 2.
2003-05-01 04:34:57 +00:00
Kenichi Handa
7de6cd0aee (coding_system_accept_latin_extra_p): New function.
(find_safe_codings): Pay attention to characters registered in
latin-extra-code-table.
2003-04-08 11:27:28 +00:00
Kenichi Handa
24a948a781 (code_convert_region): Fix last change. 2003-04-08 10:46:31 +00:00
Kenichi Handa
1c7457e294 (code_convert_region_unwind): Set
Vlast_coding_system_used to the argument.
(code_convert_region): If post-read-conversion function changed
the value of last-coding-sytem, keep the new value in
coding->symbol so that it won't be overridden.
(run_pre_post_conversion_on_str): Likewise.
2003-04-08 07:26:05 +00:00
Kenichi Handa
880cf180d9 (Qutf_16_be_nosig, Qutf_16_be, Qutf_16_le_nosig)
(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.
2003-03-28 04:09:32 +00:00
Kenichi Handa
067a6a66a6 (Vchar_coding_system_table): Remove this variable.
(Vcoding_system_safe_chars): New variable.
(intersection): Remove this function.
(find_safe_codings): Don't use Vchar_coding_system_table, but try
all codings in SAFE_CODINGS.
(Ffind_coding_systems_region_internal): Adjusted for the change of
find_safe_codings.  Get generic coding systems from
Vcoding_system_safe_chars.
(Fdefine_coding_system_internal): New function.
(syms_of_coding): Defsubr Sdefine_coding_system_internal.
Initialize and staticpro Vcoding_system_safe_chars.
2003-03-18 04:26:15 +00:00
Kenichi Handa
40fd536ccc (Fdetect_coding_region): Fix docstring. 2003-03-13 11:32:18 +00:00
Kenichi Handa
eec1f3c794 (Fdetect_coding_string): Fix docstring. 2003-03-13 11:16:16 +00:00
Kenichi Handa
b6871cc7dd (CODING_ADD_COMPOSITION_COMPONENT): If the number of
composition components reaches the limit, terminate composing.
(COMPOSITION_OK): New macro.
(detect_coding_iso2022): Use it if an escapse sequence for
composition is found.
(coding_restore_composition): Adjust the number of composition
components if it is not sane.
2003-03-07 02:18:35 +00:00
Dave Love
e1c2380488 (Fcheck_coding_systems_region): Fix type errors. 2003-02-13 22:23:01 +00:00
Juanma Barranquero
177c0ea743 Trailing whitespace deleted. 2003-02-04 14:56:31 +00:00