Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/next/external/cache/sources/hcitools/monitor/display.h
Views: 3959
/*1*2* BlueZ - Bluetooth protocol stack for Linux3*4* Copyright (C) 2011-2012 Intel Corporation5* Copyright (C) 2004-2010 Marcel Holtmann <[email protected]>6*7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or11* (at your option) any later version.12*13* This program is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16* GNU General Public License for more details.17*18* You should have received a copy of the GNU General Public License19* along with this program; if not, write to the Free Software20* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA21*22*/2324#include <stdbool.h>2526bool use_color(void);2728#define COLOR_OFF "\x1B[0m"29#define COLOR_BLACK "\x1B[0;30m"30#define COLOR_RED "\x1B[0;31m"31#define COLOR_GREEN "\x1B[0;32m"32#define COLOR_YELLOW "\x1B[0;33m"33#define COLOR_BLUE "\x1B[0;34m"34#define COLOR_MAGENTA "\x1B[0;35m"35#define COLOR_CYAN "\x1B[0;36m"36#define COLOR_WHITE "\x1B[0;37m"37#define COLOR_WHITE_BG "\x1B[0;47m"38#define COLOR_HIGHLIGHT "\x1B[1;39m"3940#define COLOR_ERROR "\x1B[1;31m"4142#define print_indent(indent, color1, prefix, title, color2, fmt, args...) \43do { \44printf("%*c%s%s%s%s" fmt "%s\n", (indent), ' ', \45use_color() ? (color1) : "", prefix, title, \46use_color() ? (color2) : "", ## args, \47use_color() ? COLOR_OFF : ""); \48} while (0)4950#define print_text(color, fmt, args...) \51print_indent(8, COLOR_OFF, "", "", color, fmt, ## args)5253#define print_field(fmt, args...) \54print_indent(8, COLOR_OFF, "", "", COLOR_OFF, fmt, ## args)5556int num_columns(void);5758void open_pager(void);59void close_pager(void);606162