summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-09-05 02:31:10 +0000
committerBruce Momjian <bruce@momjian.us>2003-09-05 02:31:10 +0000
commit04aabb034fe93679e8a662518638de96d56748e9 (patch)
treef89d9a4dafa1795156d7aa7ccd6b3722dbc6f6bc
parent248af40d6dd9435ce6c4cac2b82f8ba4fc57cd9d (diff)
Clean up WIN32_CONSOLE code.
-rw-r--r--src/bin/psql/input.c21
-rw-r--r--src/bin/psql/mbprint.c3
2 files changed, 11 insertions, 13 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index ebcb69510be..0dec1974001 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.29 2003/08/26 18:35:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.30 2003/09/05 02:31:10 momjian Exp $
*/
#include "postgres_fe.h"
#include "input.h"
@@ -45,16 +45,6 @@ static void finishInput(int, void *);
#define PSQLHISTORY ".psql_history"
-#ifdef WIN32
-
- /*
- * translate DOS console character set into ANSI, needed e.g. for German
- * umlauts
- */
-if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
- OemToChar(s, s);
-#endif
-
#ifdef USE_READLINE
static enum histcontrol
GetHistControlConfig(void)
@@ -109,6 +99,15 @@ gets_interactive(const char *prompt)
else
s = gets_basic(prompt);
+#ifdef WIN32
+ /*
+ * translate DOS console character set into ANSI, needed e.g. for German
+ * umlauts
+ */
+ if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
+ OemToChar(s, s);
+#endif
+
if (useHistory && s && s[0])
{
enum histcontrol HC;
diff --git a/src/bin/psql/mbprint.c b/src/bin/psql/mbprint.c
index 3d116f68f11..8075dfe21ab 100644
--- a/src/bin/psql/mbprint.c
+++ b/src/bin/psql/mbprint.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.9 2003/08/04 23:59:40 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.10 2003/09/05 02:31:10 momjian Exp $
*/
#include "postgres_fe.h"
@@ -335,7 +335,6 @@ mbvalidate(unsigned char *pwcs, int encoding)
else
{
#ifdef WIN32
-
/*
* translate characters to DOS console encoding, e.g. needed for
* German umlauts