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

Commitb6a40d8

Browse files
committed
Small pg_config.c cleanup.
1 parent48187a1 commitb6a40d8

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

‎src/bin/pg_config/pg_config.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
1919
*
20-
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.1 2004/08/0113:54:05 momjian Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.2 2004/08/0114:01:36 momjian Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -28,7 +28,7 @@
2828

2929
#define_(x) gettext((x))
3030

31-
char*progname;
31+
staticchar*progname;
3232

3333
staticvoid
3434
help()
@@ -67,8 +67,6 @@ main (int argc, char ** argv)
6767

6868
progname= (char*)get_progname(argv[0]);
6969

70-
71-
7270
if (argc<2)
7371
{
7472
fprintf(stderr,_("%s: argument required\n"),progname);
@@ -83,11 +81,9 @@ main (int argc, char ** argv)
8381
strcmp(argv[i],"--includedir-server")==0||
8482
strcmp(argv[i],"--libdir")==0||
8583
strcmp(argv[i],"--pkglibdir")==0||
86-
strcmp(argv[i],"--configure")==0
87-
)
84+
strcmp(argv[i],"--configure")==0)
8885
{
8986
/* come back to these later */
90-
9187
continue;
9288
}
9389

@@ -114,23 +110,19 @@ main (int argc, char ** argv)
114110
exit(1);
115111
}
116112

117-
118-
119113
for (i=1;i<argc;i++)
120114
{
121115
if (strcmp(argv[i],"--configure")==0)
122116
{
123117
/* the VAL_CONFIGURE macro must be defined by the Makefile */
124-
125118
printf("%s\n",VAL_CONFIGURE);
126119
continue;
127120
}
128121

129122
if (strcmp(argv[i],"--bindir")==0)
130123
{
131124
/* assume we are located in the bindir */
132-
133-
char*lastsep;
125+
char*lastsep;
134126
strcpy(otherpath,mypath);
135127
lastsep=strrchr(otherpath,'/');
136128
if (lastsep)
@@ -146,8 +138,6 @@ main (int argc, char ** argv)
146138
get_pkglib_path(mypath,otherpath);
147139

148140
printf("%s\n",otherpath);
149-
150-
151141
}
152142

153143
return0;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp