From e2e2a9db4c6581b3839fc8139f7d33c6770316b9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 11 Jun 2006 23:06:00 +0000 Subject: Code review for psql multiline history patch(es). Fix memory leak, failure to enter commands in history if canceled by control-C, other infelicities. --- src/bin/psql/input.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/bin/psql/input.h') diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h index 4fbc86079b4..0c6ede0cd5a 100644 --- a/src/bin/psql/input.h +++ b/src/bin/psql/input.h @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.27 2006/03/21 13:38:12 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.28 2006/06/11 23:06:00 tgl Exp $ */ #ifndef INPUT_H #define INPUT_H @@ -32,6 +32,8 @@ #endif #endif +#include "pqexpbuffer.h" + char *gets_interactive(const char *prompt); char *gets_fromFile(FILE *source); @@ -39,9 +41,7 @@ char *gets_fromFile(FILE *source); void initializeInput(int flags); bool saveHistory(char *fname, bool encodeFlag); -void pg_append_history(char *s, PQExpBuffer history_buf); -void pg_clear_history(PQExpBuffer history_buf); -void pg_write_history(char *s); - +void pg_append_history(const char *s, PQExpBuffer history_buf); +void pg_send_history(PQExpBuffer history_buf); #endif /* INPUT_H */ -- cgit v1.2.3