mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
Change void to RCore (#12125)
This commit is contained in:
parent
3b8e0a585c
commit
b6c3425610
@ -349,7 +349,7 @@ R_API RAsmOp *r_core_disassemble (RCore *core, ut64 addr) {
|
||||
}
|
||||
|
||||
static int cmd_uname(void *data, const char *input) {
|
||||
RCore *core = data;
|
||||
RCore *core = (RCore *)data;
|
||||
switch (input[0]) {
|
||||
case '?': // "u?"
|
||||
r_core_cmd_help (data, help_msg_u);
|
||||
@ -3782,7 +3782,7 @@ R_API char *r_core_disassemble_bytes(RCore *core, ut64 addr, int b) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
R_API int r_core_cmd_buffer(void *user, const char *buf) {
|
||||
R_API int r_core_cmd_buffer(RCore *core, const char *buf) {
|
||||
char *ptr, *optr, *str = strdup (buf);
|
||||
if (!str) {
|
||||
return false;
|
||||
@ -3791,32 +3791,32 @@ R_API int r_core_cmd_buffer(void *user, const char *buf) {
|
||||
ptr = strchr (str, '\n');
|
||||
while (ptr) {
|
||||
*ptr = '\0';
|
||||
r_core_cmd (user, optr, 0);
|
||||
r_core_cmd (core, optr, 0);
|
||||
optr = ptr + 1;
|
||||
ptr = strchr (str, '\n');
|
||||
}
|
||||
r_core_cmd (user, optr, 0);
|
||||
r_core_cmd (core, optr, 0);
|
||||
free (str);
|
||||
return true;
|
||||
}
|
||||
|
||||
R_API int r_core_cmdf(void *user, const char *fmt, ...) {
|
||||
R_API int r_core_cmdf(RCore *core, const char *fmt, ...) {
|
||||
char string[4096];
|
||||
int ret;
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
vsnprintf (string, sizeof (string), fmt, ap);
|
||||
ret = r_core_cmd ((RCore *)user, string, 0);
|
||||
ret = r_core_cmd (core, string, 0);
|
||||
va_end (ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
R_API int r_core_cmd0(void *user, const char *cmd) {
|
||||
return r_core_cmd ((RCore *)user, cmd, 0);
|
||||
R_API int r_core_cmd0(RCore *core, const char *cmd) {
|
||||
return r_core_cmd (core, cmd, 0);
|
||||
}
|
||||
|
||||
R_API int r_core_flush(void *user, const char *cmd) {
|
||||
int ret = r_core_cmd ((RCore *)user, cmd, 0);
|
||||
R_API int r_core_flush(RCore *core, const char *cmd) {
|
||||
int ret = r_core_cmd (core, cmd, 0);
|
||||
r_cons_flush ();
|
||||
return ret;
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ static int cmd_cp(void *data, const char *input) {
|
||||
static int cmd_cmp(void *data, const char *input) {
|
||||
static char *oldcwd = NULL;
|
||||
int ret = 0, i, mode = 0;
|
||||
RCore *core = data;
|
||||
RCore *core = (RCore *)data;
|
||||
ut64 val = UT64_MAX;
|
||||
char *filled;
|
||||
ut8 *buf;
|
||||
|
@ -313,10 +313,9 @@ R_API void r_core_cmd_repeat(RCore *core, int next);
|
||||
R_API int r_core_cmd_task_sync(RCore *core, const char *cmd, bool log);
|
||||
R_API char *r_core_editor (const RCore *core, const char *file, const char *str);
|
||||
R_API int r_core_fgets(char *buf, int len);
|
||||
// FIXME: change (void *user) to (RCore *core)
|
||||
R_API int r_core_cmdf(void *user, const char *fmt, ...);
|
||||
R_API int r_core_flush(void *user, const char *cmd);
|
||||
R_API int r_core_cmd0(void *user, const char *cmd);
|
||||
R_API int r_core_cmdf(RCore *core, const char *fmt, ...);
|
||||
R_API int r_core_flush(RCore *core, const char *cmd);
|
||||
R_API int r_core_cmd0(RCore *core, const char *cmd);
|
||||
R_API void r_core_cmd_init(RCore *core);
|
||||
R_API int r_core_cmd_pipe(RCore *core, char *radare_cmd, char *shell_cmd);
|
||||
R_API char *r_core_cmd_str(RCore *core, const char *cmd);
|
||||
@ -451,10 +450,9 @@ R_API int r_core_yank_file_all (RCore *core, const char *input);
|
||||
|
||||
R_API void r_core_loadlibs_init(RCore *core);
|
||||
R_API int r_core_loadlibs(RCore *core, int where, const char *path);
|
||||
// FIXME: change (void *user) -> (RCore *core)
|
||||
R_API int r_core_cmd_buffer(void *user, const char *buf);
|
||||
R_API int r_core_cmdf(void *user, const char *fmt, ...);
|
||||
R_API int r_core_cmd0(void *user, const char *cmd);
|
||||
R_API int r_core_cmd_buffer(RCore *core, const char *buf);
|
||||
R_API int r_core_cmdf(RCore *core, const char *fmt, ...);
|
||||
R_API int r_core_cmd0(RCore *core, const char *cmd);
|
||||
R_API char *r_core_cmd_str(RCore *core, const char *cmd);
|
||||
R_API int r_core_cmd_foreach(RCore *core, const char *cmd, char *each);
|
||||
R_API int r_core_cmd_foreach3(RCore *core, const char *cmd, char *each);
|
||||
|
Loading…
Reference in New Issue
Block a user