summaryrefslogtreecommitdiffstats
path: root/common/ttyio.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2006-05-23 18:19:43 +0200
committerWerner Koch <wk@gnupg.org>2006-05-23 18:19:43 +0200
commitfbe4ac37f6d3e7870e26caffb0d21c3c77198297 (patch)
treef21028be87bda6df4f2f1e3ae105feeb5a2eb158 /common/ttyio.h
parent2006-05-19 Marcus Brinkmann <marcus@g10code.de> (diff)
downloadgnupg2-fbe4ac37f6d3e7870e26caffb0d21c3c77198297.tar.xz
gnupg2-fbe4ac37f6d3e7870e26caffb0d21c3c77198297.zip
g10/ does build again.
Diffstat (limited to 'common/ttyio.h')
-rw-r--r--common/ttyio.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/ttyio.h b/common/ttyio.h
index 6fa7400a9..6148d644a 100644
--- a/common/ttyio.h
+++ b/common/ttyio.h
@@ -20,6 +20,11 @@
#ifndef GNUPG_COMMON_TTYIO_H
#define GNUPG_COMMON_TTYIO_H
+#ifdef HAVE_LIBREADLINE
+#include <stdio.h>
+#include <readline/readline.h>
+#endif
+
const char *tty_get_ttyname (void);
int tty_batchmode (int onoff);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
@@ -40,5 +45,16 @@ void tty_kill_prompt (void);
int tty_get_answer_is_yes (const char *prompt);
int tty_no_terminal (int onoff);
+#ifdef HAVE_LIBREADLINE
+void tty_enable_completion(rl_completion_func_t *completer);
+void tty_disable_completion(void);
+#else
+/* Use a macro to stub out these functions since a macro has no need
+ to typedef a "rl_completion_func_t" which would be undefined
+ without readline. */
+#define tty_enable_completion(x)
+#define tty_disable_completion()
+#endif
+
#endif /*GNUPG_COMMON_TTYIO_H*/