Hello Racketeers,
as I learned that it is not possible to use the ansi package under CS,
because the C extensions do not work under CS, I decided to put together
a minimalistic termios wrapper using only Racket code.
It provides the bare minimum to set the terminal to "raw" mode and
should work under any POSIX system (tested on Linux and NetBSD). Usage
is VERY simple[1].
The ansi package can be patched immediately to use it and therefore work
under CS and charterm can be probably be patched as well - meaning it
will no longer rely on `stty' for this functionality.
The termios package uses similar approach but tries to implement all
termios capabilities which means it has to compile at least the
constants from termios headers. The same applies for serial package. It
might be possible to generate a .rkt file with those constants from the
header files during package build - but I didn't investigate that yet.
Any feedback is, of course, welcome. And all the ideas mentioned are
only suggestions.
Cheers,
Dominik
[1]
https://docs.racket-lang.org/rktermios/index.html