From 0dc0ada006374cd96198c86fb2947fa968581a7d Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sun, 12 Dec 2021 00:08:54 +0100 Subject: [PATCH] Adapted to new library api --- progress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.cpp b/progress.cpp index 32439eb..f3b438b 100644 --- a/progress.cpp +++ b/progress.cpp @@ -3,13 +3,13 @@ #include int main() { - sc::term term; + sc::term term {STDERR_FILENO}; std::cout << term.rows() << " rows, " << term.cols() << " cols\n"; sleep(1); struct timespec tm; tm.tv_nsec = 20000000; tm.tv_sec = 0; - sc::cursor_hider ch; + sc::cursor_hider ch {STDERR_FILENO}; for (int i = 0; i < 1000; ++i) { term.progress(i, 1000); nanosleep(&tm, nullptr);