summaryrefslogtreecommitdiff
path: root/findutils/grep.c
AgeCommit message (Collapse)Author
2008-09-30grep: fix 'echo aaa | grep -o a' + ENABLE_EXTRA_COMPAT caseDenis Vlasenko
by Natanael Copa
2008-09-19grep: yet another fixlet for EXTRA_COMPATDenis Vlasenko
2008-09-19grep: fix EXTRA_COMPAT grep to honor -E and -iDenis Vlasenko
2008-08-09grep: option to use GNU regex matching instead of POSIX one.Denis Vlasenko
This fixes problems with NULs in files being scanned, but costs +800 bytes. The same can be done to sed (TODO).
2008-07-21libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko
(by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-27*: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
2008-06-25whitespace fixes. no code changesDenis Vlasenko
2008-06-07grep: make "-f -" work (+ testsuite)Denis Vlasenko
diff: small code shrink function old new delta grep_main 722 714 -8 diffreg 1825 1793 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-40) Total: -40 bytes
2008-05-19- use EXIT_{SUCCESS,FAILURE}. No object-code changesBernhard Reutner-Fischer
2008-03-26*: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/Denis Vlasenko
2008-03-17*: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)Denis Vlasenko
function old new delta getopt32 1370 1385 +15 sulogin_main 490 494 +4 realpath_main 84 86 +2 sleep_main 76 77 +1 mt_main 256 257 +1 printenv_main 75 74 -1 fdformat_main 546 545 -1 usleep_main 44 42 -2 setlogcons_main 77 75 -2 ed_main 2654 2649 -5 deallocvt_main 69 64 -5 addgroup_main 373 368 -5 mkfs_minix_main 2989 2982 -7 tail_main 1221 1213 -8 sv_main 1254 1241 -13 du_main 348 328 -20 tftp_main 325 302 -23 split_main 581 558 -23 nc_main 1000 977 -23 diff_main 891 868 -23 arping_main 1797 1770 -27 ls_main 893 847 -46 od_main 2797 2750 -47 readprofile_main 1944 1895 -49 tcpudpsvd_main 1973 1922 -51 udhcpc_main 2590 2513 -77 grep_main 824 722 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/22 up/down: 23/-560) Total: -537 bytes text data bss dec hex filename 796973 658 7428 805059 c48c3 busybox_old 796479 662 7420 804561 c46d1 busybox_unstripped
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2008-02-11- spelling fixesBernhard Reutner-Fischer
2008-01-24grep: fix wrong filename in error messageDenis Vlasenko
2007-11-04grep: fix -FoDenis Vlasenko
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-01'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko
263 bytes saved.
2007-09-10grep: delete obsolete commentDenis Vlasenko
2007-09-10grep: fix grep -F -e str1 -e str2 (was matching str2 only)Denis Vlasenko
by replacing "=" by "|=" here: found |= strstr(line, gl->pattern) != NULL; grep: optimization: stop on first -e match grep: stop using bss. -40 bytes
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-07-15grep: implement -m MAX_MATCHES; fix help textDenis Vlasenko
grep_file 771 822 +51 packed_usage 22573 22610 +37 .rodata 128058 128090 +32 grep_main 842 853 +11 max_matches - 4 +4 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 135/0) Total: 135 bytes
2007-07-15grep: fix buglets with context printingDenis Vlasenko
print_line 152 170 +18 did_print_line - 1 +1 grep_file 788 771 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 19/-17) Total: 2 bytes text data bss dec hex filename 673368 2740 13968 690076 a879c busybox_old 673368 2740 13968 690076 a879c busybox_unstripped
2007-06-08grep: selection done by FEATURE_GREP_EGREP_ALIAS was broken, fix.Denis Vlasenko
(Maxime Bizon <mbizon@freebox.fr> (Freebox))
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-12make sure we free the grep data as wellMike Frysinger
2007-04-08find: fix handling of -pruneDenis Vlasenko
recursive_actions: uppercase flag constants
2007-04-04- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer
2007-03-29- fold recurse, depthFirst and dereference params into one param flags.Bernhard Reutner-Fischer
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-02-25grep: "implement" -a and -I by ignoring themDenis Vlasenko
2007-02-25grep: implement -wDenis Vlasenko
2007-02-25ash: replace xstrdup (shell shall not die)Denis Vlasenko
grep: fix mis-indented block
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2006-12-22remove useless casts (type*) xzalloc(...)Denis Vlasenko
2006-10-27recursive_action: add depth paramDenis Vlasenko
chmod: match coreutils versus following links
2006-10-26rename functions to more understandable namesDenis Vlasenko
2006-10-22grep: "grep -h pattern file1 file2" ignored -hDenis Vlasenko
(precluded kernel's "make modules")
2006-10-15grep: -r didn't close files, producing "Too many open files"Denis Vlasenko
2006-10-14grep: fix combination of -r and -hDenis Vlasenko
2006-10-14grep: add support for -rDenis Vlasenko
2006-10-12bb_get_[chomped]line_from_file wasn't descriptive enough.Denis Vlasenko
Renaming...
2006-10-03bb_applet_name -> applet_nameDenis 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-10-03lots of silly indent fixesDenis Vlasenko
2006-09-29grep: add help text; fix styleDenis Vlasenko
2006-09-29grep: implement -o option. Patch by Jac Goudsmit.Denis Vlasenko
2006-09-25fix 'grep -C' which requires an argumentEric Andersen
2006-09-13- fix copy'n paste errors that got introduced when switching to the shorter ↵Bernhard Reutner-Fischer
boilerplate. No object code changes.
2006-08-03Remove xcalloc() and convert its callers to xzalloc(). About half of themRob Landley
were using "1" as one of the arguments anyway, and as for the rest a multiply and a push isn't noticeably bigger than pushing two arguments on the stack.
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.)