1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-21 05:00:47 -08:00
Commit graph

358 commits

Author SHA1 Message Date
Kenichi Handa
f46869e46f (detect_coding_iso2022): Don't check the byte length of
succeeding codes (0xa0..0xFF) if the codes follows single shit
code.
1998-08-24 06:42:56 +00:00
Kenichi Handa
25b026986f (detect_coding_system): If detect_eol_type returns
CODING_EOL_INCONSISTENT, set eol_type to CODING_EOL_UNDECIDED
correctly.
1998-08-21 06:34:13 +00:00
Kenichi Handa
7b179c2dc2 (ccl_coding_driver): Setup ccl->last_block properly.
(setup_coding_system): Correctly setup `valid_codes' member.
1998-08-18 13:15:18 +00:00
Kenichi Handa
89fa8b3669 (coding_category_name): Fix the order of initial
contents.
(detect_coding_mask): Fix previous change.
1998-08-15 01:28:14 +00:00
Kenichi Handa
6bc51348fd (default_buffer_file_coding): New variable.
(init_coding_once): Initialize default_buffer_file_coding.
1998-08-10 06:29:02 +00:00
Richard M. Stallman
f024b6aac0 (CHARSET_OK): Check that coding_system_table[IDX] != 0. 1998-08-09 05:28:02 +00:00
Richard M. Stallman
84d602979c Avoid using initializers for Lisp_Object. 1998-08-08 21:32:57 +00:00
Kenichi Handa
1397dc18d5 (Qvalid_codes): New variable.
(coding_category_name): Include "coding-category-ccl".
(detect_coding_ccl): New function.
(setup_coding_system): Setup coding->spec.ccl.valid_codes from the
coding system priority `valid-codes' for CCL based coding systesm.
(detect_coding_mask): Check also a CCL based coding system.
(Fupdate_coding_systems_internal): Renamed from
Fupdate_iso_coding_systems.
(syms_of_coding): Change property char-table-extra-slot of
translation-table to 1.  Initialize and static pro Qvalid_codes.
1998-08-02 01:06:57 +00:00
Kenichi Handa
eda284acb2 (syms_of_coding): Mention auto-coding-alist in the
docstring of file-coding-system-alist.
1998-07-25 04:23:13 +00:00
Kenichi Handa
6d74c3aa20 (init_coding): New function.
(init_coding_once): Don't initialize conversion_buffer here.  It
is done in init_coding.
1998-07-21 01:42:40 +00:00
Kenichi Handa
826bfb8b08 (code_convert_string): Count characters again if we
encounter some invalid code while decoding.
1998-07-09 04:33:00 +00:00
Kenichi Handa
85bbb1345a (DECODE_ISO_CHARACTER): While decoding two-byte code,
if the sencond byte is invalid, produce the first byte as is.
1998-07-09 02:02:33 +00:00
Kenichi Handa
54f7817141 (setup_raw_text_coding_system): New function.
(decode_coding_sjis_big5): Bug for handling invalid code fixed.
1998-06-26 03:29:15 +00:00
Karl Heuer
94487c4e37 Doc fixes. 1998-06-20 22:06:30 +00:00
Richard M. Stallman
993824c9b3 (encode_eol): Fix typo that prevented converting to Mac
line endings.  Always update dst_bytes to number of bytes actually copied.
(decode_eol): Fix value of coding->produced when decoding Unix
line endings (in case this function is ever used for that).
1998-06-16 04:50:57 +00:00
Kenichi Handa
80e803b4e7 (detect_coding_system): Always return a list of HIGHEST is zero.
(Fdetect_coding_region): Doc-string adjusted for the above change.
(Fdetect_coding_string): Likewise.
1998-06-13 01:41:23 +00:00
Karl Heuer
ecec61c199 (code_convert_string_norecord): New function.
Does encoding or decoding but doesn't set Vlast_coding_system_used.
1998-06-03 14:41:07 +00:00
Kenichi Handa
8a8147d64b (detect_coding_mask): Initilize local variable C. 1998-06-02 03:54:18 +00:00
Richard M. Stallman
65059037ab (detect_coding_system): Treat CODING_EOL_INCONSISTENT
like CODING_EOL_UNDECIDED.
1998-05-26 20:46:31 +00:00
Kenichi Handa
66cfb53089 (ascii_skip_code): New variable.
(detect_coding_mask): Skip ASCII codes at the head according to
ascii_skip_code.
(coding_priorities): New variable.
(Fset_coding_priority_internal): New function.
(detect_coding): Call set_coding_mask with coding_priorities as
arg CODING.
(init_coding_once): Initialize ascii_skip_code.
(syms_of_coding): Declare set-coding-priority-internal as a Lisp
function.
1998-05-25 08:08:07 +00:00
Kenichi Handa
f967223b11 Change term "character translation table" to "translation table". 1998-05-22 09:45:34 +00:00
Kenichi Handa
aa60dea617 (shrink_decoding_region): No short cut by
coding->heading_ascii if eol conversion is necessary.
1998-05-21 01:48:52 +00:00
Kenichi Handa
84fbb8a002 Change terms unify/unification to
translate/translation respectively throughtout the file.
(encode_coding_iso2022): Fix bug in encoding a text ending by a
composite character.
(check_composing_code): If we are decoding the last block of data,
return 0 even if the source doesn't end by an escape sequence
which terminates the current composing sequence.
(decode_coding_iso2022): Decode correctly even if the source
doesn't end by an escape sequence which terminates the current
composing sequence.
1998-05-18 00:59:38 +00:00
Richard M. Stallman
f072a3e84c (code_convert_region1): Set Vlast_coding_system_used.
(code_convert_string1): Likewise.
(Fdecode_coding_region, Fencode_coding_region): Doc fixes.
(Fdecode_coding_string, Fencode_coding_string): Doc fixes.
1998-05-10 21:52:08 +00:00
Richard M. Stallman
5ab13dd02e (detect_coding_mask): Check also coding-category-binary. 1998-05-09 21:47:17 +00:00
Richard M. Stallman
38cf95df42 (encode_coding_iso2022): Don't skip a code following some invalid code. 1998-05-04 22:33:38 +00:00
Kenichi Handa
49cb52b45c (encode_coding_iso2022): If encoding a last block,
reset graphic planes and registers.
1998-05-01 04:15:48 +00:00
Andreas Schwab
f82423d721 (setup_coding_system): Properly check for nil. 1998-04-29 09:33:53 +00:00
Richard M. Stallman
ee59c65fd0 (shrink_decoding_region): Do not consider LF as ascii
if preceded by CR, since that confuses eol decoding.
(code_convert_region): When conversion fails with
CODING_FINISH_INSUFFICIENT_SRC, was overwriting src with garbage
from dst instead of copying from src to dst.
1998-04-24 01:05:25 +00:00
Kenichi Handa
d21ca14d48 (setup_coding_system): For a type 4 coding system,
FLAGS member of coding spec is a cons of CCL program symbols.
1998-04-20 02:14:57 +00:00
Kenichi Handa
83fa074f8d (code_convert_region): If point in the conversion
region, move it to FROM in advance.
1998-04-15 23:49:52 +00:00
Eli Zaretskii
ed29121d27 (syms_of_coding): Declare and define inherit-process-coding-system. 1998-04-15 15:52:41 +00:00
Andreas Schwab
b39f748c48 (code_convert_region): Fix mixing of Lisp_Object and
int.
1998-04-14 12:55:11 +00:00
Andreas Schwab
dfcf069d56 Fix -Wimplicit warnings. 1998-04-14 12:25:56 +00:00
Andreas Schwab
68e3a8f141 (code_convert_region): Call adjust_after_insert also
in unibyte mode.
1998-04-14 10:21:04 +00:00
Kenichi Handa
f30cc6122e (code_convert_string): Give decode_coding correct byte
length of source text.
1998-04-14 01:06:44 +00:00
Kenichi Handa
704c57813e (CHARSET_OK): Don't reject safe charsets.
(DECODE_DESIGNATION): Likewise.
(check_composing_code): Likewise.
1998-04-02 00:25:47 +00:00
Kenichi Handa
12410ef100 (code_convert_region): Handle skipped ASCII characters
at the head and tail of conversion region correctly when adjusting
position keepers.  Call adjust_after_insert to record undo info
and adjust markers when we don't have to change byte sequence of
a buffer.
1998-03-30 06:00:54 +00:00
Richard M. Stallman
f5f9a3da6b (code_convert_region): Call adjust_before_replace
in the no-conversion case.  Adjust GPT, ZV and Z in chars.
1998-03-28 21:55:22 +00:00
Kenichi Handa
de9d083c5d (shrink_decoding_region): If EOL_CONVERSION is nonzero,
don't skip `\r' (instead of `\n').
1998-03-24 05:41:38 +00:00
Richard M. Stallman
bbdf84bda7 (code_convert_string): Use make_string_from_bytes. 1998-03-21 17:59:48 +00:00
Richard M. Stallman
fc932ac6c7 Use STRING_BYTES and SET_STRING_BYTES. 1998-03-21 07:06:14 +00:00
Kenichi Handa
6e44253b80 (code_convert_region): The 6th arg name is changed to
REPLACE.  Even if there's no need of code conversion, call
adjust_after_replace to handle bytes combining.
1998-03-16 05:51:07 +00:00
Kenichi Handa
2b4f9037e3 (code_convert_region): Adjusted for the change of
adjust_after_replace.
1998-03-12 00:44:06 +00:00
Richard M. Stallman
7553d0e19c (code_convert_region): Fix previous change. Adjusted
for the change of adjust_after_replace (see insdel.c change above).
1998-03-10 21:14:08 +00:00
Kenichi Handa
7cf8c582dd (code_convert_region): Fix previous change. 1998-03-04 08:05:14 +00:00
Kenichi Handa
4b5ce59134 (code_convert_region): Handle the case that codes
0240..0377 are generated just after a multibyte character.
1998-03-04 07:41:41 +00:00
Karl Heuer
ddbc19ff25 Reorder args in callers of del_range_2. 1998-02-27 22:09:52 +00:00
Kenichi Handa
fb88bf2d25 (decode_coding_iso2022): Update coding->fake_multibyte.
(ENCODE_SINGLE_SHIFT_2, ENCODE_SINGLE_SHIFT_3,
encode_coding_iso2022, decode_coding_sjis_big5,
encode_coding_sjis_big5, decode_eol, encode_eol, decode_coding,
encode_coding): Likewise.
(shrink_decoding_region, shrink_encoding_region): Do not skip
non-ASCII code in any cases.  Bug fix for getting starting address
from BEG.
(code_convert_region): Sync character positions correctly by
paying attention to coding->fake_multibyte.
(code_convert_string): Set number of character and bytes just
processed in members of CODING.
(code_convert_string): Adjusted for the change of
code_convert_region.
(code_convert_region1): Likewise.
1998-02-20 01:40:47 +00:00
Kenichi Handa
4031e2bf0a (ENCODE_ISO_CHARACTER): Pay attention to
CODING_FLAG_ISO_USE_ROMAN and CODING_FLAG_ISO_USE_OLDJIS.
(code_convert_region1): New function.
(Fdecode_coding_region): Call code_convert_region1.
(Fencode_coding_region): Likewise.
(code_convert_string1): New function.
(Fdecode_coding_string): Call code_convert_string1.
(Fencode_coding_string): Likewise.
/
1998-01-30 11:05:41 +00:00