7 #define I(x) rz_cons_singleton()->x
24 eprintf(
"Hud mode requires scr.interactive=true.\n");
27 char *os, *track, *ret, *o =
strdup(
s);
40 for (os = o,
i = 0; o[
i];
i++) {
43 if (*os && *os !=
'#') {
65 char *
p, *current_token =
filter;
70 entry = ansi_filtered;
74 if (*
p ==
' ' || *
p ==
'\0') {
75 const char *next_match, *entry_ptr =
entry;
80 if (
p == current_token) {
85 token_len = strlen(current_token);
88 int real_pos, filtered_pos = next_match -
entry;
89 int end_pos = cps[filtered_pos + token_len];
90 for (real_pos = cps[filtered_pos];
91 real_pos < end_pos && real_pos < mask_size;
92 real_pos = cps[++filtered_pos]) {
95 entry_ptr += token_len;
98 if (entry_ptr ==
entry) {
104 current_token =
p + 1;
120 bool first_line =
true;
122 rz_list_foreach (
list,
iter, current_entry) {
127 if (++
counter == rows + top_entry_n) {
131 if (!top_entry_n || *current_entry_n >= top_entry_n) {
133 x = strchr(current_entry,
'\t');
139 if (!user_input[0]) {
144 int last_color_change = 0;
150 if (
mask[j] != last_mask) {
159 last_color_change = j;
171 for (j = 0;
p[j]; j++) {
185 *selected_entry = current_entry;
189 (*current_entry_n)++;
204 char *selected_entry =
NULL;
207 HtPP *ht = ht_pp_new(
NULL, (HtPPKvFreeFunc)
mht_free_kv, (HtPPCalcSizeV)strlen);
211 I(
line)->echo =
false;
228 selected_entry =
NULL;
237 filtered_list = ht_pp_find(ht, user_input, &
found);
242 ht_pp_insert(ht, user_input, filtered_list);
245 rz_list_foreach (filtered_list,
iter, row) {
248 if (!filtered_list->
length) {
261 if (selected_entry) {
263 I(
line)->echo =
true;
267 return strdup(selected_entry);
276 I(
line)->echo =
true;
RZ_API void rz_cons_set_raw(bool is_raw)
RZ_API int rz_cons_get_size(int *rows)
RZ_API bool rz_cons_enable_mouse(const bool enable)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API bool rz_cons_is_interactive(void)
RZ_API void rz_cons_visual_flush(void)
RZ_API void rz_cons_show_cursor(int cursor)
RZ_API void rz_cons_flush(void)
RZ_API void rz_cons_println(const char *str)
RZ_API void rz_cons_gotoxy(int x, int y)
RZ_API void rz_cons_clear(void)
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
static static fork const void static count static fd const char const char static newpath const char static path const char path
RZ_API const char * rz_line_readline(void)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API const KEY_TYPE bool * found
static bool __matchString(char *entry, char *filter, char *mask, const int mask_size)
RZ_API void rz_cons_message(RZ_NONNULL const char *msg)
static void mht_free_kv(HtPPKv *kv)
RZ_API char * rz_cons_hud_path(const char *path, int dir)
static RzList * hud_filter(RzList *list, char *user_input, int top_entry_n, int *current_entry_n, char **selected_entry)
RZ_API char * rz_cons_hud_file(const char *f)
RZ_API char * rz_cons_hud(RzList *list, const char *prompt)
RZ_API char * rz_cons_hud_string(const char *s)
return memset(p, 0, total)
static void list(RzEgg *egg)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
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")
static bool filter(RzParse *p, ut64 addr, RzFlag *f, RzAnalysisHint *hint, char *data, char *str, int len, bool big_endian)
#define rz_return_if_fail(expr)
#define RZ_CONS_CLEAR_LINE
RZ_API bool rz_file_is_directory(const char *str)
RZ_API char * rz_file_abspath(const char *file)
RZ_API RZ_OWN char * rz_file_slurp(const char *str, RZ_NULLABLE size_t *usz)
RZ_API char * rz_str_appendf(char *ptr, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_append(char *ptr, const char *string)
RZ_API int rz_str_ansi_filter(char *str, char **out, int **cposs, int len)
RZ_API size_t rz_str_ncpy(char *dst, const char *src, size_t n)
Secure string copy with null terminator.
RZ_API const char * rz_str_trim_head_ro(const char *str)
RZ_API int rz_str_replace_ch(char *s, char a, char b, bool g)
RZ_API const char * rz_str_casestr(const char *a, const char *b)
RZ_API RzList * rz_sys_dir(const char *path)
static struct sockaddr static addrlen static backlog const void msg