]> git.eshelyaron.com Git - emacs.git/commitdiff
* coding.c: (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:23:55 +0000 (23:23 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:23:55 +0000 (23:23 -0800)
(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.

src/ChangeLog
src/coding.c

index ae111aef44c9d3d3e4a6e2f1db37660680ac47bb..fdc9fb126ed965410015f6a87e71e4c8fa6787cc 100644 (file)
        (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>
 
index 75fc92eee8dbe1dbd080c2504f53485746f80647..3df34cea173836f60c1a3958c966f9828b2f7e74 100644 (file)
@@ -395,8 +395,6 @@ Lisp_Object Vbig5_coding_system;
 
 /* 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 */
@@ -479,7 +477,7 @@ enum iso_code_class_type
 
 #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
 
@@ -721,25 +719,6 @@ static struct coding_system coding_categories[coding_category_max];
   } 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'
@@ -1219,7 +1198,6 @@ alloc_destination (struct coding_system *coding, EMACS_INT nbytes,
 #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
@@ -1535,11 +1513,6 @@ encode_coding_utf_8 (struct coding_system *coding)
 #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,
@@ -2905,10 +2878,6 @@ enum iso_code_class_type iso_code_class[256];
   ((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)
 {
@@ -4295,30 +4264,6 @@ encode_invocation_designation (struct charset *charset,
   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.  */