Mercurial > hg > xemacs-beta
diff src/file-coding.h @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | a4f53d9b3154 |
children | 8626e4521993 |
line wrap: on
line diff
--- a/src/file-coding.h Mon Aug 13 11:01:58 2007 +0200 +++ b/src/file-coding.h Mon Aug 13 11:03:08 2007 +0200 @@ -305,26 +305,20 @@ CODING_STATE_SS2 overrides; but this probably indicates an error in the text encoding. */ -#ifdef ENABLE_COMPOSITE_CHARS #define CODING_STATE_COMPOSITE (1 << 8) /* If set, we're currently processing a composite character (i.e. a character constructed by overstriking two or more characters). */ -#endif /* ENABLE_COMPOSITE_CHARS */ /* CODING_STATE_ISO2022_LOCK is the mask of flags that remain on until explicitly turned off when in the ISO2022 encoder/decoder. Other flags are turned off at the end of processing each character or escape sequence. */ -#ifdef ENABLE_COMPOSITE_CHARS # define CODING_STATE_ISO2022_LOCK \ (CODING_STATE_END | CODING_STATE_COMPOSITE | CODING_STATE_R2L) -#else -# define CODING_STATE_ISO2022_LOCK (CODING_STATE_END | CODING_STATE_R2L) -#endif - -#define CODING_STATE_BIG5_LOCK CODING_STATE_END +#define CODING_STATE_BIG5_LOCK \ + CODING_STATE_END /* Flags indicating what we've seen so far when parsing an ISO2022 escape sequence. */ @@ -375,10 +369,8 @@ character must be ]. */ /* Full sequences. */ -#ifdef ENABLE_COMPOSITE_CHARS ISO_ESC_START_COMPOSITE, /* Private usage for START COMPOSING */ - ISO_ESC_END_COMPOSITE, /* Private usage for END COMPOSING */ -#endif /* ENABLE_COMPOSITE_CHARS */ + ISO_ESC_END_COMPOSITE, /* Private usage for END COMPOSING */ ISO_ESC_SINGLE_SHIFT, /* We've seen a complete single-shift sequence. */ ISO_ESC_LOCKING_SHIFT,/* We've seen a complete locking-shift sequence. */ ISO_ESC_DESIGNATE, /* We've seen a complete designation sequence. */ @@ -417,36 +409,28 @@ /* For detecting the encoding of text */ -/* The order is chosen so that by default only ISO 2022 7-bit encodings - are auto-detected. These are needed for Mule files. */ enum coding_category_type { #ifdef MULE + CODING_CATEGORY_SHIFT_JIS, CODING_CATEGORY_ISO_7, /* ISO2022 system using only seven-bit bytes, no locking shift */ - CODING_CATEGORY_NO_CONVERSION, + CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes, + no locking shift, no single shift, + using designation to switch charsets */ CODING_CATEGORY_ISO_8_1, /* ISO2022 system using eight-bit bytes, no locking shift, no designation sequences, one-dimension characters in the upper half. */ CODING_CATEGORY_ISO_8_2, /* ISO2022 system using eight-bit bytes, no locking shift, no designation sequences, two-dimension characters in the upper half. */ - CODING_CATEGORY_ISO_8_DESIGNATE, /* ISO2022 system using eight-bit bytes, - no locking shift, no single shift, - using designation to switch charsets */ CODING_CATEGORY_ISO_LOCK_SHIFT, /* ISO2022 system using locking shift */ CODING_CATEGORY_BIG5, - CODING_CATEGORY_SHIFT_JIS -#else /* MULE */ +#endif /* MULE */ CODING_CATEGORY_NO_CONVERSION -#endif /* not MULE */ }; -#ifdef MULE -#define CODING_CATEGORY_LAST CODING_CATEGORY_SHIFT_JIS -#else #define CODING_CATEGORY_LAST CODING_CATEGORY_NO_CONVERSION -#endif #ifdef MULE #define CODING_CATEGORY_SHIFT_JIS_MASK \ @@ -521,9 +505,7 @@ #ifndef MULE #define MIN_LEADING_BYTE 0x80 /* These need special treatment in a string and/or character */ -#ifdef ENABLE_COMPOSITE_CHARS #define LEADING_BYTE_COMPOSITE 0x80 /* for a composite character */ -#endif #define LEADING_BYTE_CONTROL_1 0x8F /* represent normal 80-9F */ #define LEADING_BYTE_LATIN_ISO8859_1 0x81 /* Right half of ISO 8859-1 */ #define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20)