Commit Graph

1533 Commits

Author SHA1 Message Date
Denys Vlasenko
dc7e5c46b0 libbb unicode: comment out usused function and unused parameter
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 13:08:28 +01:00
Denys Vlasenko
92ffe0571a date,touch: treat 2-digit years better (fit them into +-50 yrs around today)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-02 20:02:09 +01:00
Alexey Soloviev
a5d3d3436b date: preserve isdst value if date is in time_t (unix time) format
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 05:21:51 +01:00
Denys Vlasenko
0cd4f3039b add missed underscore
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 00:01:59 +01:00
Denys Vlasenko
d1e46651a3 date: add a comment about _SVID_SOURCE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 23:56:47 +01:00
Denys Vlasenko
27c6c00a7c test: add examples when "%s: unknown operand" happens
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 03:43:20 +01:00
James Youngman
a4bc10cec7 ls: remove redundant constants LIST_FILENAME and LIST_SHORT
LIST_FILENAME is always true and LIST_SHORT affects nothing.

Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 01:36:16 +01:00
Denys Vlasenko
982aa263a0 ls: add support for -H
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 21:54:39 +01:00
Denys Vlasenko
407ab2a434 ls: tweak -e handling; better comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 16:29:08 +01:00
Denys Vlasenko
2f7d9e8903 ls: print a space after each column. Closes bug 2941
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 07:06:44 +01:00
Denys Vlasenko
163d864357 ls: make -F not follow symlinks of the command line
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 06:16:28 +01:00
Denys Vlasenko
d87815d5e0 ls: make -x force columnar output; remove unused parts of TRIGGER code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 05:43:44 +01:00
Denys Vlasenko
f313746a6d ls: for some options, only last takes effect. Closes bug 2959
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 05:05:34 +01:00
Denys Vlasenko
3f2477e8a8 touch: fix help text to not show options disabled in .config
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-01 13:06:03 +01:00
Denys Vlasenko
9e0f15010e date :add a comment about older toolchains
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-23 00:15:19 +01:00
Denys Vlasenko
4909fec73e ls: fix -lg to show group (was showing user)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 00:46:57 +01:00
Eric Lammerts
66be9197a5 stat: fix mtime/ctime/atime
If you set CONFIG_FEATURE_STAT_FORMAT=n, two of the three printed
times are wrong, because a global buffer is reused. Fix below.

Signed-off-by: Eric Lammerts <busybox@lists.lammerts.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30 02:48:20 +02:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
9ce642f974 libbb: introduce and use common crc32 routine
function                                             old     new   delta
crc32_block_endian1                                    -      37     +37
crc32_block_endian0                                    -      34     +34
global_crc32_table                                     -       8      +8
file_read                                             82      87      +5
gzip_main                                            211     214      +3
xz_crc32                                              40      35      -5
crc32_table                                            8       -      -8
calculate_gunzip_crc                                  54      34     -20
lzo_crc32                                             54      25     -29
cksum_main                                           298     211     -87
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149)           Total: -62 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-27 15:26:45 +02:00
Denys Vlasenko
4c46d85469 mv: implement -n option
function                                             old     new   delta
mv_longopts                                           23      36     +13
mv_main                                              510     520     +10
packed_usage                                       27218   27225      +7

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-26 15:58:47 +02:00
Denys Vlasenko
4b63e16d20 md5/sha1sum: code shrink
function                                             old     new   delta
hash_file                                            357     279     -78

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 14:54:53 +02:00
Denys Vlasenko
5360059131 libbb: introduce and use strcpy_and_process_escape_sequences
function                                             old     new   delta
strcpy_and_process_escape_sequences                    -      50     +50
bb_process_escape_sequence                           148     138     -10
printf_main                                          789     776     -13
getty_main                                          1897    1831     -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23 21:06:06 +02:00
Alexander Shishkin
6722737ece *: introduce and use xmkstemp. -65 bytes.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:27:16 +02:00
Alexander Shishkin
2348e09557 tail: free tailbuf upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:25:45 +02:00
Alexander Shishkin
a7027bf89e stat: remove superfluous setXXent() calls, plug memory leak
function                                             old     new   delta
print_stat                                           875     865     -10

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:24:05 +02:00
Denys Vlasenko
bec588878b *: s/open3_or_warn/open_or_warn/ where makes sense
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-20 13:21:22 +02:00
Denys Vlasenko
5fe2f863b9 sort: -o FILE should create/truncate FILE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 02:43:57 +02:00
Denys Vlasenko
c05387d5de *: replace xopen3 with xopen where makes sense
function                                             old     new   delta
uniq_main                                            421     416      -5
sort_main                                            803     798      -5
patch_main                                          2051    2046      -5
cpio_main                                            547     542      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 02:38:27 +02:00
Denys Vlasenko
ea694163af typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 12:45:24 +02:00
Denys Vlasenko
786635e62e seq: exit on write errors
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 12:44:39 +02:00
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