From b7e9697a372e4ef876838803b51c98b88bd5c3a7 Mon Sep 17 00:00:00 2001 From: millert Date: Fri, 12 Mar 2021 02:10:25 +0000 Subject: [PATCH] Provide definition of CTRL in vi.c like we do for emacs.c. Fixes a portability issue. From Benjamin Baier --- bin/ksh/vi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.20.1