aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/scripts')
-rw-r--r--src/bin/scripts/common.c11
-rw-r--r--src/bin/scripts/createuser.c20
2 files changed, 18 insertions, 13 deletions
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c
index d5f02620544..5190534268b 100644
--- a/src/bin/scripts/common.c
+++ b/src/bin/scripts/common.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.23 2006/10/03 21:45:20 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/common.c,v 1.24 2006/10/04 00:30:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -206,15 +206,18 @@ executeCommand(PGconn *conn, const char *query,
bool
yesno_prompt(const char *question)
{
- char prompt[256];
+ char prompt[256];
- /* translator: This is a question followed by the translated options for "yes" and "no". */
+ /*
+ * translator: This is a question followed by the translated options for
+ * "yes" and "no".
+ */
snprintf(prompt, sizeof(prompt), _("%s (%s/%s) "),
_(question), _(PG_YESLETTER), _(PG_NOLETTER));
for (;;)
{
- char *resp;
+ char *resp;
resp = simple_prompt(prompt, 1, true);
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index a3f5747004e..b1351c7693c 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.33 2006/09/22 18:50:41 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/scripts/createuser.c,v 1.34 2006/10/04 00:30:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,8 @@
static void help(const char *progname);
-enum trivalue {
+enum trivalue
+{
TRI_DEFAULT,
TRI_NO,
TRI_YES
@@ -66,13 +67,14 @@ main(int argc, char *argv[])
char *conn_limit = NULL;
bool pwprompt = false;
char *newpassword = NULL;
- /* Tri-valued variables. */
- enum trivalue createdb = TRI_DEFAULT,
- superuser = TRI_DEFAULT,
- createrole = TRI_DEFAULT,
- inherit = TRI_DEFAULT,
- login = TRI_DEFAULT,
- encrypted = TRI_DEFAULT;
+
+ /* Tri-valued variables. */
+ enum trivalue createdb = TRI_DEFAULT,
+ superuser = TRI_DEFAULT,
+ createrole = TRI_DEFAULT,
+ inherit = TRI_DEFAULT,
+ login = TRI_DEFAULT,
+ encrypted = TRI_DEFAULT;
PQExpBufferData sql;