Commit Graph

817 Commits

Author SHA1 Message Date
Rob Landley
eb29d6ce6a Remove a config entry that leaked in from my tree before I decided to
implement cat -v as a separate applet.
2006-06-06 22:59:37 +00:00
Bernhard Reutner-Fischer
1b9d7c9aa9 - use bb_msg_{read,write}_error where appropriate.
text	   data	    bss	    dec	    hex	filename
 825015	   9100	 645216	1479331	 1692a3	busybox.old
 824919	   9100	 645216	1479235	 169243	busybox
2006-06-03 22:45:37 +00:00
Bernhard Reutner-Fischer
b5353a20f3 - look at bb_applet_name. Should close bugs #892 and #893
also restructure code a bit so the fix only adds 1 byte..
2006-06-01 18:30:42 +00:00
Rob Landley
8abbee474c Add catv (separate applet instead of cat -v). Also cleanup cat.c comments,
the following of which (from cat.c) belongs in svn history instead of the
source code:

/* Mar 16, 2003      Manuel Novoa III   (mjn3@codepoet.org)
 *
 * This is a new implementation of 'cat' which aims to be SUSv3 compliant.
 *
 * Changes from the previous implementation include:
 * 1) Multiple '-' args are accepted as required by SUSv3.  The previous
 *    implementation would close stdin and segfault on a subsequent '-'.
 * 2) The '-u' options is required by SUSv3.  Note that the specified
 *    behavior for '-u' is done by default, so all we need do is accept
 *    the option.
 */
2006-05-31 19:36:04 +00:00
Bernhard Reutner-Fischer
bbc225e13d - just whitespace 2006-05-29 12:12:45 +00:00
Bernhard Reutner-Fischer
d2c306e862 - ls: remove unused variable
- dpkg.c, diff: use xstat
   text    data     bss     dec     hex filename
 848823    9100  645216 1503139  16efa3 busybox_old
 848679    9100  645216 1502995  16ef13 busybox_unstripped
bloatcheck is completely useless as it sees -79 for this, which is bogus.
2006-05-29 12:10:23 +00:00
Rob Landley
81dab2cf83 Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bits
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
2006-05-28 01:56:08 +00:00
Rob Landley
c44bc986b7 Fix some warnings in allbareconfig. 2006-05-28 01:19:06 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
01d23ade57 - add central knob to turn off getopt_long everywhere. EXPERIMENTAL!
Adds "Enable getopt long" under "General options", default y.
  Send patches to fix getopt_ulflags and run_parts.c if you turn this off..
  See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
2006-05-26 20:19:22 +00:00
Rob Landley
399d2b5c24 Rich Felker suggested removing dprintf() from watch, and one thing led to
another... This adds bb_xspawn() support, which does vfork/exec.  (I don't
know why using a static instead of a local adds ~40 bytes, but using
the local doesn't work...)
2006-05-25 23:02:40 +00:00
Rob Landley
027ea1aeac Two more issues pointed out by Bernhard. 2006-05-24 17:58:00 +00:00
Rob Landley
fa6b5e62c2 It takes _talent_ to implement a version of nohup that does everything except
the actual blocking of HUP.
2006-05-23 00:28:06 +00:00
Rob Landley
c020f5f518 New version of nohup that's much smaller, less paranoid, consistent,
vaguely portable, and licensed GPLv2 "or later".
2006-05-21 18:28:13 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Bernhard Reutner-Fischer
c7801c4634 - use shorter boilerplate. 2006-05-19 18:35:03 +00:00
Bernhard Reutner-Fischer
14aa06f29c - do not use non-standard u_int.
- do not use _PATH_DEVNULL gnuism but bb_dev_null.
Thanks to Rich Felker.
2006-05-19 13:02:27 +00:00
Rob Landley
2686d3bc38 Rob Sullivan cleaned up the longstanding patch from Hideki IWAMOTO to add
ibs and obs support to dd, and made it configurable.  I cleaned it up a bit
further and moved conv= into the same config option.
2006-05-16 16:52:12 +00:00
Rob Landley
34b5319d86 Make md5 calculation always go through an the buffer so that A) we don't
handle packets out of sequence if some data goes through the buffer and
some doesn't, B) it works on systems that can't handle aligned access,
C) we just have one code path to worry about.

