diff options
| author | Richard M. Stallman | 2004-06-13 22:36:05 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-06-13 22:36:05 +0000 |
| commit | 1fdab5039476b19a91861004a43fb653cb0be836 (patch) | |
| tree | e46dc4adf11cc470586c381d4111192d80305a4e /src | |
| parent | c13ecd8fca664a3b8489f568a70cc8b7dfc3b0ca (diff) | |
| download | emacs-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.c | 37 |
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 | ||
| 1974 | typedef wctype_t re_wctype_t; | ||
| 1975 | typedef 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. */ | ||
| 1984 | typedef 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 | |||
| 1995 | typedef 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). */ |
| 1998 | static re_wctype_t | 1967 | re_wctype_t |
| 1999 | re_wctype (str) | 1968 | re_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. */ |
| 2024 | static boolean | 1993 | boolean |
| 2025 | re_iswctype (ch, cc) | 1994 | re_iswctype (ch, cc) |
| 2026 | int ch; | 1995 | int ch; |
| 2027 | re_wctype_t cc; | 1996 | re_wctype_t cc; |