Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
tty.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
20
21namespace shamcmdopt {
22
29 bool is_a_tty();
30
40
49
60 void set_tty_columns(u32 columns);
61
67 inline void reset_tty_columns() { set_tty_columns(0); }
68} // namespace shamcmdopt
std::uint32_t u32
32 bit unsigned integer
namespace for cli utilities
Definition ci_env.hpp:19
void set_tty_columns(u32 columns)
Set the forced width of the terminal.
Definition tty.cpp:43
bool is_a_tty()
Test if current terminal is a tty.
Definition tty.cpp:31
void reset_tty_columns()
Reset the forced width of the terminal.
Definition tty.hpp:67
u32 get_tty_lines()
Get the number of lines of the current terminal.
Definition tty.cpp:82
u32 get_tty_columns()
Get the number of columns of the current terminal.
Definition tty.cpp:81