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

Commitbb44a7c

Browse files
committed
pgindent files for Tom.
1 parent83526cc commitbb44a7c

File tree

2 files changed

+284
-250
lines changed

2 files changed

+284
-250
lines changed

‎src/backend/main/main.c

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.82 2004/05/25 01:00:20 momjian Exp $
16+
* $PostgreSQL: pgsql/src/backend/main/main.c,v 1.83 2004/05/27 15:07:40 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -23,7 +23,7 @@
2323
#include<pwd.h>
2424
#include<unistd.h>
2525

26-
#if defined(__alpha)&& defined(__osf__)/* no __alpha__ ? */
26+
#if defined(__alpha)&& defined(__osf__)/* no __alpha__ ? */
2727
#include<sys/sysinfo.h>
2828
#include"machine/hal_sysinfo.h"
2929
#defineASSEMBLER
@@ -50,6 +50,7 @@ int
5050
main(intargc,char*argv[])
5151
{
5252
intlen;
53+
5354
#ifndefWIN32
5455
structpasswd*pw;
5556
#endif
@@ -67,7 +68,7 @@ main(int argc, char *argv[])
6768
* without help. Avoid adding more here, if you can.
6869
*/
6970

70-
#if defined(__alpha)/* no __alpha__ ? */
71+
#if defined(__alpha)/* no __alpha__ ? */
7172
#ifdefNOFIXADE
7273
intbuffer[]= {SSIN_UACPROC,UAC_SIGBUS};
7374
#endif/* NOFIXADE */
@@ -77,7 +78,7 @@ main(int argc, char *argv[])
7778
#endif/* __alpha */
7879

7980
#ifdefWIN32
80-
char*env_locale;
81+
char*env_locale;
8182
#endif
8283

8384
#if defined(NOFIXADE)|| defined(NOPRINTADE)
@@ -86,7 +87,7 @@ main(int argc, char *argv[])
8687
syscall(SYS_sysmips,MIPS_FIXADE,0,NULL,NULL,NULL);
8788
#endif
8889

89-
#if defined(__alpha)/* no __alpha__ ? */
90+
#if defined(__alpha)/* no __alpha__ ? */
9091
if (setsysinfo(SSI_NVPAIRS,buffer,1, (caddr_t)NULL,
9192
(unsigned long)NULL)<0)
9293
fprintf(stderr,gettext("%s: setsysinfo failed: %s\n"),
@@ -96,15 +97,15 @@ main(int argc, char *argv[])
9697

9798
#if defined(WIN32)
9899
{
99-
WSADATAwsaData;
100-
interr;
100+
WSADATAwsaData;
101+
interr;
101102

102103
/* Make output streams unbuffered by default */
103-
setvbuf(stdout,NULL,_IONBF,0);
104-
setvbuf(stderr,NULL,_IONBF,0);
104+
setvbuf(stdout,NULL,_IONBF,0);
105+
setvbuf(stderr,NULL,_IONBF,0);
105106

106107
/* Prepare Winsock */
107-
err=WSAStartup(MAKEWORD(2,2),&wsaData);
108+
err=WSAStartup(MAKEWORD(2,2),&wsaData);
108109
if (err!=0)
109110
{
110111
fprintf(stderr,"%s: WSAStartup failed: %d\n",
@@ -129,47 +130,48 @@ main(int argc, char *argv[])
129130

130131
/*
131132
* Remember the physical location of the initially given argv[] array
132-
* for possible use by ps display.On some platforms, the argv[]
133-
* storage must be overwritten in order to set the process title for ps.
134-
* In such cases save_ps_display_args makes and returns a new copy of
135-
* the argv[] array.
133+
* for possible use by ps display.On some platforms, the argv[]
134+
* storage must be overwritten in order to set the process title for
135+
*ps.In such cases save_ps_display_args makes and returns a new copy
136+
*ofthe argv[] array.
136137
*
137138
* save_ps_display_args may also move the environment strings to make
138-
* extra room. Therefore this should be done as early as possible during
139-
* startup, to avoid entanglements with code that might save a getenv()
140-
* result pointer.
139+
* extra room. Therefore this should be done as early as possible
140+
*duringstartup, to avoid entanglements with code that might save a
141+
*getenv()result pointer.
141142
*/
142143
argv=save_ps_display_args(argc,argv);
143144

144145
/*
145146
* Set up locale information from environment.Note that LC_CTYPE and
146147
* LC_COLLATE will be overridden later from pg_control if we are in an
147148
* already-initialized database. We set them here so that they will
148-
* be available to fill pg_control during initdb. LC_MESSAGES will get
149-
* set later during GUC option processing, but we set it here to allow
150-
* startup error messages to be localized.
149+
* be available to fill pg_control during initdb. LC_MESSAGES will
150+
*getset later during GUC option processing, but we set it here to
151+
*allowstartup error messages to be localized.
151152
*/
152153

153154
set_pglocale(argv[0],"postgres");
154155

155156
#ifdefWIN32
156-
/*
157-
* Windows uses codepages rather than the environment, so we work around
158-
* that by querying the environment explicitly first for LC_COLLATE
159-
* and LC_CTYPE. We have to do this because initdb passes those values
160-
* in the environment. If there is nothing there we fall back on the
161-
* codepage.
157+
158+
/*
159+
* Windows uses codepages rather than the environment, so we work
160+
* around that by querying the environment explicitly first for
161+
* LC_COLLATE and LC_CTYPE. We have to do this because initdb passes
162+
* those values in the environment. If there is nothing there we fall
163+
* back on the codepage.
162164
*/
163165

164166
if ((env_locale=getenv("LC_COLLATE"))!=NULL)
165-
setlocale(LC_COLLATE,env_locale);
167+
setlocale(LC_COLLATE,env_locale);
166168
else
167-
setlocale(LC_COLLATE,"");
169+
setlocale(LC_COLLATE,"");
168170

169171
if ((env_locale=getenv("LC_CTYPE"))!=NULL)
170-
setlocale(LC_CTYPE,env_locale);
172+
setlocale(LC_CTYPE,env_locale);
171173
else
172-
setlocale(LC_CTYPE,"");
174+
setlocale(LC_CTYPE,"");
173175
#else
174176
setlocale(LC_COLLATE,"");
175177
setlocale(LC_CTYPE,"");
@@ -213,7 +215,7 @@ main(int argc, char *argv[])
213215
gettext("\"root\" execution of the PostgreSQL server is not permitted.\n"
214216
"The server must be started under an unprivileged user ID to prevent\n"
215217
"possible system security compromise. See the documentation for\n"
216-
"more information on how to properly start the server.\n"
218+
"more information on how to properly start the server.\n"
217219
));
218220
exit(1);
219221
}
@@ -241,14 +243,14 @@ main(int argc, char *argv[])
241243
/*
242244
* Now dispatch to one of PostmasterMain, PostgresMain, GucInfoMain,
243245
* SubPostmasterMain, pgstat_main, pgstat_mainChild or BootstrapMain
244-
* depending on the program name (and possibly first argument) we
245-
*werecalled with. The lack of consistency here is historical.
246+
* depending on the program name (and possibly first argument) we were
247+
* called with. The lack of consistency here is historical.
246248
*/
247249
len=strlen(argv[0]);
248250

249251
if ((len >=10&&strcmp(argv[0]+len-10,"postmaster")==0)
250252
#ifdefWIN32
251-
|| (len >=14&&strcmp(argv[0]+len-14,"postmaster.exe")==0)
253+
|| (len >=14&&strcmp(argv[0]+len-14,"postmaster.exe")==0)
252254
#endif
253255
)
254256
{
@@ -264,9 +266,11 @@ main(int argc, char *argv[])
264266
exit(BootstrapMain(argc-1,argv+1));
265267

266268
#ifdefEXEC_BACKEND
269+
267270
/*
268-
* If the first argument is "-forkexec", then invoke SubPostmasterMain. Note
269-
* we remove "-forkexec" from the arguments passed on to SubPostmasterMain.
271+
* If the first argument is "-forkexec", then invoke
272+
* SubPostmasterMain. Note we remove "-forkexec" from the arguments
273+
* passed on to SubPostmasterMain.
270274
*/
271275
if (argc>1&&strcmp(argv[1],"-forkexec")==0)
272276
{
@@ -275,16 +279,16 @@ main(int argc, char *argv[])
275279
}
276280

277281
/*
278-
* If the first argument is "-statBuf", then invoke pgstat_main.
282+
* If the first argument is "-statBuf", then invoke pgstat_main.
279283
*/
280284
if (argc>1&&strcmp(argv[1],"-statBuf")==0)
281285
{
282-
pgstat_main(argc,argv);
286+
pgstat_main(argc,argv);
283287
exit(0);
284288
}
285289

286290
/*
287-
* If the first argument is "-statCol", then invoke pgstat_mainChild.
291+
* If the first argument is "-statCol", then invoke pgstat_mainChild.
288292
*/
289293
if (argc>1&&strcmp(argv[1],"-statCol")==0)
290294
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp