read_key,lineeedit: parse position answerback faster; sanitize its use
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 26 Oct 2009 14:23:32 +0000 (15:23 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 26 Oct 2009 14:23:32 +0000 (15:23 +0100)
commit727e1b536e5478b8f28c93990a5bf34091144608
treec8993291a1a03a06fcb7a2382e6cc211e6d7861e
parentd31a8793ebedb53b686c9ea01be33d3d564760b9
read_key,lineeedit: parse position answerback faster; sanitize its use

it's still not reliable, and probably cannot be made so...
added comment with explanation.

function                                             old     new   delta
put_prompt                                            52     110     +58
read_key                                             601     607      +6
lineedit_read_key                                    201     207      +6
win_changed                                          108     104      -4
read_line_input                                     4824    4809     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 70/-19)             Total: 51 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c
libbb/read_key.c