From 5fbb0c30cf78d811b86a432aada43e37544e16da Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 5 Jun 2025 23:11:07 -0400 Subject: kernel: cons: Add initial ANSI escape seq impl Signed-off-by: Ian Moffett --- sys/dev/cons/cons.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sys/dev/cons/cons.c') 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) { -- cgit v1.2.3