Commit Graph

1552 Commits

Author SHA1 Message Date
Denys Vlasenko
c0683acce8 *: pass md5/shaN context pointer as 1st arg, not last
function                                             old     new   delta
md5_hash_block                                       458     459      +1
filter_rename_config                                 252     250      -2
md5_crypt                                            591     587      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-16 20:45:27 +02:00
Denys Vlasenko
f2710d0221 date: move applet and usage bits to date.c
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-15 10:42:17 +02:00
Denys Vlasenko
afc7b4c0d8 wc: add support for -m
function                                             old     new   delta
wc_main                                              601     637     +36
packed_usage                                       27357   27358      +1

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-04 17:08:14 +02:00
Denys Vlasenko
09e7dafbfe wc: preparatory patch, no logic changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-04 17:04:20 +02:00
Dan Fandrich
2d1a78b88f Marked some more applets NOEXEC/NOFORK
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-01 23:35:09 +02:00
Denys Vlasenko
04bcd998ca style fix. no code chages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-25 17:19:04 +02:00
Denys Vlasenko
0f2e278a8a sleep: fix fractional arguments in non-POSIX locale
function                                             old     new   delta
sleep_main                                           390     379     -11

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-24 12:39:45 +02:00
Denys Vlasenko
9fe98f701d libbb: merge mail and uudecode's base64 decoders
function                                             old     new   delta
read_base64                                            -     378    +378
uudecode_main                                        306     315      +9
parse                                                953     958      +5
read_stduu                                           250     254      +4
base64_main                                          217     219      +2
read_base64                                          358       -    -358
decode_base64                                        371       -    -371
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729)         Total: -331 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-16 17:51:13 +02:00
Denys Vlasenko
197a6b3c14 sleep: make it non-NOFORK. Fixes ^C in standalone shell
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-14 12:57:05 +02:00
Dan Fandrich
77d4872691 Avoid side effects in putc(), which may be implemented as a macro
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09 11:48:02 +02:00
Denys Vlasenko
6f80fe71f0 uudecode,base64: code shrink
function                                             old     new   delta
read_base64                                          373     358     -15

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01 13:24:05 +02:00
Denys Vlasenko
ee06264a29 base64: new applet
function                                             old     new   delta
base64_main                                            -     217    +217
packed_usage                                       27181   27229     +48
read_base64                                          348     373     +25
applet_names                                        2299    2306      +7
bbconfig_config_bz2                                 4942    4948      +6
applet_main                                         1352    1356      +4
applet_nameofs                                       676     678      +2
applet_install_loc                                   169     170      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/0 up/down: 310/0)             Total: 310 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-31 14:09:22 +02:00
Denys Vlasenko
b32a543663 nandwrite: complain on malformed -s NUM
Elsewhere: use common error message. -30 bytes net size change

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-29 13:29:02 +02:00
Denys Vlasenko
7ff6836db3 split: use xopen_stdin()
function                                             old     new   delta
split_main                                           558     543     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-23 03:06:46 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
9768a82eb0 *: fix "see file License ..." - the file is named LICENSE (in uppercase)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:04:14 +02:00
Denys Vlasenko
7783248eaa *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12 14:14:45 +02:00
Jeremie Koenig
138ce54c9c stty: sort out preprocessor conditionals
* Move the definitions of missing constants to the top of the file.
* Fix undefined IDX_xxx on missing termios constants.
* FreeBSD has TABDLY, TAB0 and TAB3, but no TAB1 or TAB2
* Omit the definition of set_window_size() if TIOCGWINSZ is not available.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01 03:31:35 +02:00
Denys Vlasenko
f3ea792bad *: mass cosmetic removal of extra empty lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Jeremie Koenig
1d7266d3b5 mark Linux-specific configuration options
PLATFORM_LINUX is used as a dependency for applets or features
which require Linux-specific interfaces.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:44:56 +02:00
Jeremie Koenig
b175462422 readlink: use xmalloc_realpath()
Using realpath() directly with a non-NULL output buffer is unsafe because its
behavior is unspecified on systems which don't have PATH_MAX (ie. Hurd)

