1#ifndef _terminal_hpp_INCLUDED
2#define _terminal_hpp_INCLUDED
19 fputs (
"\033[", file);
22 void color (
int color,
bool bright) {
27 fputc (bright ?
'1' :
'0', file);
28 fprintf (file,
";%dm", color);
32 void code (
const char *str) {
51 bool colors () {
return use_colors; }
53 operator bool ()
const {
return connected; }
55 void red (
bool bright =
false) { color (31, bright); }
56 void green (
bool bright =
false) { color (32, bright); }
57 void yellow (
bool bright =
false) { color (33, bright); }
58 void blue (
bool bright =
false) { color (34, bright); }
59 void magenta (
bool bright =
false) { color (35, bright); }
60 void black (
bool bright =
false) { color (90, bright); }
61 void cyan (
bool bright =
false) { color (96, bright); }
63 void bold () { code (
"1m"); }
68#define MODIFY(CODE) (use_colors ? "\033[" CODE "m" : "")
83 void cursor (
bool on) { code (on ?
"?25h" :
"?25l"); }
91 fputc (
'\n', file), fflush (file);
#define ABC_NAMESPACE_CXX_HEADER_START
#define ABC_NAMESPACE_CXX_HEADER_END
#define CADICAL_assert(ignore)
const char * magenta_code()
const char * bright_blue_code()
const char * normal_code()
void blue(bool bright=false)
void magenta(bool bright=false)
void force_reset_on_exit()
void red(bool bright=false)
void erase_until_end_of_line()
const char * bright_magenta_code()
void black(bool bright=false)
const char * green_code()
void cyan(bool bright=false)
const char * bright_red_code()
const char * bright_yellow_code()
void erase_line_if_connected_otherwise_new_line()
const char * yellow_code()
void green(bool bright=false)
void yellow(bool bright=false)