While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine
well, which is why md5sum has been reading and processing data 4 bytes at a
time.  I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop
unrolling and such in the algorithm was an attempt to work around that bug.
2006-05-16 02:38:26 +00:00
Mike Frysinger
d9b6b844e5 pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:41 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Bernhard Reutner-Fischer
eba32f429b - typo in error-message: s/algotithm/algorithm
- whitespace cleanup
2006-05-10 07:59:32 +00:00
Rob Landley
f893250a3b Replace isnan() and isinf() with inline tests so uClibc doesn't want us to
link sort against libm.  This adds 22 bytes for glibc but is a win for uClibc,
and since glibc is bigger than all of busybox it seems kind of silly to worry
about it.
2006-05-09 23:14:39 +00:00
Bernhard Reutner-Fischer
4f7953cc3c - add helptext for CONFIG_UNIX2DOS 2006-05-05 11:55:53 +00:00
Rob Landley
425e7584a4 Patch from Rich Felker to make ls use libc's qsort. 2006-05-03 20:22:03 +00:00
Rob Landley
c5598177bc Patch from Jason Schoon to add optional SIGUSR1 support to dd. 2006-05-02 22:44:04 +00:00
Rob Landley
2631486f1b Patch from Shaun Jackman:
ls has an ugly bug. ls uses an array of pointers, the elements of
which are all in a linked list. To free the elements, instead of
freeing all the elements in the array, array[0..nelements], it frees
by iterating the linked list starting at array[0], which it assumes is
the head of the list. Unfortunately, ls also sorts the array! So,
array[0] is no longer the head, but somewhere in the middle of the
linked list. This patch fixes this bug, and also adds an
ENABLE_FEATURE_CLEAN_UP stanza.
2006-05-02 19:46:52 +00:00
Rob Landley
d5b9428bb6 Re-wordwrap the new tests, and fix seq.c to pass them. 2006-04-27 22:36:32 +00:00
Rob Landley
5fe8d5b9c5 Convert a chunk of usage.h to USE_ and SKIP_ (more to do there), and fix a
DEFALT typo in du while I was there.
2006-04-25 22:40:53 +00:00
Rob Landley
998dbee6d9 Patch from Jean Wolter:
it looks like the introduced support for character classes and
equivalence classes is not correct. The attached patch tries to fix
some symptoms and tries to make tr behave like gnu tr for the added
test cases. The patch

 - removes if clauses with side effects
 - fixes handling of buffer pointer (strcat added characters to the
   buffer without increasing the buffer pointer)
 - re-arranges character classes to match ASCII order

regards,
Jean
2006-04-19 22:22:06 +00:00
Rob Landley
856489b63c New applet cksum, from Rob Sullivan. 2006-04-18 20:57:28 +00:00
Rob Landley
e4386342b4 Simplify the GPL boilerplate. 2006-04-18 20:41:51 +00:00
Bernhard Reutner-Fischer
18260d5099 - typo: s/derefernce/dereference/g
Thanks to P.J. Day.
2006-04-18 14:17:49 +00:00
Rob Landley
0edbad1a7c Glenn gave permission for GPLv2 "or later". 2006-04-17 22:49:30 +00:00
Mike Frysinger
0436b9f482 use strchr() not index() 2006-04-16 05:54:31 +00:00
Rob Landley
2ec922eed5 Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Bernhard Reutner-Fischer
c2cb0f32b4 - patch from Denis Vlasenko to add and use bb_xopen3() 2006-04-13 12:45:04 +00:00
Bernhard Reutner-Fischer
d9cf7ac781 - patch from Denis Vlasenko to add and use bb_xchdir() 2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
fc5f318896 - use C99 %j format to print intmax.
Closes bugs #802 and #743
2006-04-12 08:03:11 +00:00
Bernhard Reutner-Fischer
cb44816ba3 - add and use bb_opendir(), bb_xopendir().
text    data     bss     dec     hex filename
 889445    9392 1035784 1934621  1d851d busybox.gcc-4.2.orig
 889297    9392 1035784 1934473  1d8489 busybox.gcc-4.2
 889009    9820 1037860 1936689  1d8d31 busybox.gcc-4.1.orig
 888817    9820 1037860 1936497  1d8c71 busybox.gcc-4.1
