File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 33 *
44 * Copyright 2000 by PostgreSQL Global Development Group
55 *
6- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.16 2001/02/27 08:13:27 ishii Exp $
6+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.17 2001/09/11 23: 08:07 petere Exp $
77 */
88#include "postgres_fe.h"
99#include "input.h"
@@ -26,6 +26,13 @@ static bool useHistory;
2626
2727#endif
2828
29+ #ifdef HAVE_ATEXIT
30+ static void finishInput (void );
31+ #else
32+ /* designed for use with on_exit() */
33+ static void finishInput (int , void * );
34+ #endif
35+
2936
3037/*
3138 * gets_interactive()
@@ -154,7 +161,7 @@ initializeInput(int flags)
154161#ifdef HAVE_ATEXIT
155162 atexit (finishInput );
156163#else
157- on_exit (finishInput );
164+ on_exit (finishInput , NULL );
158165#endif
159166}
160167
@@ -182,8 +189,12 @@ saveHistory(char *fname)
182189
183190
184191
185- void
192+ static void
193+ #ifdef HAVE_ATEXIT
186194finishInput (void )
195+ #else
196+ finishInput (int exitstatus , void * arg )
197+ #endif
187198{
188199#ifdef USE_HISTORY
189200 if (useHistory )
Original file line number Diff line number Diff line change 33 *
44 * Copyright 2000 by PostgreSQL Global Development Group
55 *
6- * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.11 2000/10/03 19:50:20 petere Exp $
6+ * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.12 2001/09/11 23:08:07 petere Exp $
77 */
88#ifndef INPUT_H
99#define INPUT_H
@@ -39,6 +39,5 @@ char *gets_fromFile(FILE *source);
3939
4040void initializeInput (int flags );
4141bool saveHistory (char * fname );
42- void finishInput (void );
4342
4443#endif /* INPUT_H */
You can’t perform that action at this time.
0 commit comments