Age | Commit message (Collapse) | Author |
|
function old new delta
zbc_parse_stmt_possibly_auto 2245 2180 -65
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-65) Total: -65 bytes
text data bss dec hex filename
982237 485 7296 990018 f1b42 busybox_old
982152 485 7296 989933 f1aed busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While at it, allow newline between "else" and its body
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
zbc_vm_process 561 589 +28
zbc_lex_next_and_skip_NLINE - 22 +22
zbc_parse_stmt_possibly_auto 2232 2253 +21
zbc_lex_skip_if_at_NLINE - 14 +14
zbc_lex_number 192 200 +8
zbc_num_divmod 150 156 +6
bc_vm_run 134 139 +5
bc_vm_init 757 760 +3
bc_num_printNewline 51 54 +3
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 7/0 up/down: 110/0) Total: 110 bytes
text data bss dec hex filename
982138 485 7296 989919 f1adf busybox_old
982275 485 7296 990056 f1b68 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
zbc_vm_process 561 597 +36
zbc_parse_stmt_possibly_auto 2232 2253 +21
zbc_lex_number 192 200 +8
zbc_num_divmod 150 156 +6
bc_vm_run 134 139 +5
bc_vm_init 757 760 +3
bc_num_printNewline 51 54 +3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/0 up/down: 82/0) Total: 82 bytes
text data bss dec hex filename
982138 485 7296 989919 f1adf busybox_old
982247 485 7296 990028 f1b4c busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The entire control construct (if/while/for/funcdef) or {} block is
"eaten" by the corresponding parsing function, instead of maintaining
special "block flag stack" with magic bits in it, and returning to main
input loop after every inner statement (every input line, essentially).
This required moving line input deep into lexer - now zbc_lex_next()
triggers more reading when needed.
"block flag stack" is gone.
Correctness of ^C handling wasn't checked, might need fixing now.
if/else syntax is changed to match GNU bc: "else" can not be on
the next line (the rationale is that "if (1) 2" statement in interactive
mode should execute and print 2 instead of waiting for possible
"else ..." line).
This change fixes the following examples:
if (1) if (1) 1 else 2 else 3
if (0) 1 else if (1) 2
define w() { auto z; return 1; }
function old new delta
zbc_parse_stmt_possibly_auto - 2232 +2232
zbc_vm_process 89 561 +472
zbc_lex_next 1982 2296 +314
bc_vm_init 749 757 +8
bc_parse_expr_empty_ok 2016 2021 +5
bc_num_printNewline 54 51 -3
zbc_program_read 289 280 -9
bc_parse_free 47 38 -9
bc_parse_reset 126 113 -13
bc_parse_create 108 92 -16
bc_parse_push_block_flag 47 - -47
bc_parse_noElse 48 - -48
zbc_parse_text_init 113 59 -54
zbc_parse_body 121 - -121
zbc_parse_else 125 - -125
zbc_parse_endBody 254 - -254
bc_vm_run 421 134 -287
zbc_parse_auto 290 - -290
zcommon_parse 476 - -476
zbc_parse_stmt 1682 7 -1675
------------------------------------------------------------------------------
(add/remove: 1/7 grow/shrink: 4/8 up/down: 3031/-3427) Total: -396 bytes
text data bss dec hex filename
982586 485 7296 990367 f1c9f busybox_old
982138 485 7296 989919 f1adf busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bc_parse_push_block_flag - 47 +47
zbc_parse_body 107 121 +14
zbc_num_divmod 156 150 -6
zbc_lex_number 200 192 -8
zbc_parse_endBody 264 254 -10
bc_parse_startBody 47 - -47
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/3 up/down: 61/-71) Total: -10 bytes
text data bss dec hex filename
982596 485 7296 990377 f1ca9 busybox_old
982586 485 7296 990367 f1c9f busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bc_vm_run 514 513 -1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The '-t' option for od is enabled by CONFIG_DESKTOP. So
check this config before using 'od -t' in test cases.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Thanks to Cristian Ionescu-Idbohrn for noticing.
Also fix "%d" ' 42' to skip leading whitespace.
function old new delta
print_direc 435 454 +19
bb_strtoll 99 103 +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 23/0) Total: 23 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Commit 2da9724b56169f00bd7fb6b9a11c9409a7620981 broke 'head -n -1' and was
later reverted with 0d598ab9f03dbf320f7b81c05e4a94cb303dfbc7.
This commit adds a test case to avoid future breakage.
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_dump_dump 1466 1491 +25
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unpack_lzma_stream 2669 2686 +17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
create_or_remember_link - 106 +106
create_links_from_list - 93 +93
find_applet_by_name 124 128 +4
unzip_main 2724 2726 +2
data_extract_all 891 873 -18
create_symlinks_from_list 64 - -64
create_or_remember_symlink 94 - -94
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/1 up/down: 205/-176) Total: 29 bytes
Signed-off-by: Harald van Dijk <harald@gigawatt.nl>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
cat_main 418 421 +3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
EMSG_NEGATIVE_FIELD - 25 +25
evaluate 3390 3403 +13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 38/0) Total: 38 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unpack_lzma_stream 1705 1717 +12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Tweak some tests so they work when the path to the test directory or
$HOME contains spaces.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unpack_lzma_stream 2647 2653 +6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
As it turns out, longjmp'ing into freed stack is not healthy...
function old new delta
unpack_usage_messages - 97 +97
unpack_bz2_stream 369 409 +40
get_next_block 1667 1677 +10
get_bits 156 155 -1
start_bunzip 212 183 -29
bb_show_usage 181 120 -61
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/3 up/down: 147/-91) Total: 56 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
grep_file 1461 1470 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This mostly reverts commit bc9bbeb2b81001e8731cd2ae501c8fccc8d87cc7
"libarchive: do not extract unsafe symlinks unless $EXTRACT_UNSAFE_SYMLINKS=1"
Users report that it is somewhat too restrictive. See
https://bugs.busybox.net/show_bug.cgi?id=8411
In particular, this interferes with unpacking of busybox-based
filesystems with links like "sbin/applet" -> "../bin/busybox".
The change is made smaller by deleting ARCHIVE_EXTRACT_QUIET flag -
it is unused since 2010, and removing conditionals on it
allows commonalizing some error message codes.
function old new delta
create_or_remember_symlink - 94 +94
create_symlinks_from_list - 64 +64
tar_main 1002 1006 +4
unzip_main 2732 2724 -8
data_extract_all 984 891 -93
unsafe_symlink_target 147 - -147
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/2 up/down: 162/-248) Total: -86 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Test scripts that use CONFIG_* variables need to source .config.
Since this wasn't being done for busybox many tests were skipped.
As a result new failures due to changes in help output were missed.
Also remove some unnecessary echos in the bzcat script.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
evaluate 3395 3390 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
get_address 165 211 +46
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unsafe_symlink_target - 147 +147
unzip_main 2711 2732 +21
copy_file 1657 1678 +21
tar_main 999 971 -28
data_extract_all 1038 984 -54
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/2 up/down: 189/-82) Total: 107 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
sysctl_act_on_setting - 451 +451
sysctl_main 222 282 +60
packed_usage 31744 31793 +49
config_read 604 639 +35
sysctl_act_recursive 612 163 -449
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 595/-449) Total: 146 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
data_extract_all 968 1038 +70
tar_main 952 986 +34
scan_tree 258 262 +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 108/0) Total: 108 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Currently od_bloaty does this:
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -f
od: invalid character 'F' in type string 'fF'
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -t fD
od: invalid character 'D' in type string 'fD'
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | busybox od -t f
0000000
0000010
The first two occur because the alphabetic length specifier isn't being
properly skipped. The third is due to the empty length specifier being
treated as alphabetic so we fall off the end of the FDL_sizeof array with
undetermined consequences. Coreutils defaults to printing a double in
this case.
With this patch the output is:
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -f
0000000 0.0000000e+00 0.0000000e+00
0000010
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -t fD
0000000 0.000000000000000e+00
0000010
$ /bin/echo -en '\x00\x00\x00\x00\x00\x00\x00\x00' | ./busybox od -t f
0000000 0.000000000000000e+00
0000010
I guess nobody uses BusyBox od to print floating point numbers.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
It's deprecated since 2009 and interferes with make_single_applets.sh tests.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
By klemens <ka7@github.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
thus far only able to factor up to ULLONG_MAX
function old new delta
factor_main - 378 +378
packed_usage 31427 31502 +75
applet_names 2590 2597 +7
applet_main 1500 1504 +4
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 464/0) Total: 464 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
paste_main - 493 +493
packed_usage 31019 31070 +51
applet_names 2569 2575 +6
applet_main 1484 1488 +4
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 554/0) Total: 554 bytes
Signed-off-by: Maxime Coste <mawww@kakoune.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This makes hash and ash more symmetrical wrt config menu and config
options.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While at it, shorten many field and variable names.
function old new delta
unzip_main 2334 2376 +42
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unzip_main 2437 2350 -87
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|