Commit graph

673 commits

Author SHA1 Message Date
Chong Yidong
708e05dc7a * keyboard.c (Fset_input_meta_mode): Doc fix.
* dispnew.c (Fsend_string_to_terminal): Doc fix.

* data.c (Fterminal_local_value, Fset_terminal_local_value): Doc
fixes.

* coding.c (Fterminal_coding_system): Doc fix.

* xfns.c (Fx_display_grayscale_p, Fx_display_pixel_width)
(Fx_display_pixel_height, Fx_display_planes)
(Fx_display_color_cells, Fx_server_max_request_size)
(Fx_server_vendor, Fx_server_version, Fx_display_screens)
(Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, Fx_synchronize): Doc
fixes, replacing "terminal id" with "terminal object".
(check_x_display_info): Handle terminal objects instead of
terminal ids.
2009-04-22 04:32:21 +00:00
Kenichi Handa
df80c7f014 (decode_coding_utf_16): Reduce charbuf_end for the
worst case.
(decode_coding_emacs_mule, decode_coding_iso_2022)
(decode_coding_sjis, decode_coding_big5, decode_coding_charset):
Likewise.
2009-04-21 06:36:21 +00:00
Kenichi Handa
67ceab9df4 (Fdetect_coding_string): Improve the docstrings. 2009-03-27 07:26:37 +00:00
Kenichi Handa
b811c52b91 (Fdetect_coding_region, Fcoding_system_priority_list): Improve the
docstrings.
2009-03-27 07:25:44 +00:00
Kenichi Handa
e951386e38 (CODING_ISO_CMP_STATUS): New macro.
(CODING_ISO_EXTSEGMENT_LEN, CODING_ISO_EMBEDDED_UTF_8): New macros.
(MAX_ANNOTATION_LENGTH): Defined to 5.
(ADD_COMPOSITION_DATA): New arg nbytes.
(emacs_mule_char): New arg cmp_status.
(DECODE_EMACS_MULE_COMPOSITION_CHAR): Delete it.
(DECODE_EMACS_MULE_COMPOSITION_RULE_20): New arg c.
(DECODE_EMACS_MULE_COMPOSITION_RULE_21): New arg c.
(DECODE_EMACS_MULE_21_COMPOSITION): Delete the arg c.
(DECODE_EMACS_MULE_20_RELATIVE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_20_RULEBASE_COMPOSITION): Likewise.
(DECODE_EMACS_MULE_COMPOSITION_START): New macro.
(EMACS_MULE_COMPOSITION_END): New macro.
(emacs_mule_finish_composition): New function.
(EMACS_MULE_MAYBE_FINISH_COMPOSITION): New macro.
(decode_coding_emacs_mule): Avoid long looking ahead while
handling composition.
(DECODE_COMPOSITION_RULE): Argument changed to rule and nbytes.
(ENCODE_COMPOSITION_RULE): New macro.
(finish_composition): New function.
(MAYBE_FINISH_COMPOSITION): Call finish_composition.
(DECODE_COMPOSITION_START): New implementation.
(DECODE_COMPOSITION_END): Likewise.
(STORE_COMPOSITION_RULE): New macro.
(decode_coding_iso_2022): Avoid long looking ahead while handling
composition, CTEXT extended segment, and embedded UTF-8.
(setup_coding_system): For a coding of type iso-2022, reset
CODING_ISO_EXTSEGMENT_LEN (coding) and
CODING_ISO_EMBEDDED_UTF_8 (coding).
(get_translation): Delete arguments last_block, from_nchars,
to_nchars.  Callers changed.
(produce_chars): Don't modify charbuf.  Adjusted for the change of
get_translation.
(produce_composition): Adjusted for the new annotation sequence.
(handle_composition_annotation): Likewise.
(consume_chars): Adjusted for the change of get_translation.
2009-03-06 07:51:52 +00:00
Eli Zaretskii
0a9564cb01 (decode_coding_utf_8, decode_coding_utf_16, decode_coding_emacs_mule,
decode_coding_iso_2022, encode_coding_iso_2022, decode_coding_sjis,
decode_coding_big5, decode_coding_raw_text, decode_coding_charset,
setup_coding_system, decode_eol, decode_coding, consume_chars): Honor
inhibit-eol-conversion.  (Bug #2186)
2009-02-28 15:53:11 +00:00
Jason Rumney
237aabf40e (detect_coding_charset): Fix last change for non-latin charsets. 2009-02-28 13:52:03 +00:00
Jason Rumney
9f0526cb4b (detect_coding_charset): If not checking latin extra,
fail on characters between 0x80 and 0xA0.  (Bug#2354)
2009-02-28 13:37:33 +00:00
Eli Zaretskii
a4aee864ad (detect_coding_charset): Fix change from 2008-10-21.
Also, check iso-latin-*, not only iso-8859-*.
2009-02-28 12:05:36 +00:00
Andreas Schwab
1b3b981ba9 * coding.h (struct coding_system): Make safe_charsets a pointer to
unsigned char.
* coding.c (CODING_ISO_REQUEST): Check for safe_charsets content
being 255.
(SAFE_CHARSET_P): Likewise.
(setup_iso_safe_charsets): Properly setup safe_charsets.
(Fdefine_coding_system_internal): Likewise.
(setup_coding_system): Likewise.  Remove unneeded casts.
(detect_coding_iso_2022): Compare Viso_2022_charset_list with
CODING_ATTR_CHARSET_LIST, not CODING_ATTR_SAFE_CHARSETS.  Remove
unneeded casts.
2009-02-22 15:48:02 +00:00
Kenichi Handa
f289d37532 (detect_coding): Don't overflow coding->carryover. 2009-02-19 04:24:54 +00:00
Kenichi Handa
73cce38dbc (detect_coding): Preserve coding->mode. 2009-02-19 02:43:38 +00:00
Andreas Schwab
4c1958f4a9 (Fcheck_coding_systems_region): Fix test for unibyte
string.
2009-02-16 13:04:15 +00:00
Kenichi Handa
5704f39a80 (Fcheck_coding_systems_region): Fix typo; Qt -> Qnil. 2009-02-16 11:53:52 +00:00
Juanma Barranquero
8510724d46 Remove spurious semicolons. 2009-02-11 09:45:12 +00:00
Kenichi Handa
cb84a2bed1 (detect_coding_charset): Fix previous change. 2009-02-09 00:45:17 +00:00
Eli Zaretskii
8434d0b8c0 (syms_of_coding) <translation-table-for-input>: Modify doc string to
discourage use for character code unification.
2009-02-07 10:52:13 +00:00
Kenichi Handa
e9f91eced1 (coding_system_charset_list): New function. 2009-02-04 01:52:39 +00:00
Eli Zaretskii
75f4f1ac04 (detect_eol, decode_eol): Handle text with DOS-style EOLs that also has
stray ^M characters.
2009-01-30 15:46:03 +00:00
Kenichi Handa
4cddb209b4 (detect_coding_system): Fix handling of null_byte_fount. 2009-01-15 07:13:39 +00:00
Kenichi Handa
220eeac9e4 Fix previous changes. 2009-01-14 12:51:06 +00:00
Kenichi Handa
f56a445091 (TWO_MORE_BYTES): New macro.
(detect_coding_utf_16): Use TWO_MORE_BYTES instead of
ONE_MORE_BYTE.
2009-01-14 12:19:44 +00:00
Eli Zaretskii
97b1b294af Fix Bug #876:
(inhibit_null_byte_detection): New variable.
(detect_coding, detect_coding_system): Don't pay attention to null bytes if
inhibit_null_byte_detection is non-zero.
(syms_of_coding) <inhibit-null-byte-detection>: Declare and document.
<inhibit-iso-escape-detection>: Doc fix.
2009-01-10 10:41:23 +00:00
Glenn Morris
76b6f70759 Add 2009 to copyright years. 2009-01-08 03:15:17 +00:00
Kenichi Handa
b71f6f7303 (decode_coding_utf_8): Check byte_after_cr before breaking the loop.
(decode_coding_utf_16, decode_coding_emacs_mule)
(decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
(decode_coding_charset): Likewise.
2009-01-07 06:49:50 +00:00
Jason Rumney
b2dab6c8f7 (decode_coding): Clear chars_at_source flag when using charbuf. 2008-12-20 08:01:12 +00:00
Juanma Barranquero
2133e2d138 * coding.c (QCdefault_char): Rename from QCdefalut_char.
(Fcoding_system_put): Use QCdefault_char.
  (syms_of_coding): Set QCdefault_char, not QCdefalut_char.
2008-12-10 01:04:19 +00:00
Chong Yidong
df36ff1f38 (make_conversion_work_buffer): Disable buffer modification hooks in
the work buffer.
2008-12-07 00:58:47 +00:00
Kenichi Handa
905ca9d212 (encode_coding_emacs_mule): Be sure to set `code'. 2008-12-03 06:35:02 +00:00
Kenichi Handa
1b17adfd3b (decode_coding_charset): Check type of an element of
vector VALIDS.
2008-12-03 05:48:11 +00:00
Kenichi Handa
4533845dc4 (detect_coding_system): Initialize utf_16_le_eol to -1, val to
Qnil.
(produce_chars): Initialize consumed_chars to 0.
2008-12-03 02:27:26 +00:00
Kenichi Handa
453b38f050 (decode_coding_utf_8): Likewise. 2008-12-03 01:22:25 +00:00
Kenichi Handa
3a8406e126 (decode_coding_utf_16): Initialize consumed_chars_base
to 0.
2008-12-03 01:19:06 +00:00
Kenichi Handa
cee53ed4b8 (detect_coding_iso_2022): Reject invalid composition
sequence.
(DECODE_COMPOSITION_START): If the current source is the last
block, and the current composition doesn't end, regard this
sequence as invalid.
(decode_coding_iso_2022): Handle invalid composition sequence.
2008-11-21 02:24:40 +00:00
Noah Friedman
159bd5a226 (make_conversion_work_buffer): Check that Vcode_conversion_reused_workbuf
is a live buffer, otherwise call Fget_buffer_create.
2008-10-23 06:55:14 +00:00
Eli Zaretskii
1560f91a92 (Fencode_coding_region, Fdecode_coding_region)
(Fdecode_coding_string, Fencode_coding_string): Doc fix.
2008-10-21 15:57:30 +00:00
Kenichi Handa
0729571314 (detect_coding_charset): For iso-8859-* coding systems,
check Vlatin_extra_code_table.
2008-10-21 02:28:20 +00:00
Kenichi Handa
a993c7a1db (make_conversion_work_buffer): Avoid calling
Fget_buffer_create if it is not necessary.
2008-09-16 01:16:58 +00:00
Kenichi Handa
0e17387a9e (detect_coding_utf_8): Set detect_info->found only when
non-ASCII char is found.
2008-07-09 13:06:14 +00:00
Kenichi Handa
c006c0c8cc (detect_coding): Fix previous change.
(detect_coding_system): Likewise.
2008-06-05 11:35:10 +00:00
Kenichi Handa
c0e16b1436 (detect_coding): Fix handling of coding->head_ascii.
Be sure to call setup_coding_system when a proper coding system is
found.
(detect_coding_system): Fix handling of coding->head_ascii.
2008-06-04 07:53:59 +00:00
Kenichi Handa
a470d44380 (CODING_UTF_8_BOM): New macro.
(enum coding_category): Delete coding_category_utf_8, add
coding_category_utf_8_auto, coding_category_utf_8_nosig, and
coding_category_utf_8_sig.
(CATEGORY_MASK_UTF_8): Delete it.
(CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG)
(CATEGORY_MASK_UTF_8_SIG): New macros.
(CATEGORY_MASK_ANY): Delete CATEGORY_MASK_UTF_8, add
CATEGORY_MASK_UTF_8_AUTO, CATEGORY_MASK_UTF_8_NOSIG, and
CATEGORY_MASK_UTF_8_SIG.
(CATEGORY_MASK_UTF_8): New macro.
(UTF_BOM, UTF_8_BOM_1, UTF_8_BOM_2, UTF_8_BOM_3): New macros.
(detect_coding_utf_8): Check BOM.
(decode_coding_utf_8, encode_coding_utf_8): Handle BOM.
(decode_coding_utf_16): Adjusted for the change of enum
utf_bom_type.
(encode_coding_utf_16): Likewise.
(setup_coding_system): Likewise.  Set CODING_UTF_8_BOM (coding).
(detect_coding, detect_coding_system): Handle utf-8-auto.
(Fdefine_coding_system_internal): Handle `bom' property for utf-8.
(syms_of_coding): Fix setting up of Vcoding_category_table.
2008-05-29 22:58:15 +00:00
Juanma Barranquero
446dcd7574 (Fdecode_coding_region, Fencode_coding_region, Fencode_coding_string):
(syms_of_coding) <coding-system-for-read, coding-system-for-write>:
<latin-extra-code-table>: Fix typos in docstrings.
(syms_of_coding) <coding-system-alist>: Doc fix.
(syms_of_coding) <translation-table-for-input>: Reflow docstring.
2008-05-28 09:11:59 +00:00
Kenichi Handa
319a394709 (encode_coding_raw_text): Fix previous change.
(encode_coding_object): When the dst_object is a buffer and is
different from src_object, move gap to PT.
2008-05-28 06:38:47 +00:00
Stefan Monnier
a0ed9b27c3 (encode_coding_raw_text): Fix last change. 2008-05-27 15:56:59 +00:00
Stefan Monnier
01d45367b2 (encode_coding_raw_text): Set coding->produced_char for all branches.
Compute it differently.
2008-05-27 15:49:49 +00:00
Juanma Barranquero
d4a1d55391 (Fcoding_system_p): Rename argument to match docstring.
(Funencodable_char_position, Fcheck_coding_systems_region,
Fdecode_coding_string, Fencode_coding_string): Fix typos in docstrings.
(Fdetect_coding_region, Fdetect_coding_string, Fencode_coding_region,
Ffind_operation_coding_system, Fset_coding_system_priority,
Fcoding_system_eol_type): Doc fixes.
2008-05-19 00:57:11 +00:00
Glenn Morris
9ec0b715e2 Switch to recommended form of GPLv3 permissions notice. 2008-05-14 07:50:26 +00:00
Kenichi Handa
c6b278e7cb (detect_coding_iso_2022): Ignore a coding category that
has no corresponding coding system.
2008-05-14 01:46:15 +00:00
Michael Albinus
3ed051d450 * coding.c (detect_coding_emacs_mule)
(Ffind_operation_coding_system): Fix typo.
2008-04-08 20:18:14 +00:00