Commit Graph

42 Commits

Author SHA1 Message Date
Denis Vlasenko
6248a734e2 xargs: simplify option parsing 2006-09-29 08:20:30 +00:00
Rob Landley
081e38483e Remove xcalloc() and convert its callers to xzalloc(). About half of them
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-03 20:07:35 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
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-08-03 15:41:12 +00:00
Bernhard Reutner-Fischer
e15d7573a1 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Bernhard Reutner-Fischer
95a040fac8 - use the defines CURRENT_TTY and VC_1; also shrink xargs a tiny bit:
add/remove: 0/0 grow/shrink: 2/6 up/down: 5/-37 (-32)
function                                     old     new   delta
static.add_interface                         271     274      +3
static.glob3                                  36      38      +2
static.renice_main                           409     408      -1
static.readcmd                              1083    1081      -2
static.changepath                            176     174      -2
static.parse_opts                             56      51      -5
static.rx_main                              1095    1088      -7
static.xargs_main                            759     739     -20
----------------------------------------------------------------
Result                                                :-)    -32
2006-05-27 09:36:43 +00:00
"Vladimir N. Oleynik"
59c4e5cf92 removed warning "comparison between signed and unsigned". Added ATTRIBUTE_UNUSED. My whitespace 2006-01-30 13:51:50 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
252183e3f5 Try to make indent formatting less horrible 2003-10-31 08:19:44 +00:00
Glenn L McGrath
40c9489d33 Add a comment with link to the SUSv3 standard for xargs 2003-10-30 22:51:33 +00:00
Glenn L McGrath
09c295a5bc run through indent 2003-10-30 22:47:16 +00:00
Glenn L McGrath
61796945e3 Vods versions of xargs 2003-10-10 12:10:18 +00:00
Glenn L McGrath
99825960c1 Bugfix for xargs 2003-10-09 11:06:45 +00:00
Glenn L McGrath
add3eadc46 Add the x, n, s and E options, remove -r as its expected behaviour. 2003-10-04 14:44:27 +00:00
Glenn L McGrath
07cf92676a Dont mix xarg options with utility option, fixes example of
`echo "README" | xargs ls -al`
Dont specify a path for the default behaviour of echo
args allocated space for an extra ptr
Use defines for the different options
2003-10-03 13:15:44 +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
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +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
Eric Andersen
d81891a2e6 Call xmalloc before realloc 2001-11-19 10:49:30 +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
6f3240abf9 xstrdup xargs cleanup from Jeff Garzik 2001-03-23 17:11:22 +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
Matt Kraai
05e782ddd3 Fix wget error message and add (and use) chomp library function. 2001-02-01 16:49:30 +00:00
Eric Andersen
8ec10a9483 Fix up copyright msgs. Bump version to 0.49 in preparation for
a release.  Update the website with release details.
 -Erik
2001-01-27 09:33:39 +00:00
Mark Whitley
6c6ea6cba2 Changed email address to codepoet.org, updated list of applets / docs I
maintain in AUTHORS.
2001-01-04 22:21:13 +00:00
Matt Kraai
a9819b2908 Use busybox error handling functions wherever possible. 2000-12-22 01:48:07 +00:00
Mark Whitley
e2e2c29ea1 Brand new version of xargs. Tested thoroughly by Kent Robotti. (Domo arigato,
Mr. Robotti...) Closes bug #1065.
2000-11-14 22:43:21 +00:00
Eric Andersen
d266748c76 Yet more polish (thanks again to kent robotti for the bug reports).
-Erik
2000-09-26 01:00:15 +00:00
Eric Andersen
d89882da16 Some more polish to make xargs act like GNU xargs (thanks to kent robotti
<robotti@metconnect.com> for testing and pointing out the differences)
 -Erik
2000-09-25 22:53:05 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Eric Andersen
e081eae7a4 Final (I think) version of xargs. Throw away all that tedious string
scrubbing, and quit using system.  Instead, use fork() and exec(), which
yields and smaller, simpler, and cleaner design.
 -Erik
2000-09-25 20:23:21 +00:00
Eric Andersen
bf73909f23 Be ever so pedantic about escaping chars that the shell might not like... 2000-09-25 18:41:18 +00:00
Eric Andersen
6f283c2f77 Fix up xargs so that things like 'cat cat.c | xargs echo' will
work properly.
 -Erik
2000-09-24 02:40:56 +00:00
Eric Andersen
9ae3838657 Fix xargs option parsing 2000-09-24 01:12:54 +00:00
Eric Andersen
96bdde97fb Fix memory problems, and make behavior correct. 2000-09-23 19:53:31 +00:00
Eric Andersen
a37d5b772b rewrite, so it should be firly clean now 2000-09-23 06:10:14 +00:00
Eric Andersen
5b17693f0a Use minix xargs instead, and update docs accordingly
-Erik
2000-09-22 20:22:28 +00:00
Eric Andersen
ebc0dd7a8a Comment on xargs choice. 2000-09-22 20:02:34 +00:00
Eric Andersen
92a61c1206 Add in xargs 2000-09-22 20:01:23 +00:00