Retire readinput()

This commit is contained in:
Arun Prakash Jana 2018-04-25 23:09:00 +05:30
parent 4fbb36b66b
commit 6dc4176f57
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 1 additions and 17 deletions

18
nnn.c
View File

@ -1327,20 +1327,6 @@ xreadline(char *fname, char *prompt)
return g_buf;
}
static char *
readinput(void)
{
cleartimeout();
echo();
curs_set(TRUE);
memset(g_buf, 0, NAME_MAX + 1);
wgetnstr(stdscr, g_buf, NAME_MAX);
noecho();
curs_set(FALSE);
settimeout();
return g_buf[0] ? g_buf : NULL;
}
/*
* Updates out with "dir/name or "/name"
* Returns the number of bytes copied including the terminating NULL byte
@ -2833,9 +2819,7 @@ nochange:
presel = FILTER;
goto begin;
case SEL_CDBM:
printprompt("key: ");
tmp = readinput();
clearprompt();
tmp = xreadline(NULL, "key: ");
if (tmp == NULL || tmp[0] == '\0')
break;