[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src character.h [EMACS_23_1_RC]
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] emacs/src character.h [EMACS_23_1_RC] |
Date: |
Tue, 07 Jul 2009 01:41:20 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_23_1_RC
Changes by: Kenichi Handa <handa> 09/07/07 01:41:20
Modified files:
src : character.h
Log message:
(unibyte_has_multibyte_table): Delete extern.
(charset_unibyte_decoder): Extern it.
(DECODE_UNIBYTE): New macro.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/character.h?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.15&r2=1.15.2.1
Patches:
Index: character.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/character.h,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -b -r1.15 -r1.15.2.1
--- character.h 8 Jan 2009 03:15:27 -0000 1.15
+++ character.h 7 Jul 2009 01:41:20 -0000 1.15.2.1
@@ -87,11 +87,15 @@
#define unibyte_char_to_multibyte(c) \
((c) < 256 ? unibyte_to_multibyte_table[(c)] : (c))
-/* Nth element is 1 iff unibyte char N can be mapped to a multibyte
- char. */
-extern char unibyte_has_multibyte_table[256];
-
-#define UNIBYTE_CHAR_HAS_MULTIBYTE_P(c) (unibyte_has_multibyte_table[(c)])
+/* Decoding table for 8-bit byte codes of the charset charset_unibyte.
+ Nth element is for the code (N-0x80). */
+extern int charset_unibyte_decoder[128];
+
+/* Return a character correspoinding to the code BYTE of
+ charset_unibyte. BYTE must be a byte; i.e. less than 0x100. If
+ BYTE is not a valid code of charset_unibyte, return -1. */
+#define DECODE_UNIBYTE(BYTE) \
+ ((BYTE) < 0x80 ? (int) (BYTE) : charset_unibyte_decoder[(BYTE) - 0x80])
/* If C is not ASCII, make it unibyte. */
#define MAKE_CHAR_UNIBYTE(c) \
- [Emacs-diffs] emacs/src character.h [EMACS_23_1_RC],
Kenichi Handa <=