Rizin
unix-like reverse engineering framework and cli tools
pal.c File Reference
#include <rz_cons.h>

Go to the source code of this file.

Classes

struct  RAttrStr
 

Macros

#define RZCOLOR_AT(i)   (RzColor *)(((ut8 *)&(rz_cons_singleton()->context->cpal)) + keys[i].coff)
 
#define COLOR_AT(i)   (char **)(((ut8 *)&(rz_cons_singleton()->context->pal)) + keys[i].off)
 

Functions

static ut8 rgbnum (const char ch1, const char ch2)
 
static void __cons_pal_update_event (RzConsContext *ctx)
 
RZ_API void rz_cons_pal_init (RzConsContext *ctx)
 
RZ_API void rz_cons_pal_free (RzConsContext *ctx)
 
RZ_API void rz_cons_pal_copy (RzConsContext *dst, RzConsContext *src)
 
RZ_API void rz_cons_pal_random (void)
 
RZ_API char * rz_cons_pal_parse (const char *str, RzColor *outcol)
 
static void rz_cons_pal_show_gs (void)
 
static void rz_cons_pal_show_256 (void)
 
static void rz_cons_pal_show_rgb (void)
 
RZ_API void rz_cons_pal_show (void)
 
RZ_API void rz_cons_pal_list (int rad, const char *arg)
 
RZ_API int rz_cons_pal_set (const char *key, const char *val)
 
RZ_API RzColor rz_cons_pal_get (const char *key)
 
RZ_API RzColor rz_cons_pal_get_i (int index)
 
RZ_API const char * rz_cons_pal_get_name (int index)
 
RZ_API int rz_cons_pal_len (void)
 
RZ_API void rz_cons_pal_update_event (void)
 
RZ_API void rz_cons_rainbow_new (RzConsContext *ctx, int sz)
 
RZ_API void rz_cons_rainbow_free (RzConsContext *ctx)
 
RZ_API char * rz_cons_rainbow_get (int idx, int last, bool bg)
 

Variables

struct {
   const char *   name
 
   int   off
 
   int   coff
 
keys []
 
static const int keys_len = sizeof(keys) / sizeof(keys[0]) - 1
 
struct {
   const char *   name
 
   RzColor   rcolor
 
   const char *   code
 
