[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/charset.h
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/charset.h |
Date: |
Fri, 30 May 2003 20:10:46 -0400 |
Index: emacs/src/charset.h
diff -c emacs/src/charset.h:1.74 emacs/src/charset.h:1.75
*** emacs/src/charset.h:1.74 Thu Apr 17 17:55:18 2003
--- emacs/src/charset.h Fri May 30 20:10:46 2003
***************
*** 441,461 ****
#endif /* not BYTE_COMBINING_DEBUG */
/* Return 1 iff the byte sequence at unibyte string STR (LENGTH bytes)
is valid as a multibyte form. If valid, by a side effect, BYTES is
set to the byte length of the multibyte form. */
! #define UNIBYTE_STR_AS_MULTIBYTE_P(str, length, bytes) \
! (((str)[0] < 0x80 || (str)[0] >= 0xA0) \
! ? ((bytes) = 1) \
! : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \
! ((bytes) > 1 && (bytes) <= (length) \
! && (str)[0] != LEADING_CODE_8_BIT_CONTROL \
! && !CHAR_HEAD_P ((str)[1]) \
! && ((bytes) == 2 \
! || (!CHAR_HEAD_P ((str)[2]) \
! && ((bytes) == 3 \
! || !CHAR_HEAD_P ((str)[3])))))))
/* Return 1 iff the byte sequence at multibyte string STR is valid as
a unibyte form. By a side effect, BYTES is set to the byte length
--- 441,469 ----
#endif /* not BYTE_COMBINING_DEBUG */
+ #define VALID_LEADING_CODE_P(code) \
+ (! NILP (CHARSET_TABLE_ENTRY (code)))
+
/* Return 1 iff the byte sequence at unibyte string STR (LENGTH bytes)
is valid as a multibyte form. If valid, by a side effect, BYTES is
set to the byte length of the multibyte form. */
! #define UNIBYTE_STR_AS_MULTIBYTE_P(str, length, bytes) \
! (((str)[0] < 0x80 || (str)[0] >= 0xA0) \
! ? ((bytes) = 1) \
! : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \
! ((bytes) <= (length) \
! && !CHAR_HEAD_P ((str)[1]) \
! && ((bytes) == 2 \
! ? (str)[0] != LEADING_CODE_8_BIT_CONTROL \
! : (!CHAR_HEAD_P ((str)[2]) \
! && ((bytes) == 3 \
! ? (((str)[0] != LEADING_CODE_PRIVATE_11 \
! && (str)[0] != LEADING_CODE_PRIVATE_12) \
! || VALID_LEADING_CODE_P (str[1])) \
! : (!CHAR_HEAD_P ((str)[3]) \
! && VALID_LEADING_CODE_P (str[1]))))))))
!
/* Return 1 iff the byte sequence at multibyte string STR is valid as
a unibyte form. By a side effect, BYTES is set to the byte length
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/charset.h,
Kenichi Handa <=