From: millert Date: Fri, 12 Mar 2021 02:10:25 +0000 (+0000) Subject: Provide definition of CTRL in vi.c like we do for emacs.c. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b7e9697a372e4ef876838803b51c98b88bd5c3a7;p=openbsd Provide definition of CTRL in vi.c like we do for emacs.c. Fixes a portability issue. From Benjamin Baier --- 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 */