Commit graph

355 commits

Author SHA1 Message Date
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
Kenichi Handa
6b89e3aa28 (syms_of_coding): Add `...' for symbols in the docstring of
`coding-system-require-warning'.
2003-01-31 04:03:07 +00:00
Kenichi Handa
8dcbea820b (decode_coding_ccl, encode_coding_ccl): Call ccl_driver
with the last arg charset_list acquired from coding.
(Fdefine_coding_system_internal): For ccl-based coding system, fix
the attribute coding_attr_ccl_valids.
2003-01-30 02:23:40 +00:00
Kenichi Handa
ff0dacd733 (CATEGORY_MASK_RAW_TEXT): New macro.
(detect_coding_utf_8, detect_coding_utf_16)
(detect_coding_emacs_mule, detect_coding_iso_2022)
(detect_coding_sjis, detect_coding_big5)
(detect_coding_ccl, detect_coding_charset): Change argument MASK
to DETECT_INFO.  Update DETECT_INFO and return 1 if the byte
sequence is valid in this coding system.  Callers changed.
(MAX_ANNOTATION_LENGTH): New macro.
(ADD_ANNOTATION_DATA): New macro.
(ADD_COMPOSITION_DATA): Argument changed.  Callers changed.  Call
ADD_ANNOTATION_DATA.  The format of annotation data changed.
(ADD_CHARSET_DATA): New macro.
(emacs_mule_char): New argument ID.  Callers changed.
(decode_coding_emacs_mule, decode_coding_iso_2022)
(decode_coding_sjis, decode_coding_big5, decode_coding_charset):
Produce charset annotation data in coding->charbuf.
(encode_coding_emacs_mule, encode_coding_iso_2022): Pay attention
to charset annotation data in coding->charbuf.
(setup_coding_system): Add CODING_ANNOTATE_CHARSET_MASK
coding->common_flags if the coding system is iso-2022 based and
uses designation.
(produce_composition): Adjusted for the new annotation data
format.
(produce_charset): New function.
(produce_annotation): Handle charset annotation.
(handle_composition_annotation, handle_charset_annotation): New
functions.
(consume_chars): Handle charset annotation.  Utilize the above two
functions.
(encode_coding_object): If SRC_OBJECT and DST_OBJECT are the same
buffer, get the deleted text as a string and set
coding->src_object to that string.
(detect_coding, detect_coding_system): Use the new struct
coding_detection_info.
2003-01-06 11:37:17 +00:00
Kenichi Handa
5d5bf4d8e1 (coding_system_require_warning): New variable.
(syms_of_coding): DEFVAR it.
2002-12-17 11:39:13 +00:00
Kenichi Handa
200c93e2af (Funencodable_char_position): Set pend correctly. 2002-12-13 02:35:51 +00:00
Dave Love
15c8f9d1ad (Vtranslation_table_for_input): New.
(syms_of_coding): DEFVAR it.
2002-11-09 12:49:31 +00:00
Dave Love
002fdb4486 Reformat some DEFUNs so that etags works. 2002-11-06 23:31:21 +00:00