Skip to content

Commit 04aabb0

Browse files
committed
Clean up WIN32_CONSOLE code.
1 parent 248af40 commit 04aabb0

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/bin/psql/input.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.29 2003/08/26 18:35:31 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.30 2003/09/05 02:31:10 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "input.h"
@@ -45,16 +45,6 @@ static void finishInput(int, void *);
4545
#define PSQLHISTORY ".psql_history"
4646

4747

48-
#ifdef WIN32
49-
50-
/*
51-
* translate DOS console character set into ANSI, needed e.g. for German
52-
* umlauts
53-
*/
54-
if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
55-
OemToChar(s, s);
56-
#endif
57-
5848
#ifdef USE_READLINE
5949
static enum histcontrol
6050
GetHistControlConfig(void)
@@ -109,6 +99,15 @@ gets_interactive(const char *prompt)
10999
else
110100
s = gets_basic(prompt);
111101

102+
#ifdef WIN32
103+
/*
104+
* translate DOS console character set into ANSI, needed e.g. for German
105+
* umlauts
106+
*/
107+
if (GetVariableBool(pset.vars, "WIN32_CONSOLE"))
108+
OemToChar(s, s);
109+
#endif
110+
112111
if (useHistory && s && s[0])
113112
{
114113
enum histcontrol HC;

src/bin/psql/mbprint.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.9 2003/08/04 23:59:40 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.10 2003/09/05 02:31:10 momjian Exp $
77
*/
88

99
#include "postgres_fe.h"
@@ -335,7 +335,6 @@ mbvalidate(unsigned char *pwcs, int encoding)
335335
else
336336
{
337337
#ifdef WIN32
338-
339338
/*
340339
* translate characters to DOS console encoding, e.g. needed for
341340
* German umlauts

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy