summaryrefslogtreecommitdiff
path: root/src/include/mb
diff options
context:
space:
mode:
authorBruce Momjian2008-06-18 18:42:54 +0000
committerBruce Momjian2008-06-18 18:42:54 +0000
commit9de09c087d63b13b54a0db1073477d70188823c5 (patch)
treea899a5d3cebebdd02f10a67ae1e2883144a5416b /src/include/mb
parent3eb9da524ddb85c213108e5aeadc6e8b18f6875f (diff)
Move wchar2char() and char2wchar() from tsearch into /mb to be easier to
use for other modules; also move pnstrdup(). Clean up code slightly.
Diffstat (limited to 'src/include/mb')
-rw-r--r--src/include/mb/pg_wchar.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index adfdee9b973..b29552fdeaf 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.78 2008/01/01 19:45:58 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.79 2008/06/18 18:42:54 momjian Exp $
*
* NOTES
* This is used both by the backend and by libpq, but should not be
@@ -362,6 +362,11 @@ extern int pg_mbcharcliplen(const char *mbstr, int len, int imit);
extern int pg_encoding_max_length(int encoding);
extern int pg_database_encoding_max_length(void);
+#ifdef USE_WIDE_UPPER_LOWER
+extern size_t wchar2char(char *to, const wchar_t *from, size_t tolen);
+extern size_t char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen);
+#endif
+
extern void SetDefaultClientEncoding(void);
extern int SetClientEncoding(int encoding, bool doit);
extern void InitializeClientEncoding(void);