Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9082329

Browse files
committed
pgindent new initdb.c from Tom.
1 parent b9f5c93 commit 9082329

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/bin/initdb/initdb.c

+13-11
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* This is a C implementation of the previous shell script for setting up a
1313
* PostgreSQL cluster location, and should be highly compatible with it.
1414
*
15-
* $Header: /cvsroot/pgsql/src/bin/initdb/initdb.c,v 1.5 2003/11/13 15:01:40 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/bin/initdb/initdb.c,v 1.6 2003/11/13 20:12:47 momjian Exp $
1616
*
1717
* TODO:
1818
* - clean up find_postgres code and return values
@@ -122,6 +122,7 @@ static void canonicalize_path(char *);
122122

123123
#ifdef WIN32
124124
static char *expanded_path(char *);
125+
125126
#else
126127
#define expanded_path(x) (x)
127128
#endif
@@ -246,10 +247,10 @@ rmtree(char *path, bool rmtopdir)
246247
#ifndef WIN32
247248
/* doesn't handle .* files */
248249
snprintf(buf, sizeof(buf), "rm -rf '%s%s'", path,
249-
rmtopdir ? "" : "/*");
250+
rmtopdir ? "" : "/*");
250251
#else
251252
snprintf(buf, sizeof(buf), "%s /s /q \"%s\"",
252-
rmtopdir ? "rmdir" : "del", path);
253+
rmtopdir ? "rmdir" : "del", path);
253254
#endif
254255

255256
return !system(buf);
@@ -816,6 +817,7 @@ find_postgres(char *path)
816817
return FIND_NOT_REGFILE;
817818

818819
#ifndef WIN32
820+
819821
/*
820822
* Only unix requires this test, on WIN32 an .exe file should be
821823
* executable
@@ -859,7 +861,7 @@ expanded_path(char *path)
859861
canonicalize_path(abspath);
860862
return xstrdup(abspath);
861863
}
862-
#endif
864+
#endif
863865

864866
/*
865867
* set the paths pointing to postgres
@@ -1045,7 +1047,7 @@ test_buffers(void)
10451047
for (i = 0; i < len; i++)
10461048
{
10471049
snprintf(cmd, sizeof(cmd), format, pgpath, bufs[i], n_connections,
1048-
DEVNULL, DEVNULL);
1050+
DEVNULL, DEVNULL);
10491051
status = system(cmd);
10501052
if (status == 0)
10511053
break;
@@ -1286,7 +1288,7 @@ get_set_pwd(void)
12861288
PG_CMD_OPEN;
12871289

12881290
if (fprintf(pg,
1289-
"ALTER USER \"%s\" WITH PASSWORD '%s';\n", username, pwd1) < 0)
1291+
"ALTER USER \"%s\" WITH PASSWORD '%s';\n", username, pwd1) < 0)
12901292
{
12911293
/* write failure */
12921294
exit_nicely();
@@ -2276,9 +2278,9 @@ main(int argc, char *argv[])
22762278
check_input(system_views_file);
22772279

22782280
printf("The files belonging to this database system will be owned "
2279-
"by user \"%s\".\n"
2280-
"This user must also own the server process.\n\n",
2281-
effective_user);
2281+
"by user \"%s\".\n"
2282+
"This user must also own the server process.\n\n",
2283+
effective_user);
22822284

22832285
setlocales();
22842286

@@ -2413,8 +2415,8 @@ main(int argc, char *argv[])
24132415
" %s%s%s/postmaster -D %s%s%s\n"
24142416
"or\n"
24152417
" %s%s%s/pg_ctl -D %s%s%s -l logfile start\n\n",
2416-
QUOTE_PATH, pgpath, QUOTE_PATH, QUOTE_PATH, pg_data, QUOTE_PATH,
2417-
QUOTE_PATH, pgpath, QUOTE_PATH, QUOTE_PATH, pg_data, QUOTE_PATH);
2418+
QUOTE_PATH, pgpath, QUOTE_PATH, QUOTE_PATH, pg_data, QUOTE_PATH,
2419+
QUOTE_PATH, pgpath, QUOTE_PATH, QUOTE_PATH, pg_data, QUOTE_PATH);
24182420

24192421
return 0;
24202422
}

0 commit comments

Comments
 (0)