aboutsummaryrefslogtreecommitdiff
path: root/miscutils/less.c
AgeCommit message (Collapse)Author
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
2006-04-16use more boiler plate GPL noticesMike Frysinger
2006-04-16uncuddle bracketsMike Frysinger
2006-02-01removed anoinig warnings"Vladimir N. Oleynik"
2005-12-16Ahem. Vladimir checked in a different fix bug didn't close out the bug.Rob Landley
Reverting...
2005-12-16Less would segfault if it had no tty. (Bug 600.)Rob Landley
2005-12-15fopen(TTY...) to bb_xfopen(), close bug 600"Vladimir N. Oleynik"
2005-09-29change interface to bb_xasprintf() - more perfect for me."Vladimir N. Oleynik"
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers reduce 100 bytes don't care in sum
2005-09-22quick patch - have removed stranges for me"Vladimir N. Oleynik"
2005-09-191) read from stdin work now"Vladimir N. Oleynik"
2) destroy segfault in number_process 3) removes dead code complex patch my and Tito
2005-09-19quick patchs: drop founded memory leak, more libbb, more C-compatibility, ↵"Vladimir N. Oleynik"
size reduction
2005-09-18First cleanup pass, from Rob Sullivan. More to be done...Rob Landley
2005-09-16more C-compatibily, Thanks Bernhard Fischer"Vladimir N. Oleynik"
2005-09-16small change for highlihting flags, more busyboxes: indent, forward ↵"Vladimir N. Oleynik"
declaration, paste BSS
2005-09-15New applet "less", from Rob Sullivan.Rob Landley