summaryrefslogtreecommitdiffstats
path: root/lib/libedit/common.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2016-03-20 23:48:27 +0000
committerschwarze <schwarze@openbsd.org>2016-03-20 23:48:27 +0000
commit7ccfa089d503f0f7c1c22435af04c237b0796118 (patch)
tree6522e595632a0b190dfe2f14b1a5641765a9c2cd /lib/libedit/common.c
parentdelete useless "typedef int bool_t", use int directly; (diff)
downloadwireguard-openbsd-7ccfa089d503f0f7c1c22435af04c237b0796118.tar.xz
wireguard-openbsd-7ccfa089d503f0f7c1c22435af04c237b0796118.zip
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/common.c')
-rw-r--r--lib/libedit/common.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/libedit/common.c b/lib/libedit/common.c
index 47a6ca152ef..16becf93c24 100644
--- a/lib/libedit/common.c
+++ b/lib/libedit/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.13 2016/03/20 23:24:18 schwarze Exp $ */
+/* $OpenBSD: common.c,v 1.14 2016/03/20 23:48:27 schwarze Exp $ */
/* $NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos Exp $ */
/*-
@@ -38,6 +38,9 @@
/*
* common.c: Common Editor functions
*/
+#include <ctype.h>
+#include <string.h>
+
#include "el.h"
#include "common.h"
#include "parse.h"
@@ -446,7 +449,7 @@ ed_unassigned(EditLine *el, wint_t c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_sigint(EditLine *el __attribute__((__unused__)),
+ed_tty_sigint(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -460,7 +463,7 @@ ed_tty_sigint(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_dsusp(EditLine *el __attribute__((__unused__)),
+ed_tty_dsusp(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -474,7 +477,7 @@ ed_tty_dsusp(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_flush_output(EditLine *el __attribute__((__unused__)),
+ed_tty_flush_output(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -488,7 +491,7 @@ ed_tty_flush_output(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_sigquit(EditLine *el __attribute__((__unused__)),
+ed_tty_sigquit(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -502,7 +505,7 @@ ed_tty_sigquit(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_sigtstp(EditLine *el __attribute__((__unused__)),
+ed_tty_sigtstp(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -516,7 +519,7 @@ ed_tty_sigtstp(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_stop_output(EditLine *el __attribute__((__unused__)),
+ed_tty_stop_output(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -530,7 +533,7 @@ ed_tty_stop_output(EditLine *el __attribute__((__unused__)),
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_start_output(EditLine *el __attribute__((__unused__)),
+ed_tty_start_output(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -595,7 +598,7 @@ ed_clear_screen(EditLine *el, wint_t c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
-ed_redisplay(EditLine *el __attribute__((__unused__)),
+ed_redisplay(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -623,7 +626,7 @@ ed_start_over(EditLine *el, wint_t c __attribute__((__unused__)))
*/
protected el_action_t
/*ARGSUSED*/
-ed_sequence_lead_in(EditLine *el __attribute__((__unused__)),
+ed_sequence_lead_in(EditLine *el __attribute__((__unused__)),
wint_t c __attribute__((__unused__)))
{
@@ -657,7 +660,6 @@ ed_prev_history(EditLine *el, wint_t c __attribute__((__unused__)))
if (hist_get(el) == CC_ERROR) {
if (el->el_map.type == MAP_VI) {
el->el_history.eventno = sv_event;
-
}
beep = 1;
/* el->el_history.eventno was fixed by first call */