*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.16 2001/02/27 08:13:27 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.17 2001/09/11 23:08:07 petere Exp $
*/
#include "postgres_fe.h"
#include "input.h"
#endif
+#ifdef HAVE_ATEXIT
+static void finishInput(void);
+#else
+/* designed for use with on_exit() */
+static void finishInput(int, void*);
+#endif
+
/*
* gets_interactive()
#ifdef HAVE_ATEXIT
atexit(finishInput);
#else
- on_exit(finishInput);
+ on_exit(finishInput, NULL);
#endif
}
-void
+static void
+#ifdef HAVE_ATEXIT
finishInput(void)
+#else
+finishInput(int exitstatus, void *arg)
+#endif
{
#ifdef USE_HISTORY
if (useHistory)
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.11 2000/10/03 19:50:20 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.12 2001/09/11 23:08:07 petere Exp $
*/
#ifndef INPUT_H
#define INPUT_H
void initializeInput(int flags);
bool saveHistory(char *fname);
-void finishInput(void);
#endif /* INPUT_H */