LLDB  mainline
Namespaces | Macros | Functions
AnsiTerminal.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include <string>
Include dependency graph for AnsiTerminal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 lldb_utility
 
 lldb_utility::ansi
 

Macros

#define ANSI_FG_COLOR_BLACK   30
 
#define ANSI_FG_COLOR_RED   31
 
#define ANSI_FG_COLOR_GREEN   32
 
#define ANSI_FG_COLOR_YELLOW   33
 
#define ANSI_FG_COLOR_BLUE   34
 
#define ANSI_FG_COLOR_PURPLE   35
 
#define ANSI_FG_COLOR_CYAN   36
 
#define ANSI_FG_COLOR_WHITE   37
 
#define ANSI_BG_COLOR_BLACK   40
 
#define ANSI_BG_COLOR_RED   41
 
#define ANSI_BG_COLOR_GREEN   42
 
#define ANSI_BG_COLOR_YELLOW   43
 
#define ANSI_BG_COLOR_BLUE   44
 
#define ANSI_BG_COLOR_PURPLE   45
 
#define ANSI_BG_COLOR_CYAN   46
 
#define ANSI_BG_COLOR_WHITE   47
 
#define ANSI_SPECIAL_FRAMED   51
 
#define ANSI_SPECIAL_ENCIRCLED   52
 
#define ANSI_CTRL_NORMAL   0
 
#define ANSI_CTRL_BOLD   1
 
#define ANSI_CTRL_FAINT   2
 
#define ANSI_CTRL_ITALIC   3
 
#define ANSI_CTRL_UNDERLINE   4
 
#define ANSI_CTRL_SLOW_BLINK   5
 
#define ANSI_CTRL_FAST_BLINK   6
 
#define ANSI_CTRL_IMAGE_NEGATIVE   7
 
#define ANSI_CTRL_CONCEAL   8
 
#define ANSI_CTRL_CROSSED_OUT   9
 
#define ANSI_ESC_START   "\033["
 
#define ANSI_ESC_END   "m"
 
#define ANSI_STR(s)   #s
 
#define ANSI_DEF_STR(s)   ANSI_STR(s)
 
#define ANSI_ESCAPE1(s)   ANSI_ESC_START ANSI_DEF_STR(s) ANSI_ESC_END
 
#define ANSI_1_CTRL(ctrl1)   "\033["##ctrl1 ANSI_ESC_END
 
#define ANSI_2_CTRL(ctrl1, ctrl2)   "\033["##ctrl1 ";"##ctrl2 ANSI_ESC_END
 
#define _TO_STR2(_val)   #_val
 
#define _TO_STR(_val)   _TO_STR2(_val)
 

Functions

std::string lldb_utility::ansi::FormatAnsiTerminalCodes (llvm::StringRef format, bool do_color=true)
 

Macro Definition Documentation

◆ _TO_STR

#define _TO_STR (   _val)    _TO_STR2(_val)

◆ _TO_STR2

#define _TO_STR2 (   _val)    #_val

◆ ANSI_1_CTRL

#define ANSI_1_CTRL (   ctrl1)    "\033["##ctrl1 ANSI_ESC_END

Definition at line 49 of file AnsiTerminal.h.

◆ ANSI_2_CTRL

#define ANSI_2_CTRL (   ctrl1,
  ctrl2 
)    "\033["##ctrl1 ";"##ctrl2 ANSI_ESC_END

Definition at line 50 of file AnsiTerminal.h.

◆ ANSI_BG_COLOR_BLACK

#define ANSI_BG_COLOR_BLACK   40

Definition at line 18 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_BLUE

#define ANSI_BG_COLOR_BLUE   44

Definition at line 22 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_CYAN

#define ANSI_BG_COLOR_CYAN   46

Definition at line 24 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_GREEN

#define ANSI_BG_COLOR_GREEN   42

Definition at line 20 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_PURPLE

#define ANSI_BG_COLOR_PURPLE   45

Definition at line 23 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_RED

#define ANSI_BG_COLOR_RED   41

Definition at line 19 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_WHITE

#define ANSI_BG_COLOR_WHITE   47

Definition at line 25 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_BG_COLOR_YELLOW

#define ANSI_BG_COLOR_YELLOW   43

Definition at line 21 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_BOLD

#define ANSI_CTRL_BOLD   1

◆ ANSI_CTRL_CONCEAL

#define ANSI_CTRL_CONCEAL   8

Definition at line 38 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_CROSSED_OUT

#define ANSI_CTRL_CROSSED_OUT   9

Definition at line 39 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_FAINT

#define ANSI_CTRL_FAINT   2

Definition at line 32 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_FAST_BLINK

#define ANSI_CTRL_FAST_BLINK   6

Definition at line 36 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_IMAGE_NEGATIVE

#define ANSI_CTRL_IMAGE_NEGATIVE   7

Definition at line 37 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_ITALIC

#define ANSI_CTRL_ITALIC   3

Definition at line 33 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_NORMAL

#define ANSI_CTRL_NORMAL   0

◆ ANSI_CTRL_SLOW_BLINK

#define ANSI_CTRL_SLOW_BLINK   5

Definition at line 35 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_CTRL_UNDERLINE

#define ANSI_CTRL_UNDERLINE   4

Definition at line 34 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_DEF_STR

#define ANSI_DEF_STR (   s)    ANSI_STR(s)

Definition at line 45 of file AnsiTerminal.h.

◆ ANSI_ESC_END

#define ANSI_ESC_END   "m"

Definition at line 42 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_ESC_START

#define ANSI_ESC_START   "\033["

Definition at line 41 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_ESCAPE1

#define ANSI_ESCAPE1 (   s)    ANSI_ESC_START ANSI_DEF_STR(s) ANSI_ESC_END

Definition at line 47 of file AnsiTerminal.h.

Referenced by lldb_private::REPL::IOHandlerInputComplete().

◆ ANSI_FG_COLOR_BLACK

#define ANSI_FG_COLOR_BLACK   30

Definition at line 9 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_BLUE

#define ANSI_FG_COLOR_BLUE   34

Definition at line 13 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_CYAN

#define ANSI_FG_COLOR_CYAN   36

Definition at line 15 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_GREEN

#define ANSI_FG_COLOR_GREEN   32

Definition at line 11 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_PURPLE

#define ANSI_FG_COLOR_PURPLE   35

Definition at line 14 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_RED

#define ANSI_FG_COLOR_RED   31

◆ ANSI_FG_COLOR_WHITE

#define ANSI_FG_COLOR_WHITE   37

Definition at line 16 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_FG_COLOR_YELLOW

#define ANSI_FG_COLOR_YELLOW   33

Definition at line 12 of file AnsiTerminal.h.

Referenced by lldb_utility::ansi::FormatAnsiTerminalCodes().

◆ ANSI_SPECIAL_ENCIRCLED

#define ANSI_SPECIAL_ENCIRCLED   52

Definition at line 28 of file AnsiTerminal.h.

◆ ANSI_SPECIAL_FRAMED

#define ANSI_SPECIAL_FRAMED   51

Definition at line 27 of file AnsiTerminal.h.

◆ ANSI_STR

#define ANSI_STR (   s)    #s

Definition at line 44 of file AnsiTerminal.h.