瀏覽代碼

Retire readinput()

master
Arun Prakash Jana 7 年之前
父節點
當前提交
6dc4176f57
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 1 行新增17 行删除
  1. +1
    -17
      nnn.c

+ 1
- 17
nnn.c 查看文件

@@ -1327,20 +1327,6 @@ xreadline(char *fname, char *prompt)
return g_buf; 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" * Updates out with "dir/name or "/name"
* Returns the number of bytes copied including the terminating NULL byte * Returns the number of bytes copied including the terminating NULL byte
@@ -2833,9 +2819,7 @@ nochange:
presel = FILTER; presel = FILTER;
goto begin; goto begin;
case SEL_CDBM: case SEL_CDBM:
printprompt("key: "); tmp = xreadline(NULL, "key: ");
tmp = readinput();
clearprompt();
if (tmp == NULL || tmp[0] == '\0') if (tmp == NULL || tmp[0] == '\0')
break; break;




||||||
x
 
000:0
Loading…
取消
儲存