Remove dupe api in r_cons

This commit is contained in:
pancake 2019-03-13 11:06:19 +01:00
parent 5251c20ebf
commit 654e246fc0
2 changed files with 0 additions and 25 deletions

View File

@ -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; }

View File

@ -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);