(decode_coding_object, encode_coding_object, detect_coding_system):
Mark variables that gcc -Wuninitialized does not deduce are never
used uninitialized.
+ (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
+ (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
+ (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
+ (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
+ Remove unused macros.
2011-03-06 Chong Yidong <cyd@stupidchicken.com>
/* Control characters of ISO2022. */
/* code */ /* function */
-#define ISO_CODE_LF 0x0A /* line-feed */
-#define ISO_CODE_CR 0x0D /* carriage-return */
#define ISO_CODE_SO 0x0E /* shift-out */
#define ISO_CODE_SI 0x0F /* shift-in */
#define ISO_CODE_SS2_7 0x19 /* single-shift-2 for 7-bit code */
#define CODING_ISO_FLAG_COMPOSITION 0x2000
-#define CODING_ISO_FLAG_EUC_TW_SHIFT 0x4000
+/* #define CODING_ISO_FLAG_EUC_TW_SHIFT 0x4000 */
#define CODING_ISO_FLAG_USE_ROMAN 0x8000
} while (0)
-#define ONE_MORE_BYTE_NO_CHECK(c) \
- do { \
- c = *src++; \
- if (multibytep && (c & 0x80)) \
- { \
- if ((c & 0xFE) == 0xC0) \
- c = ((c & 1) << 6) | *src++; \
- else \
- { \
- src--; \
- c = - string_char (src, &src, NULL); \
- record_conversion_result \
- (coding, CODING_RESULT_INVALID_SRC); \
- } \
- } \
- consumed_chars++; \
- } while (0)
-
-
/* Store a byte C in the place pointed by DST and increment DST to the
next free point, and increment PRODUCED_CHARS. The caller should
assure that C is 0..127, and declare and set the variable `dst'
#define UTF_8_4_OCTET_LEADING_P(c) (((c) & 0xF8) == 0xF0)
#define UTF_8_5_OCTET_LEADING_P(c) (((c) & 0xFC) == 0xF8)
-#define UTF_BOM 0xFEFF
#define UTF_8_BOM_1 0xEF
#define UTF_8_BOM_2 0xBB
#define UTF_8_BOM_3 0xBF
#define UTF_16_LOW_SURROGATE_P(val) \
(((val) & 0xFC00) == 0xDC00)
-#define UTF_16_INVALID_P(val) \
- (((val) == 0xFFFE) \
- || ((val) == 0xFFFF) \
- || UTF_16_LOW_SURROGATE_P (val))
-
static int
detect_coding_utf_16 (struct coding_system *coding,
((id) <= (coding)->max_charset_id \
&& (coding)->safe_charsets[id] != 255)
-
-#define SHIFT_OUT_OK(category) \
- (CODING_ISO_INITIAL (&coding_categories[category], 1) >= 0)
-
static void
setup_iso_safe_charsets (Lisp_Object attrs)
{
return dst;
}
-/* The following three macros produce codes for indicating direction
- of text. */
-#define ENCODE_CONTROL_SEQUENCE_INTRODUCER \
- do { \
- if (CODING_ISO_FLAGS (coding) == CODING_ISO_FLAG_SEVEN_BITS) \
- EMIT_TWO_ASCII_BYTES (ISO_CODE_ESC, '['); \
- else \
- EMIT_ONE_BYTE (ISO_CODE_CSI); \
- } while (0)
-
-
-#define ENCODE_DIRECTION_R2L() \
- do { \
- ENCODE_CONTROL_SEQUENCE_INTRODUCER (dst); \
- EMIT_TWO_ASCII_BYTES ('2', ']'); \
- } while (0)
-
-
-#define ENCODE_DIRECTION_L2R() \
- do { \
- ENCODE_CONTROL_SEQUENCE_INTRODUCER (dst); \
- EMIT_TWO_ASCII_BYTES ('0', ']'); \
- } while (0)
-
/* Produce codes for designation and invocation to reset the graphic
planes and registers to initial state. */