Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
color.h File Reference

Go to the source code of this file.

Macros

#define COLOR_MAXLEN   24
 
#define PERF_COLOR_NORMAL   ""
 
#define PERF_COLOR_RESET   "\033[m"
 
#define PERF_COLOR_BOLD   "\033[1m"
 
#define PERF_COLOR_RED   "\033[31m"
 
#define PERF_COLOR_GREEN   "\033[32m"
 
#define PERF_COLOR_YELLOW   "\033[33m"
 
#define PERF_COLOR_BLUE   "\033[34m"
 
#define PERF_COLOR_MAGENTA   "\033[35m"
 
#define PERF_COLOR_CYAN   "\033[36m"
 
#define PERF_COLOR_BG_RED   "\033[41m"
 
#define MIN_GREEN   0.5
 
#define MIN_RED   5.0
 

Functions

int perf_color_default_config (const char *var, const char *value, void *cb)
 
int perf_config_colorbool (const char *var, const char *value, int stdout_is_tty)
 
void color_parse (const char *value, const char *var, char *dst)
 
void color_parse_mem (const char *value, int len, const char *var, char *dst)
 
int color_vsnprintf (char *bf, size_t size, const char *color, const char *fmt, va_list args)
 
int color_vfprintf (FILE *fp, const char *color, const char *fmt, va_list args)
 
int color_fprintf (FILE *fp, const char *color, const char *fmt,...)
 
int color_snprintf (char *bf, size_t size, const char *color, const char *fmt,...)
 
int color_fprintf_ln (FILE *fp, const char *color, const char *fmt,...)
 
int color_fwrite_lines (FILE *fp, const char *color, size_t count, const char *buf)
 
int percent_color_snprintf (char *bf, size_t size, const char *fmt, double percent)
 
int percent_color_fprintf (FILE *fp, const char *fmt, double percent)
 
const charget_percent_color (double percent)
 

Variables

int perf_use_color_default
 

Macro Definition Documentation

#define COLOR_MAXLEN   24

Definition at line 5 of file color.h.

#define MIN_GREEN   0.5

Definition at line 18 of file color.h.

#define MIN_RED   5.0

Definition at line 19 of file color.h.

#define PERF_COLOR_BG_RED   "\033[41m"

Definition at line 16 of file color.h.

#define PERF_COLOR_BLUE   "\033[34m"

Definition at line 13 of file color.h.

#define PERF_COLOR_BOLD   "\033[1m"

Definition at line 9 of file color.h.

#define PERF_COLOR_CYAN   "\033[36m"

Definition at line 15 of file color.h.

#define PERF_COLOR_GREEN   "\033[32m"

Definition at line 11 of file color.h.

#define PERF_COLOR_MAGENTA   "\033[35m"

Definition at line 14 of file color.h.

#define PERF_COLOR_NORMAL   ""

Definition at line 7 of file color.h.

#define PERF_COLOR_RED   "\033[31m"

Definition at line 10 of file color.h.

#define PERF_COLOR_RESET   "\033[m"

Definition at line 8 of file color.h.

#define PERF_COLOR_YELLOW   "\033[33m"

Definition at line 12 of file color.h.

Function Documentation

int color_fprintf ( FILE *  fp,
const char color,
const char fmt,
  ... 
)

Definition at line 243 of file color.c.

int color_fprintf_ln ( FILE *  fp,
const char color,
const char fmt,
  ... 
)

Definition at line 254 of file color.c.

int color_fwrite_lines ( FILE *  fp,
const char color,
size_t  count,
const char buf 
)

Definition at line 269 of file color.c.

void color_parse ( const char value,
const char var,
char dst 
)

Definition at line 43 of file color.c.

void color_parse_mem ( const char value,
int  len,
const char var,
char dst 
)

Definition at line 48 of file color.c.

int color_snprintf ( char bf,
size_t  size,
const char color,
const char fmt,
  ... 
)

Definition at line 231 of file color.c.

int color_vfprintf ( FILE *  fp,
const char color,
const char fmt,
va_list  args 
)

Definition at line 226 of file color.c.

int color_vsnprintf ( char bf,
size_t  size,
const char color,
const char fmt,
va_list  args 
)

Definition at line 220 of file color.c.

const char* get_percent_color ( double  percent)

Definition at line 292 of file color.c.

int percent_color_fprintf ( FILE *  fp,
const char fmt,
double  percent 
)

Definition at line 310 of file color.c.

int percent_color_snprintf ( char bf,
size_t  size,
const char fmt,
double  percent 
)

Definition at line 321 of file color.c.

int perf_color_default_config ( const char var,
const char value,
void cb 
)

Definition at line 160 of file color.c.

int perf_config_colorbool ( const char var,
const char value,
int  stdout_is_tty 
)

Definition at line 133 of file color.c.

Variable Documentation

int perf_use_color_default

Definition at line 5 of file color.c.