Denys Vlasenko
adf922ec28
*: a few more NOINLINEs
...
function old new delta
print_linkinfo - 815 +815
do_msg - 783 +783
INET_setroute - 757 +757
varvalue - 746 +746
do_sem - 637 +637
inflate_codes - 617 +617
INET6_setroute - 491 +491
edir - 370 +370
sync_cursor - 298 +298
update_utmp - 246 +246
searchLines - 165 +165
setup_alarm - 144 +144
may_wakeup - 101 +101
getNum 566 371 -195
refresh 1166 848 -318
rtcwake_main 809 479 -330
getty_main 2396 1921 -475
chpst_main 1373 746 -627
inflate_unzip_internal 1335 567 -768
evalvar 1384 612 -772
ipaddr_list_or_flush 2160 1246 -914
route_main 1585 245 -1340
ipcs_main 2523 1049 -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 14:35:37 +02:00
Denys Vlasenko
7bb346f23c
*: use {i,u}toa() where appropriate
...
function old new delta
startservice 377 363 -14
setari_u 54 40 -14
ash_main 1375 1361 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-42) Total: -42 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-06 22:09:50 +02:00
Denys Vlasenko
606291beab
*: more portability fixes by Dan Fandrich
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 23:15:43 +02:00
Denys Vlasenko
11c8238d1b
sed: fix bug 623 (SEGV on some sed commands)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 03:02:21 +02:00
Denys Vlasenko
bc3e9479c2
awk: fix typo in prev commit
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 04:16:00 +02:00
Leonid Lisovskiy
46a0be5304
awk: implement mktime
...
function old new delta
exec_builtin - 1466 +1466
do_mktime - 116 +116
tokenlist 441 448 +7
tokeninfo 396 400 +4
evaluate 5395 3755 -1640
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 1593/-1640) Total: -47 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 04:08:08 +02:00
Denys Vlasenko
d8dd25a2a7
diff: debug macros; one trivial size optimization
...
function old new delta
diffreg 1781 1815 +34
isqrt 64 - -64
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 34/-64) Total: -30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 01:23:19 +02:00
Denys Vlasenko
3e02050314
diff: fix bug 613 (diff -ub segfaults)
...
function old new delta
dump_unified_vec 435 457 +22
diff_main 855 860 +5
diffreg 1786 1781 -5
do_diff 428 416 -12
change 325 283 -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 27/-59) Total: -32 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 01:22:18 +02:00
Denys Vlasenko
d069e5398d
a few more GCC-isms removed
...
text data bss dec hex filename
824641 458 6956 832055 cb237 busybox_old
824631 458 6956 832045 cb22d busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 23:12:10 +02:00
Denys Vlasenko
90a9904e9e
remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)
...
function old new delta
logdirs_reopen 1310 1308 -2
read_line_input 4757 4753 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6) Total: -6 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:36:23 +02:00
Denys Vlasenko
d7874ed1d4
patch: support -N. By Olivier Duclos (olivier.duclos AT gmail.com)
...
function old new delta
packed_usage 26646 26656 +10
patch_main 1101 1110 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-20 23:33:19 +02:00
Denys Vlasenko
f210cff601
sed: fix " echo /usr/lib | sed 's,\(^/\|\)[^/][^/]*,..,g' " bug
...
function old new delta
process_files 2102 2091 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-17 01:35:04 +02:00
Denys Vlasenko
8e96b5b531
sed: simpler fix for recent GNU compat stuff (by Rob Landley)
...
function old new delta
process_files 2120 2102 -18
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-14 01:02:57 +02:00
Denys Vlasenko
ae68f1133f
sed: deal with peculiar behavior of '2d;2,1p' in GNU sed
...
function old new delta
process_files 2173 2120 -53
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-10 11:55:20 +02:00
Denys Vlasenko
b22bbfffec
fix dependencies of FEATURE_GETOPT_LONG
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-04 16:50:43 +02:00
Denys Vlasenko
8bca3e20b9
sed: fix handling of 1d;1,3p and 1d;1,REGEXp
...
function old new delta
process_files 2084 2173 +89
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-30 19:19:37 +02:00
Denys Vlasenko
6548edd430
vi: do not accept uppercase comments (compat). Closes bug 397.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-15 12:44:11 +02:00
Denys Vlasenko
38d9072b2c
diff: tiny compat tweak
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09 12:55:13 +02:00
Denys Vlasenko
e424423a7b
awk: put at least one NUL between $n. Hopefully closes 337.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-18 23:50:03 +02:00
Denys Vlasenko
020f40693a
line editing: add an option to emit ESC [ 6 n and use results
...
This makes line editing able to recognize case when
cursor was not at the beginning of the line. It may also
be adapted later to find out display size (serial line users
would love it).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-17 16:44:54 +02: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
c7cc5a9432
mdev: Rob's #if forest removal
...
*: remove superfluous conts in "f(type *const param)"
2009-04-19 01:27:20 +00:00
Denis Vlasenko
67b5eeb933
awk: fix long field separators case. By Ian Wienand (ianw AT vmware.com)
2009-04-12 13:54:13 +00:00
Denis Vlasenko
3266aa9ec2
trailing whitespace removal
2009-04-01 11:24:04 +00:00
Denis Vlasenko
7a6766428e
awk: fix compat issue found by gpm build
...
function old new delta
as_regex 105 131 +26
hash_find 247 233 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 26/-14) Total: 12 bytes
2009-03-15 22:20:31 +00:00
Denis Vlasenko
9aa5c652e9
unzip: fix thinko with le/be conv and size (closes bug 129)
...
awk: make "struct global" hack more robust wrt alignment (closes bug 131)
2009-02-26 11:21:04 +00:00
Denis Vlasenko
41d5ebee17
awk: in BEGIN section $0 should be "", not "0".
2009-01-25 01:00:15 +00:00
Denis Vlasenko
00d8417631
vi: speedup and code shrink (Walter Harms)
...
networking/interface.c: silence warning (Vladimir)
wget: more robust EINTR detection
2008-11-24 07:34:42 +00:00
Denis Vlasenko
4c83025ea6
diff: emit /dev/null if diff -rN diffs a file against /dev/null
...
function old new delta
diffreg 1782 1786 +4
2008-11-23 14:40:00 +00:00
Denis Vlasenko
4ae1e13d3f
vi: fix several instances of major goof: when text grows, text[]
...
might get reallocated! We were keeping around pointers to old place...
function old new delta
colon 3017 3037 +20
char_insert 336 354 +18
stupid_insert 18 24 +6
string_insert 89 94 +5
do_cmd 4461 4465 +4
file_insert 328 329 +1
text_hole_make 134 120 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/1 up/down: 54/-14) Total: 40 bytes
2008-11-19 13:25:14 +00:00
Denis Vlasenko
202ac504e1
*: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, xx) op
...
function old new delta
tcsetattr_stdin_TCSANOW - 14 +14
set_sane_term 116 113 -3
top_main 1277 1273 -4
make_new_session 421 415 -6
rawmode 133 126 -7
reset_term 18 10 -8
die 43 35 -8
cookmode 62 54 -8
vlock_main 425 415 -10
read_line_input 3165 3155 -10
bb_askpass 357 347 -10
fsck_minix_main 3079 3065 -14
getty_main 2375 2332 -43
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
2008-11-05 13:20:58 +00:00
Denis Vlasenko
31d58e58d2
randomconfig fixes
2008-10-29 13:16:28 +00:00
Denis Vlasenko
c3a9dc8ac5
vi: fix uninitialized last_search_pattern (bug 5794)
2008-10-29 00:58:04 +00:00
Denis Vlasenko
5f6aaf39cf
less: reuse former vi's key reading code. Improve SIGWINCH handling.
...
function old new delta
less_main 2056 2097 +41
getch_nowait 248 273 +25
read_key 310 321 +11
static.esccmds 61 69 +8
count_lines 72 74 +2
less_gets 166 142 -24
less_getch 172 43 -129
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/5 up/down: 91/-170) Total: -79 bytes
text data bss dec hex filename
2008-10-25 23:27:29 +00:00
Denis Vlasenko
0112ff5203
vi: move key reading routine out of vi into llbbb
...
function old new delta
read_key - 310 +310
....
static.esccmds 170 61 -109
readit 286 60 -226
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 9/10 up/down: 349/-367) Total: -18 bytes
2008-10-25 23:23:00 +00:00
Denis Vlasenko
2d5bd807c0
build system cleanup: rename FEATURE_AWK_MATH to FEATURE_AWK_LIBM;
...
disable parsing test applet.
2008-10-24 10:49:49 +00:00
Denis Vlasenko
37890e2f37
awk: fix typo in atan2 code. closes bug 5594.
2008-10-21 12:59:34 +00:00
Denis Vlasenko
4c9e9c4314
vi: handle chars 0x80, 0x81... correctly
2008-10-20 08:59:03 +00:00
Denis Vlasenko
078323010b
dc: conditionalize parts which require libm
2008-10-20 08:43:10 +00:00
Denis Vlasenko
582dff0514
volume identification: abolish /proc/partitions and /proc/cdroms
...
scanning. It does not catch volume managers and such.
Adding even more cruft is bad, so I decided to simply
scan /dev/* for any block devices. See how much better
it finds devices now:
# ./busybox_old blkid
/dev/sda1: LABEL="/boot" UUID="7931e231-dcb4-4b6d-9301-f7354ae24061"
/dev/dm-0: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a"
/dev/dm-1: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267"
/dev/sdb1: UUID="6F84-ED0F"
# ./busybox blkid
/dev/sdb1: UUID="6F84-ED0F"
/dev/root: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a"
/dev/dm-1: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267"
/dev/dm-0: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a"
/dev/sda1: LABEL="/boot" UUID="7931e231-dcb4-4b6d-9301-f7354ae24061"
/dev/mapper/VolGroup00-LogVol01: UUID="edc2a920-ef83-437e-ba64-d3b6dc851267"
/dev/mapper/VolGroup00-LogVol00: LABEL="Fedora-9-Live-x8" UUID="bb491e1e-1145-4f5b-b0ab-cbd2baf4f15a"
function old new delta
static.drive_name_string 12 - -12
append_mount_options 205 190 -15
volume_id_open_node 37 18 -19
uuidcache_check_device 485 257 -228
uuidcache_init 637 36 -601
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-875) Total: -875 bytes
text data bss dec hex filename
792218 592 6648 799458 c32e2 busybox_old
791260 592 6648 798500 c2f24 busybox_unstripped
2008-10-19 19:36:30 +00:00
Rob Landley
4bdeaaf556
Comment and whitespace tweaks.
2008-10-19 04:21:21 +00:00
Denis Vlasenko
e3742f4217
vi: explain why reading 4 chars is unsafe
2008-10-18 19:37:41 +00:00
Denis Vlasenko
1dfeeeb651
vi: whitespace fix
2008-10-18 19:04:37 +00:00
Denis Vlasenko
8ef801b40c
vi: a few trivial optimizations to keyboard reading code; bump timeout to 50s.
...
function old new delta
edit_file 901 912 +11
count_lines 74 72 -2
readit 306 289 -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 11/-19) Total: -8 bytes
2008-10-16 09:46:07 +00:00
Rob Landley
7960ea8918
Confirmed that on Linux the serial interrupt takes precedence over the timer
...
interrupt, so we don't need to worry about scheduler delays. This means the
delay can be trimmed down to 25 miliseconds. Add comment while at it.
2008-10-16 06:34:10 +00:00
Denis Vlasenko
d44c1535ae
vi: fix bizarre formatting. no code changes
2008-10-14 12:59:42 +00:00
Denis Vlasenko
ded6ad34ed
fix recurring "last_cmd overrun", fix [del] handling in insert mode
2008-10-14 12:26:30 +00:00
Denis Vlasenko
267e16c74a
vi: trivial size optimization -65 bytes
2008-10-14 10:34:41 +00:00
Denis Vlasenko
25497c1d92
vi: reinstate timeout of 300 ms
2008-10-14 10:25:05 +00:00
Denis Vlasenko
5373fbcd11
vi: add comments to Rob's algorithm of reading and matching ESC sequences
...
(nice work btw!)
2008-10-14 10:09:56 +00:00