   const char *   bgcode
 
colors []
 

Macro Definition Documentation

◆ COLOR_AT

#define COLOR_AT (   i)    (char **)(((ut8 *)&(rz_cons_singleton()->context->pal)) + keys[i].off)

Definition at line 9 of file pal.c.

◆ RZCOLOR_AT

#define RZCOLOR_AT (   i)    (RzColor *)(((ut8 *)&(rz_cons_singleton()->context->cpal)) + keys[i].coff)

Definition at line 8 of file pal.c.

Function Documentation

◆ __cons_pal_update_event()

static void __cons_pal_update_event ( RzConsContext ctx)
static

Definition at line 129 of file pal.c.

129  {
130  RzPVector sorter;
131  rz_pvector_init(&sorter, NULL);
132  /* Compute cons->pal values */
133  for (int i = 0; keys[i].name; i++) {
134  RzColor *rcolor = (RzColor *)(((ut8 *)&(ctx->cpal)) + keys[i].coff);
135  char **color = (char **)(((ut8 *)&(ctx->pal)) + keys[i].off);
136  // Color is dynamically allocated, needs to be freed
137  RZ_FREE(*color);
138  *color = rz_cons_rgb_str_mode(ctx->color_mode, NULL, 0, rcolor);
139  char *rgb = rz_str_newf("rgb:%02x%02x%02x", rcolor->r, rcolor->g, rcolor->b);
140  rz_pvector_push(&sorter, rgb);
141  }
142  rz_pvector_sort(&sorter, (RzPVectorComparator)strcmp);
145  int n = 0;
146  void **iter;
147  rz_pvector_foreach (&sorter, iter) {
148  ctx->pal.rainbow[n++] = (char *)(*iter);
149  }
150  ctx->pal.rainbow_sz = n;
151  rz_pvector_fini(&sorter);
152 }
lzma_index ** i
Definition: index.h:629
#define NULL
Definition: cris-opc.c:27
uint8_t ut8
Definition: lh5801.h:11
int n
Definition: mipsasm.c:19
static struct @218 keys[]
RZ_API void rz_cons_rainbow_free(RzConsContext *ctx)
Definition: pal.c:662
RzColor rcolor
Definition: pal.c:97
RZ_API void rz_cons_rainbow_new(RzConsContext *ctx, int sz)
Definition: pal.c:656
RZ_API char * rz_cons_rgb_str_mode(RzConsColorMode mode, char *outstr, size_t sz, const RzColor *rcolor)
Definition: rgb.c:292
static int rgb(int r, int g, int b)
Definition: rgb.c:87
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
#define RZ_FREE(x)
Definition: rz_types.h:369
RZ_API void rz_pvector_sort(RzPVector *vec, RzPVectorComparator cmp)
Definition: vector.c:408
RZ_API void rz_pvector_init(RzPVector *vec, RzPVectorFree free)
Definition: vector.c:298
RZ_API void rz_pvector_fini(RzPVector *vec)
Definition: vector.c:331
static size_t rz_pvector_len(const RzPVector *vec)
Definition: rz_vector.h:231
static void ** rz_pvector_push(RzPVector *vec, void *x)
Definition: rz_vector.h:300
int(* RzPVectorComparator)(const void *a, const void *b)
Definition: rz_vector.h:40
#define rz_pvector_foreach(vec, it)
Definition: rz_vector.h:334
ut8 g
Definition: rz_cons.h:183
ut8 b
Definition: rz_cons.h:184
ut8 r
Definition: rz_cons.h:182
static int color
Definition: visual.c:20

References rcolor_t::b, color, rcolor_t::g, i, keys, n, NULL, rcolor_t::r, rcolor, rgb(), rz_cons_rainbow_free(), rz_cons_rainbow_new(), rz_cons_rgb_str_mode(), RZ_FREE, rz_pvector_fini(), rz_pvector_foreach, rz_pvector_init(), rz_pvector_len(), rz_pvector_push(), rz_pvector_sort(), and rz_str_newf().

Referenced by rz_cons_pal_copy(), rz_cons_pal_init(), and rz_cons_pal_update_event().

◆ rgbnum()

static ut8 rgbnum ( const char  ch1,
const char  ch2 
)
inlinestatic

Definition at line 122 of file pal.c.

122  {
123  ut8 r = 0, r2 = 0;
124  rz_hex_to_byte(&r, ch1);
125  rz_hex_to_byte(&r2, ch2);
126  return r << 4 | r2;
127 }
r2
Definition: arm-aliases.s.cs:2
#define r
Definition: crypto_rc6.c:12
RZ_API bool rz_hex_to_byte(ut8 *val, ut8 c)
Definition: hex.c:10

References r, r2, and rz_hex_to_byte().

Referenced by rz_cons_pal_parse().

◆ rz_cons_pal_copy()

RZ_API void rz_cons_pal_copy ( RzConsContext dst,
RzConsContext src 
)

Definition at line 258 of file pal.c.

258  {
259  memcpy(&dst->cpal, &src->cpal, sizeof(src->cpal));
260  memset(&dst->pal, 0, sizeof(dst->pal));
261 
262  dst->pal.rainbow = NULL;
263  dst->pal.rainbow_sz = 0;
264 
265  dst->pal.reset = Color_RESET; // reset is not user accessible, const char* is ok
266 
268 }
lzma_index * src
Definition: index.h:567
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
char * dst
Definition: lz4.h:724
static void __cons_pal_update_event(RzConsContext *ctx)
Definition: pal.c:129
#define Color_RESET
Definition: rz_cons.h:617

References __cons_pal_update_event(), Color_RESET, dst, memcpy(), memset(), NULL, and src.

Referenced by cons_context_init().

◆ rz_cons_pal_free()

RZ_API void rz_cons_pal_free ( RzConsContext ctx)

Definition at line 247 of file pal.c.

247  {
248  int i;
249  for (i = 0; keys[i].name; i++) {
250  char **color = (char **)(((ut8 *)&(ctx->pal)) + keys[i].off);
251  if (color && *color) {
252  RZ_FREE(*color);
253  }
254  }
256 }

References color, i, keys, rz_cons_rainbow_free(), and RZ_FREE.

Referenced by cons_context_deinit(), and rz_cons_pal_init().

◆ rz_cons_pal_get()

RZ_API RzColor rz_cons_pal_get ( const char *  key)

Definition at line 626 of file pal.c.

626  {
627  int i;
628  RzColor *rcolor;
629  for (i = 0; keys[i].name; i++) {
630  if (!strcmp(key, keys[i].name)) {
631  rcolor = RZCOLOR_AT(i);
632  return *rcolor;
633  }
634  }
635  return (RzColor)RzColor_NULL;
636 }
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
Definition: sflib.h:118
#define RZCOLOR_AT(i)
Definition: pal.c:8
#define RzColor_NULL
Definition: rz_cons.h:664
Definition: z80asm.h:102

References i, key, keys, rcolor, RZCOLOR_AT, and RzColor_NULL.

Referenced by palColorFor(), and rz_cmd_eval_color_list_handler().

◆ rz_cons_pal_get_i()

RZ_API RzColor rz_cons_pal_get_i ( int  index)

Definition at line 639 of file pal.c.

639  {
640  return *(RZCOLOR_AT(index));
641 }

References RZCOLOR_AT.

Referenced by rz_core_visual_colors().

◆ rz_cons_pal_get_name()

RZ_API const char* rz_cons_pal_get_name ( int  index)

Definition at line 644 of file pal.c.

644  {
645  return (index >= 0 && index < keys_len) ? keys[index].name : NULL;
646 }
static const int keys_len
Definition: pal.c:93

References keys, keys_len, and NULL.

Referenced by rz_core_visual_colors().

◆ rz_cons_pal_init()

RZ_API void rz_cons_pal_init ( RzConsContext ctx)

Definition at line 154 of file pal.c.

154  {
155  memset(&ctx->cpal, 0, sizeof(ctx->cpal));
156 
157  ctx->cpal.b0x00 = (RzColor)RzColor_GREEN;
158  ctx->cpal.b0x7f = (RzColor)RzColor_CYAN;
159  ctx->cpal.b0xff = (RzColor)RzColor_RED;
160  ctx->cpal.args = (RzColor)RzColor_YELLOW;
161  ctx->cpal.bin = (RzColor)RzColor_CYAN;
162  ctx->cpal.btext = (RzColor)RzColor_YELLOW;
163  ctx->cpal.call = (RzColor)RzColor_BGREEN;
164  ctx->cpal.call.attr = RZ_CONS_ATTR_BOLD;
165  ctx->cpal.ucall = (RzColor)RzColor_GREEN;
166  ctx->cpal.ujmp = (RzColor)RzColor_GREEN;
167  ctx->cpal.cjmp = (RzColor)RzColor_GREEN;
168  ctx->cpal.cmp = (RzColor)RzColor_CYAN;
169  ctx->cpal.comment = (RzColor)RzColor_RED;
170  ctx->cpal.usercomment = (RzColor)RzColor_WHITE;
171  ctx->cpal.creg = (RzColor)RzColor_CYAN;
172  ctx->cpal.flag = (RzColor)RzColor_CYAN;
173  ctx->cpal.fline = (RzColor)RzColor_CYAN;
174  ctx->cpal.floc = (RzColor)RzColor_CYAN;
175  ctx->cpal.flow = (RzColor)RzColor_CYAN;
176  ctx->cpal.flow2 = (RzColor)RzColor_BLUE;
177  ctx->cpal.fname = (RzColor)RzColor_RED;
178  ctx->cpal.help = (RzColor)RzColor_GREEN;
179  ctx->cpal.input = (RzColor)RzColor_WHITE;
180  ctx->cpal.invalid = (RzColor)RzColor_BRED;
181  ctx->cpal.invalid.attr = RZ_CONS_ATTR_BOLD;
182  ctx->cpal.jmp = (RzColor)RzColor_GREEN;
183  ctx->cpal.label = (RzColor)RzColor_CYAN;
184  ctx->cpal.math = (RzColor)RzColor_YELLOW;
185  ctx->cpal.mov = (RzColor)RzColor_WHITE;
186  ctx->cpal.nop = (RzColor)RzColor_BLUE;
187  ctx->cpal.num = (RzColor)RzColor_YELLOW;
188  ctx->cpal.offset = (RzColor)RzColor_GREEN;
189  ctx->cpal.other = (RzColor)RzColor_WHITE;
190  ctx->cpal.pop = (RzColor)RzColor_BMAGENTA;
191  ctx->cpal.pop.attr = RZ_CONS_ATTR_BOLD;
192  ctx->cpal.prompt = (RzColor)RzColor_YELLOW;
193  ctx->cpal.push = (RzColor)RzColor_MAGENTA;
194  ctx->cpal.crypto = (RzColor)RzColor_BGBLUE;
195  ctx->cpal.reg = (RzColor)RzColor_CYAN;
196  ctx->cpal.ret = (RzColor)RzColor_RED;
197  ctx->cpal.swi = (RzColor)RzColor_MAGENTA;
198  ctx->cpal.trap = (RzColor)RzColor_BRED;
199  ctx->cpal.trap.attr = RZ_CONS_ATTR_BOLD;
200 
201  ctx->cpal.ai_read = (RzColor)RzColor_GREEN;
202  ctx->cpal.ai_write = (RzColor)RzColor_BLUE;
203  ctx->cpal.ai_exec = (RzColor)RzColor_RED;
204  ctx->cpal.ai_seq = (RzColor)RzColor_MAGENTA;
205  ctx->cpal.ai_ascii = (RzColor)RzColor_YELLOW;
206 
207  ctx->cpal.gui_cflow = (RzColor)RzColor_YELLOW;
208  ctx->cpal.gui_dataoffset = (RzColor)RzColor_YELLOW;
209  ctx->cpal.gui_background = (RzColor)RzColor_BLACK;
210  ctx->cpal.gui_alt_background = (RzColor)RzColor_WHITE;
211  ctx->cpal.gui_border = (RzColor)RzColor_BLACK;
212  ctx->cpal.wordhl = (RzColor)RzColor_BGRED;
213  ctx->cpal.meta = (RzColor)RzColor_GRAY;
214  // No good choice for fallback ansi16 color
215 #if __WINDOWS__
216  ctx->cpal.linehl = (RzColor)RZCOLOR(ALPHA_BG, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 4);
217 #else
218  ctx->cpal.linehl = (RzColor)RZCOLOR(ALPHA_BG, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 4);
219 #endif
220 
221  ctx->cpal.func_var = (RzColor)RzColor_WHITE;
222  ctx->cpal.func_var_type = (RzColor)RzColor_BLUE;
223  ctx->cpal.func_var_addr = (RzColor)RzColor_CYAN;
224 
225  ctx->cpal.widget_bg = (RzColor)RZCOLOR(ALPHA_BG, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0);
226  ctx->cpal.widget_sel = (RzColor)RzColor_BGRED;
227 
228  ctx->cpal.graph_box = (RzColor)RzColor_NULL;
229  ctx->cpal.graph_box2 = (RzColor)RzColor_BLUE;
230  ctx->cpal.graph_box3 = (RzColor)RzColor_MAGENTA;
231  ctx->cpal.graph_box4 = (RzColor)RzColor_GRAY;
232  ctx->cpal.graph_true = (RzColor)RzColor_GREEN;
233  ctx->cpal.graph_false = (RzColor)RzColor_RED;
234  ctx->cpal.graph_ujump = (RzColor)RzColor_BLUE; // single jump
235  ctx->cpal.graph_traced = (RzColor)RzColor_YELLOW;
236  ctx->cpal.graph_current = (RzColor)RzColor_BLUE;
237  ctx->cpal.diff_unknown = (RzColor)RzColor_MAGENTA;
238  ctx->cpal.diff_new = (RzColor)RzColor_RED;
239  ctx->cpal.diff_match = (RzColor)RzColor_GRAY;
240  ctx->cpal.diff_unmatch = (RzColor)RzColor_YELLOW;
241 
243  ctx->pal.reset = Color_RESET; // reset is not user accessible, const char* is ok
245 }
RZ_API void rz_cons_pal_free(RzConsContext *ctx)
Definition: pal.c:247
#define RzColor_BLACK
Definition: rz_cons.h:702
@ ALPHA_BG
Definition: rz_cons.h:169
#define RzColor_WHITE
Definition: rz_cons.h:706
#define RzColor_BGRED
Definition: rz_cons.h:705
#define RzColor_BMAGENTA
Definition: rz_cons.h:726
#define RZCOLOR(a, r, g, b, bgr, bgg, bgb, id16)
Definition: rz_cons.h:661
#define RzColor_YELLOW
Definition: rz_cons.h:712
#define RzColor_RED
Definition: rz_cons.h:704
#define RzColor_GREEN
Definition: rz_cons.h:708
#define RzColor_BRED
Definition: rz_cons.h:720
struct rcolor_t RzColor
#define RzColor_MAGENTA
Definition: rz_cons.h:710
#define RzColor_GRAY
Definition: rz_cons.h:735
@ RZ_CONS_ATTR_BOLD
Definition: rz_cons.h:171
#define RzColor_BGREEN
Definition: rz_cons.h:724
#define RzColor_CYAN
Definition: rz_cons.h:714
#define RzColor_BLUE
Definition: rz_cons.h:716
#define RzColor_BGBLUE
Definition: rz_cons.h:717

References __cons_pal_update_event(), ALPHA_BG, Color_RESET, memset(), RZ_CONS_ATTR_BOLD, rz_cons_pal_free(), RZCOLOR, RzColor_BGBLUE, RzColor_BGRED, RzColor_BGREEN, RzColor_BLACK, RzColor_BLUE, RzColor_BMAGENTA, RzColor_BRED, RzColor_CYAN, RzColor_GRAY, RzColor_GREEN, RzColor_MAGENTA, RzColor_NULL, RzColor_RED, RzColor_WHITE, and RzColor_YELLOW.

Referenced by cons_context_init(), rz_cmd_eval_color_set_default_palette_handler(), and rz_core_theme_load().

◆ rz_cons_pal_len()

RZ_API int rz_cons_pal_len ( void  )

Definition at line 648 of file pal.c.

648  {
649  return keys_len;
650 }

References keys_len.

Referenced by rz_core_visual_colors().

◆ rz_cons_pal_list()

RZ_API void rz_cons_pal_list ( int  rad,
const char *  arg 
)

Definition at line 528 of file pal.c.

528  {
529  char *name, **color;
530  const char *hasnext;
531  int i;
532  if (rad == 'j') {
533  rz_cons_print("{");
534  }
535  for (i = 0; keys[i].name; i++) {
537  color = COLOR_AT(i);
538  switch (rad) {
539  case 'j':
540  hasnext = (keys[i + 1].name) ? "," : "";
541  rz_cons_printf("\"%s\":[%d,%d,%d]%s",
542  keys[i].name, rcolor->r, rcolor->g, rcolor->b, hasnext);
543  break;
544  case 'c': {
545  const char *prefix = rz_str_trim_head_ro(arg);
546  if (!prefix) {
547  prefix = "";
548  }
549  hasnext = (keys[i + 1].name) ? "\n" : "";
550  // TODO Need to replace the '.' char because this is not valid CSS
551  char *name = strdup(keys[i].name);
552  int j, len = strlen(name);
553  for (j = 0; j < len; j++) {
554  if (name[j] == '.') {
555  name[j] = '_';
556  }
557  }
558  rz_cons_printf(".%s%s { color: rgb(%d, %d, %d); }%s",
559  prefix, name, rcolor->r, rcolor->g, rcolor->b, hasnext);
560  free(name);
561  } break;
562  case 'h':
563  name = strdup(keys[i].name);
564  rz_str_replace_char(name, '.', '_');
565  rz_cons_printf(".%s { color:#%02x%02x%02x }\n",
566  name, rcolor->r, rcolor->g, rcolor->b);
567  free(name);
568  break;
569  case '*':
570  case 'r':
571  case 1:
572  rz_cons_printf("ec %s rgb:%02x%02x%02x",
573  keys[i].name, rcolor->r, rcolor->g, rcolor->b);
574  if (rcolor->a == ALPHA_FGBG) {
575  rz_cons_printf(" rgb:%02x%02x%02x",
576  rcolor->r2, rcolor->g2, rcolor->b2);
577  }
578  if (rcolor->attr) {
579  const RAttrStr attrs[] = {
580  { RZ_CONS_ATTR_BOLD, "bold" },
581  { RZ_CONS_ATTR_DIM, "dim" },
582  { RZ_CONS_ATTR_ITALIC, "italic" },
583  { RZ_CONS_ATTR_UNDERLINE, "underline" },
584  { RZ_CONS_ATTR_BLINK, "blink" }
585  };
586  int j;
587  if (rcolor->a != ALPHA_FGBG) {
588  rz_cons_strcat(" .");
589  }
590  for (j = 0; j < RZ_ARRAY_SIZE(attrs); j++) {
591  if (rcolor->attr & attrs[j].val) {
592  rz_cons_printf(" %s", attrs[j].str);
593  }
594  }
595  }
596  rz_cons_newline();
597  break;
598  default:
599  rz_cons_printf(" %s##" Color_RESET " %s\n", *color,
600  keys[i].name);
601  }
602  }
603  if (rad == 'j') {
604  rz_cons_print("}\n");
605  }
606 }
size_t len
Definition: 6502dis.c:15
RZ_API void rz_cons_strcat(const char *str)
Definition: cons.c:1263
RZ_API void rz_cons_newline(void)
Definition: cons.c:1274
RZ_API int rz_cons_printf(const char *format,...)
Definition: cons.c:1202
unsigned short prefix[65536]
Definition: gun.c:163
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
#define COLOR_AT(i)
Definition: pal.c:9
const char * name
Definition: pal.c:12
@ ALPHA_FGBG
Definition: rz_cons.h:170
@ RZ_CONS_ATTR_BLINK
Definition: rz_cons.h:175
@ RZ_CONS_ATTR_ITALIC
Definition: rz_cons.h:173
@ RZ_CONS_ATTR_DIM
Definition: rz_cons.h:172
@ RZ_CONS_ATTR_UNDERLINE
Definition: rz_cons.h:174
RZ_API const char * rz_str_trim_head_ro(const char *str)
Definition: str_trim.c:86
RZ_API int rz_str_replace_char(char *s, int a, int b)
Definition: str.c:169
#define RZ_ARRAY_SIZE(x)
Definition: rz_types.h:300
Definition: pal.c:523
ut8 r2
Definition: rz_cons.h:185
ut8 g2
Definition: rz_cons.h:186
ut8 b2
Definition: rz_cons.h:187
ut8 a
Definition: rz_cons.h:181
ut8 attr
Definition: rz_cons.h:180

References rcolor_t::a, ALPHA_FGBG, rcolor_t::attr, rcolor_t::b, rcolor_t::b2, color, COLOR_AT, Color_RESET, free(), rcolor_t::g, rcolor_t::g2, i, keys, len, name, prefix, rcolor_t::r, rcolor_t::r2, rcolor, RZ_ARRAY_SIZE, RZ_CONS_ATTR_BLINK, RZ_CONS_ATTR_BOLD, RZ_CONS_ATTR_DIM, RZ_CONS_ATTR_ITALIC, RZ_CONS_ATTR_UNDERLINE, rz_cons_newline(), rz_cons_printf(), rz_cons_strcat(), rz_str_replace_char(), rz_str_trim_head_ro(), RZCOLOR_AT, cmd_descs_generate::str, strdup(), and RAttrStr::val.

Referenced by rz_cmd_eval_color_display_palette_css_handler(), and rz_cmd_eval_color_list_handler().

◆ rz_cons_pal_parse()

RZ_API char* rz_cons_pal_parse ( const char *  str,
RzColor outcol 
)

Definition at line 281 of file pal.c.

281  {
282  int i;
284  rcolor.id16 = -1;
285  char *fgcolor;
286  char *bgcolor;
287  char *attr = NULL;
288  char out[128];
289  if (!str) {
290  return NULL;
291  }
292  fgcolor = strdup(str);
293  if (!fgcolor) {
294  return NULL;
295  }
296  bgcolor = strchr(fgcolor + 1, ' ');
297  out[0] = 0;
298  if (bgcolor) {
299  *bgcolor++ = '\0';
300  attr = strchr(bgcolor, ' ');
301  if (attr) {
302  *attr++ = '\0';
303  }
304  }
305 
306  // Handle first color (fgcolor)
307  if (!strcmp(fgcolor, "random")) {
309  if (!outcol) {
310  rz_cons_rgb_str(out, sizeof(out), &rcolor);
311  }
312  } else if (!strncmp(fgcolor, "#", 1)) { // "#00ff00" HTML format
313  if (strlen(fgcolor) == 7) {
314  i = sscanf(fgcolor + 1, "%02hhx%02hhx%02hhx", &rcolor.r, &rcolor.g, &rcolor.b);
315  if (i != 3) {
316  eprintf("Error while parsing HTML color: %s\n", fgcolor);
317  }
318  if (!outcol) {
319  rz_cons_rgb_str(out, sizeof(out), &rcolor);
320  }
321  } else {
322  eprintf("Invalid html color code\n");
323  }
324  } else if (!strncmp(fgcolor, "rgb:", 4)) { // "rgb:123" rgb format
325  if (strlen(fgcolor) == 7) {
326  rcolor.r = rgbnum(fgcolor[4], '0');
327  rcolor.g = rgbnum(fgcolor[5], '0');
328  rcolor.b = rgbnum(fgcolor[6], '0');
329  if (!outcol) {
330  rz_cons_rgb_str(out, sizeof(out), &rcolor);
331  }
332  } else if (strlen(fgcolor) == 10) {
333  rcolor.r = rgbnum(fgcolor[4], fgcolor[5]);
334  rcolor.g = rgbnum(fgcolor[6], fgcolor[7]);
335  rcolor.b = rgbnum(fgcolor[8], fgcolor[9]);
336  if (!outcol) {
337  rz_cons_rgb_str(out, sizeof(out), &rcolor);
338  }
339  }
340  }
341  // Handle second color (bgcolor)
342  if (bgcolor && !strncmp(bgcolor, "rgb:", 4)) { // "rgb:123" rgb format
343  if (strlen(bgcolor) == 7) {
344  rcolor.a |= ALPHA_BG;
345  rcolor.r2 = rgbnum(bgcolor[4], '0');
346  rcolor.g2 = rgbnum(bgcolor[5], '0');
347  rcolor.b2 = rgbnum(bgcolor[6], '0');
348  if (!outcol) {
349  size_t len = strlen(out);
350  rz_cons_rgb_str(out + len, sizeof(out) - len, &rcolor);
351  }
352  } else if (strlen(bgcolor) == 10) {
353  rcolor.a |= ALPHA_BG;
354  rcolor.r2 = rgbnum(bgcolor[4], bgcolor[5]);
355  rcolor.g2 = rgbnum(bgcolor[6], bgcolor[7]);
356  rcolor.b2 = rgbnum(bgcolor[8], bgcolor[9]);
357  if (!outcol) {
358  size_t len = strlen(out);
359  rz_cons_rgb_str(out + len, sizeof(out) - len, &rcolor);
360  }
361  }
362  }
363  // No suitable format, checking if colors are named
364  for (i = 0; colors[i].name; i++) {
365  if (!strcmp(fgcolor, colors[i].name)) {
366  rcolor.r = colors[i].rcolor.r;
367  rcolor.g = colors[i].rcolor.g;
368  rcolor.b = colors[i].rcolor.b;
369  rcolor.id16 = colors[i].rcolor.id16;
370  if (!outcol) {
371  strncat(out, colors[i].code,
372  sizeof(out) - strlen(out) - 1);
373  }
374  }
375  if (bgcolor && !strcmp(bgcolor, colors[i].name)) {
376  rcolor.a |= ALPHA_BG;
377  rcolor.r2 = colors[i].rcolor.r; // Initial color doesn't
378  rcolor.g2 = colors[i].rcolor.g; // have r2, g2, b2
379  rcolor.b2 = colors[i].rcolor.b;
380  rcolor.id16 = colors[i].rcolor.id16;
381  if (!outcol) {
382  strncat(out, colors[i].bgcode,
383  sizeof(out) - strlen(out) - 1);
384  }
385  }
386  }
387  if (attr) {
388  // Parse extra attributes.
389  const char *p = attr;
390  while (p) {
391  if (!strncmp(p, "bold", 4)) {
393  } else if (!strncmp(p, "dim", 3)) {
395  } else if (!strncmp(p, "italic", 6)) {
397  } else if (!strncmp(p, "underline", 9)) {
399  } else if (!strncmp(p, "blink", 5)) {
401  } else {
402  eprintf("Failed to parse terminal attributes: %s\n", p);
403  break;
404  }
405  p = strchr(p, ' ');
406  if (p) {
407  p++;
408  }
409  }
410  }
411  if (outcol) {
412  if (outcol->a == ALPHA_BG && !bgcolor) {
413  rcolor.a = ALPHA_BG;
414  }
415  *outcol = rcolor;
416  }
417  free(fgcolor);
418  return (*out && !outcol) ? strdup(out) : NULL;
419 }
const lzma_allocator const uint8_t size_t uint8_t * out
Definition: block.h:528
RZ_API RzColor rz_cons_color_random(ut8 alpha)
Definition: cons.c:183
void * p
Definition: libc.cpp:67
const char * bgcode
Definition: pal.c:99
static ut8 rgbnum(const char ch1, const char ch2)
Definition: pal.c:122
struct @219 colors[]
RZ_API char * rz_cons_rgb_str(char *outstr, size_t sz, const RzColor *rcolor)
Definition: rgb.c:318
#define eprintf(x, y...)
Definition: rlcc.c:7
@ ALPHA_FG
Definition: rz_cons.h:168
Definition: inftree9.h:24
st8 id16
Definition: rz_cons.h:188

References rcolor_t::a, ALPHA_BG, ALPHA_FG, rcolor_t::attr, rcolor_t::b, rcolor_t::b2, bgcode, colors, eprintf, free(), rcolor_t::g, rcolor_t::g2, i, rcolor_t::id16, len, NULL, out, p, rcolor_t::r, rcolor_t::r2, rcolor, rgbnum(), RZ_CONS_ATTR_BLINK, RZ_CONS_ATTR_BOLD, RZ_CONS_ATTR_DIM, RZ_CONS_ATTR_ITALIC, RZ_CONS_ATTR_UNDERLINE, rz_cons_color_random(), rz_cons_rgb_str(), RzColor_BLACK, cmd_descs_generate::str, and strdup().

Referenced by __preline_flag(), annotated_hexdump(), cmd_prc(), ds_print_offset(), ds_show_flags(), rz_cmd_eval_color_highlight_current_instruction_handler(), rz_cmd_eval_color_highlight_instruction_word_handler(), rz_cons_pal_set(), and rz_cons_rainbow_get().

◆ rz_cons_pal_random()

RZ_API void rz_cons_pal_random ( void  )

Definition at line 270 of file pal.c.

270  {
271  int i;
272  RzColor *rcolor;
273  for (i = 0; keys[i].name; i++) {
274  rcolor = RZCOLOR_AT(i);
276  }
278 }
RZ_API void rz_cons_pal_update_event(void)
Definition: pal.c:652

References ALPHA_FG, i, keys, rcolor, rz_cons_color_random(), rz_cons_pal_update_event(), and RZCOLOR_AT.

Referenced by __panels_process(), cb_scrrainbow(), rz_cmd_eval_color_set_random_palette_handler(), rz_core_visual_bit_editor(), rz_core_visual_cmd(), rz_core_visual_colors(), and rz_core_visual_graph().

◆ rz_cons_pal_set()

RZ_API int rz_cons_pal_set ( const char *  key,
const char *  val 
)

Definition at line 611 of file pal.c.

611  {
612  int i;
613  RzColor *rcolor;
614  for (i = 0; keys[i].name; i++) {
615  if (!strcmp(key, keys[i].name)) {
616  rcolor = RZCOLOR_AT(i);
618  return true;
619  }
620  }
621  eprintf("rz_cons_pal_set: Invalid color %s\n", key);
622  return false;
623 }
ut16 val
Definition: armass64_const.h:6
RZ_API char * rz_cons_pal_parse(const char *str, RzColor *outcol)
Definition: pal.c:281

References eprintf, i, key, keys, rcolor, rz_cons_pal_parse(), RZCOLOR_AT, and val.

Referenced by rz_cmd_eval_color_list_handler().

◆ rz_cons_pal_show()

RZ_API void rz_cons_pal_show ( void  )

Definition at line 501 of file pal.c.

501  {
502  int i;
503  for (i = 0; colors[i].name; i++) {
504  rz_cons_printf("%s%s__" Color_RESET " %s\n",
505  colors[i].code,
506  colors[i].bgcode,
507  colors[i].name);
508  }
509  switch (rz_cons_singleton()->context->color_mode) {
510  case COLOR_MODE_256: // 256 color palette
513  break;
514  case COLOR_MODE_16M: // 16M (truecolor)
517  break;
518  default:
519  break;
520  }
521 }
RZ_API RzCons * rz_cons_singleton(void)
Definition: cons.c:300
static void rz_cons_pal_show_256(void)
Definition: pal.c:446
static void rz_cons_pal_show_rgb(void)
Definition: pal.c:477
static void rz_cons_pal_show_gs(void)
Definition: pal.c:421
@ COLOR_MODE_16M
Definition: rz_cons.h:445
@ COLOR_MODE_256
Definition: rz_cons.h:444

References bgcode, COLOR_MODE_16M, COLOR_MODE_256, Color_RESET, colors, i, rz_cons_pal_show_256(), rz_cons_pal_show_gs(), rz_cons_pal_show_rgb(), rz_cons_printf(), and rz_cons_singleton().

Referenced by rz_cmd_eval_color_set_colorful_palette_handler().

◆ rz_cons_pal_show_256()

static void rz_cons_pal_show_256 ( void  )
static

Definition at line 446 of file pal.c.

446  {
447  RzColor rc = RzColor_BLACK;
448  rz_cons_print("\n\nXTerm colors:\n");
449  int r = 0;
450  int g = 0;
451  int b = 0;
452  for (r = 0x00; r <= 0xff; r += 0x28) {
453  rc.r = r;
454  if (rc.r == 0x28) {
455  rc.r = 0x5f;
456  }
457  for (b = 0x00; b <= 0xff; b += 0x28) {
458  rc.b = b;
459  if (rc.b == 0x28) {
460  rc.b = 0x5f;
461  }
462  for (g = 0x00; g <= 0xff; g += 0x28) {
463  rc.g = g;
464  char bg[32];
465  if (rc.g == 0x28) {
466  rc.g = 0x5f;
467  }
468  const char *fg = ((rc.r <= 0x5f) && (rc.g <= 0x5f)) ? Color_WHITE : Color_BLACK;
469  rz_cons_rgb_str(bg, sizeof(bg), &rc);
470  rz_cons_printf("%s%s rgb:%02x%02x%02x " Color_RESET, fg, bg, rc.r, rc.g, rc.b);
471  }
472  rz_cons_newline();
473  }
474  }
475 }
struct @667 g
#define Color_WHITE
Definition: rz_cons.h:625
#define Color_BLACK
Definition: rz_cons.h:621
#define b(i)
Definition: sha256.c:42

References rcolor_t::b, b, Color_BLACK, Color_RESET, Color_WHITE, rcolor_t::g, g, r, rcolor_t::r, rz_cons_newline(), rz_cons_printf(), rz_cons_rgb_str(), and RzColor_BLACK.

Referenced by rz_cons_pal_show().

◆ rz_cons_pal_show_gs()

static void rz_cons_pal_show_gs ( void  )
static

Definition at line 421 of file pal.c.

421  {
422  int i, n;
423  rz_cons_print("\nGreyscale:\n");
425  for (i = 0x08, n = 0; i <= 0xee; i += 0xa) {
426  char fg[32], bg[32];
427  rcolor.r = i;
428  rcolor.g = i;
429  rcolor.b = i;
430 
431  if (i < 0x76) {
432  strcpy(fg, Color_WHITE);
433  } else {
434  strcpy(fg, Color_BLACK);
435  }
436  rz_cons_rgb_str(bg, sizeof(bg), &rcolor);
437  rz_cons_printf("%s%s rgb:%02x%02x%02x " Color_RESET,
438  fg, bg, i, i, i);
439  if (n++ == 5) {
440  n = 0;
441  rz_cons_newline();
442  }
443  }
444 }

References rcolor_t::b, Color_BLACK, Color_RESET, Color_WHITE, rcolor_t::g, i, n, rcolor_t::r, rcolor, rz_cons_newline(), rz_cons_printf(), rz_cons_rgb_str(), and RzColor_BLACK.

Referenced by rz_cons_pal_show().

◆ rz_cons_pal_show_rgb()

static void rz_cons_pal_show_rgb ( void  )
static

Definition at line 477 of file pal.c.

477  {
478  const int inc = 3;
479  int i, j, k, n = 0;
480  RzColor rc = RzColor_BLACK;
481  rz_cons_print("\n\nRGB:\n");
482  for (i = n = 0; i <= 0xf; i += inc) {
483  for (k = 0; k <= 0xf; k += inc) {
484  for (j = 0; j <= 0xf; j += inc) {
485  char fg[32], bg[32];
486  rc.r = i * 16;
487  rc.g = j * 16;
488  rc.b = k * 16;
489  strcpy(fg, ((i < 6) && (j < 5)) ? Color_WHITE : Color_BLACK);
490  rz_cons_rgb_str(bg, sizeof(bg), &rc);
491  rz_cons_printf("%s%s rgb:%02x%02x%02x " Color_RESET, fg, bg, rc.r, rc.g, rc.b);
492  if (n++ == 5) {
493  n = 0;
494  rz_cons_newline();
495  }
496  }
497  }
498  }
499 }
const char * k
Definition: dsignal.c:11

References rcolor_t::b, Color_BLACK, Color_RESET, Color_WHITE, rcolor_t::g, i, k, n, rcolor_t::r, rz_cons_newline(), rz_cons_printf(), rz_cons_rgb_str(), and RzColor_BLACK.

Referenced by rz_cons_pal_show().

◆ rz_cons_pal_update_event()

RZ_API void rz_cons_pal_update_event ( void  )

◆ rz_cons_rainbow_free()

RZ_API void rz_cons_rainbow_free ( RzConsContext ctx)

Definition at line 662 of file pal.c.

662  {
663  int i, sz = ctx->pal.rainbow_sz;
664  if (ctx->pal.rainbow) {
665  for (i = 0; i < sz; i++) {
666  free(ctx->pal.rainbow[i]);
667  }
668  }
669  ctx->pal.rainbow_sz = 0;
670  RZ_FREE(ctx->pal.rainbow);
671 }

References free(), i, and RZ_FREE.

Referenced by __cons_pal_update_event(), and rz_cons_pal_free().

◆ rz_cons_rainbow_get()

RZ_API char* rz_cons_rainbow_get ( int  idx,
int  last,
bool  bg 
)

Definition at line 673 of file pal.c.

673  {
674  RzCons *cons = rz_cons_singleton();
675  if (last < 0) {
676  last = cons->context->pal.rainbow_sz;
677  }
678  if (idx < 0 || idx >= last || !cons->context->pal.rainbow) {
679  return NULL;
680  }
681  int x = (last == cons->context->pal.rainbow_sz)
682  ? idx
683  : (cons->context->pal.rainbow_sz * idx) / (last + 1);
684  const char *a = cons->context->pal.rainbow[x];
685  if (bg) {
686  char *dup = rz_str_newf("%s %s", a, a);
687  char *res = rz_cons_pal_parse(dup, NULL);
688  free(dup);
689  return res;
690  }
691  return rz_cons_pal_parse(a, NULL);
692 }
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode dup
Definition: sflib.h:68
int x
Definition: mipsasm.c:20
int idx
Definition: setup.py:197
#define a(i)
Definition: sha256.c:41
RzConsPrintablePalette pal
Definition: rz_cons.h:491
RzConsContext * context
Definition: rz_cons.h:502

References a, rz_cons_t::context, dup, free(), setup::idx, NULL, rz_cons_context_t::pal, rz_cons_printable_palette_t::rainbow, rz_cons_printable_palette_t::rainbow_sz, rz_cons_pal_parse(), rz_cons_singleton(), rz_str_newf(), and x.

Referenced by annotated_hexdump(), and rz_core_init().

◆ rz_cons_rainbow_new()

RZ_API void rz_cons_rainbow_new ( RzConsContext ctx,
int  sz 
)

Definition at line 656 of file pal.c.

656  {
657  ctx->pal.rainbow_sz = sz;
658  free(ctx->pal.rainbow);
659  ctx->pal.rainbow = calloc(sizeof(char *), sz);
660 }
void * calloc(size_t number, size_t size)
Definition: malloc.c:102

References calloc(), and free().

Referenced by __cons_pal_update_event().

Variable Documentation

◆ bgcode

const char* bgcode

Definition at line 99 of file pal.c.

Referenced by rz_cons_pal_parse(), and rz_cons_pal_show().

◆ code

◆ coff

int coff

Definition at line 14 of file pal.c.

◆ 

struct { ... } colors[]
Initial value:
= {
}
#define Color_BCYAN
Definition: rz_cons.h:652
#define RzColor_BYELLOW
Definition: rz_cons.h:728
#define Color_BYELLOW
Definition: rz_cons.h:650
#define Color_BBLACK
Definition: rz_cons.h:640
#define Color_MAGENTA
Definition: rz_cons.h:629
#define Color_CYAN
Definition: rz_cons.h:633
#define RzColor_BBLUE
Definition: rz_cons.h:732
#define Color_BBGYELLOW
Definition: rz_cons.h:651
#define Color_BBGRED
Definition: rz_cons.h:643
#define RzColor_BWHITE
Definition: rz_cons.h:722
#define Color_BBGMAGENTA
Definition: rz_cons.h:649
#define Color_BRED
Definition: rz_cons.h:642
#define Color_GREEN
Definition: rz_cons.h:627
#define Color_BWHITE
Definition: rz_cons.h:644
#define Color_BBGGREEN
Definition: rz_cons.h:647
#define Color_RED
Definition: rz_cons.h:623
#define Color_BGGRAY
Definition: rz_cons.h:638
#define Color_BBGCYAN
Definition: rz_cons.h:653
#define Color_BGREEN
Definition: rz_cons.h:646
#define Color_BGBLACK
Definition: rz_cons.h:622
#define RzColor_BBLACK
Definition: rz_cons.h:718
#define Color_BBLUE
Definition: rz_cons.h:654
#define Color_BBGBLUE
Definition: rz_cons.h:655
#define Color_YELLOW
Definition: rz_cons.h:631
#define RzColor_BCYAN
Definition: rz_cons.h:730
#define Color_BGWHITE
Definition: rz_cons.h:626
#define Color_BGGREEN
Definition: rz_cons.h:628
#define Color_BLUE
Definition: rz_cons.h:635
#define Color_BBGWHITE
Definition: rz_cons.h:645
#define Color_BGYELLOW
Definition: rz_cons.h:632
#define Color_BGBLUE
Definition: rz_cons.h:636
#define Color_BGCYAN
Definition: rz_cons.h:634
#define Color_BGRED
Definition: rz_cons.h:624
#define Color_GRAY
Definition: rz_cons.h:637
#define Color_BBGBLACK
Definition: rz_cons.h:641
#define Color_BMAGENTA
Definition: rz_cons.h:648
#define Color_BGMAGENTA
Definition: rz_cons.h:630

Referenced by annotated_hexdump(), core_print_columns(), print_debug_maps_ascii_art(), rz_cons_pal_parse(), rz_cons_pal_show(), rz_debug_map_list_visual(), rz_diff_get_colors(), rz_diff_load_file_with_core(), rz_diff_parse_arguments(), rz_print_hexpair(), rz_print_json_indent(), and rz_str_escape_8bit().

◆ 

◆ keys_len

const int keys_len = sizeof(keys) / sizeof(keys[0]) - 1
static

Definition at line 93 of file pal.c.

Referenced by rz_cons_pal_get_name(), and rz_cons_pal_len().

◆ name

const char* name

Definition at line 12 of file pal.c.

Referenced by rz_cons_pal_list().

◆ off

int off

Definition at line 13 of file pal.c.

Referenced by __lfh_segment_loop(), __ne_get_resources(), _createKDNetPacket(), _io_malloc_set_off(), _parse_resource_directory(), _zip_cdir_write(), analBars(), annotated_hexdump(), anop(), anop_esil(), ar_read_at(), ar_write_at(), arm_assemble(), armass_assemble(), bbget(), bin_pe_init_imports(), bin_pe_init_rich_info(), bin_pe_parse_imports(), bin_pe_parse_resource(), check_buffer(), checkHeader(), cmd_print_bars(), cmd_print_blocks(), dalvik_op(), dcpu16_assemble(), define_data_ntimes(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), dem_str_replace(), demangle_classname(), describe_xbe_lib_at(), disarm_12bit_offset(), disarm_8bit_offset(), disassemble(), emit_set_string(), esil_mem_deceq_n(), esil_mem_inceq_n(), estimate_slide(), fill_hist_offset(), filter(), flags_at_offset(), gdbr_exec_file_read(), gdbr_get_baddr(), gdbr_read_feature(), gdbr_read_osdata(), getFunctionNamePrefix(), GetHeapBlocks(), hex_op_masks_extract(), i386nto_register_area(), init_items(), is_in_base(), is_in_input(), is_in_screen(), label_off(), le_get_entries(), le_get_modname_by_ord(), lenof(), MACH0_(), mach_headerfields(), mget(), name_from_table(), num_callback(), objc_build_refs(), objc_find_refs(), on_rebase_pointer(), parse_aranges_raw(), parse_dylib(), parse_dysymtab(), parse_function_starts(), parse_segments(), parse_signature(), parse_symtab(), parse_thread(), parseCodeDirectory(), parseDragons(), parseMetadata(), printPadded(), qnxr_read_registers(), qnxr_write_register(), rc6_decrypt(), read_xbe_header(), read_xbe_lib(), read_xbe_section(), readString(), rebase_buffer(), rz_analysis_aefa(), rz_analysis_block_analyze_ops(), rz_analysis_block_get_op_addr_in(), rz_analysis_block_op_starts_at(), rz_analysis_find_most_relevant_block_in(), rz_analysis_noreturn_functions(), rz_asm_massemble(), rz_bin_get_section_at(), rz_bin_le_get_relocs(), rz_bin_ne_get_entrypoints(), rz_bin_ne_get_imports(), rz_bin_ne_get_relocs(), rz_bin_ne_get_symbols(), rz_bin_object_get_map_at(), rz_bin_object_get_maps_at(), rz_bin_pe_get_imports(), rz_bin_pe_get_libs(), rz_bin_pe_get_sections(), rz_cmd_analysis(), rz_cmd_debug(), rz_cmd_macro_cmd_args(), rz_cmd_print(), rz_cons_rgb_str_off(), rz_core_analysis_esil_emulate(), rz_core_analysis_undefine(), rz_core_bin_export_info(), rz_core_cmd_foreach3(), rz_core_debug_step_until_frame(), rz_core_flag_get_by_spaces(), rz_core_rtr_gdb_cb(), rz_core_seek_to_register(), rz_core_visual_asm(), rz_core_visual_cmd(), rz_core_visual_define(), rz_core_visual_jump(), rz_core_visual_view_rop(), rz_coresym_cache_element_header_new(), rz_coresym_cache_element_new(), rz_debug_desc_new(), rz_debug_drx_handler(), rz_egg_patch(), rz_egg_patch_num(), rz_file_slurp_range(), rz_flag_exist_at(), rz_flag_get_at(), rz_flag_get_by_spaces(), rz_flag_get_i(), rz_flag_get_list(), rz_flag_get_liststr(), rz_flag_get_nearest_list(), rz_flag_relocate(), rz_flag_set(), rz_flag_set_next(), rz_flag_unset_all_off(), rz_flag_unset_off(), rz_heap_debug_block_win(), rz_io_desc_size(), rz_main_rz_gg(), rz_num_as_string(), rz_num_tail_base(), rz_print_hexdump_str(), rz_print_offset(), rz_print_offset_sg(), rz_reg_get_double(), rz_reg_get_longdouble(), rz_reg_get_pack(), rz_reg_get_value(), rz_reg_get_value_big(), rz_reg_read_regs(), rz_reg_set_pack(), rz_search_strings_update(), rz_str_replace(), rz_str_replace_icase(), rz_str_stripLine(), rz_syscmd_ls(), size(), step_line(), step_until(), str_callback(), subvar(), tbb(), thumb_assemble(), uv__fs_preadv(), uv__fs_sendfile(), uv_fs_ftruncate(), uv_fs_read(), uv_fs_sendfile(), uv_fs_write(), windbg_read(), and zip_close().

◆ rcolor