7 #include "../core_private.h"
33 if (next_fn && !strcmp(next_fn, core->
curtheme)) {
45 if (prev_fn && !strcmp(prev_fn, core->
curtheme)) {
81 eprintf(
"eco: cannot open colorscheme profile (%s)\n",
name);
96 if (*
fn && *
fn !=
'.') {
97 ht_pu_insert(themes,
fn, 1);
122 HtPU *themes = ht_pu_new0();
154 if (*
fn && *
fn !=
'.') {
174 }
else if (argc == 2) {
251 rz_list_foreach (themes_list, th_iter, th) {
252 switch (
state->mode) {
343 for (
i = 1;
i < argc;
i++) {
354 eprintf(
"No string specified before `=`. Make sure to use the format <key>=<value> without spaces.\n");
365 }
else if (llen == 1) {
373 }
else if (llen == 2) {
383 const char *
arg = argc > 1 ?
argv[1] :
"";
394 eprintf(
"Cannot toggle config key '%s'\n",
argv[1]);
417 eprintf(
"Cannot make eval '%s' readonly.\n",
argv[1]);
447 eprintf(
"Cannot find type of eval '%s'.\n",
argv[1]);
RZ_API void rz_core_config_print_all(RzConfig *cfg, const char *str, RzCmdStateOutput *state)
Prints the configuation variables with their description and its values.
RZ_API int rz_core_config_init(RzCore *core)
RZ_API RZ_OWN RzList * rz_core_config_in_space(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *space)
Get config variable spaces.
RZ_API int rz_core_cmd_file(RzCore *core, const char *file)
RZ_API bool rz_cmd_state_output_init(RZ_NONNULL RzCmdStateOutput *state, RzOutputMode mode)
Initialize a RzCmdStateOutput structure and its inner fields based on the provided mode.
RZ_API void rz_cmd_state_output_fini(RZ_NONNULL RzCmdStateOutput *state)
Clear the inner fields of RzCmdStateOutput structure, but do not free it.
RZ_API void rz_cmd_state_output_print(RZ_NONNULL RzCmdStateOutput *state)
Print the output accumulated in state to RzCons, if necessary.
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_instruction_word_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_set_default_palette_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_set_random_palette_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_list_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_API void rz_core_theme_nextpal(RzCore *core, RzConsPalSeekMode mode)
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_current_instruction_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_list_reload_current_handler(RzCore *core, int argc, const char **argv)
static void list_themes_in_path(HtPU *themes, const char *path)
RZ_IPI RzCmdStatus rz_cmd_eval_color_load_theme_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_eval_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_eval_bool_invert_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_eval_type_handler(RzCore *core, int argc, const char **argv)
static bool dict2keylist(void *user, const void *key, const ut64 value)
RZ_IPI RzCmdStatus rz_cmd_eval_color_display_palette_css_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_list_current_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_eval_reset_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_eval_getset_handler(RzCore *core, int argc, const char **argv)
static bool pal_seek(RzCore *core, RzConsPalSeekMode mode, const char *file, RzListIter *iter)
static bool load_theme(RzCore *core, const char *path)
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_remove_current_handler(RzCore *core, int argc, const char **argv)
RZ_API RZ_OWN RzList * rz_core_theme_list(RZ_NONNULL RzCore *core)
Returns the list of the rizin themes.
RZ_IPI RzCmdStatus rz_cmd_eval_color_list_current_theme_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_list_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_eval_color_highlight_remove_all_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_eval_spaces_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_load_previous_theme_handler(RzCore *core, int argc, const char **argv)
RZ_API char * rz_core_theme_get(RzCore *core)
RZ_IPI RzCmdStatus rz_cmd_eval_color_load_next_theme_handler(RzCore *core, int argc, const char **argv)
RZ_API bool rz_core_theme_load(RzCore *core, const char *name)
RZ_IPI RzCmdStatus rz_eval_readonly_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_eval_color_set_colorful_palette_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_eval_editor_handler(RzCore *core, int argc, const char **argv)
RZ_API RzConfigNode * rz_config_set(RzConfig *cfg, RZ_NONNULL const char *name, const char *value)
RZ_API bool rz_config_readonly(RzConfig *cfg, const char *key)
RZ_API RZ_BORROW RzConfigNode * rz_config_node_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API const char * rz_config_node_type(RzConfigNode *node)
RZ_API bool rz_config_toggle(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void rz_cons_println(const char *str)
static RzCmdStatus bool2status(bool val)
static static fork const void static count static fd const char const char static newpath const char static path const char path
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
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 RZ_OWN char * rz_core_editor(const RzCore *core, RZ_NULLABLE const char *file, RZ_NULLABLE const char *str)
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 void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
RZ_API RZ_BORROW void * rz_list_get_n(RZ_NONNULL const RzList *list, ut32 n)
Returns the N-th element of the list.
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
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.
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
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
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")
RZ_API RzColor rz_cons_pal_get(const char *key)
RZ_API void rz_cons_pal_show(void)
RZ_API void rz_cons_pal_update_event(void)
RZ_API int rz_cons_pal_set(const char *key, const char *val)
RZ_API void rz_cons_pal_list(int rad, const char *arg)
RZ_API void rz_cons_pal_init(RzConsContext *ctx)
RZ_API char * rz_cons_pal_parse(const char *str, RzColor *outcol)
RZ_API void rz_cons_pal_random(void)
RZ_API char * rz_cons_rgb_str(char *outstr, size_t sz, const RzColor *rcolor)
#define rz_return_val_if_fail(expr, val)
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
@ RZ_CONS_PAL_SEEK_PREVIOUS
RZ_API bool rz_file_exists(const char *str)
RZ_API RZ_OWN char * rz_file_path_join(RZ_NONNULL const char *s1, RZ_NULLABLE const char *s2)
Concatenate two paths to create a new one with s1+s2 with the correct path separator.
int(* RzListComparator)(const void *value, const void *list_data)
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
RZ_API RZ_OWN char * rz_path_system(RZ_NULLABLE const char *path)
Return the full system path of the given subpath path.
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_s(PJ *j, const char *k)
RZ_API const char * rz_str_lchr(const char *str, char chr)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_dup(char *ptr, const char *string)
#define RZ_STR_ISEMPTY(x)
RZ_API int rz_str_replace_char(char *s, int a, int b)
RZ_API int rz_str_cmp(const char *dst, const char *orig, int len)
RZ_API bool rz_str_endswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string ends with a specifc sequence of characters (case sensitive)
RZ_API RzList * rz_str_split_duplist_n(const char *str, const char *c, int n, bool trim)
Split the string str according to the substring c and returns a RzList with the result.
RZ_API RzList * rz_sys_dir(const char *path)
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
Represent the output state of a command handler.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()