I beleive this also fixes a small bug whereby 'buf' would not be freed
on 'readlink -v' with ENABLE_FEATURE_CLEANUP.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:43:05 +02:00
Denys Vlasenko
d1516c4d62 dos2unix: fix the case w/o parameters
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-17 22:43:42 +02:00
Denys Vlasenko
8f65b0cf31 whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-06 18:46:02 +02:00
Pascal Bellard
21e8e8da64 libbb: introduce and use BB_EXECVP_or_die()
function                                             old     new   delta
BB_EXECVP_or_die                                       -      47     +47
time_main                                           1042    1043      +1
chrt_main                                            371     364      -7
ionice_main                                          292     282     -10
setsid_main                                           69      56     -13
nohup_main                                           236     223     -13
cttyhack_main                                        266     253     -13
chroot_main                                           94      81     -13
chpst_main                                           746     733     -13
timeout_main                                         297     279     -18
taskset_main                                         541     522     -19
vfork_child                                           67      45     -22
parse                                                975     953     -22
lpd_main                                             770     748     -22
launch_helper                                        192     170     -22
tcpudpsvd_main                                      1810    1782     -28
nice_main                                            190     156     -34
env_main                                             242     206     -36
run_command                                          221     174     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352)         Total: -304 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 00:57:03 +02:00
Denys Vlasenko
41ddd9f606 *: make exec failure message more consistent
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 01:46:53 +02:00
Denys Vlasenko
4ebdae3777 date: make %N work without -lrt on glibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-18 02:55:48 +02:00
Seb
d2d327db6d stat: make output more similar to GNU stat
Signed-off-by: Seb <sbb@tuxfamily.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-12 21:57:50 +02:00
Denys Vlasenko
e2b41cfb4b date: trivial fix - was reading seconds into nanoseconds field! DOH
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-12 03:32:22 +02:00
Denys Vlasenko
d70e0e995e *: add INSERTs to *.src files where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 12:15:11 +02:00
Denys Vlasenko
b68bba5649 date: use the same code for FEATURE_DATE_NANO for glibc and uclibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 04:39:30 +02:00
Denys Vlasenko
729ecb87bf bbconfig: make it independent from printf functions
function                                             old     new   delta
full_write2_str                                        -      25     +25
full_write1_str                                        -      25     +25
clear_main                                            21      20      -1
telnet_main                                         1488    1477     -11
getty_main                                          1932    1918     -14
full_write22_str                                      25       -     -25
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51)             Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 14:14:26 +02:00
Denys Vlasenko
f2da16f451 date: make FEATURE_NANO compile on glibc systems
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 17:53:48 +02:00
Denys Vlasenko
f2177abe1d yes: this applet doesn't have options, don't lie that it does.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 05:23: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
729ce47360 tr: add forgotten //config: prefixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-05 21:29:41 +02:00
Denys Vlasenko
da929a95aa mass renaming Kbuild -> Kbuild.src, Config.in -> Config.src
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 20:10:51 +02:00
Denys Vlasenko
e4070cb0d7 partially migrate coreutils to Config.src and Kbuild.src
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 19:59:49 +02:00
Denys Vlasenko
6c2406ac86 date: optional support for %N. Closes bug 1861.
function                                             old     new   delta
date_main                                            862    1090    +228
clock_gettime                                          -      41     +41
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/0 up/down: 269/0)             Total: 269 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 18:19:15 +02:00
Denys Vlasenko
3e47cfec90 test: "" is not a valid number. Closes bug 1915
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-03 01:47:04 +02:00
Denys Vlasenko
ea8b252cb3 *: better string sharing
text   data    bss    dec    hex filename
 849427    441   7556 857424  d1550 busybox_old
 849355    441   7556 857352  d1508 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-02 12:57:26 +02:00
