From 8a14a8193900f74a986ead962e5ec9950aa8d49d Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Sat, 4 Jan 2025 21:32:48 -0700 Subject: [PATCH] ui-vt100: write ouptut using write(3) we use raw write elsewhere; no need to go through stdio unnecessarily. --- ui-terminal-vt100.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui-terminal-vt100.c b/ui-terminal-vt100.c index a1c92f35b..92e23eb1d 100644 --- a/ui-terminal-vt100.c +++ b/ui-terminal-vt100.c @@ -36,7 +36,6 @@ * See http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt * for further information. */ -#include #include "buffer.h" #define UI_TERMKEY_FLAGS TERMKEY_FLAG_UTF8 @@ -75,8 +74,7 @@ static CellColor color_terminal(Ui *ui, uint8_t index) { static void output(const char *data, size_t len) { - fwrite(data, len, 1, stderr); - fflush(stderr); + write(STDERR_FILENO, data, len); } static void output_literal(const char *data) { @@ -122,7 +120,7 @@ static void ui_term_backend_blit(Ui *tui) { if ((style->attr & a) == (attr & a)) continue; buffer_appendf(buf, "\x1b[%sm", - style->attr & a ? + style->attr & a ? cell_attrs[i].on : cell_attrs[i].off); }