Denys Vlasenko
4f731ce30e
findutils/*: move usage and applet bits to *.c files
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-15 15:40:16 +02:00
Denys Vlasenko
237aecedab
xargs: another code shrink
...
function old new delta
process0_stdin 117 103 -14
process_stdin 336 314 -22
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-15 10:18:01 +02:00
Denys Vlasenko
f7e929e795
xargs: trivial code shrink
...
function old new delta
xargs_main 807 787 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-15 10:02:04 +02:00
Denys Vlasenko
c28cafb18d
xargs: trivial code shrink
...
function old new delta
process_stdin 343 336 -7
process0_stdin 124 117 -7
xargs_main 807 787 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-14 12:38:36 +02:00
Denys Vlasenko
7a4021deba
xargs: simplify logic
...
Removed double-buffering in a linked list.
function old new delta
store_param - 56 +56
xargs_main 871 840 -31
process_stdin 458 396 -62
process0_stdin 267 143 -124
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 56/-217) Total: -161 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-14 00:57:05 +02:00
Denys Vlasenko
aaa24e09f9
xargs: fix accounting of -sNUM
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-13 12:43:54 +02:00
Denys Vlasenko
1613de85d9
xargs: make -s NUM accept practically unlimited range
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-13 03:44:27 +02:00
Denys Vlasenko
d5fa1a0f49
xargs: code shrink -15 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-13 03:43:43 +02:00
Denys Vlasenko
19ced5c425
pipe_progress: make it independent of printf machinery
...
function old new delta
bb_putchar_stderr - 24 +24
ParseField 494 471 -23
progress_meter 212 188 -24
xargs_main 888 842 -46
pipe_progress_main 151 105 -46
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/4 up/down: 24/-139) Total: -115 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 21:53:09 +02:00
Denys Vlasenko
2f32bf8be6
remove defconfig. Now "make defconfig" simply uses defaults from Config.in
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 04:14:28 +02:00
Denys Vlasenko
7fb68f199f
make it possible to keep Config/Kbuild snippets in *.c files
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09 04:22:48 +02:00
Denys Vlasenko
d7b5289209
xargs: do not decrease orig_arg_max to negative values
...
Based on patch by Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 14:58:40 +02:00
Denys Vlasenko
8531d76a15
*: code shrink and better "died from signal" reporting from wait4pid
...
function old new delta
parse 964 967 +3
udhcp_run_script 670 665 -5
singlemount 911 906 -5
mount_it_now 360 355 -5
inotifyd_main 521 516 -5
xspawn 21 - -21
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41) Total: -38 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18 22:44:00 +01:00
Denys Vlasenko
6331cf059c
*: use "can't" instead of "cannot"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
8131eea3dc
*: introduce and use ffulsh_all()
...
function old new delta
buffer_fill_and_print 179 196 +17
fflush_all - 9 +9
spawn 87 92 +5
rtcwake_main 455 453 -2
...
alarm_intr 93 84 -9
readcmd 1072 1062 -10
bb_ask 345 333 -12
more_main 845 832 -13
flush_stdout_stderr 42 23 -19
xfflush_stdout 27 - -27
flush_stderr 30 - -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 14:19:51 +01:00
Denis Vlasenko
5e34ff29bc
*: mass renaming of USE_XXXX to IF_XXXX
...
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
82ad032e26
xargs: fix -e default to match newer GNU xargs, add SUS mandated -E.
...
closes bug 4414
2008-08-04 21:30:55 +00:00
Denis Vlasenko
cc08ad26fe
xargs: fix xargs -e; added test for that
2008-08-03 19:12:25 +00:00
Denis Vlasenko
5415c856ea
libbb: [x]fopen_for_{read,write} introduced and used.
...
(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
2008-07-21 23:05:26 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
d50dda8c35
*: use llist_pop for traverse-and-free list operation
...
function old new delta
append_file_list_to_list 109 111 +2
udhcpc_main 2414 2413 -1
run_parts_main 325 324 -1
od_main 2324 2323 -1
getopt_main 709 707 -2
env_main 253 251 -2
sed_main 659 656 -3
ps_main 522 519 -3
traceroute_main 3960 3954 -6
sort_main 844 838 -6
diff_main 866 858 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33) Total: -31 bytes
2008-06-15 05:40:56 +00:00
Bernhard Reutner-Fischer
636a1f85e8
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
2008-05-19 09:29:47 +00:00
Denis Vlasenko
77ad97f199
more -Wall warning fixes from Cristian Ionescu-Idbohrn.
...
This time it resulted in small code changes:
function old new delta
nexpr 820 828 +8
tail_main 1200 1202 +2
wrapf 166 167 +1
parse_mount_options 227 209 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
2008-05-13 02:27:31 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
0c97c9d437
'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
...
263 bytes saved.
2007-10-01 11:58:38 +00:00
Denis Vlasenko
fe7cd642b0
don't pass argc in getopt32, it's superfluous
...
(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
2007-08-18 15:32:12 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
58394b1e29
xargs: simplify word list management
2007-04-15 08:38:50 +00:00
Denis Vlasenko
f5294e1f4c
hush: use NOFORK applets as appropriate. Net reduction of code size.
2007-04-14 10:09:57 +00:00
Denis Vlasenko
51742f4bb0
style fixes. No code changes
2007-04-12 00:32:05 +00:00
Denis Vlasenko
8905496444
xargs: fix my brain fart (resulted in memory leak)
2007-04-10 21:41:16 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Denis Vlasenko
cd7001f705
factor out NOFORK/NOEXEC code from find. Use it for xargs too.
2007-04-09 21:32:30 +00:00
Denis Vlasenko
1b4b2cb20e
xargs: shrink code, ~80 bytes
...
applets.h: +#undef APPLET_NOEXEC
2007-04-09 21:30:53 +00:00
Denis Vlasenko
1d76f439da
EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>
2007-02-06 01:20:12 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
8f8f268cfd
bb_applet_name -> applet_name
2006-10-03 21:00:43 +00:00
Denis Vlasenko
67b23e6043
getopt_ulflags -> getopt32.
...
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
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