aboutsummaryrefslogtreecommitdiff
path: root/miscutils/less.c
AgeCommit message (Collapse)Author
2007-09-27introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko
2007-08-18don't pass argc in getopt32, it's superfluousDenis Vlasenko
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
2007-08-03less: add a bit more robustness in keyboard reading codeDenis Vlasenko
2007-05-31less: less <HUGEFILE + [End] busy loops, fix itDenis Vlasenko
2007-05-31less: forgot trivial #if ENABLE_xxxxDenis Vlasenko
2007-05-31more: stop using bssDenis Vlasenko
# make && make bloatcheck function old new delta gotsig 86 107 +21 more_main 777 781 +4 cin_fileno 4 - -4 set_tty_to_initial_mode 25 - -25 new_settings 120 60 -60 initial_settings 120 60 -60 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 2/2 up/down: 25/-149) Total: -124 bytes
2007-05-31less: fix very obscure memory corruption bugDenis Vlasenko
2007-05-31less: stop using data/bss. Code got smaller too.Denis Vlasenko
# size busybox_old busybox_unstripped text data bss dec hex filename 700719 2896 17880 721495 b0257 busybox_old 700547 2832 17432 720811 affab busybox_unstripped # size */*/less.o text data bss dec hex filename 6861 50 344 7255 1c57 busybox.t0/miscutils/less.o 6657 0 0 6657 1a01 busybox.t1/miscutils/less.o
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-05-09less: fix case when regex search finds nothingDenis Vlasenko
2007-03-20fix accumulated whitespace and indentation damageDenis Vlasenko
2007-03-10more: do not mess with "/dev/console" (!);Denis Vlasenko
fill whole 1st screen (was "screen sans one line"); fall back to cat if redirected or no ctty less: fall back to cat if no ctty (was exiting) resize: cosmetics
2007-03-09less: handle yet another Home/End key sequence; expand a commentDenis Vlasenko
2007-03-08less: make '/' (regex search) scan input if no matches are foundDenis Vlasenko
in input taken so far.
2007-03-08less: yet another attempt to make search betterDenis Vlasenko
2007-03-08less: fix 'n'ext match: sometimes was going to 999999th lineDenis Vlasenko
2007-03-07clean up accumulated whitespace damageDenis Vlasenko
2007-02-14less: support xterm's home/end; improve forward searchDenis Vlasenko
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2006-12-31less: fix <tab><backspace> bugletDenis Vlasenko
2006-12-31less: interpret backspace.Denis Vlasenko
less is officially declared PAGER-capable! ;) (this includes viewing of manpages)
2006-12-31fixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr>Denis Vlasenko
2006-12-30done a dozen of randconfig test. guess what? ALL failed...Denis Vlasenko
these are resulting fixes
2006-12-25less: fix regexp search '/' on large filesDenis Vlasenko
2006-12-24small stupid changes. no code changesDenis Vlasenko
2006-12-24less: implement waiting for input using select(). Rather tricky business.Denis Vlasenko
But we do not read entire input anymore up-front.
2006-12-21less: a few fixes for cases where we overflow status lineDenis Vlasenko
2006-12-21less: restore TAB display (was showing as inverse I after prev changes :)Denis Vlasenko
2006-12-21less: "(null)" is a bit strange. "standard input" is better :)Denis Vlasenko
2006-12-21less: how many different kinds of status line we need, three?!Denis Vlasenko
small fixes. [prev commit also added control char filtering on input (e.g. regexp input, filename input for 'E' etc)]
2006-12-21less: stop dying on bad regexps, quietly pipe data w/oDenis Vlasenko
user interaction if stdout is not a tty. size optimizations
2006-12-21less: total cleanup and bugfix.Denis Vlasenko
Doesn't die horribly on binary files anymore. In fact, they _100%_ work now. Control chars are in reverse video, including DEL and that idiocy of VT-10x, Meta-ESC [inventor of which should be prohibited from reproducing]. Regex search is fixed also. When you specify search ('/' key), control chars turn into dots (unhighlighted), and found occurrences highlighted instead. This is reversible. Memory management fixed (was leaky as hell) and optimized. Linewrapping fixed and thoroughly tested. Max buffer size made configurable. ~ 600 bytes saved.
2006-12-20less: somewhat buggy applet, but nice. Muchly reducedDenis Vlasenko
xstrdup'ing and memory consumption. Made linewrap saner. regex matching code was awful - still buggy, but not as leaky as before. Made buffer size configurable. Killed several static and on-stack buffers. Hopefully eliminated staircase effect on Ctrl-C (unable to reproduce).
2006-12-04- shrink less.Bernhard Reutner-Fischer
01a: svn version 01b: merge past_eof and inp_stdin into flags. 01c: merge match_backwards into flags. 01d: add handling of <HOME> and <END> keys, remove set_tty_raw, use fflush_stdout_and_exit 01e: rewrite special-key handling to be smaller. 01f: changing the format saves 4 bytes (alot of places would benefit from this) text data bss dec hex filename 9034 8 648 9690 25da less.o.01a 9023 8 640 9671 25c7 less.o.01b 9027 8 636 9671 25c7 less.o.01c 9068 8 636 9712 25f0 less.o.01d 8990 8 636 9634 25a2 less.o.01e 8986 8 636 9630 259e less.o.01f
2006-10-26remove bb_printf and the likeDenis Vlasenko
2006-10-20message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-09-17whitespace cleanupDenis Vlasenko
2006-08-20- merge -r15463:15564 from busybox_scratch branch through these changesets:Bernhard Reutner-Fischer
------------------------------------------------------------------------ r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines - use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert. - use xchdir() since all is invain if it fails there anyways, supposedly ------------------------------------------------------------------------ r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines - adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account. ------------------------------------------------------------------------ r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines - partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save s 144 bytes text data bss dec hex filename 862434 10156 645924 1518514 172bb2 busybox.old 862322 10156 645892 1518370 172b22 busybox function old new delta z_len 4 - -4 textend 4 - -4 part_nb 4 - -4 insize 4 - -4 ifile_size 4 - -4 do_link 4 - -4 new_text 70 60 -10 ipaddr_list_link 33 23 -10 gzip_main 898 822 -76 ------------------------------------------------------------------------------ (add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120) Total: -120 bytes ------------------------------------------------------------------------ r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines - remove useless global exports function old new delta rpm_main 940 1601 +661 rpm_getstring 107 112 +5 rpm_getint 148 153 +5 loop_through_files 103 106 +3 fileaction_dobackup 115 113 -2 fileaction_list 5 - -5 rpm_getcount 42 - -42 extract_cpio_gz 161 - -161 rpm_gettags 504 - -504 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714) Total: -40 bytes text data bss dec hex filename 862322 10156 645892 1518370 172b22 busybox.old 862290 10156 645892 1518338 172b02 busybox ------------------------------------------------------------------------ r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines - shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s emaphore stuff into single caller manually. stats: function old new delta logMessage 395 427 +32 message 1245 1257 +12 opts - 4 +4 small 1 - -1 local_logging 4 - -4 doRemoteLog 4 - -4 circular_logging 4 - -4 syslogd_main 1299 1285 -14 static.res 36 16 -20 .rodata 186650 186586 -64 static.line 1025 - -1025 ------------------------------------------------------------------------------ (add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136) Total: -1088 bytes cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,} text data bss dec hex filename 3723 348 5242 9313 2461 sysklogd/syslogd.o.orig 3697 348 4188 8233 2029 sysklogd/syslogd.o ============================================================================== Overall bloatcheck for the changeset mentioned above: function old new delta rpm_main 953 1608 +655 logMessage 395 427 +32 message 1245 1257 +12 opts - 4 +4 rpm_getstring 107 110 +3 rpm_getint 148 151 +3 loop_through_files 103 104 +1 small 1 - -1 fileaction_dobackup 115 113 -2 z_len 4 - -4 textend 4 - -4 part_nb 4 - -4 local_logging 4 - -4 insize 4 - -4 ifile_size 4 - -4 do_link 4 - -4 doRemoteLog 4 - -4 circular_logging 4 - -4 fileaction_list 5 - -5 new_text 70 60 -10 ipaddr_list_link 33 23 -10 clear_bufs 31 21 -10 syslogd_main 1287 1273 -14 builtin_help 190 176 -14 static.res 36 16 -20 builtin_source 229 199 -30 rpm_getcount 42 - -42 gzip_main 842 786 -56 .rodata 227176 227112 -64 lash_main 609 527 -82 busy_loop 3883 3739 -144 extract_cpio_gz 155 - -155 rpm_gettags 501 - -501 static.line 1025 - -1025 ------------------------------------------------------------------------------ (add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221) Total: -1511 bytes
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-06-03- move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer
and eventual platform specific includes in early.
2006-05-25And fix the error I just introduced. :)Rob Landley
2006-05-25Remove pointless #define.Rob Landley
2006-05-19- fix invalid modeBernhard Reutner-Fischer
2006-04-29Rob Sullivan writes: rewrite the regex handling to improve stabilityMike Frysinger
2006-04-18From Rob Sullivan: Fix a segfault with searching, plus some cleanups.Rob Landley
2006-04-16just use the stack to kill memleak and return if user didnt give us anything ↵Mike Frysinger
to match
2006-04-16use xmalloc, dont hardcode length of string, and get rid of pointless call ↵Mike Frysinger
to memset
2006-04-16uncuddle if statementsMike Frysinger