Commit Graph

114 Commits

Author SHA1 Message Date
Denis Vlasenko
83e5d6f772 A bunch of defined(__GLIBC__) added. static-linking warning expanded 2006-12-18 21:49:06 +00:00
Denis Vlasenko
9f739445cd inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid] 2006-12-16 23:49:13 +00:00
Denis Vlasenko
459903bd4e Provide our own isdigit macro. saves more than 400 bytes. 2006-11-27 14:44:18 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Bernhard Reutner-Fischer
73561cc75a - pull from busybox_scratch: r15829:15850
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
   text    data     bss     dec     hex filename
1087742   15853  790632 1894227  1ce753 ../busybox/busybox.old
1086790   15853  790632 1893275  1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped 
function                                             old     new   delta
ipcrm_main                                           756     822     +66
getval                                                 -      61     +61
maybe_set_utc                                          -      40     +40
udhcpc_main                                         2896    2912     +16
md5_hash_block                                       428     437      +9
opt                                                    8      16      +8
qgravechar                                           106     110      +4
make_bitmap                                          292     295      +3
inflate_unzip                                       2056    2059      +3
add_partition                                       1412    1414      +2
__parsespent                                         156     158      +2
qrealloc                                              41      42      +1
format                                                 -       1      +1
catv_main                                            313     314      +1
watch_main                                           293     292      -1
varunset                                              81      80      -1
part                                                   1       -      -1
check_if_skip                                        837     836      -1
start_stop_daemon_main                               840     837      -3
create_lost_and_found                                175     172      -3
supress_non_delimited_lines                            4       -      -4
static.l                                               4       -      -4
static.c                                               5       1      -4
bsd_sum_file                                         237     233      -4
eval2                                                338     332      -6
arithmetic_common                                    166     158      -8
cmpfunc                                               22       5     -17
cksum_main                                           294     275     -19
cmp_main                                             465     439     -26
dd_main                                             1535    1508     -27
rmmod_main                                           376     333     -43
cut_file                                             727     644     -83
ipcs_main                                           3809    3721     -88
cut_main                                             722     614    -108
date_main                                           1443    1263    -180
remove_ids                                           222       -    -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853)       Total: -636 bytes
2006-08-28 23:31:54 +00:00
Rob Landley
534374755d Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
2006-07-16 08:14:35 +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
Rob Landley
f8fd4db92f Move SUSv2 obsolete feature disabling to debug menu, invert meaning of
symbol (switched on to remove now: test your apps to make sure they _don't_
do this, because as some point we should just yank it), fixup head/tail/fold.

Also tweak "make allyesconfig" so anything starting with CONFIG_DEBUG gets
left switched off.  Possibly other things we want to put in the debug menu?
2006-01-30 01:30:39 +00:00
Bernhard Reutner-Fischer
9a14bd04f8 - Stephane Billiart writes:
Fix the compilation of head and tail.

  thanks!
2005-12-15 11:47:16 +00:00
Bernhard Reutner-Fischer
5816ccb190 - wrap label GET_COUNT in #if ENABLE_FEATURE_FANCY_applet to avoid warning
about unused label.
2005-12-13 10:48:45 +00:00
Glenn L McGrath
0bd0257fe0 Add build options to control SuS compatability, allows numeric
option handling to be disabled.
Defaults to enabled, so no changes in default behaviour
2005-12-11 03:09:05 +00:00
Rob Landley
58a651b2e5 Very minor tweak to tail. 2005-08-13 00:35:00 +00:00
Mike Frysinger
dbc049fda4 remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way 2005-07-26 22:57:51 +00:00
Paul Fox
4905434b8a applying fix for:
0000265: tail -f should keep following files even if they
                    were truncated
2005-07-20 19:46:32 +00:00
Rob Landley
b9dfb8c03f Manuel points out that if printf needs a flush to act like dprintf, the result
is bigger.  Revert last patch.
2005-05-07 17:45:38 +00:00
Rob Landley
cce1ae2ce5 Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf. 2005-05-07 07:53:16 +00:00
Glenn L McGrath
f86391e7d7 Patch from William Barsse to fix a segfault when multiple files are specified. 2004-09-30 00:24:21 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
4ef5a84583 Move the tail -c option from FANCY_TAIL to the default tail, this makes
the default tail options conform to SUSv3, with the non-SUS
option all in FANCY_TAIL
2003-10-31 00:35:59 +00:00
Eric Andersen
b5b5ac3237 trivial fix to make sure we have sufficient arguments before
we mess with a possibly non-existant argv[1]
 -Erik
