[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/coding.c
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] Changes to emacs/src/coding.c |
Date: |
Mon, 17 Dec 2001 10:21:07 -0500 |
Index: emacs/src/coding.c
diff -c emacs/src/coding.c:1.235 emacs/src/coding.c:1.236
*** emacs/src/coding.c:1.235 Mon Dec 17 09:05:07 2001
--- emacs/src/coding.c Mon Dec 17 10:21:06 2001
***************
*** 60,66 ****
all variants of ISO2022. Details are described in section 3.
2. SJIS (or Shift-JIS or MS-Kanji-Code)
!
A coding system to encode character sets: ASCII, JISX0201, and
JISX0208. Widely used for PC's in Japan. Details are described in
section 4.
--- 60,66 ----
all variants of ISO2022. Details are described in section 3.
2. SJIS (or Shift-JIS or MS-Kanji-Code)
!
A coding system to encode character sets: ASCII, JISX0201, and
JISX0208. Widely used for PC's in Japan. Details are described in
section 4.
***************
*** 503,509 ****
struct coding_system *coding;
{
Lisp_Object coding_spec, plist, safe_chars;
!
coding_spec = Fget (coding->symbol, Qcoding_system);
plist = XVECTOR (coding_spec)->contents[3];
safe_chars = Fplist_get (XVECTOR (coding_spec)->contents[3], Qsafe_chars);
--- 503,509 ----
struct coding_system *coding;
{
Lisp_Object coding_spec, plist, safe_chars;
!
coding_spec = Fget (coding->symbol, Qcoding_system);
plist = XVECTOR (coding_spec)->contents[3];
safe_chars = Fplist_get (XVECTOR (coding_spec)->contents[3], Qsafe_chars);
***************
*** 889,895 ****
CODING_ADD_COMPOSITION_START (coding, coding->produced_char, method);
for (i = 0; i < ncomponent; i++)
CODING_ADD_COMPOSITION_COMPONENT (coding, component[i]);
! CODING_ADD_COMPOSITION_END (coding, coding->produced_char + nchars);
if (buf < bufp)
{
unsigned char *p = buf;
--- 889,895 ----
CODING_ADD_COMPOSITION_START (coding, coding->produced_char, method);
for (i = 0; i < ncomponent; i++)
CODING_ADD_COMPOSITION_COMPONENT (coding, component[i]);
! CODING_ADD_COMPOSITION_END (coding, coding->produced_char + nchars);
if (buf < bufp)
{
unsigned char *p = buf;
***************
*** 1055,1061 ****
coding->cmp_data_start = 0; \
}
\
} while (0)
!
static void encode_eol P_ ((struct coding_system *, unsigned char *,
unsigned char *, int, int));
--- 1055,1061 ----
coding->cmp_data_start = 0; \
}
\
} while (0)
!
static void encode_eol P_ ((struct coding_system *, unsigned char *,
unsigned char *, int, int));
***************
*** 1433,1439 ****
mask_found |= CODING_CATEGORY_MASK_ISO_SHIFT;
}
break;
!
case ISO_CODE_SI:
if (inhibit_iso_escape_detection)
break;
--- 1433,1439 ----
mask_found |= CODING_CATEGORY_MASK_ISO_SHIFT;
}
break;
!
case ISO_CODE_SI:
if (inhibit_iso_escape_detection)
break;
***************
*** 1665,1671 ****
#define DECODE_COMPOSITION_END(c1) \
do {
\
! if (! COMPOSING (coding)) \
{
\
*dst++ = ISO_CODE_ESC; \
*dst++ = c1; \
--- 1665,1671 ----
#define DECODE_COMPOSITION_END(c1) \
do {
\
! if (! COMPOSING_P (coding))
\
{
\
*dst++ = ISO_CODE_ESC; \
*dst++ = c1; \
***************
*** 2439,2445 ****
ONE_MORE_CHAR (c);
if (c == '\n')
break;
!
charset = CHAR_CHARSET (c);
reg = CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset);
if (reg != CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION && r[reg] < 0)
--- 2439,2445 ----
ONE_MORE_CHAR (c);
if (c == '\n')
break;
!
charset = CHAR_CHARSET (c);
reg = CODING_SPEC_ISO_REQUESTED_DESIGNATION (coding, charset);
if (reg != CODING_SPEC_ISO_NO_REQUESTED_DESIGNATION && r[reg] < 0)
***************
*** 2609,2615 ****
*dst++ = ISO_CODE_CR;
CODING_SPEC_ISO_BOL (coding) = 1;
}
! else
{
if (coding->flags & CODING_FLAG_ISO_RESET_AT_CNTL)
ENCODE_RESET_PLANE_AND_REGISTER;
--- 2609,2615 ----
*dst++ = ISO_CODE_CR;
CODING_SPEC_ISO_BOL (coding) = 1;
}
! else
{
if (coding->flags & CODING_FLAG_ISO_RESET_AT_CNTL)
ENCODE_RESET_PLANE_AND_REGISTER;
***************
*** 3032,3038 ****
src_base = src;
ONE_MORE_CHAR (c);
!
/* Now encode the character C. */
if (SINGLE_BYTE_CHAR_P (c))
{
--- 3032,3038 ----
src_base = src;
ONE_MORE_CHAR (c);
!
/* Now encode the character C. */
if (SINGLE_BYTE_CHAR_P (c))
{
***************
*** 3357,3363 ****
If the value is nil, graphic register N is never used on
encoding.
!
sub-element[N] where N is 4 through 11: to be set in `coding->flags'
Each value takes t or nil. See the section ISO2022 of
`coding.h' for more information.
--- 3357,3363 ----
If the value is nil, graphic register N is never used on
encoding.
!
sub-element[N] where N is 4 through 11: to be set in `coding->flags'
Each value takes t or nil. See the section ISO2022 of
`coding.h' for more information.
***************
*** 3481,3487 ****
}
else
goto label_invalid_coding_system;
!
/* If the coding system has non-nil `composition' property, enable
composition handling. */
val = Fplist_get (plist, Qcomposition);
--- 3481,3487 ----
}
else
goto label_invalid_coding_system;
!
/* If the coding system has non-nil `composition' property, enable
composition handling. */
val = Fplist_get (plist, Qcomposition);
***************
*** 3621,3627 ****
}
else
CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = -1;
!
CODING_SPEC_ISO_DESIGNATION (coding, i)
= CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i);
}
--- 3621,3627 ----
}
else
CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i) = -1;
!
CODING_SPEC_ISO_DESIGNATION (coding, i)
= CODING_SPEC_ISO_INITIAL_DESIGNATION (coding, i);
}
***************
*** 3994,4000 ****
| CODING_CATEGORY_MASK_UTF_16_LE);
/* Or, if C is a special latin extra code,
! or is an ISO2022 specific control code of C1 (SS2 or SS3),
or is an ISO2022 control-sequence-introducer (CSI),
we should also consider the possibility of ISO2022 codings. */
if ((VECTORP (Vlatin_extra_code_table)
--- 3994,4000 ----
| CODING_CATEGORY_MASK_UTF_16_LE);
/* Or, if C is a special latin extra code,
! or is an ISO2022 specific control code of C1 (SS2 or SS3),
or is an ISO2022 control-sequence-introducer (CSI),
we should also consider the possibility of ISO2022 codings. */
if ((VECTORP (Vlatin_extra_code_table)
***************
*** 5101,5107 ****
break;
if (coding->flags & CODING_FLAG_ISO_DESIGNATE_AT_BOL)
{
! unsigned char *bol = begp;
while (begp < endp && *begp < 0x80)
{
begp++;
--- 5101,5107 ----
break;
if (coding->flags & CODING_FLAG_ISO_DESIGNATE_AT_BOL)
{
! unsigned char *bol = begp;
while (begp < endp && *begp < 0x80)
{
begp++;
***************
*** 5599,5605 ****
coding->symbol = XVECTOR (eol_type)->contents[CODING_EOL_LF];
else
coding->symbol = saved_coding_symbol;
!
continue;
}
if (len_byte <= 0)
--- 5599,5605 ----
coding->symbol = XVECTOR (eol_type)->contents[CODING_EOL_LF];
else
coding->symbol = saved_coding_symbol;
!
continue;
}
if (len_byte <= 0)
***************
*** 5617,5623 ****
if (multibyte_p)
{
unsigned char *start = dst;
!
inserted += len_byte;
while (len_byte--)
{
--- 5617,5623 ----
if (multibyte_p)
{
unsigned char *start = dst;
!
inserted += len_byte;
while (len_byte--)
{
***************
*** 5700,5706 ****
inserted_byte = str_to_multibyte (GPT_ADDR, GAP_SIZE, inserted_byte);
}
! /* If we shrank the conversion area, adjust it now. */
if (total_skip > 0)
{
if (tail_skip > 0)
--- 5700,5706 ----
inserted_byte = str_to_multibyte (GPT_ADDR, GAP_SIZE, inserted_byte);
}
! /* If we shrank the conversion area, adjust it now. */
if (total_skip > 0)
{
if (tail_skip > 0)
***************
*** 5942,5948 ****
}
produced += num_eol;
produced_char += num_eol;
! }
/* Suppress eol-format conversion in the further conversion. */
coding->eol_type = CODING_EOL_LF;
--- 5942,5948 ----
}
produced += num_eol;
produced_char += num_eol;
! }
/* Suppress eol-format conversion in the further conversion. */
coding->eol_type = CODING_EOL_LF;
***************
*** 6212,6218 ****
}
}
return (highest ? XCAR (val) : val);
! }
DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region,
2, 3, 0,
--- 6212,6218 ----
}
}
return (highest ? XCAR (val) : val);
! }
DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region,
2, 3, 0,
***************
*** 6408,6414 ****
for (p = p1; p < p1end && ASCII_BYTE_P (*p); p++);
if (p == p1end)
{
! for (p = p2; p < p2end && ASCII_BYTE_P (*p); p++);
if (p == p2end)
return Qt;
}
--- 6408,6414 ----
for (p = p1; p < p1end && ASCII_BYTE_P (*p); p++);
if (p == p1end)
{
! for (p = p2; p < p2end && ASCII_BYTE_P (*p); p++);
if (p == p2end)
return Qt;
}
***************
*** 6940,6946 ****
{
int i;
! /* Emacs' internal format specific initialize routine. */
for (i = 0; i <= 0x20; i++)
emacs_code_class[i] = EMACS_control_code;
emacs_code_class[0x0A] = EMACS_linefeed_code;
--- 6940,6946 ----
{
int i;
! /* Emacs' internal format specific initialize routine. */
for (i = 0; i <= 0x20; i++)
emacs_code_class[i] = EMACS_control_code;
emacs_code_class[0x0A] = EMACS_linefeed_code;