summaryrefslogtreecommitdiff
path: root/lib/libedit/readline.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-03-20 23:48:28 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-03-20 23:48:28 +0000
commit96221280867fcc5be32f99ba980f07468713d523 (patch)
treee9e87ee9ac7950a5acd831c07587a4b682542cfa /lib/libedit/readline.c
parent03f05bdc3179e384311dc47f75682a01739c2c3f (diff)
Cleanup of standard header inclusion:
1. Add the missing <errno.h> to sig.c. 2. Do not include standard headers from private headers "chared.h" and "el.h", include them directly where needed. 3. Delete a few needless inclusions of <ctype.h>. 4. Sort the standard headers. 5. Delete _GNU_SOURCE weirdness from histedit.h, that file doesn't even need the access to wcsdup(3) mentioned in the comment. 6. Delete some trailing blanks and blanks before tabs. OK czarkoff@
Diffstat (limited to 'lib/libedit/readline.c')
-rw-r--r--lib/libedit/readline.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c
index fbb74e17fec..25b3fb34d7a 100644
--- a/lib/libedit/readline.c
+++ b/lib/libedit/readline.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readline.c,v 1.17 2016/03/20 22:57:59 schwarze Exp $ */
+/* $OpenBSD: readline.c,v 1.18 2016/03/20 23:48:27 schwarze Exp $ */
/* $NetBSD: readline.c,v 1.91 2010/08/28 15:44:59 christos Exp $ */
/*-
@@ -34,18 +34,18 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <string.h>
-#include <pwd.h>
#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
+#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
+#include <limits.h>
+#include <pwd.h>
#include <setjmp.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#ifdef HAVE_VIS_H
#include <vis.h>
#else
@@ -255,7 +255,7 @@ rl_set_prompt(const char *prompt)
if (!prompt)
prompt = "";
- if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0)
+ if (rl_prompt != NULL && strcmp(rl_prompt, prompt) == 0)
return 0;
if (rl_prompt)
free(rl_prompt);
@@ -349,7 +349,7 @@ rl_initialize(void)
"ReadLine compatible suspend function",
_el_rl_tstp);
el_set(e, EL_BIND, "^Z", "rl_tstp", NULL);
-
+
/* read settings from configuration file */
el_source(e, NULL);
@@ -1939,7 +1939,7 @@ rl_callback_read_char()
}
}
-void
+void
rl_callback_handler_install(const char *prompt, VCPFunction *linefunc)
{
if (e == NULL) {
@@ -1948,9 +1948,9 @@ rl_callback_handler_install(const char *prompt, VCPFunction *linefunc)
(void)rl_set_prompt(prompt);
rl_linefunc = linefunc;
el_set(e, EL_UNBUFFERED, 1);
-}
+}
-void
+void
rl_callback_handler_remove(void)
{
el_set(e, EL_UNBUFFERED, 0);
@@ -2150,7 +2150,7 @@ rl_completion_matches(const char *str, rl_compentry_func_t *fun)
list[0][min] = '\0';
}
return list;
-
+
out:
free(list);
return NULL;