aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2004-06-13 22:36:05 +0000
committerRichard M. Stallman2004-06-13 22:36:05 +0000
commit1fdab5039476b19a91861004a43fb653cb0be836 (patch)
treee46dc4adf11cc470586c381d4111192d80305a4e /src
parentc13ecd8fca664a3b8489f568a70cc8b7dfc3b0ca (diff)
downloademacs-1fdab5039476b19a91861004a43fb653cb0be836.tar.gz
emacs-1fdab5039476b19a91861004a43fb653cb0be836.zip
(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.
Diffstat (limited to 'src')
-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
1961 } \ 1961 } \
1962 } while (0) 1962 } while (0)
1963 1963
1964#if WIDE_CHAR_SUPPORT 1964#if ! WIDE_CHAR_SUPPORT
1965/* The GNU C library provides support for user-defined character classes
1966 and the functions from ISO C amendement 1. */
1967# ifdef CHARCLASS_NAME_MAX
1968# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
1969# else
1970/* This shouldn't happen but some implementation might still have this
1971 problem. Use a reasonable default value. */
1972# define CHAR_CLASS_MAX_LENGTH 256
1973# endif
1974typedef wctype_t re_wctype_t;
1975typedef wchar_t re_wchar_t;
1976# define re_wctype wctype
1977# define re_iswctype iswctype
1978# define re_wctype_to_bit(cc) 0
1979#else
1980# define CHAR_CLASS_MAX_LENGTH 9 /* Namely, `multibyte'. */
1981# define btowc(c) c
1982
1983/* Character classes. */
1984typedef enum { RECC_ERROR = 0,
1985 RECC_ALNUM, RECC_ALPHA, RECC_WORD,
1986 RECC_GRAPH, RECC_PRINT,
1987 RECC_LOWER, RECC_UPPER,
1988 RECC_PUNCT, RECC_CNTRL,
1989 RECC_DIGIT, RECC_XDIGIT,
1990 RECC_BLANK, RECC_SPACE,
1991 RECC_MULTIBYTE, RECC_NONASCII,
1992 RECC_ASCII, RECC_UNIBYTE
1993} re_wctype_t;
1994
1995typedef int re_wchar_t;
1996 1965
1997/* Map a string to the char class it names (if any). */ 1966/* Map a string to the char class it names (if any). */
1998static re_wctype_t 1967re_wctype_t
1999re_wctype (str) 1968re_wctype (str)
2000 re_char *str; 1969 re_char *str;
2001{ 1970{
@@ -2021,7 +1990,7 @@ re_wctype (str)
2021} 1990}
2022 1991
2023/* True iff CH is in the char class CC. */ 1992/* True iff CH is in the char class CC. */
2024static boolean 1993boolean
2025re_iswctype (ch, cc) 1994re_iswctype (ch, cc)
2026 int ch; 1995 int ch;
2027 re_wctype_t cc; 1996 re_wctype_t cc;