Rizin
unix-like reverse engineering framework and cli tools
|
#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) |
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 [] |
|
static |
Definition at line 129 of file pal.c.
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().
Definition at line 122 of file pal.c.
References r, r2, and rz_hex_to_byte().
Referenced by rz_cons_pal_parse().
RZ_API void rz_cons_pal_copy | ( | RzConsContext * | dst, |
RzConsContext * | src | ||
) |
Definition at line 258 of file pal.c.
References __cons_pal_update_event(), Color_RESET, dst, memcpy(), memset(), NULL, and src.
Referenced by cons_context_init().
RZ_API void rz_cons_pal_free | ( | RzConsContext * | ctx | ) |
Definition at line 247 of file pal.c.
References color, i, keys, rz_cons_rainbow_free(), and RZ_FREE.
Referenced by cons_context_deinit(), and rz_cons_pal_init().
Definition at line 626 of file pal.c.
References i, key, keys, rcolor, RZCOLOR_AT, and RzColor_NULL.
Referenced by palColorFor(), and rz_cmd_eval_color_list_handler().
RZ_API void rz_cons_pal_init | ( | RzConsContext * | ctx | ) |
Definition at line 154 of file pal.c.
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().
Definition at line 528 of file pal.c.
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().
Definition at line 281 of file pal.c.
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_API void rz_cons_pal_random | ( | void | ) |
Definition at line 270 of file pal.c.
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().
Definition at line 611 of file pal.c.
References eprintf, i, key, keys, rcolor, rz_cons_pal_parse(), RZCOLOR_AT, and val.
Referenced by rz_cmd_eval_color_list_handler().
RZ_API void rz_cons_pal_show | ( | void | ) |
Definition at line 501 of file pal.c.
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().
|
static |
Definition at line 446 of file pal.c.
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().
|
static |
Definition at line 421 of file pal.c.
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().
|
static |
Definition at line 477 of file pal.c.
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_API void rz_cons_pal_update_event | ( | void | ) |
Definition at line 652 of file pal.c.
References __cons_pal_update_event(), and rz_cons_singleton().
Referenced by cb_color(), load_theme(), rz_cmd_eval_color_list_handler(), and rz_cons_pal_random().
RZ_API void rz_cons_rainbow_free | ( | RzConsContext * | ctx | ) |
Definition at line 662 of file pal.c.
References free(), i, and RZ_FREE.
Referenced by __cons_pal_update_event(), and rz_cons_pal_free().
Definition at line 673 of file pal.c.
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_API void rz_cons_rainbow_new | ( | RzConsContext * | ctx, |
int | sz | ||
) |
Definition at line 656 of file pal.c.
References calloc(), and free().
Referenced by __cons_pal_update_event().
const char* bgcode |
Definition at line 99 of file pal.c.
Referenced by rz_cons_pal_parse(), and rz_cons_pal_show().
Definition at line 98 of file pal.c.
Referenced by __open(), __read(), __system(), __write(), aarch64_opcode_decode(), compress_block(), decode(), decode_sizeq(), encode_reply(), get_sim_reg(), inflate(), is_process_alive(), lunpipe(), M68K_getInstruction(), ocaml_cs_disasm(), ocaml_cs_disasm_internal(), rz_analysis_esil_set_op(), rz_annotated_code_new(), rz_core_analysis_code_count(), rz_hex_from_c(), rz_hex_from_c_array(), rz_hex_from_c_str(), rz_hex_from_py_array(), RZ_PACKED(), skip_comment_c(), skip_comment_py(), test(), tr_static_init(), and zip_read_lens().
struct { ... } colors[] |
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().
struct { ... } keys[] |
Referenced by __cons_pal_update_event(), _nettle_aes_decrypt(), _nettle_aes_encrypt(), _zip_pkware_decrypt(), _zip_pkware_encrypt(), _zip_pkware_keys_reset(), autocomplete_minus(), clusterCommand(), crypt_byte(), findPair(), getid(), rz_analysis_function_all_opcode_stat_handler(), rz_cmd_alias(), rz_cons_pal_free(), rz_cons_pal_get(), rz_cons_pal_get_name(), rz_cons_pal_list(), rz_cons_pal_random(), rz_cons_pal_set(), and update_keys().
Definition at line 93 of file pal.c.
Referenced by rz_cons_pal_get_name(), and rz_cons_pal_len().
Definition at line 12 of file pal.c.
Referenced by rz_cons_pal_list().
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().
RzColor rcolor |
Definition at line 97 of file pal.c.
Referenced by __cons_pal_update_event(), palColorFor(), rz_cmd_eval_color_list_handler(), rz_cons_color_random(), rz_cons_pal_get(), rz_cons_pal_list(), rz_cons_pal_parse(), rz_cons_pal_random(), rz_cons_pal_set(), rz_cons_pal_show_gs(), rz_cons_rgb_str(), rz_cons_rgb_str_mode(), and rz_core_visual_colors().