]> granicus.if.org Git - postgresql/blob - src/bin/psql/input.h
dfe9cf6ba41852f007831ac93adafa5388378f34
[postgresql] / src / bin / psql / input.h
1 /*
2  * psql - the PostgreSQL interactive terminal
3  *
4  * Copyright (c) 2000-2003, PostgreSQL Global Development Group
5  *
6  * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.20 2003/08/04 23:59:40 tgl Exp $
7  */
8 #ifndef INPUT_H
9 #define INPUT_H
10
11 /*
12  * If some other file needs to have access to readline/history, include this
13  * file and save yourself all this work.
14  *
15  * USE_READLINE is the definite pointers regarding existence or not.
16  */
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)
24 #include <readline.h>
25 #endif
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)
31 #include <history.h>
32 #endif
33 #endif
34
35
36 char       *gets_interactive(const char *prompt);
37 char       *gets_fromFile(FILE *source);
38
39 void            initializeInput(int flags);
40 bool            saveHistory(char *fname);
41
42 #endif   /* INPUT_H */