2006-04-12 07:35:12 +00:00
Rob Landley
998f449375 We use -funsigned-char now, so having a separate RESERVE_CONFIG_UBUFFER is
a bit silly.  Wean of that where it currently makes no difference...
2006-04-10 16:40:47 +00:00
Bernhard Reutner-Fischer
bc14214018 - patch from Rob Sullivan to add support for -L 2006-04-06 16:07:08 +00:00
Bernhard Reutner-Fischer
5fb0fecc1f - shrink it a little bit and make it buildable with gcc-2.95
text    data     bss     dec     hex filename
   7332       4      92    7428    1d04 diff.o-gcc-4.2-HEAD.orig
   7185       4      92    7281    1c71 diff.o-gcc-4.2-HEAD.new
   7336       4      92    7432    1d08 diff.o-gcc-4.1-HEAD.orig
   7148       4      92    7244    1c4c diff.o-gcc-4.1-HEAD.new
   7485       4      92    7581    1d9d diff.o-gcc-4.0.orig
   7318       4      92    7414    1cf6 diff.o-gcc-4.0.new
   7511       4      92    7607    1db7 diff.o-gcc-3.4.orig
   7252       4      92    7348    1cb4 diff.o-gcc-3.4.new
   8214       4      92    8310    2076 diff.o-gcc-3.3.orig
   7882       4      92    7978    1f2a diff.o-gcc-3.3.new
      -       -       -       -       - diff.o-gcc-2.95.orig
   8238       8      88    8334    208e diff.o-gcc-2.95.new
2006-04-06 11:28:19 +00:00
Bernhard Reutner-Fischer
cc4003f778 - remove unused args.
text    data     bss     dec     hex filename
   7353       4      92    7449    1d19 coreutils/diff.o-gcc-4.2.oorig
   7332       4      92    7428    1d04 coreutils/diff.o
2006-04-06 08:23:11 +00:00
Bernhard Reutner-Fischer
693a93608a - move code around to avoid the need for the prototypes. 2006-04-06 08:15:24 +00:00
Bernhard Reutner-Fischer
8f7d389700 - new applet diff. Rob Sullivan writes:
Here's my attempt at a mini diff applet - it's adapted from the code at
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/diff/, and only supports
unified diffs.

I've busyboxified everything to a reasonable degree, so I think the code is
suitable enough to be included, but there's still a fair bit of cleaning up
to be done.
2006-04-06 08:11:08 +00:00
Bernhard Reutner-Fischer
e11a01cc34 - include inttypes.h as pointed out by Jason Schoon.
- use shorter boilerplate and switch to USE_FEATURE_STAT_FORMAT while at it.
2006-04-05 17:19:37 +00:00
Bernhard Reutner-Fischer
465874f3a3 - use proper macros to print intmax_t.
PRIuMAX and PRIxMAX are defined in inttypes depending on the wordsize.
2006-04-05 14:57:59 +00:00
Rob Landley
e104d5fdcb Some tests were always true. We need comm.tests... 2006-04-04 19:26:37 +00:00
Bernhard Reutner-Fischer
101a470068 - make append_option and multiconvert static. 2006-04-03 15:46:14 +00:00