[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/coding.c
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/coding.c |
Date: |
Fri, 30 May 2003 20:56:42 -0400 |
Index: emacs/src/coding.c
diff -c emacs/src/coding.c:1.283 emacs/src/coding.c:1.284
*** emacs/src/coding.c:1.283 Fri May 30 03:57:48 2003
--- emacs/src/coding.c Fri May 30 20:56:42 2003
***************
*** 712,718 ****
#define DECODE_EMACS_MULE_COMPOSITION_CHAR(c, p) \
do { \
int bytes; \
! \
c = SAFE_ONE_MORE_BYTE (); \
if (c < 0) \
break; \
--- 712,718 ----
#define DECODE_EMACS_MULE_COMPOSITION_CHAR(c, p) \
do { \
int bytes; \
! \
c = SAFE_ONE_MORE_BYTE (); \
if (c < 0) \
break; \
***************
*** 743,749 ****
break; \
*p++ = c; \
} \
! if (UNIBYTE_STR_AS_MULTIBYTE_P (p0, p - p0, bytes)) \
c = STRING_CHAR (p0, bytes); \
else \
c = -1; \
--- 743,752 ----
break; \
*p++ = c; \
} \
! if (UNIBYTE_STR_AS_MULTIBYTE_P (p0, p - p0, bytes) \
! || (coding->flags /* We are recovering a file. */ \
! && p0[0] == LEADING_CODE_8_BIT_CONTROL \
! && ! CHAR_HEAD_P (p0[1]))) \
c = STRING_CHAR (p0, bytes); \
else \
c = -1; \
***************
*** 847,853 ****
else
{
int bytes;
! if (UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes))
c = STRING_CHAR (src, bytes);
else
c = *src, bytes = 1;
--- 850,859 ----
else
{
int bytes;
! if (UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes)
! || (coding->flags /* We are recovering a file. */
! && src[0] == LEADING_CODE_8_BIT_CONTROL
! && ! CHAR_HEAD_P (src[1])))
c = STRING_CHAR (src, bytes);
else
c = *src, bytes = 1;
***************
*** 1001,1007 ****
p = tmp;
src++;
}
! else if (UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes))
{
p = src;
src += bytes;
--- 1007,1016 ----
p = tmp;
src++;
}
! else if (UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes)
! || (coding->flags /* We are recovering a file. */
! && src[0] == LEADING_CODE_8_BIT_CONTROL
! && ! CHAR_HEAD_P (src[1])))
{
p = src;
src += bytes;
***************
*** 1132,1138 ****
EMIT_ONE_BYTE ('\r');
}
else if (SINGLE_BYTE_CHAR_P (c))
! EMIT_ONE_BYTE (c);
else
EMIT_BYTES (src_base, src);
coding->consumed_char++;
--- 1141,1162 ----
EMIT_ONE_BYTE ('\r');
}
else if (SINGLE_BYTE_CHAR_P (c))
! {
! if (coding->flags && ! ASCII_BYTE_P (c))
! {
! /* As we are auto saving, retain the multibyte form for
! 8-bit chars. */
! unsigned char buf[MAX_MULTIBYTE_LENGTH];
! int bytes = CHAR_STRING (c, buf);
!
! if (bytes == 1)
! EMIT_ONE_BYTE (buf[0]);
! else
! EMIT_TWO_BYTES (buf[0], buf[1]);
! }
! else
! EMIT_ONE_BYTE (c);
! }
else
EMIT_BYTES (src_base, src);
coding->consumed_char++;
- [Emacs-diffs] Changes to emacs/src/coding.c, (continued)
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/20
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/22
- [Emacs-diffs] Changes to emacs/src/coding.c, Andreas Schwab, 2003/05/24
- [Emacs-diffs] Changes to emacs/src/coding.c, Stefan Monnier, 2003/05/25
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/28
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/28
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/28
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/29
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/30
- [Emacs-diffs] Changes to emacs/src/coding.c, Kenichi Handa, 2003/05/30
- [Emacs-diffs] Changes to emacs/src/coding.c,
Kenichi Handa <=