8 #define I rz_line_instance
24 I.enable_vi_mode =
false;
29 I.vtmode = rz_cons_detect_vt_mode();
34 eprintf(
"error: rz_line_dietline_init\n");
43 free((
void *)
I.prompt);
81 if (completion->
quit) {
90 completion->
quit =
true;
91 eprintf(
"WARNING: Maximum completion capacity reached, increase scr.maxtab");
99 eprintf(
"WARNING: Maximum completion capacity reached, increase scr.maxtab");
111 completion->
quit =
false;
128 HtPPOptions opt = { 0 };
129 opt.cmp = (HtPPListComparator)strcmp;
130 opt.hashfn = (HtPPHashFunction)
sdb_hash;
171 if (strncmp(
option, cur, cur_len)) {
RZ_API RzCons * rz_cons_singleton(void)
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 count
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 static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
RZ_API int rz_line_dietline_init(void)
RZ_API void rz_line_hist_free(void)
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_BORROW RzListIter * rz_list_insert(RZ_NONNULL RzList *list, ut32 n, void *data)
Inserts a new element at the N-th position.
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
static void rz_line_nscompletion_init(RzLineNSCompletion *c)
RZ_API RzLine * rz_line_singleton(void)
RZ_API void rz_line_set_prompt(const char *prompt)
RZ_API void rz_line_completion_push(RzLineCompletion *completion, const char *str)
RZ_API RZ_OWN char * rz_line_get_prompt(void)
RZ_API void rz_line_clipboard_push(const char *str)
RZ_API void rz_line_completion_set(RzLineCompletion *completion, int argc, const char **argv)
RZ_API void rz_line_ns_completion_result_free(RzLineNSCompletionResult *res)
RZ_API RzLine * rz_line_new(void)
RZ_API RzLineNSCompletionResult * rz_line_ns_completion_result_new(size_t start, size_t end, const char *end_string)
RZ_API void rz_line_completion_fini(RzLineCompletion *completion)
RZ_API void rz_line_ns_completion_result_add(RzLineNSCompletionResult *res, const char *option)
RZ_API void rz_line_completion_clear(RzLineCompletion *completion)
RZ_API void rz_line_completion_init(RzLineCompletion *completion, size_t args_limit)
static RzLine rz_line_instance
RZ_API void rz_line_ns_completion_result_propose(RzLineNSCompletionResult *res, const char *option, const char *cur, size_t cur_len)
Add a new option to the list of possible autocomplete-able value if it matches the given string.
RZ_API void rz_line_free(void)
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
static static fork const void static count static fd const char const char static newpath char char argv
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 rz_return_if_fail(expr)
@ RZ_VIRT_TERM_MODE_COMPLETE
All the sequences goes through VT (Windows Terminal, mintty, all OSs)
static void ** rz_pvector_reserve(RzPVector *vec, size_t capacity)
RZ_API void rz_pvector_init(RzPVector *vec, RzPVectorFree free)
RZ_API void rz_pvector_fini(RzPVector *vec)
static size_t rz_pvector_len(const RzPVector *vec)
void(* RzPVectorFree)(void *e)
static void ** rz_pvector_push(RzPVector *vec, void *x)
RZ_API void rz_pvector_clear(RzPVector *vec)
RZ_API ut32 sdb_hash(const char *key)
RzConsFunctionKey cb_fkey
size_t start
First byte that was considered for autocompletion. Everything before this will be left intact.
const char * end_string
String to place after the only option available is autocompleted. By default a space is used.
HtPP * options_ht
Hash table to keep track of duplicated autocompletion suggestions.
size_t end
Last byte that was considered for autocompletion. Everything after this will be left intact.
RzPVector options
Vector of options that can be used for autocompletion.