Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Remove empty callbacks (Ingo Schwartze)
details: https://anonhg.NetBSD.org/src/rev/3ebc5ef56e92
branches: trunk
changeset: 344762:3ebc5ef56e92
user: christos <christos%NetBSD.org@localhost>
date: Sun Apr 17 18:39:14 2016 +0000
description:
Remove empty callbacks (Ingo Schwartze)
diffstat:
lib/libedit/common.c | 102 +++-----------------------------------------------
lib/libedit/editrc.5 | 18 +-------
lib/libedit/map.c | 48 ++++++++++++------------
3 files changed, 34 insertions(+), 134 deletions(-)
diffs (truncated from 303 to 300 lines):
diff -r 191940f132ce -r 3ebc5ef56e92 lib/libedit/common.c
--- a/lib/libedit/common.c Sun Apr 17 14:32:03 2016 +0000
+++ b/lib/libedit/common.c Sun Apr 17 18:39:14 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.43 2016/04/11 00:50:13 christos Exp $ */
+/* $NetBSD: common.c,v 1.44 2016/04/17 18:39:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)common.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: common.c,v 1.43 2016/04/11 00:50:13 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.44 2016/04/17 18:39:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -441,102 +441,14 @@
}
-/**
- ** TTY key handling.
- **/
-
-/* ed_tty_sigint():
- * Tty interrupt character
- * [^C]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigint(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_dsusp():
- * Tty delayed suspend character
- * [^Y]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_dsusp(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_flush_output():
- * Tty flush output characters
- * [^O]
+/* ed_ignore():
+ * Input characters that have no effect
+ * [^C ^O ^Q ^S ^Z ^\ ^]] [^C ^O ^Q ^S ^\]
*/
protected el_action_t
/*ARGSUSED*/
-ed_tty_flush_output(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_sigquit():
- * Tty quit character
- * [^\]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigquit(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_sigtstp():
- * Tty suspend character
- * [^Z]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_sigtstp(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_stop_output():
- * Tty disallow output characters
- * [^S]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_stop_output(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
-{
-
- return CC_NORM;
-}
-
-
-/* ed_tty_start_output():
- * Tty allow output characters
- * [^Q]
- */
-protected el_action_t
-/*ARGSUSED*/
-ed_tty_start_output(EditLine *el __attribute__((__unused__)),
- wint_t c __attribute__((__unused__)))
+ed_ignore(EditLine *el __attribute__((__unused__)),
+ wint_t c __attribute__((__unused__)))
{
return CC_NORM;
diff -r 191940f132ce -r 3ebc5ef56e92 lib/libedit/editrc.5
--- a/lib/libedit/editrc.5 Sun Apr 17 14:32:03 2016 +0000
+++ b/lib/libedit/editrc.5 Sun Apr 17 18:39:14 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: editrc.5,v 1.29 2014/12/25 13:39:41 wiz Exp $
+.\" $NetBSD: editrc.5,v 1.30 2016/04/17 18:39:14 christos Exp $
.\"
.\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -459,20 +459,8 @@
Digit that starts argument.
.It Ic ed-unassigned
Indicates unbound character.
-.It Ic ed-tty-sigint
-Tty interrupt character.
-.It Ic ed-tty-dsusp
-Tty delayed suspend character.
-.It Ic ed-tty-flush-output
-Tty flush output characters.
-.It Ic ed-tty-sigquit
-Tty quit character.
-.It Ic ed-tty-sigtstp
-Tty suspend character.
-.It Ic ed-tty-stop-output
-Tty disallow output characters.
-.It Ic ed-tty-start-output
-Tty allow output characters.
+.It Ic ed-ignore
+Ignore this character.
.It Ic ed-newline
Execute command.
.It Ic ed-delete-prev-char
diff -r 191940f132ce -r 3ebc5ef56e92 lib/libedit/map.c
--- a/lib/libedit/map.c Sun Apr 17 14:32:03 2016 +0000
+++ b/lib/libedit/map.c Sun Apr 17 18:39:14 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map.c,v 1.48 2016/04/12 00:16:06 christos Exp $ */
+/* $NetBSD: map.c,v 1.49 2016/04/17 18:39:14 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: map.c,v 1.48 2016/04/12 00:16:06 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.49 2016/04/17 18:39:14 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -65,7 +65,7 @@
/* 0 */ EM_SET_MARK, /* ^@ */
/* 1 */ ED_MOVE_TO_BEG, /* ^A */
/* 2 */ ED_PREV_CHAR, /* ^B */
- /* 3 */ ED_TTY_SIGINT, /* ^C */
+ /* 3 */ ED_IGNORE, /* ^C */
/* 4 */ EM_DELETE_OR_LIST, /* ^D */
/* 5 */ ED_MOVE_TO_END, /* ^E */
/* 6 */ ED_NEXT_CHAR, /* ^F */
@@ -77,21 +77,21 @@
/* 12 */ ED_CLEAR_SCREEN, /* ^L */
/* 13 */ ED_NEWLINE, /* ^M */
/* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
+ /* 15 */ ED_IGNORE, /* ^O */
/* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
+ /* 17 */ ED_IGNORE, /* ^Q */
/* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
+ /* 19 */ ED_IGNORE, /* ^S */
/* 20 */ ED_TRANSPOSE_CHARS, /* ^T */
/* 21 */ EM_KILL_LINE, /* ^U */
/* 22 */ ED_QUOTED_INSERT, /* ^V */
/* 23 */ EM_KILL_REGION, /* ^W */
/* 24 */ ED_SEQUENCE_LEAD_IN, /* ^X */
/* 25 */ EM_YANK, /* ^Y */
- /* 26 */ ED_TTY_SIGTSTP, /* ^Z */
+ /* 26 */ ED_IGNORE, /* ^Z */
/* 27 */ EM_META_NEXT, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
- /* 29 */ ED_TTY_DSUSP, /* ^] */
+ /* 28 */ ED_IGNORE, /* ^\ */
+ /* 29 */ ED_IGNORE, /* ^] */
/* 30 */ ED_UNASSIGNED, /* ^^ */
/* 31 */ ED_UNASSIGNED, /* ^_ */
/* 32 */ ED_INSERT, /* SPACE */
@@ -347,9 +347,9 @@
/* 14 */ ED_INSERT, /* ^N */
/* 15 */ ED_INSERT, /* ^O */
/* 16 */ ED_INSERT, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
+ /* 17 */ ED_IGNORE, /* ^Q */
/* 18 */ ED_INSERT, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
+ /* 19 */ ED_IGNORE, /* ^S */
/* 20 */ ED_INSERT, /* ^T */
/* 21 */ VI_KILL_LINE_PREV, /* ^U */
/* 22 */ ED_QUOTED_INSERT, /* ^V */
@@ -359,7 +359,7 @@
/* 25 */ ED_INSERT, /* ^Y */
/* 26 */ ED_INSERT, /* ^Z */
/* 27 */ VI_COMMAND_MODE, /* ^[ */ /* [ Esc ] key */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
+ /* 28 */ ED_IGNORE, /* ^\ */
/* 29 */ ED_INSERT, /* ^] */
/* 30 */ ED_INSERT, /* ^^ */
/* 31 */ ED_INSERT, /* ^_ */
@@ -373,7 +373,7 @@
/* 0 */ ED_UNASSIGNED, /* ^@ */
/* 1 */ ED_MOVE_TO_BEG, /* ^A */
/* 2 */ ED_PREV_CHAR, /* ^B */
- /* 3 */ ED_TTY_SIGINT, /* ^C */
+ /* 3 */ ED_IGNORE, /* ^C */
/* 4 */ VI_LIST_OR_EOF, /* ^D */
/* 5 */ ED_MOVE_TO_END, /* ^E */
/* 6 */ ED_NEXT_CHAR, /* ^F */
@@ -385,20 +385,20 @@
/* 12 */ ED_CLEAR_SCREEN, /* ^L */
/* 13 */ ED_NEWLINE, /* ^M */
/* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
+ /* 15 */ ED_IGNORE, /* ^O */
/* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
+ /* 17 */ ED_IGNORE, /* ^Q */
/* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
+ /* 19 */ ED_IGNORE, /* ^S */
/* 20 */ ED_TRANSPOSE_CHARS, /* ^T */
/* 21 */ VI_KILL_LINE_PREV, /* ^U */
/* 22 */ ED_QUOTED_INSERT, /* ^V */
/* 23 */ ED_DELETE_PREV_WORD, /* ^W */
/* 24 */ ED_UNASSIGNED, /* ^X */
- /* 25 */ ED_TTY_DSUSP, /* ^Y */
- /* 26 */ ED_TTY_SIGTSTP, /* ^Z */
+ /* 25 */ ED_IGNORE, /* ^Y */
+ /* 26 */ ED_IGNORE, /* ^Z */
/* 27 */ VI_COMMAND_MODE, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
+ /* 28 */ ED_IGNORE, /* ^\ */
/* 29 */ ED_UNASSIGNED, /* ^] */
/* 30 */ ED_UNASSIGNED, /* ^^ */
/* 31 */ ED_UNASSIGNED, /* ^_ */
@@ -633,7 +633,7 @@
/* 0 */ ED_UNASSIGNED, /* ^@ */
/* 1 */ ED_MOVE_TO_BEG, /* ^A */
/* 2 */ ED_UNASSIGNED, /* ^B */
- /* 3 */ ED_TTY_SIGINT, /* ^C */
+ /* 3 */ ED_IGNORE, /* ^C */
/* 4 */ ED_UNASSIGNED, /* ^D */
/* 5 */ ED_MOVE_TO_END, /* ^E */
/* 6 */ ED_UNASSIGNED, /* ^F */
@@ -645,11 +645,11 @@
/* 12 */ ED_CLEAR_SCREEN, /* ^L */
/* 13 */ ED_NEWLINE, /* ^M */
/* 14 */ ED_NEXT_HISTORY, /* ^N */
- /* 15 */ ED_TTY_FLUSH_OUTPUT, /* ^O */
+ /* 15 */ ED_IGNORE, /* ^O */
/* 16 */ ED_PREV_HISTORY, /* ^P */
- /* 17 */ ED_TTY_START_OUTPUT, /* ^Q */
+ /* 17 */ ED_IGNORE, /* ^Q */
/* 18 */ ED_REDISPLAY, /* ^R */
- /* 19 */ ED_TTY_STOP_OUTPUT, /* ^S */
+ /* 19 */ ED_IGNORE, /* ^S */
/* 20 */ ED_UNASSIGNED, /* ^T */
/* 21 */ VI_KILL_LINE_PREV, /* ^U */
/* 22 */ ED_UNASSIGNED, /* ^V */
@@ -658,7 +658,7 @@
/* 25 */ ED_UNASSIGNED, /* ^Y */
/* 26 */ ED_UNASSIGNED, /* ^Z */
/* 27 */ EM_META_NEXT, /* ^[ */
- /* 28 */ ED_TTY_SIGQUIT, /* ^\ */
+ /* 28 */ ED_IGNORE, /* ^\ */
Home |
Main Index |
Thread Index |
Old Index