aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/libpq/fe-connect.c25
-rw-r--r--src/interfaces/libpq/fe-misc.c23
-rw-r--r--src/interfaces/libpq/fe-print.c6
3 files changed, 3 insertions, 51 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 6ccc702c994..3272de9be5f 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.197 2002/08/27 16:21:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.198 2002/08/29 07:22:29 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,9 +45,7 @@
#include <crypt.h>
#endif
-#ifdef MULTIBYTE
#include "mb/pg_wchar.h"
-#endif
#ifdef WIN32
static int
@@ -157,11 +155,9 @@ static const struct EnvironmentOptions
{
"PGTZ", "timezone"
},
-#ifdef MULTIBYTE
{
"PGCLIENTENCODING", "client_encoding"
},
-#endif
/* internal performance-related settings */
{
"PGGEQO", "geqo"
@@ -1584,12 +1580,7 @@ PQsetenvStart(PGconn *conn)
conn->setenv_state != SETENV_STATE_IDLE)
return false;
-#ifdef MULTIBYTE
conn->setenv_state = SETENV_STATE_ENCODINGS_SEND;
-#else
- conn->setenv_state = SETENV_STATE_OPTION_SEND;
-#endif
-
conn->next_eo = EnvironmentOptions;
return true;
@@ -1606,9 +1597,7 @@ PQsetenvPoll(PGconn *conn)
{
PGresult *res;
-#ifdef MULTIBYTE
static const char envname[] = "PGCLIENTENCODING";
-#endif
if (conn == NULL || conn->status == CONNECTION_BAD)
return PGRES_POLLING_FAILED;
@@ -1617,9 +1606,7 @@ PQsetenvPoll(PGconn *conn)
switch (conn->setenv_state)
{
/* These are reading states */
-#ifdef MULTIBYTE
case SETENV_STATE_ENCODINGS_WAIT:
-#endif
case SETENV_STATE_OPTION_WAIT:
{
/* Load waiting data */
@@ -1634,9 +1621,7 @@ PQsetenvPoll(PGconn *conn)
}
/* These are writing states, so we just proceed. */
-#ifdef MULTIBYTE
case SETENV_STATE_ENCODINGS_SEND:
-#endif
case SETENV_STATE_OPTION_SEND:
break;
@@ -1660,7 +1645,6 @@ keep_going: /* We will come back to here until there
switch (conn->setenv_state)
{
-#ifdef MULTIBYTE
case SETENV_STATE_ENCODINGS_SEND:
{
const char *env;
@@ -1734,7 +1718,6 @@ keep_going: /* We will come back to here until there
conn->setenv_state = SETENV_STATE_OPTION_SEND;
goto keep_going;
}
-#endif
case SETENV_STATE_OPTION_SEND:
{
@@ -2788,9 +2771,6 @@ PQclientEncoding(const PGconn *conn)
int
PQsetClientEncoding(PGconn *conn, const char *encoding)
{
-
-#ifdef MULTIBYTE
-
char qbuf[128];
static char query[] = "set client_encoding to '%s'";
PGresult *res;
@@ -2822,9 +2802,6 @@ PQsetClientEncoding(PGconn *conn, const char *encoding)
}
PQclear(res);
return (status);
-#else
- return -1; /* Multibyte support isn't compiled in */
-#endif
}
void
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index be91d796c08..8e40a531c28 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -25,7 +25,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.77 2002/08/17 12:33:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.78 2002/08/29 07:22:30 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,10 +50,7 @@
#include "libpq-fe.h"
#include "libpq-int.h"
#include "pqsignal.h"
-
-#ifdef MULTIBYTE
#include "mb/pg_wchar.h"
-#endif
#define DONOTICE(conn,message) \
((*(conn)->noticeHook) ((conn)->noticeArg, (message)))
@@ -847,7 +844,6 @@ retry5:
* to be in fe-print.c but that file is doomed.
*/
-#ifdef MULTIBYTE
/*
* returns the byte length of the word beginning s, using the
* specified encoding.
@@ -873,23 +869,6 @@ PQenv2encoding(void)
return (encoding);
}
-#else
-
-/* Provide a default definition in case someone calls it anyway */
-int
-PQmblen(const unsigned char *s, int encoding)
-{
- (void) s;
- (void) encoding;
- return 1;
-}
-int
-PQenv2encoding(void)
-{
- return 0;
-}
-#endif /* MULTIBYTE */
-
#ifdef ENABLE_NLS
char *
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c
index 33f370f46f1..baa9700934c 100644
--- a/src/interfaces/libpq/fe-print.c
+++ b/src/interfaces/libpq/fe-print.c
@@ -10,7 +10,7 @@
* didn't really belong there.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.45 2002/06/20 20:29:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.46 2002/08/29 07:22:30 ishii Exp $
*
*-------------------------------------------------------------------------
*/
@@ -352,11 +352,7 @@ do_field(const PQprintOpt *po, const PGresult *res,
/* Detect whether field contains non-numeric data */
char ch = '0';
-#ifdef MULTIBYTE
for (p = pval; *p; p += PQmblen(p, res->client_encoding))
-#else
- for (p = pval; *p; p++)
-#endif
{
ch = *p;
if (!((ch >= '0' && ch <= '9') ||