summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-04-12 09:04:03 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-04-12 09:04:03 +0000
commit9441aff53938c12789572dc5ff88c6ba93d72129 (patch)
treed064bdf71bc99c3b4de3f450b2b01c3118374265 /lib
parent5738498b647fd7f2adc654793417831ca8319265 (diff)
* Delete the unimplemented feature XK_EXE.
* Delete the unused macro MIN(). No functional change. OK czarkoff@ martijn@
Diffstat (limited to 'lib')
-rw-r--r--lib/libedit/keymacro.c12
-rw-r--r--lib/libedit/keymacro.h5
-rw-r--r--lib/libedit/map.c8
-rw-r--r--lib/libedit/read.c12
4 files changed, 8 insertions, 29 deletions
diff --git a/lib/libedit/keymacro.c b/lib/libedit/keymacro.c
index 97de3a72a7e..eb863fd5f45 100644
--- a/lib/libedit/keymacro.c
+++ b/lib/libedit/keymacro.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: keymacro.c,v 1.13 2016/04/11 21:17:29 schwarze Exp $ */
-/* $NetBSD: keymacro.c,v 1.19 2016/04/11 18:56:31 christos Exp $ */
+/* $OpenBSD: keymacro.c,v 1.14 2016/04/12 09:04:02 schwarze Exp $ */
+/* $NetBSD: keymacro.c,v 1.20 2016/04/12 00:16:06 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -44,7 +44,7 @@
* number of characters. This module maintains a map (the
* el->el_keymacro.map)
* to convert these extended-key sequences into input strs
- * (XK_STR), editor functions (XK_CMD), or unix commands (XK_EXE).
+ * (XK_STR) or editor functions (XK_CMD).
*
* Warning:
* If key is a substr of some other keys, then the longer
@@ -163,7 +163,7 @@ keymacro_reset(EditLine *el)
* Calls the recursive function with entry point el->el_keymacro.map
* Looks up *ch in map and then reads characters until a
* complete match is found or a mismatch occurs. Returns the
- * type of the match found (XK_STR, XK_CMD, or XK_EXE).
+ * type of the match found (XK_STR or XK_CMD).
* Returns NULL in val.str and XK_STR for no match.
* The last character read is returned in *ch.
*/
@@ -335,7 +335,6 @@ node__try(EditLine *el, keymacro_node_t *ptr, const wchar_t *str,
case XK_NOD:
break;
case XK_STR:
- case XK_EXE:
if (ptr->val.str)
free(ptr->val.str);
break;
@@ -350,7 +349,6 @@ node__try(EditLine *el, keymacro_node_t *ptr, const wchar_t *str,
ptr->val = *val;
break;
case XK_STR:
- case XK_EXE:
if ((ptr->val.str = wcsdup(val->str)) == NULL)
return -1;
break;
@@ -435,7 +433,6 @@ node__put(EditLine *el, keymacro_node_t *ptr)
case XK_CMD:
case XK_NOD:
break;
- case XK_EXE:
case XK_STR:
if (ptr->val.str != NULL)
free(ptr->val.str);
@@ -587,7 +584,6 @@ keymacro_kprint(EditLine *el, const wchar_t *key, keymacro_value_t *val,
if (val != NULL)
switch (ntype) {
case XK_STR:
- case XK_EXE:
(void) keymacro__decode_str(val->str, unparsbuf,
sizeof(unparsbuf),
ntype == XK_STR ? "\"\"" : "[]");
diff --git a/lib/libedit/keymacro.h b/lib/libedit/keymacro.h
index d538d85632f..732f71010ef 100644
--- a/lib/libedit/keymacro.h
+++ b/lib/libedit/keymacro.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: keymacro.h,v 1.3 2016/04/11 20:43:33 schwarze Exp $ */
-/* $NetBSD: keymacro.h,v 1.4 2016/04/11 00:50:13 christos Exp $ */
+/* $OpenBSD: keymacro.h,v 1.4 2016/04/12 09:04:02 schwarze Exp $ */
+/* $NetBSD: keymacro.h,v 1.5 2016/04/12 00:16:06 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -57,7 +57,6 @@ typedef struct el_keymacro_t {
#define XK_CMD 0
#define XK_STR 1
#define XK_NOD 2
-#define XK_EXE 3
protected int keymacro_init(EditLine *);
protected void keymacro_end(EditLine *);
diff --git a/lib/libedit/map.c b/lib/libedit/map.c
index 02843283d2d..f4ddb291c1d 100644
--- a/lib/libedit/map.c
+++ b/lib/libedit/map.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: map.c,v 1.23 2016/04/11 21:17:29 schwarze Exp $ */
+/* $OpenBSD: map.c,v 1.24 2016/04/12 09:04:02 schwarze Exp $ */
/* $NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos Exp $ */
/*-
@@ -1270,11 +1270,6 @@ map_bind(EditLine *el, int argc, const wchar_t **argv)
case 's':
ntype = XK_STR;
break;
-#ifdef notyet
- case 'c':
- ntype = XK_EXE;
- break;
-#endif
case 'k':
key = 1;
break;
@@ -1347,7 +1342,6 @@ map_bind(EditLine *el, int argc, const wchar_t **argv)
switch (ntype) {
case XK_STR:
- case XK_EXE:
if ((out = parse__string(outbuf, argv[argc])) == NULL) {
(void) fprintf(el->el_errfile,
"%ls: Invalid \\ or ^ in outstring.\n", argv[0]);
diff --git a/lib/libedit/read.c b/lib/libedit/read.c
index 3d17dc1a9a3..85d68358fe7 100644
--- a/lib/libedit/read.c
+++ b/lib/libedit/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.35 2016/04/11 21:17:29 schwarze Exp $ */
+/* $OpenBSD: read.c,v 1.36 2016/04/12 09:04:02 schwarze Exp $ */
/* $NetBSD: read.c,v 1.91 2016/04/11 18:56:31 christos Exp $ */
/*-
@@ -92,10 +92,6 @@ el_read_getfn(EditLine *el)
}
-#ifndef MIN
-#define MIN(A,B) ((A) < (B) ? (A) : (B))
-#endif
-
#ifdef DEBUG_EDIT
static void
read_debug(EditLine *el)
@@ -239,12 +235,6 @@ read_getcmd(EditLine *el, el_action_t *cmdnum, wchar_t *ch)
case XK_STR:
el_wpush(el, val.str);
break;
-#ifdef notyet
- case XK_EXE:
- /* XXX: In the future to run a user function */
- RunCommand(val.str);
- break;
-#endif
default:
EL_ABORT((el->el_errfile, "Bad XK_ type \n"));
break;