summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTatsuo Ishii2002-08-29 07:22:30 +0000
committerTatsuo Ishii2002-08-29 07:22:30 +0000
commited7baeaf4df676489106ab761936cdae9ffb7228 (patch)
tree91908d828af2d2c6e4bd96374d932cec73aaf01d /src/include
parent8e80dbb849cc63f6652a5fc645fa4d1e136c3c4c (diff)
Remove #ifdef MULTIBYTE per hackers list discussion.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/regex/regex.h3
-rw-r--r--src/include/regex/regex2.h23
-rw-r--r--src/include/regex/utils.h4
-rw-r--r--src/include/utils/ascii.h5
-rw-r--r--src/include/utils/builtins.h6
5 files changed, 3 insertions, 38 deletions
diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h
index dd8e0da171b..cf20160b6d9 100644
--- a/src/include/regex/regex.h
+++ b/src/include/regex/regex.h
@@ -52,10 +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 MULTIBYTE
pg_wchar *patsave; /* me too :-) */
-#endif
-
} regex_t;
typedef struct
diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h
index 98bf46a52e3..5ceed7fe9c0 100644
--- a/src/include/regex/regex2.h
+++ b/src/include/regex/regex2.h
@@ -113,18 +113,13 @@ typedef struct
{
uch *ptr; /* -> uch [csetsize] */
uch mask; /* bit within array */
-#ifdef MULTIBYTE
pg_wchar hash; /* hash code */
unsigned int lc; /* leading character (character-set) */
-#else
- uch hash; /* hash code */
-#endif
size_t smultis;
char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
} cset;
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
-#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))
@@ -135,15 +130,6 @@ typedef struct
* fns */
#define MCsub(p, cs, cp) mcsub(p, cs, cp)
#define MCin(p, cs, cp) mcin(p, cs, cp)
-#else
-#define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c))
-#define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c))
-#define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask)
-#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal
- * fns */
-#define MCsub(p, cs, cp) mcsub(p, cs, cp)
-#define MCin(p, cs, cp) mcin(p, cs, cp)
-#endif
/* stuff for character categories */
typedef unsigned char cat_t;
@@ -182,16 +168,7 @@ struct re_guts
};
/* misc utilities */
-#ifdef MULTIBYTE
#define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
-#else
-#define OUT (CHAR_MAX+1) /* a non-character value */
-#endif
-#ifdef MULTIBYTE
#define ISWORD(c) (((c) >= 0 && (c) <= UCHAR_MAX) && \
(isalnum((unsigned char) (c)) || (c) == '_'))
-#else
-#define ISWORD(c) (isalnum((unsigned char) (c)) || (c) == '_')
-
-#endif
diff --git a/src/include/regex/utils.h b/src/include/regex/utils.h
index 282bb791ad6..5831122f7c9 100644
--- a/src/include/regex/utils.h
+++ b/src/include/regex/utils.h
@@ -46,11 +46,7 @@
#define DUPMAX 100000000 /* xxx is this right? */
#define INFINITY (DUPMAX + 1)
-#ifdef MULTIBYTE
#define NC (SHRT_MAX - SHRT_MIN + 1)
-#else
-#define NC (CHAR_MAX - CHAR_MIN + 1)
-#endif
typedef unsigned char uch;
diff --git a/src/include/utils/ascii.h b/src/include/utils/ascii.h
index 068cf61a6c9..a2a983f2428 100644
--- a/src/include/utils/ascii.h
+++ b/src/include/utils/ascii.h
@@ -2,7 +2,7 @@
/* -----------------------------------------------------------------------
* ascii.h
*
- * $Id: ascii.h,v 1.8 2001/11/05 17:46:36 momjian Exp $
+ * $Id: ascii.h,v 1.9 2002/08/29 07:22:29 ishii Exp $
*
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
*
@@ -18,10 +18,7 @@ extern Datum to_ascii_encname(PG_FUNCTION_ARGS);
extern Datum to_ascii_enc(PG_FUNCTION_ARGS);
extern Datum to_ascii_default(PG_FUNCTION_ARGS);
-#ifdef MULTIBYTE
-
extern char *pg_to_ascii(unsigned char *src, unsigned char *src_end,
unsigned char *desc, int enc);
-#endif /* MULTIBYTE */
#endif /* _ASCII_H_ */
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 6f33ee4e42c..33467c2ff03 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.196 2002/08/29 00:17:06 tgl Exp $
+ * $Id: builtins.h,v 1.197 2002/08/29 07:22:29 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -661,9 +661,7 @@ extern Datum RI_FKey_setnull_upd(PG_FUNCTION_ARGS);
extern Datum RI_FKey_setdefault_del(PG_FUNCTION_ARGS);
extern Datum RI_FKey_setdefault_upd(PG_FUNCTION_ARGS);
-/* even if MULTIBYTE is not enabled, these functions are necessary
- * since pg_proc.h has references to them.
- */
+/* multibyte support functions */
extern Datum getdatabaseencoding(PG_FUNCTION_ARGS);
extern Datum database_character_set(PG_FUNCTION_ARGS);
extern Datum pg_client_encoding(PG_FUNCTION_ARGS);