diff options
| author | Bruce Momjian | 1999-11-04 21:56:02 +0000 |
|---|---|---|
| committer | Bruce Momjian | 1999-11-04 21:56:02 +0000 |
| commit | a45195a191eec367a4f305bb71ab541d17a3b9f9 (patch) | |
| tree | 99b815a93f6175b0db76c2da0da39e95a0ee6b8d /src/bin/psql/input.h | |
| parent | 2ea3b6d63addeaf07267e2390597645cbf013c36 (diff) | |
Major psql overhaul by Peter Eisentraut.
Diffstat (limited to 'src/bin/psql/input.h')
| -rw-r--r-- | src/bin/psql/input.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h new file mode 100644 index 00000000000..272b0574f13 --- /dev/null +++ b/src/bin/psql/input.h @@ -0,0 +1,56 @@ +#ifndef INPUT_H +#define INPUT_H + +#include <config.h> +#include <c.h> +#include <stdio.h> +#include "settings.h" + + +/* If some other file needs to have access to readline/history, include this + * file and save yourself all this work. + * + * USE_READLINE and USE_HISTORY are the definite pointers regarding existence or not. + */ +#ifdef HAVE_LIBREADLINE +#ifdef HAVE_READLINE_H +#include <readline.h> +#define USE_READLINE 1 +#else +#if defined(HAVE_READLINE_READLINE_H) +#include <readline/readline.h> +#define USE_READLINE 1 +#endif +#endif +#endif + +#if defined(HAVE_LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE)) +#if defined(HAVE_HISTORY_H) +#include <history.h> +#define USE_HISTORY 1 +#else +#if defined(HAVE_READLINE_HISTORY_H) +#include <readline/history.h> +#define USE_HISTORY 1 +#endif +#endif +#endif + + +char * +gets_interactive(const char *prompt); + +char * +gets_fromFile(FILE *source); + + +void +initializeInput(int flags); + +bool +saveHistory(const char *fname); + +void +finishInput(void); + +#endif |