Denys Vlasenko
b9542cb2ce deinline two big functions
function                                             old     new   delta
xz_dec_lzma2_run                                       -    1483   +1483
decode_one_format                                      -     715    +715
decode_format_string                                 840      98    -742
unpack_xz_stream                                    4014    2377   -1637
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/2 up/down: 2198/-2379)       Total: -181 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-01 23:16:46 +02:00
Denys Vlasenko
ff0e875e02 work on adding testsuite runs to randomconfig test builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-10 04:16:43 +02:00
Denys Vlasenko
6dbbac5d4f Move utmp/wtmp support to "General configuration" section
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:48:32 +02:00
Denys Vlasenko
37f5bef63c libbb: split update_utmp from login/getty in preparation to use it for telnetd
function                                             old     new   delta
update_utent                                           -     339    +339
login_main                                          1498    1128    -370
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370)          Total: -31 bytes

function                                             old     new   delta
update_utmp                                          246     337     +91
login_main                                          1128    1140     +12
getty_main                                          1908    1918     +10
...
update_utent                                         339       -    -339
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368)         Total: -249 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05 03:18:40 +02:00
Denys Vlasenko
4c721049c3 who: fix attempts to open '/dev/dev/ttyX'; make columns a bit wider, add -H
function                                             old     new   delta
who_main                                             292     363     +71

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 23:45:09 +02:00
Jérémie Koenig
fbedacfc8c Hurd compat fixes. Mostly dealing with absent PATH_MAX
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 19:08:53 +01:00
Denys Vlasenko
19158a837d unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 14:06:56 +01:00
Tomas Heinrich
968951fd0c unexpand: fix "a b"\n" input case
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 09:46:07 +01:00
Tomas Heinrich
1abc07dcca [un]expand: account for different character widths. +16 bytes.
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 09:40:47 +01:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Mikhail Gusarov
927e4bb644 touch: do not ignore argument of -d/-t option
Previously -d/-t was no-op due to wrong handling of args passed to
utimes(2).

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 13:04:47 +01:00
Denys Vlasenko
6eaeb7737d tailk: fix error detected by testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-12 22:16:25 +01:00
Denys Vlasenko
79950a6bbe wc: compat: make "wc -c ONE_FILE" not print leading spaces. +2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-08 22:03:24 +01:00
Denys Vlasenko
5749328b56 head,tail: trim help text; make suffixes unconditional for head too
function                                             old     new   delta
packed_usage                                       26411   26375     -36

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02 16:18:14 +01:00
Bernhard Reutner-Fischer
836f36333a tail: document FANCY flags in helptext
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-26 18:34:16 +01:00
Bernhard Reutner-Fischer
1359e0d1b9 df: explain FANCY options in helptext
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-26 18:21:42 +01:00
Denys Vlasenko
43d9747f6e install: strip before mode/uid/gid is set, not after.
function                                             old     new   delta
install_main                                         694     716     +22
basename                                              21       -     -21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-21 16:55:29 +01:00
Denys Vlasenko
10544a8410 compat and warning fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-09 00:26:10 +01:00
Denys Vlasenko
3205c24a82 shaNNNsum: accept and ignore -b and -t
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-07 23:28:23 +01:00
Denys Vlasenko
cb7edc2661 adduser: copy /etc/skel to mew homes. +100 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-06 21:50:59 +01:00
Denys Vlasenko
0cd445f4d1 cosmetic fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-06 21:11:49 +01:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
5b9b1365a0 stat: get rid on intmax_t
function                                             old     new   delta
print_it                                             225     218      -7
print_stat                                           919     889     -30
print_statfs                                         370     339     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-68)             Total: -68 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02 03:08:57 +01:00
Denys Vlasenko
d8528b8e56 ls: unicode fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-31 05:15:38 +01:00
Denys Vlasenko
ed910c750d cal: add a unicode test
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-31 00:10:18 +01:00
Denys Vlasenko
e17764c8fb further work on unicodization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-30 23:16:21 +01:00
Denys Vlasenko
6b9f163353 *: style fixes. no code changes (verified with objdump)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 02:24:24 +01:00
Denys Vlasenko
6b01b71e83 randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24 22:52:21 +01:00
Denys Vlasenko
9f93d62192 libbb: better unicode width support. Hopefully fixes bug 839.
Also opens up a possibility to make other unicode stuff smaller
and more correct later. but:

