mirror of
https://github.com/postgres/postgres.git
synced 2025-12-12 02:37:31 +03:00
Here's some changes I made last night to psql's common.c (as found in
7.3.2). It removes some code duplication and #ifdeffing, and some unstructured ugliness such as tacky breaks and an unneeded continue. Breaks up a large function into smaller functions and reduces required nesting levels, and kills a variable or two. Jeroen T. Vermeulen
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.22 2003/03/18 22:15:44 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/common.h,v 1.23 2003/03/20 06:00:12 momjian Exp $
|
||||
*/
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
@@ -29,6 +29,8 @@ extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
|
||||
extern volatile bool cancel_pressed;
|
||||
extern PGconn *cancelConn;
|
||||
|
||||
extern void ResetCancelConn(void);
|
||||
|
||||
#ifndef WIN32
|
||||
extern void handle_sigint(SIGNAL_ARGS);
|
||||
#endif /* not WIN32 */
|
||||
|
||||
Reference in New Issue
Block a user