GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
ui-style.c File Reference
#include "defs.h"
#include "ui-style.h"
#include "gdbsupport/gdb_regex.h"

Go to the source code of this file.

Macros

#define DATA_SUBEXP   1
 
#define FINAL_SUBEXP   2
 
#define NUM_SUBEXPRESSIONS   3
 

Functions

static bool read_semi_number (const char *string, regoff_t *idx, long *num)
 
static bool extended_color (const char *str, regoff_t *idx, ui_file_style::color *color)
 
bool skip_ansi_escape (const char *buf, int *n_read)
 
void _initialize_ui_style ()
 

Variables

static const char ansi_regex_text []
 
static regex_t ansi_regex
 
static const uint8_t bright_colors [][3]
 

Macro Definition Documentation

◆ DATA_SUBEXP

#define DATA_SUBEXP   1

◆ FINAL_SUBEXP

#define FINAL_SUBEXP   2

◆ NUM_SUBEXPRESSIONS

#define NUM_SUBEXPRESSIONS   3

Definition at line 44 of file ui-style.c.

Function Documentation

◆ _initialize_ui_style()

void _initialize_ui_style ( )

Definition at line 409 of file ui-style.c.

Referenced by initialize_all_files().

◆ extended_color()

static bool extended_color ( const char * str,
regoff_t * idx,
ui_file_style::color * color )
static

Definition at line 189 of file ui-style.c.

References read_semi_number(), and value.

Referenced by ui_file_style::parse().

◆ read_semi_number()

static bool read_semi_number ( const char * string,
regoff_t * idx,
long * num )
static

Definition at line 172 of file ui-style.c.

Referenced by extended_color().

◆ skip_ansi_escape()

bool skip_ansi_escape ( const char * buf,
int * n_read )

Variable Documentation

◆ ansi_regex

regex_t ansi_regex
static

Definition at line 48 of file ui-style.c.

Referenced by ui_file_style::parse(), and skip_ansi_escape().

◆ ansi_regex_text

const char ansi_regex_text[]
static
Initial value:
=
"^\033\\["
#define DATA_SUBEXP
"("
"[\x30-\x3f]*"
"[\x20-\x2f]*"
")"
#define FINAL_SUBEXP
"([\x40-\x7e])"

Definition at line 26 of file ui-style.c.

◆ bright_colors

const uint8_t bright_colors[][3]
static
Initial value:
= {
{ 127, 127, 127 },
{ 255, 0, 0 },
{ 0, 255, 0 },
{ 255, 255, 0 },
{ 92, 92, 255 },
{ 255, 0, 255 },
{ 0, 255, 255 },
{ 255, 255, 255 }
}

Definition at line 54 of file ui-style.c.

Referenced by ui_file_style::color::get_rgb().