diff options
author | Ron Yorston <rmy@pobox.com> | 2015-07-21 22:28:09 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-07-21 22:28:09 +0200 |
commit | 193ba408a4fd3313b1dc2eb5eb25885cfa4363f6 (patch) | |
tree | 1062a000b0d330756ec8e88e14052d803634f2a9 /examples/bootfloppy/mkrootfs.sh | |
parent | 35ae2ccb40924efcd0fd0c873cc9e56c58851222 (diff) | |
download | busybox-193ba408a4fd3313b1dc2eb5eb25885cfa4363f6.tar.gz |
less: improvements to verbose status messages
Make verbose status messages (-m/-M flags) behave more like the
real `less` command:
- fix display of line numbers so they're correct whether lines are
being truncated (-S flag) or wrapped.
- don't display total lines or percentage when lines are read from
stdin: we don't have that information until we reach EOF. When
we do reach EOF the additional information is displayed.
- when lines are read from a file count the total number of lines
so that we can display percentages. Counting lines is avoided
until the information is actually needed. If the user pages to
EOF the separate read pass can be avoided entirely.
Fixes Bug 7586
function old new delta
m_status_print 195 382 +187
safe_lineno - 35 +35
reinitialize 172 182 +10
read_lines 675 685 +10
buffer_fill_and_print 178 169 -9
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 242/-9) Total: 233 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'examples/bootfloppy/mkrootfs.sh')
0 files changed, 0 insertions, 0 deletions