From 4590204701232f3bee50daf69a0d3e62b026c648 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Sun, 26 Dec 2021 15:57:13 -0500 Subject: goldfishterm: Don’t hard-code std::cout/STDOUT_FILENO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make terminal-handling code purer by requiring the user pass TERM, a termios struct, and an appropriate ostream rather than querying them from the environment. This eliminates some error-handling code and makes duplicate syscalls less likely. --- goldfishterm/internal/emit.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'goldfishterm/internal/emit.cc') diff --git a/goldfishterm/internal/emit.cc b/goldfishterm/internal/emit.cc index 2cc7609..608aa3c 100644 --- a/goldfishterm/internal/emit.cc +++ b/goldfishterm/internal/emit.cc @@ -14,15 +14,9 @@ #include "goldfishterm/internal/emit.h" -#include -#include -#include - #include -#include -#include +#include -#include "third_party/abseil/absl/strings/string_view.h" #include "third_party/abseil/absl/time/clock.h" #include "third_party/abseil/absl/types/span.h" -- cgit v1.2.3