mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 15:10:53 +00:00
r_cons_singleton() 🠊 r_cons_singleton ()
This commit is contained in:
parent
99e45f6f54
commit
2faadf6d86
@ -2,8 +2,8 @@
|
||||
|
||||
#include <r_cons.h>
|
||||
|
||||
#define useUtf8 (r_cons_singleton()->use_utf8)
|
||||
#define useUtf8Curvy (r_cons_singleton()->use_utf8_curvy)
|
||||
#define useUtf8 (r_cons_singleton ()->use_utf8)
|
||||
#define useUtf8Curvy (r_cons_singleton ()->use_utf8_curvy)
|
||||
|
||||
#define W(y) r_cons_canvas_write (c, y)
|
||||
#define G(x, y) r_cons_canvas_gotoxy (c, x, y)
|
||||
|
@ -4,8 +4,8 @@
|
||||
#define W(y) r_cons_canvas_write(c,y)
|
||||
#define G(x,y) r_cons_canvas_gotoxy(c,x,y)
|
||||
|
||||
#define useUtf8 (r_cons_singleton()->use_utf8)
|
||||
#define useUtf8Curvy (r_cons_singleton()->use_utf8_curvy)
|
||||
#define useUtf8 (r_cons_singleton ()->use_utf8)
|
||||
#define useUtf8Curvy (r_cons_singleton ()->use_utf8_curvy)
|
||||
|
||||
enum {
|
||||
APEX_DOT = 0,
|
||||
|
@ -9,7 +9,7 @@
|
||||
/* experimental support for x/y click */
|
||||
#define USE_CLICK 0
|
||||
|
||||
#define I r_cons_singleton()
|
||||
#define I r_cons_singleton ()
|
||||
|
||||
#if 0
|
||||
//__UNIX__
|
||||
@ -510,7 +510,7 @@ R_API int r_cons_yesno(int def, const char *fmt, ...) {
|
||||
}
|
||||
|
||||
R_API char *r_cons_input(const char *msg) {
|
||||
char *oprompt = r_line_get_prompt (); //r_cons_singleton()->line->prompt);
|
||||
char *oprompt = r_line_get_prompt (); //r_cons_singleton ()->line->prompt);
|
||||
if (!oprompt) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* radare - LGPL - Copyright 2009-2018 - pancake */
|
||||
|
||||
#include <r_cons.h>
|
||||
#define I r_cons_singleton()
|
||||
#define I r_cons_singleton ()
|
||||
|
||||
#if __WINDOWS__
|
||||
static void fill_tail (int cols, int lines) {
|
||||
|
@ -3135,7 +3135,7 @@ R_API int r_core_anal_data (RCore *core, ut64 addr, int count, int depth, int wo
|
||||
r_io_read_at (core->io, addr, buf, len);
|
||||
buf[len - 1] = 0;
|
||||
|
||||
RConsPrintablePalette *pal = r_config_get_i (core->config, "scr.color")? &r_cons_singleton()->pal: NULL;
|
||||
RConsPrintablePalette *pal = r_config_get_i (core->config, "scr.color")? &r_cons_singleton ()->pal: NULL;
|
||||
for (i = j = 0; j < count; j++) {
|
||||
if (i >= len) {
|
||||
r_io_read_at (core->io, addr + i, buf, len);
|
||||
|
@ -2123,7 +2123,7 @@ static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon) {
|
||||
ptr = strchr (cmd, '<');
|
||||
if (ptr) {
|
||||
ptr[0] = '\0';
|
||||
if (r_cons_singleton()->is_interactive) {
|
||||
if (r_cons_singleton ()->is_interactive) {
|
||||
if (ptr[1] == '<') {
|
||||
/* this is a bit mess */
|
||||
//const char *oprompt = strdup (r_line_singleton ()->prompt);
|
||||
|
@ -1981,7 +1981,7 @@ R_API RCore *r_core_fini(RCore *c) {
|
||||
/* rconfig doesnt knows how to deinitialize vars, so we
|
||||
should probably need to add a r_config_free_payload callback */
|
||||
r_cons_free ();
|
||||
r_cons_singleton()->teefile = NULL; // HACK
|
||||
r_cons_singleton ()->teefile = NULL; // HACK
|
||||
r_search_free (c->search);
|
||||
r_flag_free (c->flags);
|
||||
r_fs_free (c->fs);
|
||||
|
@ -342,7 +342,7 @@ R_API int r_core_rtr_http_stop(RCore *u) {
|
||||
RSocket* sock;
|
||||
|
||||
#if __WINDOWS__
|
||||
r_socket_http_server_set_breaked (&r_cons_singleton()->breaked);
|
||||
r_socket_http_server_set_breaked (&r_cons_singleton ()->breaked);
|
||||
#endif
|
||||
if (((size_t)u) > 0xff) {
|
||||
port = listenport? listenport: r_config_get (
|
||||
@ -1668,12 +1668,12 @@ static bool r_core_rtr_rap_run(RCore *core, const char *input) {
|
||||
if (fd) {
|
||||
if (r_io_is_listener (core->io)) {
|
||||
if (!r_core_serve (core, fd)) {
|
||||
r_cons_singleton() -> breaked = true;
|
||||
r_cons_singleton () -> breaked = true;
|
||||
}
|
||||
r_io_desc_free (fd);
|
||||
}
|
||||
} else {
|
||||
r_cons_singleton()->breaked = true;
|
||||
r_cons_singleton ()->breaked = true;
|
||||
}
|
||||
return !r_cons_singleton ()->breaked;
|
||||
// r_core_cmdf (core, "o rap://%s", input);
|
||||
|
@ -28,7 +28,7 @@ typedef struct {
|
||||
static char *prompt(const char *str, const char *txt) {
|
||||
char cmd[1024];
|
||||
char *res = NULL;
|
||||
char *oprompt = strdup (r_cons_singleton()->line->prompt);
|
||||
char *oprompt = strdup (r_cons_singleton ()->line->prompt);
|
||||
r_cons_show_cursor (true);
|
||||
if (txt && *txt) {
|
||||
free (r_cons_singleton ()->line->contents);
|
||||
|
@ -1405,7 +1405,7 @@ R_API int r_debug_continue_syscalls(RDebug *dbg, int *sc, int n_sc) {
|
||||
for (;;) {
|
||||
RDebugReasonType reason;
|
||||
|
||||
if (r_cons_singleton()->breaked)
|
||||
if (r_cons_singleton ()->breaked)
|
||||
break;
|
||||
#if __linux__
|
||||
// step is needed to avoid dupped contsc results
|
||||
|
Loading…
Reference in New Issue
Block a user