mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-17 12:48:41 +00:00
Remove dupe api in r_cons
This commit is contained in:
parent
5251c20ebf
commit
654e246fc0
@ -230,30 +230,6 @@ R_API int r_cons_arrow_to_hjkl(int ch) {
|
||||
return ch;
|
||||
}
|
||||
|
||||
R_API char *r_cons_gets(const char *prompt, int len) {
|
||||
if (len < 0) {
|
||||
return NULL;
|
||||
}
|
||||
if (len == 0) {
|
||||
len = 1024; // default size
|
||||
}
|
||||
char *res = calloc (1, len);
|
||||
if (res) {
|
||||
char *oprompt = NULL;
|
||||
if (prompt) {
|
||||
oprompt = r_line_get_prompt ();
|
||||
if (!oprompt) {
|
||||
return NULL;
|
||||
}
|
||||
r_line_set_prompt (prompt);
|
||||
}
|
||||
r_cons_fgets (res, len, -1, NULL);
|
||||
if (oprompt) {
|
||||
r_line_set_prompt (prompt);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
// XXX no control for max length here?!?!
|
||||
R_API int r_cons_fgets(char *buf, int len, int argc, const char **argv) {
|
||||
#define RETURN(x) { ret=x; goto beach; }
|
||||
|
@ -800,7 +800,6 @@ R_API char *r_cons_rainbow_get(int idx, int last, bool bg);
|
||||
R_API void r_cons_rainbow_free(RConsContext *ctx);
|
||||
R_API void r_cons_rainbow_new(RConsContext *ctx, int sz);
|
||||
|
||||
R_API char *r_cons_gets(const char *prompt, int len);
|
||||
R_API int r_cons_fgets(char *buf, int len, int argc, const char **argv);
|
||||
R_API char *r_cons_hud(RList *list, const char *prompt);
|
||||
R_API char *r_cons_hud_path(const char *path, int dir);
|
||||
|
Loading…
x
Reference in New Issue
Block a user