oksh-noxz

[fork] Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
git clone https://noxz.tech/git/oksh-noxz.git
oksh-noxz

commit: d401cd57fbd7e82c8728d7117607fd0d3154a703
parent: ecb75ab017842021260b38c0feeb71c9ca8e590b
author: Brian Callahan <bcallah@openbsd.org>
date:   Sat, 31 Oct 2020 16:29:22 -0400
musl-libc doesn't have a CTRL define. Perhaps other systems don't
either. Wrap the define to only trigger if you don't have it.
Fix #49
Mvi.c4++++
1 file changed, 4 insertions(+)
diff --git a/vi.c b/vi.c
@@ -22,6 +22,10 @@
 #include "sh.h"
 #include "edit.h"
 
+#ifndef CTRL
+#define CTRL(c)	(c & 0x1f)
+#endif
+
 struct edstate {
 	char	*cbuf;		/* main buffer to build the command line */
 	int	cbufsize;	/* number of bytes allocated for cbuf */