summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-06-13 22:36:05 +0000
committerRichard M. Stallman <rms@gnu.org>2004-06-13 22:36:05 +0000
commit1fdab5039476b19a91861004a43fb653cb0be836 (patch)
treee46dc4adf11cc470586c381d4111192d80305a4e
parentc13ecd8fca664a3b8489f568a70cc8b7dfc3b0ca (diff)
downloademacs-1fdab5039476b19a91861004a43fb653cb0be836.tar.gz
(re_wctype, re_iswctype): Function defs longer static.
(CHAR_CLASS_MAX_LENGTH, re_wctype_t, re_wchar_t) (re_wctype, re_iswctype, re_wctype_to_bit): Non-function definitions moved to regex.h.
-rw-r--r--src/regex.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/src/regex.c b/src/regex.c
index db69275c312..31a10ee92e0 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1961,41 +1961,10 @@ struct range_table_work_area
} \
} while (0)
-#if WIDE_CHAR_SUPPORT
-/* The GNU C library provides support for user-defined character classes
- and the functions from ISO C amendement 1. */
-# ifdef CHARCLASS_NAME_MAX
-# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
-# else
-/* This shouldn't happen but some implementation might still have this
- problem. Use a reasonable default value. */
-# define CHAR_CLASS_MAX_LENGTH 256
-# endif
-typedef wctype_t re_wctype_t;
-typedef wchar_t re_wchar_t;
-# define re_wctype wctype
-# define re_iswctype iswctype
-# define re_wctype_to_bit(cc) 0
-#else
-# define CHAR_CLASS_MAX_LENGTH 9 /* Namely, `multibyte'. */
-# define btowc(c) c
-
-/* Character classes. */
-typedef enum { RECC_ERROR = 0,
- RECC_ALNUM, RECC_ALPHA, RECC_WORD,
- RECC_GRAPH, RECC_PRINT,
- RECC_LOWER, RECC_UPPER,
- RECC_PUNCT, RECC_CNTRL,
- RECC_DIGIT, RECC_XDIGIT,
- RECC_BLANK, RECC_SPACE,
- RECC_MULTIBYTE, RECC_NONASCII,
- RECC_ASCII, RECC_UNIBYTE
-} re_wctype_t;
-
-typedef int re_wchar_t;
+#if ! WIDE_CHAR_SUPPORT
/* Map a string to the char class it names (if any). */
-static re_wctype_t
+re_wctype_t
re_wctype (str)
re_char *str;
{
@@ -2021,7 +1990,7 @@ re_wctype (str)
}
/* True iff CH is in the char class CC. */
-static boolean
+boolean
re_iswctype (ch, cc)
int ch;
re_wctype_t cc;