emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114043: * regex.c (CHAR_CHARSET, CHARSET_LEADING_CO


From: Andreas Schwab
Subject: [Emacs-diffs] trunk r114043: * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
Date: Wed, 28 Aug 2013 14:05:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114043
revision-id: address@hidden
parent: address@hidden
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Wed 2013-08-28 15:50:55 +0200
message:
  * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
  (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
  Remove unused macro definitions.
  (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
  (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA): Only
  define if emacs.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/regex.c                    regex.c-20091113204419-o5vbwnq5f7feedwu-518
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-08-28 11:00:03 +0000
+++ b/src/ChangeLog     2013-08-28 13:50:55 +0000
@@ -1,3 +1,12 @@
+2013-08-28  Andreas Schwab  <address@hidden>
+
+       * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
+       (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
+       Remove unused macro definitions.
+       (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
+       (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA): Only
+       define if emacs.
+
 2013-08-28  Dmitry Antipov  <address@hidden>
 
        Prefer enum glyph_row_area to int where appropriate.

=== modified file 'src/regex.c'
--- a/src/regex.c       2013-08-26 21:31:50 +0000
+++ b/src/regex.c       2013-08-28 13:50:55 +0000
@@ -257,15 +257,10 @@
 enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
 
 /* Dummy macros for non-Emacs environments.  */
-# define CHAR_CHARSET(c) 0
-# define CHARSET_LEADING_CODE_BASE(c) 0
 # define MAX_MULTIBYTE_LENGTH 1
 # define RE_MULTIBYTE_P(x) 0
 # define RE_TARGET_MULTIBYTE_P(x) 0
 # define WORD_BOUNDARY_P(c1, c2) (0)
-# define CHAR_HEAD_P(p) (1)
-# define SINGLE_BYTE_CHAR_P(c) (1)
-# define SAME_CHARSET_P(c1, c2) (1)
 # define BYTES_BY_CHAR_HEAD(p) (1)
 # define PREV_CHAR_BOUNDARY(p, limit) ((p)--)
 # define STRING_CHAR(p) (*(p))
@@ -279,8 +274,6 @@
   (c = ((p) == (str2) ? *((end1) - 1) : *((p) - 1)))
 # define GET_CHAR_AFTER(c, p, len)     \
   (c = *p, len = 1)
-# define MAKE_CHAR(charset, c1, c2) (c1)
-# define BYTE8_TO_CHAR(c) (c)
 # define CHAR_BYTE8_P(c) (0)
 # define CHAR_LEADING_CODE(c) (c)
 
@@ -775,10 +768,12 @@
    and the 2 bytes of flags at the start of the range table.  */
 #define CHARSET_RANGE_TABLE(p) (&(p)[4 + CHARSET_BITMAP_SIZE (p)])
 
+#ifdef emacs
 /* Extract the bit flags that start a range table.  */
 #define CHARSET_RANGE_TABLE_BITS(p)            \
   ((p)[2 + CHARSET_BITMAP_SIZE (p)]            \
    + (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100)
+#endif
 
 /* Return the address of end of RANGE_TABLE.  COUNT is number of
    ranges (which is a pair of (start, end)) in the RANGE_TABLE.  `* 2'
@@ -1830,6 +1825,8 @@
   int bits;                    /* flag to record character classes */
 };
 
+#ifdef emacs
+
 /* Make sure that WORK_AREA can hold more N multibyte characters.
    This is used only in set_image_of_range and set_image_of_range_1.
    It expects WORK_AREA to be a pointer.
@@ -1848,15 +1845,6 @@
 #define SET_RANGE_TABLE_WORK_AREA_BIT(work_area, bit)          \
   (work_area).bits |= (bit)
 
-/* Bits used to implement the multibyte-part of the various character classes
-   such as [:alnum:] in a charset's range table.  */
-#define BIT_WORD       0x1
-#define BIT_LOWER      0x2
-#define BIT_PUNCT      0x4
-#define BIT_SPACE      0x8
-#define BIT_UPPER      0x10
-#define BIT_MULTIBYTE  0x20
-
 /* Set a range (RANGE_START, RANGE_END) to WORK_AREA.  */
 #define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end)   \
   do {                                                                 \
@@ -1865,6 +1853,8 @@
     (work_area).table[(work_area).used++] = (range_end);               \
   } while (0)
 
+#endif /* emacs */
+
 /* Free allocated memory for WORK_AREA.  */
 #define FREE_RANGE_TABLE_WORK_AREA(work_area)  \
   do {                                         \
@@ -1876,6 +1866,15 @@
 #define RANGE_TABLE_WORK_USED(work_area) ((work_area).used)
 #define RANGE_TABLE_WORK_BITS(work_area) ((work_area).bits)
 #define RANGE_TABLE_WORK_ELT(work_area, i) ((work_area).table[i])
+
+/* Bits used to implement the multibyte-part of the various character classes
+   such as [:alnum:] in a charset's range table.  */
+#define BIT_WORD       0x1
+#define BIT_LOWER      0x2
+#define BIT_PUNCT      0x4
+#define BIT_SPACE      0x8
+#define BIT_UPPER      0x10
+#define BIT_MULTIBYTE  0x20
 
 
 /* Set the bit for character C in a list.  */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]