Skip to content

Commit

Permalink
Fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Sep 15, 2024
1 parent e99998b commit 9523b8d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cstool/cstool.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,44 @@ static void print_details(csh handle, cs_arch arch, cs_mode md, cs_insn *ins)
printf("\n");
}

static cs_mode find_additional_modes(const char *input, cs_arch arch) {
if (!input) {
return 0;
}
cs_mode mode = 0;
int i, j;
for (i = 0; all_opts[i].name; i++) {
if (all_opts[i].opt || !strstr(input, all_opts[i].name)) {
continue;
}
for (j = 0; j < CS_ARCH_MAX; j++) {
if (arch == all_opts[i].archs[j]) {
mode |= all_opts[i].mode;
break;
}
}
}
return mode;
}

static void enable_additional_options(csh handle, const char *input, cs_arch arch) {
if (!input) {
return;
}
int i, j;
for (i = 0; all_opts[i].name; i++) {
if (all_opts[i].mode || !strstr(input, all_opts[i].name)) {
continue;
}
for (j = 0; j < CS_ARCH_MAX; j++) {
if (arch == all_opts[i].archs[j]) {
cs_option(handle, CS_OPT_SYNTAX, all_opts[i].opt);
break;
}
}
}
}

int main(int argc, char **argv)
{
int i, c;
Expand Down

0 comments on commit 9523b8d

Please sign in to comment.