1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Run pgindent on 9.2 source tree in preparation for first 9.3

commit-fest.
This commit is contained in:
Bruce Momjian
2012-06-10 15:20:04 -04:00
parent 60801944fa
commit 927d61eeff
494 changed files with 7343 additions and 7046 deletions

View File

@ -777,7 +777,7 @@ exec_command(const char *cmd,
/* \i and \ir include files */
else if (strcmp(cmd, "i") == 0 || strcmp(cmd, "include") == 0
|| strcmp(cmd, "ir") == 0 || strcmp(cmd, "include_relative") == 0)
|| strcmp(cmd, "ir") == 0 || strcmp(cmd, "include_relative") == 0)
{
char *fname = psql_scan_slash_option(scan_state,
OT_NORMAL, NULL, true);
@ -789,7 +789,7 @@ exec_command(const char *cmd,
}
else
{
bool include_relative;
bool include_relative;
include_relative = (strcmp(cmd, "ir") == 0
|| strcmp(cmd, "include_relative") == 0);
@ -1103,16 +1103,16 @@ exec_command(const char *cmd,
else if (strcmp(cmd, "setenv") == 0)
{
char *envvar = psql_scan_slash_option(scan_state,
OT_NORMAL, NULL, false);
OT_NORMAL, NULL, false);
char *envval = psql_scan_slash_option(scan_state,
OT_NORMAL, NULL, false);
OT_NORMAL, NULL, false);
if (!envvar)
{
psql_error("\\%s: missing required argument\n", cmd);
success = false;
}
else if (strchr(envvar,'=') != NULL)
else if (strchr(envvar, '=') != NULL)
{
psql_error("\\%s: environment variable name must not contain \"=\"\n",
cmd);
@ -1127,16 +1127,17 @@ exec_command(const char *cmd,
else
{
/* Set variable to the value of the next argument */
int len = strlen(envvar) + strlen(envval) + 1;
int len = strlen(envvar) + strlen(envval) + 1;
char *newval = pg_malloc(len + 1);
snprintf(newval, len+1, "%s=%s", envvar, envval);
snprintf(newval, len + 1, "%s=%s", envvar, envval);
putenv(newval);
success = true;
/*
* Do not free newval here, it will screw up the environment
* if you do. See putenv man page for details. That means we
* leak a bit of memory here, but not enough to worry about.
* Do not free newval here, it will screw up the environment if
* you do. See putenv man page for details. That means we leak a
* bit of memory here, but not enough to worry about.
*/
}
free(envvar);
@ -2046,9 +2047,9 @@ process_file(char *filename, bool single_txn, bool use_relative_path)
/*
* If we were asked to resolve the pathname relative to the location
* of the currently executing script, and there is one, and this is
* a relative pathname, then prepend all but the last pathname
* component of the current script to this pathname.
* of the currently executing script, and there is one, and this is a
* relative pathname, then prepend all but the last pathname component
* of the current script to this pathname.
*/
if (use_relative_path && pset.inputfile && !is_absolute_path(filename)
&& !has_drive_prefix(filename))