diff options
Diffstat (limited to 'src/include/regex')
-rw-r--r-- | src/include/regex/pg_wchar.h | 8 | ||||
-rw-r--r-- | src/include/regex/regex.h | 2 | ||||
-rw-r--r-- | src/include/regex/regex2.h | 14 | ||||
-rw-r--r-- | src/include/regex/utils.h | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/include/regex/pg_wchar.h b/src/include/regex/pg_wchar.h index bfbd8ba37bb..a37c253e1f2 100644 --- a/src/include/regex/pg_wchar.h +++ b/src/include/regex/pg_wchar.h @@ -1,4 +1,4 @@ -/* $Id: pg_wchar.h,v 1.3 1998/06/16 07:29:43 momjian Exp $ */ +/* $Id: pg_wchar.h,v 1.4 1998/07/18 18:34:24 momjian Exp $ */ #ifndef PG_WCHAR_H #define PG_WCHAR_H @@ -19,8 +19,8 @@ /* followings are for client encoding only */ #define SJIS 16 /* Shift JIS */ -#ifdef MB -# if LATIN1 <= MB && MB <= LATIN5 +#ifdef MULTIBYTE +# if LATIN1 <= MULTIBYTE && MULTIBYTE <= LATIN5 typedef unsigned char pg_wchar; # else typedef unsigned int pg_wchar; @@ -65,7 +65,7 @@ typedef unsigned int pg_wchar; #define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */ #define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */ -#ifdef MB +#ifdef MULTIBYTE extern void pg_mb2wchar(const unsigned char *, pg_wchar *); extern void pg_mb2wchar_with_len(const unsigned char *, pg_wchar *, int); extern int pg_char_and_wchar_strcmp(const char *, const pg_wchar *); diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h index f0c9876fe06..672ed2a382f 100644 --- a/src/include/regex/regex.h +++ b/src/include/regex/regex.h @@ -52,7 +52,7 @@ typedef struct size_t re_nsub; /* number of parenthesized subexpressions */ const pg_wchar *re_endp; /* end pointer for REG_PEND */ struct re_guts *re_g; /* none of your business :-) */ -#ifdef MB +#ifdef MULTIBYTE pg_wchar *patsave; /* mee too :-) */ #endif diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h index 4590862486c..3bd1469750d 100644 --- a/src/include/regex/regex2.h +++ b/src/include/regex/regex2.h @@ -127,7 +127,7 @@ typedef struct { uch *ptr; /* -> uch [csetsize] */ uch mask; /* bit within array */ -#ifdef MB +#ifdef MULTIBYTE pg_wchar hash; /* hash code */ unsigned int lc; /* leading character (character-set) */ #else @@ -138,7 +138,7 @@ typedef struct } cset; /* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */ -#ifdef MB +#ifdef MULTIBYTE #define CHlc(c) (((unsigned)(c)&0xff0000)>>16) #define CHadd(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] |= (cs)->mask, (cs)->hash += (unsigned)(c)&0xffff,\ (cs)->lc = CHlc(c)) @@ -196,12 +196,12 @@ struct re_guts }; /* misc utilities */ -#ifdef MB -# if MB == MULE_INTERNAL +#ifdef MULTIBYTE +# if MULTIBYTE == MULE_INTERNAL # define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */ -# elif MB == EUC_JP || MB == EUC_CN || MB == EUC_KR || MB == EUC_TW +# elif MULTIBYTE == EUC_JP || MULTIBYTE == EUC_CN || MULTIBYTE == EUC_KR || MULTIBYTE == EUC_TW # define OUT (USHRT_MAX+1) /* 2 bytes */ -# elif MB == UNICODE +# elif MULTIBYTE == UNICODE # define OUT (USHRT_MAX+1) /* 2 bytes. assuming UCS-2 */ # else # define OUT (UCHAR_MAX+1) /* other codes. assuming 1 byte */ @@ -210,7 +210,7 @@ struct re_guts # define OUT (CHAR_MAX+1) /* a non-character value */ #endif -#ifdef MB +#ifdef MULTIBYTE #define ISWORD(c) ((c >= 0 && c <= UCHAR_MAX) && \ (isalnum(c) || (c) == '_')) #else diff --git a/src/include/regex/utils.h b/src/include/regex/utils.h index 6f02759aa14..e6f169065fb 100644 --- a/src/include/regex/utils.h +++ b/src/include/regex/utils.h @@ -43,7 +43,7 @@ #define DUPMAX 100000000 /* xxx is this right? */ #define INFINITY (DUPMAX + 1) -#ifdef MB +#ifdef MULTIBYTE #define NC (SHRT_MAX - SHRT_MIN + 1) #else #define NC (CHAR_MAX - CHAR_MIN + 1) |