function                                             old     new   delta
static.combining                                       -     516    +516
bb_wcwidth                                             -     328    +328
unicode_cut_nchars                                     -     141    +141
mbstowc_internal                                       -      93     +93
in_table                                               -      78     +78
cal_main                                             899     961     +62
static.combining0x10000                                -      40     +40
unicode_strlen                                         -      31     +31
bb_mbstrlen                                           31       -     -31
bb_mbstowcs                                          173     102     -71
------------------------------------------------------------------------------
(add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102)        Total: 1187 bytes

Uses code of Markus Kuhn, which is in public domain:
http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
"Permission to use, copy, modify, and distribute this software
 for any purpose and without fee is hereby granted. The author
 disclaims all warranties with regard to this software."

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24 07:44:03 +01:00
Denys Vlasenko
5da9f96ad8 date: introduce FEATURE_DATE_COMPAT; shrink
function                                             old     new   delta
date_main                                            889     862     -27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-23 23:37:52 +01:00
Denys Vlasenko
9882b34fe2 chown: -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-23 00:13:32 +01:00
Matheus Izvekov
31416d589e chown: support long options
function                                             old     new   delta
chown_longopts                                         -      81     +81
chown_main                                           182     192     +10

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-23 00:10:40 +01:00
Denys Vlasenko
7be97c5b6b ls: fix sort of very large files. +21 byte
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18 13:02:27 +01:00
Denys Vlasenko
573ba4e92e fix examples which used non-standard cut -b0-NNN
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18 12:25:09 +01:00
Denys Vlasenko
9c3b84a304 ls: make it so that group never glues itself to file size
+ smaller enhancements: inode is long long; -h is a bit narrower; etc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18 01:55:00 +01:00
Denys Vlasenko
a40f0624db cp: fix -H handling
function                                             old     new   delta
copy_file                                           1495    1518     +23

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-15 22:05:07 +01:00
Denys Vlasenko
bb16f57e5d INSTALL: update obsolete doc, as suggested by Doug Clapp (doug.clapp AT triad.rr.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-13 22:43:13 +01:00
Denys Vlasenko
c041e239db fix configure sha256sum problem. Closes bug 895
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-13 18:55:37 +01:00
Denys Vlasenko
dc698bb038 *: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 19:10:49 +01:00
Denys Vlasenko
86350f8d5f cal: document the location of unicode bug. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 10:18:37 +01:00
Denys Vlasenko
28055028a7 fold: unicode support. Based on a patch by Tomas Heinrich <heinrich.tomas@gmail.com>
General Unicode support is tweaked to expose unicode_status.

function                                             old     new   delta
init_unicode                                           -      77     +77
write2stdout                                           -      19     +19
adjust_column                                         68      71      +3
unicode_status                                         -       1      +1
unicode_is_enabled                                     1       -      -1
grep_main                                            780     773      -7
fold_main                                            619     552     -67
check_unicode_in_env                                  77       -     -77
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152)          Total: -52 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 20:49:58 +01:00
Tomas Heinrich
d2b1ba6fde [un]expand: unicode support
function                                             old     new   delta
expand_main                                          633     663     +30

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 16:21:31 +01:00
Denys Vlasenko
2ec91aead5 *: remove some uses of argc
function                                             old     new   delta
whoami_main                                           34      37      +3
logname_main                                          60      63      +3
hostid_main                                           35      38      +3
ttysize_main                                         136     135      -1
nmeter_main                                          673     672      -1
logger_main                                          387     386      -1
uuencode_main                                        330     328      -2
ifupdown_main                                       2125    2123      -2
mesg_main                                            158     155      -3
free_main                                            333     330      -3
cal_main                                             902     899      -3
acpid_main                                           443     440      -3
ar_main                                              196     189      -7
find_main                                            476     467      -9
ifconfig_main                                       1235    1221     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49)            Total: -40 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 14:15:38 +01:00
Denys Vlasenko
a355da0775 *: make 2 more "int argc"'s unused; more saved if !DESKTOP
function                                             old     new   delta
sync_main                                             18      20      +2
tty_main                                              90      87      -3
iprule_list                                           83      79      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 13:16:08 +01:00
Denys Vlasenko
aa42d13e32 sort: make sort -o FILE FILE (same FILE) work. Closes bug 785. -3 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-13 02:09:22 +01:00
Denys Vlasenko
800ff7cc75 stty: code shrink -44 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 15:00:17 +01:00
Denys Vlasenko
9f5a577a32 stty: fix columns command. closes bug 791.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 14:17:02 +01:00
Denys Vlasenko
a7329667b4 mount: prevent second mount -a from mounting everything again
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-05 04:25:19 +01:00
Denys Vlasenko
d0f9d0ed58 touch: needs another fix after last utimes() fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-30 11:36:14 +01:00
Denys Vlasenko
dcbfaba264 fix improper utimes usage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29 19:40:36 +01:00
Denys Vlasenko
e992bae6f9 *: remove a few more cases of argc usage. -89 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-28 15:18:53 +01:00
Denys Vlasenko
5b6fe34cee split: handle - as "use stdin". +13 bytes. Closes bug 741.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-26 05:43:16 +01:00
Denys Vlasenko
11f3a8b7ed od: fix -tx without length spec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-22 15:37:16 +01:00
Denys Vlasenko
c270454f8f fix fallout from isprint() changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-20 19:14:19 +01:00
Denys Vlasenko
8684cbb5cc libbb: robustify isXXXX(). +39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18 11:34:43 +01:00
Dan Fandrich
5b0a7f1a6e wc: fix a hang gue to isprint(EOF)
The new isprint replacement macro returns TRUE for isprint(EOF), so the
read loop never returns. Moved the check for EOF immediately after the
read.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18 10:48:09 +01:00
Denys Vlasenko
a7ccdeef39 libbb: added xfdopen_for_read/write
function                                             old     new   delta
xfdopen_helper                                         -      40     +40
logdir_open                                         1163    1184     +21
process_stdin                                        433     443     +10
xfdopen_for_write                                      -       9      +9
doCommands                                          2465    2474      +9
patch_main                                          1214    1222      +8
bbunpack                                             457     465      +8
xfdopen_for_read                                       -       7      +7
scan_tree                                            258     262      +4
xstrtoul_range_sfx                                   230     231      +1
sendmail_main                                        957     955      -2
passwd_main                                         1027    1023      -4
parse                                                969     964      -5
test_main                                            253     247      -6
sed_main                                             655     649      -6
dos2unix_main                                        437     429      -8
fbsplash_main                                        950     938     -12
handle_dir_common                                    371     354     -17
expand_vars_to_list                                 2197    2169     -28
update_passwd                                       1275    1246     -29
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117)           Total: 0 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 23:28:11 +01:00
Denys Vlasenko
ff1822aed1 date: restore hadling of MMDDhhmm[[CC]YY][.ss] date format
function                                             old     new   delta
date_main                                            698     889    +191

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 04:55:40 +01:00
Denys Vlasenko
389cca4b9e some non-gnu compilers can't have non-const struct initializers
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 02:28:56 +01:00
Bernhard Reutner-Fischer
a307af1af6 use utimes() rather than obsolescent utime()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-15 00:12:53 +01:00