Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04aabb0

Browse files
committed
Clean up WIN32_CONSOLE code.
1 parent248af40 commit04aabb0

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
#definePSQLHISTORY ".psql_history"
4646

4747

48-
#ifdefWIN32
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
#ifdefUSE_READLINE
5949
staticenumhistcontrol
6050
GetHistControlConfig(void)
@@ -109,6 +99,15 @@ gets_interactive(const char *prompt)
10999
else
110100
s=gets_basic(prompt);
111101

102+
#ifdefWIN32
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
enumhistcontrolHC;

‎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
#ifdefWIN32
338-
339338
/*
340339
* translate characters to DOS console encoding, e.g. needed for
341340
* German umlauts

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp