Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | I(x) rz_cons_singleton()->x |
#define | RZ_CONS_GREP_BUFSIZE 4096 |
#define | INSERT_LINES(list) |
Functions | |
static char * | strchr_ns (char *s, const char ch) |
RZ_API void | rz_cons_grep_help (void) |
static void | parse_grep_expression (const char *str) |
static char * | find_next_intgrep (char *cmd, const char *quotes) |
static char * | preprocess_filter_expr (char *cmd, const char *quotes) |
RZ_API void | rz_cons_grep_parsecmd (char *cmd, const char *quotestr) |
RZ_API char * | rz_cons_grep_strip (char *cmd, const char *quotestr) |
RZ_API void | rz_cons_grep_process (char *grep) |
static int | cmp (const void *a, const void *b) |
RZ_API void | rz_cons_grepbuf (void) |
RZ_API int | rz_cons_grep_line (char *buf, int len) |
RZ_API void | rz_cons_grep (const char *grep) |
Variables | |
static const char * | help_detail_tilde [] |
static RzList * | sorted_lines = NULL |
static RzList * | unsorted_lines = NULL |
static int | sorted_column = -1 |
#define I | ( | x | ) | rz_cons_singleton()->x |
#define INSERT_LINES | ( | list | ) |
Definition at line 428 of file grep.c.
References a, b, cb, free(), IS_DIGIT, NULL, rz_num_get(), rz_str_trim_head_ro(), rz_str_word_get0(), rz_str_word_set0(), sorted_column, strdup(), and ut64().
Referenced by rz_cons_grepbuf().
|
static |
Definition at line 338 of file grep.c.
References cmd, NULL, p, and rz_str_firstbut().
Referenced by preprocess_filter_expr().
|
static |
Definition at line 76 of file grep.c.
References rz_cons_grep_t::amp, rz_cons_grep_t::begin, rz_cons_grep_t::charCounter, rz_cons_t::context, rz_cons_grep_t::counter, rz_cons_grep_t::end, eprintf, rz_cons_grep_t::f_line, fail, rz_cons_t::filter, free(), rz_cons_context_t::grep, rz_cons_grep_t::hud, rz_cons_grep_t::human, rz_cons_grep_t::icase, IS_DIGIT, rz_cons_grep_t::json, rz_cons_grep_t::json_path, rz_cons_grep_t::l_line, len, rz_cons_grep_t::less, rz_cons_grep_t::line, rz_cons_grep_t::neg, rz_cons_grep_t::nstrings, NULL, rz_cons_t::num, p, rz_cons_grep_t::range_line, RZ_CONS_GREP_BUFSIZE, rz_cons_grep_help(), RZ_CONS_GREP_TOKENS, RZ_CONS_GREP_WORD_SIZE, RZ_CONS_GREP_WORDS, rz_cons_singleton(), RZ_MIN, rz_num_get(), rz_str_ncpy(), rz_cons_grep_t::sort, rz_cons_grep_t::sort_invert, rz_cons_grep_t::sort_row, sorted_column, cmd_descs_generate::str, rz_cons_grep_t::str, strchr_ns(), strdup(), rz_cons_grep_t::strings, rz_cons_grep_t::tokens, rz_cons_grep_t::tokens_used, ut64(), ZERO_FILL, and rz_cons_grep_t::zoom.
Referenced by rz_cons_grep(), rz_cons_grep_parsecmd(), and rz_cons_grep_process().
|
static |
Definition at line 363 of file grep.c.
References cmd, find_next_intgrep(), i, len, NULL, rz_str_append(), rz_str_appendlen(), and rz_str_endswith().
Referenced by rz_cons_grep_parsecmd(), and rz_cons_grep_strip().
Definition at line 874 of file grep.c.
References parse_grep_expression(), and rz_cons_grepbuf().
Referenced by rz_cons_bind().
RZ_API void rz_cons_grep_help | ( | void | ) |
Definition at line 70 of file grep.c.
References help_detail_tilde, and rz_cons_cmd_help().
Referenced by parse_grep_expression(), and rz_core_cmd_subst_i().
Definition at line 746 of file grep.c.
References rz_cons_grep_t::amp, rz_cons_grep_t::begin, calloc(), rz_cons_t::context, rz_cons_grep_t::end, eprintf, rz_cons_grep_t::f_line, free(), rz_cons_context_t::grep, hit(), i, rz_cons_grep_t::icase, in, rz_cons_grep_t::l_line, len, rz_cons_grep_t::line, rz_cons_t::lines, memcpy(), rz_cons_grep_t::neg, rz_cons_grep_t::nstrings, NULL, out, p, rz_cons_grep_t::range_line, RZ_BETWEEN, RZ_CONS_GREP_TOKENS, rz_cons_singleton(), rz_list_append(), rz_list_newf(), rz_str_case(), rz_strstr_ansi(), rz_cons_grep_t::sort, rz_cons_grep_t::sort_row, sorted_lines, cmd_descs_generate::str, strdup(), rz_cons_grep_t::strings, rz_cons_grep_t::tokens, rz_cons_grep_t::tokens_used, and unsorted_lines.
Referenced by rz_cons_grepbuf().
Definition at line 401 of file grep.c.
References cmd, free(), parse_grep_expression(), preprocess_filter_expr(), rz_return_if_fail, and rz_str_trim().
Referenced by rz_core_cmd_pipe_old(), and rz_core_cmd_subst_i().
RZ_API void rz_cons_grep_process | ( | char * | grep | ) |
Definition at line 421 of file grep.c.
References free(), and parse_grep_expression().
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), and rz_core_cmd_subst_i().
Definition at line 411 of file grep.c.
References cmd, NULL, preprocess_filter_expr(), and rz_str_trim().
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), and rz_core_cmd_subst_i().
RZ_API void rz_cons_grepbuf | ( | void | ) |
Definition at line 463 of file grep.c.
References rz_cons_context_t::buffer, rz_cons_context_t::buffer_len, rz_cons_context_t::buffer_sz, calloc(), rz_cons_grep_t::charCounter, cmp(), rz_cons_context_t::col, Color_INVERT, Color_RESET, rz_cons_printable_palette_t::comment, rz_cons_t::context, rz_cons_grep_t::counter, rz_cons_grep_t::f_line, rz_cons_t::filter, free(), rz_cons_printable_palette_t::graph_false, rz_cons_printable_palette_t::graph_true, rz_cons_context_t::grep, rz_cons_t::grep_color, rz_cons_t::grep_highlight, rz_cons_grep_t::hud, rz_cons_grep_t::human, I, i, rz_cons_grep_t::icase, in, INSERT_LINES, rz_cons_grep_t::json, rz_cons_grep_t::json_path, rz_cons_grep_t::l_line, len, rz_cons_grep_t::less, rz_cons_grep_t::line, rz_cons_t::lines, malloc(), memcpy(), newstr(), rz_cons_grep_t::nstrings, NULL, rz_cons_printable_palette_t::num, rz_cons_t::num, out, p, rz_cons_context_t::pal, rz_cons_grep_t::range_line, rz_cons_context_t::row, rz_cons_context_t::rowcol_calc_start, rz_cons_grep_line(), rz_cons_hud_string(), rz_cons_less_str(), rz_cons_newline(), rz_cons_println(), rz_cons_singleton(), RZ_FREE, rz_json_as_string(), rz_json_get_path(), rz_json_parse(), rz_list_free(), rz_list_reverse(), rz_list_sort(), rz_print_json_human(), rz_print_json_indent(), rz_str_ansi_filter(), rz_str_ndup(), rz_str_newf(), rz_str_replace(), rz_str_replace_icase(), rz_str_scale(), rz_strbuf_append(), rz_strbuf_drain(), rz_strbuf_free(), rz_strbuf_getbin(), rz_strbuf_length(), rz_strbuf_new(), snprintf, rz_cons_grep_t::sort, rz_cons_grep_t::sort_invert, sorted_column, sorted_lines, cmd_descs_generate::str, rz_cons_grep_t::str, strdup(), rz_cons_grep_t::strings, unsorted_lines, rz_num_t::value, rz_cons_grep_t::zoom, and rz_cons_grep_t::zoomy.
Referenced by rz_cons_filter(), and rz_cons_grep().
|
static |
|
static |
Definition at line 23 of file grep.c.
Referenced by rz_cons_grep_help().
|
static |
Definition at line 68 of file grep.c.
Referenced by cmp(), parse_grep_expression(), and rz_cons_grepbuf().
Definition at line 66 of file grep.c.
Referenced by rz_cons_grep_line(), and rz_cons_grepbuf().
Definition at line 67 of file grep.c.
Referenced by rz_cons_grep_line(), and rz_cons_grepbuf().