aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* grep: cap insane -B NUM values to MAX_INT / 8. Fixes bug 2653.Denys Vlasenko2010-10-021-6/+9
| | | | | | | function old new delta grep_main 766 779 +13 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix -o match with empty string (suggested by Colin Watson ↵Denys Vlasenko2010-08-231-3/+7
| | | | | | | | | <cjwatson@ubuntu.com>) function old new delta grep_file 1216 1251 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* findutils/*: move usage and applet bits to *.c filesDenys Vlasenko2010-06-151-5/+58
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* remove defconfig. Now "make defconfig" simply uses defaults from Config.inDenys Vlasenko2010-06-061-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make it possible to keep Config/Kbuild snippets in *.c filesDenys Vlasenko2010-05-091-0/+35
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix -FiIan Wienand2010-04-301-1/+4
| | | | | | | | function old new delta grep_file 1151 1169 +18 Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: makw -w support unconditionalDenys Vlasenko2010-04-261-4/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko2010-02-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove some uses of argcDenys Vlasenko2010-01-041-6/+4
| | | | | | | | | | | | | | | | | | | | | | | function old new delta whoami_main 34 37 +3 logname_main 60 63 +3 hostid_main 35 38 +3 ttysize_main 136 135 -1 nmeter_main 673 672 -1 logger_main 387 386 -1 uuencode_main 330 328 -2 ifupdown_main 2125 2123 -2 mesg_main 158 155 -3 free_main 333 330 -3 cal_main 902 899 -3 acpid_main 443 440 -3 ar_main 196 189 -7 find_main 476 467 -9 ifconfig_main 1235 1221 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49) Total: -40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix a case when -o loops foreverDenys Vlasenko2009-12-041-3/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix -E + {range}; fix -o not printing all matches (bug 489)Denys Vlasenko2009-07-291-15/+21
| | | | | | | | | two different bugs, one with EXTRA_COMPAT, other without. function old new delta grep_file 1132 1129 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-19/+19
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* trailing whitespace removalDenis Vlasenko2009-04-011-1/+1
|
* Compatibility fixes:Denis Vlasenko2009-03-201-4/+13
| | | | | | | | | grep: support -z find: support --mindepth together +45 bytes cpio: support -p (configurable, +230 bytes) libbb: tweaks for cpio
* timeout: new applet. 370 bytes. by Roberto Foglietta.Denis Vlasenko2008-11-241-2/+2
|
* grep: fix 'echo aaa | grep -o a' + ENABLE_EXTRA_COMPAT caseDenis Vlasenko2008-09-301-2/+12
| | | | | by Natanael Copa
* grep: yet another fixlet for EXTRA_COMPATDenis Vlasenko2008-09-191-0/+5
|
* grep: fix EXTRA_COMPAT grep to honor -E and -iDenis Vlasenko2008-09-191-1/+30
|
* grep: option to use GNU regex matching instead of POSIX one.Denis Vlasenko2008-08-091-28/+101
| | | | | | This fixes problems with NULs in files being scanned, but costs +800 bytes. The same can be done to sed (TODO).
* libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko2008-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-2/+2
|
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* whitespace fixes. no code changesDenis Vlasenko2008-06-251-6/+5
|
* grep: make "-f -" work (+ testsuite)Denis Vlasenko2008-06-071-6/+6
| | | | | | | | | | | 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
* - use EXIT_{SUCCESS,FAILURE}. No object-code changesBernhard Reutner-Fischer2008-05-191-2/+2
|
* *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/Denis Vlasenko2008-03-261-2/+2
|
* *: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)Denis Vlasenko2008-03-171-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* - spelling fixesBernhard Reutner-Fischer2008-02-111-1/+1
|
* grep: fix wrong filename in error messageDenis Vlasenko2008-01-241-1/+1
|
* grep: fix -FoDenis Vlasenko2007-11-041-3/+10
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-2/+2
| | | | | 263 bytes saved.
* grep: delete obsolete commentDenis Vlasenko2007-09-101-7/+1
|
* grep: fix grep -F -e str1 -e str2 (was matching str2 only)Denis Vlasenko2007-09-101-37/+61
| | | | | | | | by replacing "=" by "|=" here: found |= strstr(line, gl->pattern) != NULL; grep: optimization: stop on first -e match grep: stop using bss. -40 bytes
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-2/+2
| | | | | | | | (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
* grep: implement -m MAX_MATCHES; fix help textDenis Vlasenko2007-07-151-37/+46
| | | | | | | | | | | 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
* grep: fix buglets with context printingDenis Vlasenko2007-07-151-28/+42
| | | | | | | | | | | | 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
* grep: selection done by FEATURE_GREP_EGREP_ALIAS was broken, fix.Denis Vlasenko2007-06-081-16/+16
| | | | | (Maxime Bizon <mbizon@freebox.fr> (Freebox))
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* make sure we free the grep data as wellMike Frysinger2007-04-121-0/+1
|
* find: fix handling of -pruneDenis Vlasenko2007-04-081-3/+3
| | | | recursive_actions: uppercase flag constants
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"Bernhard Reutner-Fischer2007-04-041-1/+1
|
* - fold recurse, depthFirst and dereference params into one param flags.Bernhard Reutner-Fischer2007-03-291-3/+3
| | | | Minor size improvement (-16b for size, -24b according to bloat-o-meter).
* grep: "implement" -a and -I by ignoring themDenis Vlasenko2007-02-251-0/+3
|
* grep: implement -wDenis Vlasenko2007-02-251-76/+96
|
* ash: replace xstrdup (shell shall not die)Denis Vlasenko2007-02-251-52/+52
| | | | grep: fix mis-indented block
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* remove useless casts (type*) xzalloc(...)Denis Vlasenko2006-12-221-1/+1
|