mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Display -? as -\? under unix for psql.
This commit is contained in:
parent
0fbde5d928
commit
e10c5597b7
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.30 2000/05/11 01:37:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.31 2000/05/11 03:14:19 momjian Exp $
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
@ -82,7 +82,8 @@ static void
|
||||
static void
|
||||
showVersion(void);
|
||||
|
||||
|
||||
static void
|
||||
explain_help_and_exit(void);
|
||||
|
||||
/*
|
||||
*
|
||||
@ -513,8 +514,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
||||
/* unknown option reported by getopt */
|
||||
else
|
||||
{
|
||||
fputs("Try -? for help.\n", stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
explain_help_and_exit();
|
||||
}
|
||||
break;
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
@ -525,8 +525,7 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
fputs("Try -? for help.\n", stderr);
|
||||
exit(EXIT_FAILURE);
|
||||
explain_help_and_exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -640,3 +639,17 @@ showVersion(void)
|
||||
puts("Read the file COPYRIGHT or use the command \\copyright to see the");
|
||||
puts("usage and distribution terms.");
|
||||
}
|
||||
|
||||
static void
|
||||
explain_help_and_exit(void)
|
||||
{
|
||||
|
||||
#ifdef WIN32
|
||||
fputs("Try -? for help.\n", stderr);
|
||||
#else /* !WIN32 */
|
||||
fputs("Try -\\? for help.\n", stderr);
|
||||
#endif /* WIN32 */
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user