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 */
2828
2929#define _ (x ) gettext((x))
3030
31- char * progname ;
31+ static char * progname ;
3232
3333static void
3434help ()
@@ -67,8 +67,6 @@ main (int argc, char ** argv)
6767
6868progname = (char * )get_progname (argv [0 ]);
6969
70-
71-
7270if (argc < 2 )
7371{
7472fprintf (stderr ,_ ("%s: argument required\n" ),progname );
@@ -83,11 +81,9 @@ main (int argc, char ** argv)
8381strcmp (argv [i ],"--includedir-server" )== 0 ||
8482strcmp (argv [i ],"--libdir" )== 0 ||
8583strcmp (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-
9187continue ;
9288}
9389
@@ -114,23 +110,19 @@ main (int argc, char ** argv)
114110exit (1 );
115111}
116112
117-
118-
119113for (i = 1 ;i < argc ;i ++ )
120114{
121115if (strcmp (argv [i ],"--configure" )== 0 )
122116{
123117/* the VAL_CONFIGURE macro must be defined by the Makefile */
124-
125118printf ("%s\n" ,VAL_CONFIGURE );
126119continue ;
127120}
128121
129122if (strcmp (argv [i ],"--bindir" )== 0 )
130123{
131124/* assume we are located in the bindir */
132-
133- char * lastsep ;
125+ char * lastsep ;
134126strcpy (otherpath ,mypath );
135127lastsep = strrchr (otherpath ,'/' );
136128if (lastsep )
@@ -146,8 +138,6 @@ main (int argc, char ** argv)
146138get_pkglib_path (mypath ,otherpath );
147139
148140printf ("%s\n" ,otherpath );
149-
150-
151141}
152142
153143return 0 ;