diff options
Diffstat (limited to 'src/bin/psql/startup.c')
-rw-r--r-- | src/bin/psql/startup.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 3852edbbab1..55ad9692c66 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.44 2001/02/10 02:31:28 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.45 2001/03/22 04:00:23 momjian Exp $ */ #include "postgres_fe.h" @@ -82,7 +82,8 @@ static void #ifdef USE_SSL static void - printSSLInfo(void); + printSSLInfo(void); + #endif @@ -108,17 +109,17 @@ main(int argc, char *argv[]) if (argc > 1) { - if (strcmp(argv[1], "--help")==0 || strcmp(argv[1], "-?")==0) + if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) { usage(); exit(EXIT_SUCCESS); } - if (strcmp(argv[1], "--version")==0 || strcmp(argv[1], "-V")==0) + if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0) { showVersion(); exit(EXIT_SUCCESS); } - } + } pset.cur_cmd_source = stdin; pset.cur_cmd_interactive = false; @@ -279,7 +280,7 @@ main(int argc, char *argv[]) "Type: \\copyright for distribution terms\n" " \\h for help with SQL commands\n" " \\? for help on internal slash commands\n" - " \\g or terminate with semicolon to execute query\n" + " \\g or terminate with semicolon to execute query\n" " \\q to quit\n\n", pset.progname); #ifdef USE_SSL printSSLInfo(); @@ -672,18 +673,19 @@ showVersion(void) * Prints information about the current SSL connection, if SSL is in use */ #ifdef USE_SSL -static void +static void printSSLInfo(void) { - int sslbits = -1; - SSL *ssl; + int sslbits = -1; + SSL *ssl; ssl = PQgetssl(pset.db); if (!ssl) - return; /* no SSL */ + return; /* no SSL */ SSL_get_cipher_bits(ssl, &sslbits); printf("SSL enabled connection. Chiper: %s, bits: %i\n\n", - SSL_get_cipher(ssl),sslbits); + SSL_get_cipher(ssl), sslbits); } + #endif |