Commit Graph

136 Commits

Author SHA1 Message Date
Eric Andersen
65e20a33c2 Patch from Kent Robotti adding a bunch of needed docs!
-Erik
2003-07-05 07:52:35 +00:00
Eric Andersen
8876fb2f59 last_patch89 from vodz:
Manuel,

    I rewrite bb_getopt_ulflags() function for more universal usage.
    My version support now:
    - options with arguments (optional arg as GNU extension also)
    - complementaly and/or incomplementaly and/or incongruously and/or list
    options
    - long_opt (all applets may have long option, add supporting is trivial)
    This realisation full compatibile from your version.
    Code size grow 480 bytes, but only coreutils/* over compensate this size
    after using new function. Last patch reduced over 800 bytes and not full
    applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate
    trivial addition support long_opt with usage new bb_getopt_ulflags().
    Complementaly and/or incomplementaly and/or incongruously and/or list options
    logic is not trivial, but new "cut" and "grep" applets using this logic
    for examples with full demostrating. New "grep" applet reduced over 300
    bytes.

    Mark,
    Also. I removed bug from "grep" applet.
    $ echo a b | busybox grep -e a b
    a b
    a b
    But right is printing one only.

    --w
    vodz
2003-06-20 09:01:58 +00:00
Glenn L McGrath
c91ce57099 Config option to create an fgrep alias 2003-04-27 02:43:54 +00:00
Glenn L McGrath
c5408fe7f7 Fix segfault when cleaning up 2003-04-27 02:22:01 +00:00
Glenn L McGrath
26df70a823 grep -f support, adds only 60 Bytes, but regex's now compiled as
required, rather than being pre-compiled.
2003-04-27 01:50:57 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
97d86f2bb5 Apply patch from Ghozlane Toumi to add -inum support to find.
Apply patch from Ghozlane Toumi to make find smaller by combining
    similar error messages
Forward port find -newer support from busybox stable that was
    missing from unstable.  -Erik.
Fixup usage messages for find.  -Erik
2003-01-23 05:27:42 +00:00
Glenn L McGrath
49b0f86043 Fix -mtime, by Ian Abbott 2002-12-11 21:22:21 +00:00
Eric Andersen
c9f20d9fb9 Yet another major rework of the BusyBox config system, using the considerably
modified Kbuild system I put into uClibc.  With this, there should be no more
need to modify Rules.mak since I've moved all the interesting options into the
config system.  I think I've got everything updated, but you never know, I may
have made some mistakes, so watch closely.
 -Erik
2002-12-05 08:41:41 +00:00
Aaron Lehmann
a170e1c858 Change if(x)free(x); to free(x); 2002-11-28 11:27:31 +00:00
Glenn L McGrath
8f0722a53b Move readlink, mktemp, run-parts and which to a new debianutils dir. 2002-11-11 03:00:12 +00:00
Glenn L McGrath
f57674e9a9 Rewrite of xargs by Vladimir N. Oleynik 2002-11-10 21:47:17 +00:00
Eric Andersen
d4ee98940b last_patch55 from vodz:
I found overflow problem in xargs applet
    (allocated not space for trailing '\0').
    Last patch also reduce 22 bytes size. ;)
2002-09-16 10:44:24 +00:00
Robert Griebl
0d833ca7fd Fixed a bug in xarg: string data was strcat'ed to a malloc'ed buffer - and
malloc does not clear memory by default (somehow this worked on x86, but
not on arm)
2002-08-03 14:49:03 +00:00
Robert Griebl
41369af3f2 Patch for bug #1183: Added a -xdev option to find (configurable) 2002-07-24 00:34:48 +00:00
Eric Andersen
85208e2ab9 Completely rework the config system so that it no longer annoys me to work on
the busybox development tree.  This eliminates the use of recursive make, and
once again allows us to run 'make' in a subdirectory with the expected result.
And things are now much faster too.  Greatly improved IMHO...
 -Erik
2002-04-12 12:05:57 +00:00
Matt Kraai
eed9451cf6 * findutils/grep.c (grep_main): Remove unnecessary use of junk. 2002-02-22 22:08:16 +00:00
Matt Kraai
a3181dd833 Do not segfault if PATH is unset. 2002-01-14 18:30:10 +00:00
Matt Kraai
1f0c43668a Remove == TRUE' tests and convert != TRUE' and `== FALSE' tests to use !. 2001-12-20 23:13:26 +00:00
Matt Kraai
585f657e2d Fix undeclared variable error. 2001-11-20 16:00:44 +00:00
Eric Andersen
81ee96fe62 Usr get_last_path_component() name basename() 2001-11-20 00:23:48 +00:00
Eric Andersen
6f8b7ea452 oops 2001-11-19 11:45:39 +00:00
Eric Andersen
55805bcba4 More scrubbing 2001-11-19 10:59:37 +00:00
Eric Andersen
d81891a2e6 Call xmalloc before realloc 2001-11-19 10:49:30 +00:00
Eric Andersen
43626d7671 Fixup CLEANUP behavior 2001-11-19 10:36:20 +00:00
Matt Kraai
a21c24bf03 Convert strdup call to xstrdup, and calloc calls to xcalloc (patch from
Steve Merrifield).
2001-11-12 16:58:07 +00:00
Eric Andersen
dba4e6f046 Add in grep -E support 2001-11-10 12:54:00 +00:00
Eric Andersen
7131213460 config.in features patch from Giulio Orsero <giulioo@pobox.com>
with some minor edits from me
2001-11-10 09:53:23 +00:00
Matt Kraai
bb0088e980 Make egrep only set REG_EXTENDED flag. 2001-10-31 16:16:31 +00:00
Eric Andersen
ccd96f1972 Patch from Charles Steinkuehler <charles@steinkuehler.net>
to properly handle extended regexps for egrep
2001-10-31 10:02:46 +00:00
Matt Kraai
999623e973 Use extended regular expressions when invoked as egrep (noted and initial
patch by Charles Steinkuehler).
2001-10-29 15:49:03 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
74400ccfd0 Scrub up some function prototypes.
-Erik
2001-10-18 04:11:39 +00:00
Eric Andersen
0034443140 Fix behavior of grep -lc to match GNU grep. SuS2 is ambiguous
on the correct behavior, so acting like GNU grep seems best
 -Erik
2001-07-31 23:18:49 +00:00
Eric Andersen
86f0167e39 grep failed to compile when BB_FEATURE_CLEAN_UP was defined -- types were wrong. 2001-05-29 22:36:39 +00:00
Mark Whitley
fa43e54b6f Added support for grep -e and grep -f, closes bug #1164. Also added some
testcases for these new features.
2001-05-24 18:36:18 +00:00
Matt Kraai
edc806507c Fixed extra -- lines (noted by Christophe Boyanique). 2001-05-22 14:29:27 +00:00
Mark Whitley
1d9d41150b Fixed mishandling of -c & -l options and accounted for case when we're
grepping only one file.
2001-05-21 21:13:00 +00:00
Matt Kraai
59df6f7398 Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
by Larry Doolittle.
2001-05-16 14:21:09 +00:00
Mark Whitley
35e59bed97 Fixed a subtle bug in the handling of -l and -c flags. 2001-05-14 19:40:32 +00:00
Eric Andersen
8d35134ad8 A bug fix from Vladimir for a memory leak I stupidly
added to which.c.
2001-05-07 22:45:06 +00:00
Eric Andersen
044a72d0d5 Larry suggested using concat_path_file() would be an even safer bet
for 'which'.  I ageed, so I whipped this up -- which revealed a bug in
concat_path_file.  It turns out that that a '/' can be appended from
either the path _or_ the filename, but only the former was checked.
 -Erik
2001-05-04 22:04:24 +00:00
Eric Andersen
7526f035f4 Fix a buffer overflow. Which accounted for the size of the path, plus the the
'/', plus the size of the test command.  It did not account for the terminating
NULL, which overwrote the end of the string.
 -Erik
2001-05-04 20:47:33 +00:00
Mark Whitley
59a86cad67 The tiniest of bracket-placement fixes. 2001-04-17 17:30:44 +00:00
Eric Andersen
303dd28bb0 Make 'grep -l' work 2001-04-09 23:26:31 +00:00
Mark Whitley
4391a16c92 Fixed option parsing. Grep would continue grepping, even when given a bad /
invalid option. Closes bug #1146.
2001-04-09 23:00:07 +00:00
Mark Whitley
e0a7f917c2 Applied patch from David Douthitt to re-add -print option to find.
Closes bug #1144.
2001-03-28 22:04:42 +00:00
Eric Andersen
6f3240abf9 xstrdup xargs cleanup from Jeff Garzik 2001-03-23 17:11:22 +00:00
Eric Andersen
8d4c397d9d Patch from Jeff Garzik marking a few 'getopt not needed' apps. 2001-03-09 21:28:09 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00