summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2021-03-12 02:10:25 +0000
committermillert <millert@openbsd.org>2021-03-12 02:10:25 +0000
commitb7e9697a372e4ef876838803b51c98b88bd5c3a7 (patch)
tree1069ffe189775dfc604d9a87ec6b3caf0fae0daf /bin
parentquiz: handle line continuation in data files correctly, switch to getline(3) (diff)
downloadwireguard-openbsd-b7e9697a372e4ef876838803b51c98b88bd5c3a7.tar.xz
wireguard-openbsd-b7e9697a372e4ef876838803b51c98b88bd5c3a7.zip
Provide definition of CTRL in vi.c like we do for emacs.c.
Fixes a portability issue. From Benjamin Baier
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/vi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ksh/vi.c b/bin/ksh/vi.c
index f1ef401161b..cdda9cb24b1 100644
--- a/bin/ksh/vi.c
+++ b/bin/ksh/vi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vi.c,v 1.59 2021/03/10 20:17:33 millert Exp $ */
+/* $OpenBSD: vi.c,v 1.60 2021/03/12 02:10:25 millert Exp $ */
/*
* vi command editing
@@ -22,6 +22,9 @@
#include "sh.h"
#include "edit.h"
+#undef CTRL
+#define CTRL(x) ((x) & 0x1F) /* ASCII */
+
struct edstate {
char *cbuf; /* main buffer to build the command line */
int cbufsize; /* number of bytes allocated for cbuf */