line editing: make read_line_input() not take timeout param

It's almost always -1.

function                                             old     new   delta
read_line_input                                     3902    3912     +10
new_line_input_t                                      24      31      +7
pgetc                                                583     585      +2
save_command_ps_at_cur_history                        80      78      -2
read_line                                             76      74      -2
fgetc_interactive                                    246     244      -2
addLines                                              84      82      -2
doCommands                                          2226    2222      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 19/-12)              Total: 7 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-08-02 17:27:28 +02:00
parent dd4b446f76
commit 84ea60ed65
6 changed files with 30 additions and 20 deletions

View File

@ -644,7 +644,7 @@ read_line(const char *prompt)
{
int sz;
sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer), /*timeout*/ -1);
sz = read_line_input(NULL, prompt, line_buffer, sizeof(line_buffer));
if (sz <= 0)
exit(EXIT_SUCCESS); /* Ctrl-D or Ctrl-C */