lineedit: remove pos_buf[] array (up to 16k!); fix compat bugs
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 3 Sep 2010 10:59:15 +0000 (12:59 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Fri, 3 Sep 2010 10:59:15 +0000 (12:59 +0200)
commit81254ed3875f7be81b98266866de7f990bcd06c8
tree53b1ebe15e0736714fa3bbc40b5a81dfe9690130
parent3c460b005c3c422fe73dc464902e0626fc57938a
lineedit: remove pos_buf[] array (up to 16k!); fix compat bugs

pos_buf is a strange hack, easy to do without it.
This also allows lines >32k long to be handled.
Also simplified match prefix generations and made behavior more like bash.

function                                             old     new   delta
remove_chunk                                           -      43     +43
collapse_pos                                          79       -     -79
build_match_prefix                                   804     579    -225
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 43/-304)          Total: -261 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
libbb/lineedit.c