From be1c6e75293fac69453d2ca6fc99d642f7806dfa Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 20 Mar 2003 06:00:12 +0000 Subject: 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 --- src/bin/psql/mainloop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/bin/psql/mainloop.c') diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c index 1f84d507963..e9ed1a621e5 100644 --- a/src/bin/psql/mainloop.c +++ b/src/bin/psql/mainloop.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.51 2002/10/12 23:09:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/mainloop.c,v 1.52 2003/03/20 06:00:12 momjian Exp $ */ #include "postgres_fe.h" #include "mainloop.h" @@ -92,8 +92,6 @@ MainLoop(FILE *source) /* main loop to get queries and execute them */ while (1) { -#ifndef WIN32 - /* * Welcome code for Control-C */ @@ -113,6 +111,7 @@ MainLoop(FILE *source) cancel_pressed = false; } +#ifndef WIN32 if (sigsetjmp(main_loop_jmp, 1) != 0) { /* got here with longjmp */ -- cgit v1.2.3