summaryrefslogtreecommitdiff
path: root/edit-readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'edit-readline.c')
-rw-r--r--edit-readline.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/edit-readline.c b/edit-readline.c
index dcaa51b..2e48fd2 100644
--- a/edit-readline.c
+++ b/edit-readline.c
@@ -11,6 +11,35 @@
#include "edit.h"
+/* A number of readline functions used in this file are not
+ * present in the version of readline supplied on OpenBSD.
+ * These are replaced with no-ops.
+ * This does not seem to have any major effect other than
+ * ruining the completion of quoted strings. */
+#if RL_VERSION_MAJOR < 5
+typedef char *rl_cpvfunc_t (void);
+rl_cpvfunc_t *rl_completion_word_break_hook;
+int rl_bind_keyseq (const char *s, rl_command_func_t *f) {
+ (void)s;
+ (void)f;
+ return 0;
+}
+histdata_t free_history_entry (HIST_ENTRY *e) {
+ (void)e;
+ return (histdata_t){};
+}
+#endif
+
+#if RL_VERSION_MAJOR < 5 || (RL_VERSION_MAJOR == 5 && RL_VERSION_MINOR < 1)
+int rl_reset_screen_size(void) {
+ return 0;
+}
+#endif
+
+#if RL_VERSION_MAJOR < 6
+int rl_sort_completion_matches;
+#endif
+
bool editing = 1;
static const char *quote_chars = "\t\n !#$&'()*;<=>?@[\\]^`{|}~";