2 * psql - the PostgreSQL interactive terminal
4 * Copyright (c) 2000-2006, PostgreSQL Global Development Group
6 * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.27 2006/03/21 13:38:12 momjian Exp $
12 * If some other file needs to have access to readline/history, include this
13 * file and save yourself all this work.
15 * USE_READLINE is the definite pointers regarding existence or not.
17 #ifdef HAVE_LIBREADLINE
18 #define USE_READLINE 1
19 #if defined(HAVE_READLINE_READLINE_H)
20 #include <readline/readline.h>
21 #elif defined(HAVE_EDITLINE_READLINE_H)
22 #include <editline/readline.h>
23 #elif defined(HAVE_READLINE_H)
26 #if defined(HAVE_READLINE_HISTORY_H)
27 #include <readline/history.h>
28 #elif defined(HAVE_EDITLINE_HISTORY_H)
29 #include <editline/history.h>
30 #elif defined(HAVE_HISTORY_H)
36 char *gets_interactive(const char *prompt);
37 char *gets_fromFile(FILE *source);
39 void initializeInput(int flags);
40 bool saveHistory(char *fname, bool encodeFlag);
42 void pg_append_history(char *s, PQExpBuffer history_buf);
43 void pg_clear_history(PQExpBuffer history_buf);
44 void pg_write_history(char *s);