2003-03-28 16:54:14 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
76ff0da4d2 Support the obsolete '+' option 2002-12-23 11:54:56 +00:00
Robert Griebl
53146cc9ec Added include for isdigit(); simplified -<num> detection 2002-05-27 22:24:53 +00:00
Robert Griebl
13c26fc1a5 SUpport old style -[::digit::] options for head and tail
Also make head behave like GNU head (-0/-n 0 is valid)
2002-05-17 22:18:04 +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
ce98c19dfe A patch from Erik Meusel <erik@wh58-709.st.uni-magdeburg.de>
to fix the behavior of 'tail -f -n 0 FILE'
2001-06-26 15:07:08 +00:00
Eric Andersen
004015e9c4 Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bug
#1130 (i.e. When you turn on features it should always ADD features)
2001-05-21 20:30:51 +00:00
Eric Andersen
3e6ff9017f A cleanup patch from Jeff Garzik to static-ify a number of
namespace polluting things that really should be static.
2001-03-09 21:24:12 +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
Eric Andersen
963791a9e9 Another patch from Vladimir to eliminate obsolete junk. 2001-02-18 20:13:18 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
a164c647ac Make suffix_mult structures const. Thanks to Vladimir N. Oleynik. 2001-02-05 17:50:03 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Mark Whitley
eb60d8bcd1 Turned some #define constants into static const ints. 2001-01-05 18:19:30 +00:00
Matt Kraai
55bccf315e Rewrote tail. 2001-01-05 02:57:53 +00:00
Matt Kraai
24ac017961 Rewrote dd. 2000-12-18 21:38:57 +00:00
Mark Whitley
f57c944e09 Changed names of functions in utility.c and all affected files, to make
compliant with the style guide. Everybody rebuild your tags file!
2000-12-07 19:56:48 +00:00
Matt Kraai
69229a6c92 Piss people off by removing [+-][0-9]+ options from tail. 2000-10-19 21:28:32 +00:00
Eric Andersen
3570a34de4 Renamed "internal.h" to the more sensible "busybox.h".
-Erik
2000-09-25 21:45:58 +00:00
Matt Kraai
322ae93a5e Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
segfaulting or handling errors the same way themselves.
2000-09-13 02:46:14 +00:00
Pavel Roskin
8237add8d0 Fixed misuse of type "char" 2000-08-22 15:38:16 +00:00
Eric Andersen
88f50b6bf5 Some #include updates.
-Erik
2000-08-10 17:59:11 +00:00
Eric Andersen
46ade97983 Cleaner way to handle -NUM and +NUM, reduces the mem usage as well.
-Erik
2000-08-02 19:57:18 +00:00
Eric Andersen
d5fa3e3e9a Update to the tail rewrite by "Allen Soard" <esp-software@mail.hypermart.net>
-Erik
2000-08-02 16:42:58 +00:00
Eric Andersen
98bbd688a8 Commit the rewrite of tail by Allen Soard
<esp-software@mail.hypermart.net>.  Thanks Allen for
you work at getting this into shape,
 -Erik
2000-07-31 17:05:58 +00:00
Mark Whitley
7ce41ad692 Fixed a syntax error & superfluous param decl that was causing the build to
fail.
2000-07-26 18:09:22 +00:00
Eric Andersen
cc10a5b42b Fix some bitrot.
-Erik
2000-07-26 00:52:04 +00:00
Matt Kraai
bf181b9338 Extract usage information into a separate file. 2000-07-16 20:57:15 +00:00
Eric Andersen
fad04fdd12 More cleanups.
-Erik
2000-07-14 06:49:52 +00:00
Matt Kraai
d537a95fdb Use errorMsg rather than fprintf. 2000-07-14 01:51:25 +00:00
Eric Andersen
b610615be9 Updates to a number of apps to remove warnings/compile errors under libc5.
Tested under both libc5 and libc6 and all seems well with these fixes.
 -Erik
2000-06-19 17:25:40 +00:00
Eric Andersen
86ab8a32bd A number of additional fixed from Pavel Roskin, note some more bugs in the
TODO list.  Add Glenn to the Authors list for writing a mini ar for BusyBox,
which is now included.
 -Erik
2000-06-02 03:21:42 +00:00
Erik Andersen
7ab9c7ee52 Lots of updates. Finished implementing BB_FEATURE_TRIVIAL_HELP
which lets you compile out most of the "--help" output, saving
up to 17k.

Renamed mnc to nc.
 -Erik
2000-05-12 19:41:47 +00:00
Erik Andersen
94f5e0ba7c Some accrued fixes/updates.
* cp/mv now accepts (and ignores) the -f flag, since it always
	does force anyway
    * tail can now accept -<num> commands (e.g. -10) for better
	compatibility with the standard tail command
    * added a simple id implementation; doesn't support supp. groups yet
2000-05-01 19:10:52 +00:00
Erik Andersen
93d6513d93 Some more minor updates to better use some gcc attributes.
-Erik
2000-04-06 08:06:36 +00:00
Erik Andersen
e272915e1f Some updates for the day,
-Erik
2000-02-18 21:34:17 +00:00
Erik Andersen
9ffdaa647e Updates
-Erik
2000-02-11 21:55:04 +00:00
Erik Andersen
e49d5ecbbe Some formatting updates (ran the code through indent)
-Erik
2000-02-08 19:58:47 +00:00
Erik Andersen
fac10d7c59 A few minor updates. ;-)
Seriously though, read the Changelog for busybox 0.42,
which this is about to become...
 -Erik
2000-02-07 05:29:42 +00:00
Erik Andersen
3fe39dce5d Some busybox updates. See the changelog for details if you care.
-Erik
2000-01-25 18:13:53 +00:00
Erik Andersen
4d1d0113fd Reworked the source so it will compile and run under glibc 2.0.7
and linux kernel 2.0.36 (though the dubious reasons why someone
would want to do that defy imagination ;)
 -Erik
1999-12-17 18:44:15 +00:00
Eric Andersen
1792f8c489 Tail now works (costs 6k). Several other updates.
-Erik
1999-12-09 06:11:36 +00:00
Eric Andersen
abc0f4f8f9 Latest and greatest 1999-12-08 23:19:36 +00:00