diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-05 23:11:07 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-05 23:13:05 -0400 |
commit | 5fbb0c30cf78d811b86a432aada43e37544e16da (patch) | |
tree | 7b3845171ee08d300fb132372ac1d459cb5a1831 /sys/dev/cons/cons.c | |
parent | 7864572520cd857d97e4e60aa605724f2885786d (diff) |
kernel: cons: Add initial ANSI escape seq impl
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev/cons/cons.c')
-rw-r--r-- | sys/dev/cons/cons.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/cons/cons.c b/sys/dev/cons/cons.c index 75425f3..671d5f0 100644 --- a/sys/dev/cons/cons.c +++ b/sys/dev/cons/cons.c @@ -264,6 +264,14 @@ cons_fast_putch(struct cons_screen *scr, char c) { struct cons_char cc; struct cons_buf *bp; + int ansi; + + ansi = ansi_feed(&scr->ansi_s, c); + if (ansi > 0) { + c = ASCII_NUL; + } else if (ansi < 0) { + c = ASCII_NUL; + } /* Handle specials */ if (cons_handle_special(scr, c) == 0) { |