busybox/miscutils
Ron Yorston d542d183e1 less: fix line number confusion
Much of the code refers to lines using indices into the flines
array (which splits lines into portions that fit on the terminal).
In some cases this is wrong and actual line numbers should be
used:

- when lines are being truncated rather than wrapped (-S flag)
- when line numbers have been entered by the user

Also fix a bug in numeric input and improve the display at EOF.

function                                             old     new   delta
goto_lineno                                            -     111    +111
cap_cur_fline                                          -     101    +101
buffer_to_line                                         -      56     +56
buffer_up                                             35      66     +31
less_main                                           2606    2615      +9
goto_match                                           125     127      +2
buffer_down                                           81      56     -25
buffer_line                                           64       -     -64
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 310/-89)           Total: 221 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-31 16:22:08 +02:00
..
adjtimex.c
bbconfig.c
beep.c
chat.c
chrt.c
Config.src
conspy.c
crond.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
crontab.c Removes stray empty line from code 2015-07-13 03:25:46 +02:00
dc.c dc: fix "dc p" prinitng bogus data 2015-05-25 13:31:25 +02:00
devfsd.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
devmem.c
eject.c
fbsplash.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
fbsplash.cfg
flash_eraseall.c
flash_lock_unlock.c
flashcp.c flashcp: change BUFSIZE to 4k 2014-12-10 13:44:27 +01:00
hdparm.c
i2c_tools.c i2cdetect: use break instead of goto in list_i2c_busses_and_exit() 2015-06-07 18:05:47 +02:00
inotifyd.c
ionice.c
Kbuild.src
last_fancy.c libbb: add a function to make a copy of a region of memory 2015-07-19 23:05:20 +02:00
last.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
less.c less: fix line number confusion 2015-07-31 16:22:08 +02:00
makedevs.c
man.c libbb: introduce and use is_prefixed_with() 2015-03-12 17:48:34 +01:00
microcom.c
mountpoint.c
mt.c
nandwrite.c nanddump: don't show --bb in usage when disabled 2014-12-18 11:55:08 +01:00
raidautorun.c
readahead.c
rfkill.c
runlevel.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
rx.c
setserial.c
setsid.c
strings.c
taskset.c taskset: fix logic error in "if it doesn't start with 0x..." 2014-08-31 01:35:45 +02:00
time.c
timeout.c
ttysize.c
ubi_tools.c ubiattach: add option -O 2015-01-30 18:33:24 +01:00
volname.c
wall.c *: Switch to POSIX utmpx API 2015-04-02 23:03:46 +02:00
watchdog.c