58 #define RZ_PSEUDO_DEFINE_GRAMMAR(x, y) \
59 { .mnemonic = x, .mnemonic_length = sizeof(x) - 1, .grammar = y }
61 #define RZ_PSEUDO_DEFINE_DIRECT(x, y) \
62 { .expected = x, .pseudo = y }
64 #define RZ_PSEUDO_DEFINE_REPLACE(x, y, f) \
65 { .expected = x, .replace = y, .flag = f }
67 #define RZ_PSEUDO_DEFINE_CONFIG(d, l, r, m, t) \
70 .direct_length = RZ_ARRAY_SIZE(d), \
72 .replace_length = RZ_ARRAY_SIZE(r), \
74 .lexicon_length = RZ_ARRAY_SIZE(l), \
79 #define RZ_PSEUDO_DEFINE_CONFIG_NO_DIRECT(l, r, m, t) \
84 .replace_length = RZ_ARRAY_SIZE(r), \
86 .lexicon_length = RZ_ARRAY_SIZE(l), \
91 #define RZ_PSEUDO_DEFINE_CONFIG_ONLY_LEXICON(l, m, t) \
96 .replace_length = 0, \
98 .lexicon_length = RZ_ARRAY_SIZE(l), \
111 if (!strcmp(assembly,
"invalid")) {
113 }
else if (!strncmp(assembly,
"trunc", 5)) {
115 }
else if (!strcmp(assembly,
"nop")) {
118 size_t length = strlen(assembly);
120 for (
i = 0;
i <
config->direct_length; ++
i) {
122 if (!strcmp(assembly,
tmp)) {
128 size_t mnemonic_length =
length;
129 if ((
tmp = strchr(assembly,
' '))) {
130 mnemonic_length =
tmp - assembly;
132 for (
i = 0;
i <
config->lexicon_length; ++
i) {
152 if (index > 0 && index < config->max_args) {
175 for (
int i = 0;
i <
config->replace_length; ++
i) {
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 length
RZ_API void Ht_() free(HtName_(Ht) *ht)
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 void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
static bool rz_pseudo_convert(const RzPseudoConfig *config, const char *assembly, RzStrBuf *sb)
#define rz_return_val_if_fail(expr, val)
RZ_API char * rz_str_replace(char *str, const char *key, const char *val, int g)
RZ_API RZ_OWN char * rz_strbuf_drain_nofree(RzStrBuf *sb)
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API const char * rz_strbuf_setf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API bool rz_strbuf_append_n(RzStrBuf *sb, const char *s, size_t l)
const RzPseudoGrammar * lexicon
const RzPseudoReplace * replace
const RzPseudoDirect * direct