oweals/busybox.git
15 years agopost 1.14.1 fixes; bump version to 1.14.2 1_14_2
Denys Vlasenko [Sun, 21 Jun 2009 22:47:18 +0000 (00:47 +0200)]
post 1.14.1 fixes; bump version to 1.14.2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agohush: add support for special vars in braces
Mike Frysinger [Mon, 1 Jun 2009 18:09:09 +0000 (14:09 -0400)]
hush: add support for special vars in braces

Some people like to use ${?} rather than $?, so make sure we support all
the special single char vars that use this form.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agodepmod.pl: updates and fixes galore
Mike Frysinger [Wed, 6 May 2009 00:14:12 +0000 (20:14 -0400)]
depmod.pl: updates and fixes galore

The helper script needs updating to match latest busybox modprobe behavior
in that all dependencies need to be listed, not just the immediate ones.
Along the way, fix symbol prefixed ports, optimize the output, and add
some more depmod compatible options.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agohush: more fixes from trunk; bump version to 1.14.1 1_14_1
Denys Vlasenko [Wed, 27 May 2009 16:07:29 +0000 (18:07 +0200)]
hush: more fixes from trunk; bump version to 1.14.1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agopost-1.14.0 fixes
Denys Vlasenko [Wed, 27 May 2009 16:01:42 +0000 (18:01 +0200)]
post-1.14.0 fixes

hush significantly updated.
fixes for acpid, awk, depmod, dhcp, gzip, mdev, modprobe, sysctl.
libbb fixes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
15 years agowebsite: another tweak
Denis Vlasenko [Wed, 15 Apr 2009 11:55:27 +0000 (11:55 -0000)]
website: another tweak

15 years agowebsite: yet another small tweak
Denis Vlasenko [Wed, 15 Apr 2009 11:51:18 +0000 (11:51 -0000)]
website: yet another small tweak

15 years agowebsite: another tiny tweak
Denis Vlasenko [Wed, 15 Apr 2009 11:48:25 +0000 (11:48 -0000)]
website: another tiny tweak

15 years agowebsite: textual fixes in 1.14.0 announcement text
Denis Vlasenko [Wed, 15 Apr 2009 11:11:19 +0000 (11:11 -0000)]
website: textual fixes in 1.14.0 announcement text

15 years agowebsite: announce 1.14.0 and 1.13.4 1_14_0
Denis Vlasenko [Wed, 15 Apr 2009 02:13:14 +0000 (02:13 -0000)]
website: announce 1.14.0 and 1.13.4
Makefile: bump version to 1.14.0

15 years agomdev: safer handling of $SUBSYSTEM in mdev -s
Denis Vlasenko [Tue, 14 Apr 2009 21:23:33 +0000 (21:23 -0000)]
mdev: safer handling of $SUBSYSTEM in mdev -s

15 years agopointless whitespace/comment fixes, no code changes
Denis Vlasenko [Tue, 14 Apr 2009 09:58:11 +0000 (09:58 -0000)]
pointless whitespace/comment fixes, no code changes

15 years agorandomconfig fixes
Denis Vlasenko [Tue, 14 Apr 2009 08:06:59 +0000 (08:06 -0000)]
randomconfig fixes

15 years agowebsite: update ActionTec URL to http://opensource.actiontec.com/
Denis Vlasenko [Tue, 14 Apr 2009 01:31:41 +0000 (01:31 -0000)]
website: update ActionTec URL to opensource.actiontec.com/

15 years agowebsite: fix obsolete
Denis Vlasenko [Tue, 14 Apr 2009 00:59:37 +0000 (00:59 -0000)]
website: fix obsolete
 "svn co svn://busybox.net/branches/busybox_1_12_stable"
 example

15 years ago*: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}
Denis Vlasenko [Tue, 14 Apr 2009 00:51:05 +0000 (00:51 -0000)]
*: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}
 by Tito (farmatito AT tiscali.it)

function                                             old     new   delta
update_passwd                                        743    1171    +428
bb_perror_nomsg                                        -       9      +9
find_main                                            436     444      +8
passwd_main                                         1023    1027      +4
nameval                                              202     206      +4
chpasswd_main                                        315     319      +4
bb__parsespent                                       119     117      -2
adduser_main                                         654     650      -4
addgroup_main                                        345     341      -4
sv_main                                             1228    1222      -6
deluser_main                                         173     160     -13
bb_internal_putpwent                                  69       -     -69
add_user_to_group                                    231       -    -231
del_line_matching                                    460      31    -429
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 5/6 up/down: 457/-758)         Total: -301 bytes

15 years agomdev: add support for - "dont stop here" char
Denis Vlasenko [Mon, 13 Apr 2009 23:18:52 +0000 (23:18 -0000)]
mdev: add support for - "dont stop here" char

function                                             old     new   delta
make_device                                         1340    1362     +22
packed_usage                                       26291   26299      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 30/0)               Total: 30 bytes

15 years agomdev: provide $SUBSYSTEM (by Vladimir)
Denis Vlasenko [Mon, 13 Apr 2009 22:23:02 +0000 (22:23 -0000)]
mdev: provide $SUBSYSTEM (by Vladimir)

function                                             old     new   delta
make_device                                         1265    1340     +75
dirAction                                             14      60     +46
mdev_main                                            676     695     +19
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 140/0)             Total: 140 bytes

15 years agomove llist_find_str from modutils to libbb
Denis Vlasenko [Mon, 13 Apr 2009 20:52:00 +0000 (20:52 -0000)]
move llist_find_str from modutils to libbb

15 years agomodutils: remove redundant sanitization
Denis Vlasenko [Mon, 13 Apr 2009 20:32:31 +0000 (20:32 -0000)]
modutils: remove redundant sanitization

15 years agohush: make function support configurable
Denis Vlasenko [Mon, 13 Apr 2009 14:23:12 +0000 (14:23 -0000)]
hush: make function support configurable

15 years agomdev: fix a bug where \t is not treated as delimiter after [>|=PATH]
Denis Vlasenko [Mon, 13 Apr 2009 13:59:26 +0000 (13:59 -0000)]
mdev: fix a bug where \t is not treated as delimiter after [>|=PATH]

15 years agomdev: make usage text more useful
Denis Vlasenko [Mon, 13 Apr 2009 13:33:02 +0000 (13:33 -0000)]
mdev: make usage text more useful

function                                             old     new   delta
packed_usage                                       26235   26291     +56

15 years agodhcprelay: fix usage text. Simplify and make code more readable.
Denis Vlasenko [Mon, 13 Apr 2009 03:33:46 +0000 (03:33 -0000)]
dhcprelay: fix usage text. Simplify and make code more readable.
 Add TODOs.

15 years agormmod: fix bug 263
Denis Vlasenko [Mon, 13 Apr 2009 02:25:40 +0000 (02:25 -0000)]
rmmod: fix bug 263
"modutils/rmmod can't remove modules with dash in name on 2.4 kernels"

function                                             old     new   delta
rmmod_main                                           187     220     +33

15 years agomdev: ignore events with "$SUBSYSTEM" == "firmware" && "$ACTION" == "remove"
Denis Vlasenko [Mon, 13 Apr 2009 02:15:57 +0000 (02:15 -0000)]
mdev: ignore events with "$SUBSYSTEM" == "firmware" && "$ACTION" == "remove"

function                                             old     new   delta
mdev_main                                            665     676     +11

15 years agowebsite: add http://www.dream-multimedia-tv.de/ to list of products
Denis Vlasenko [Mon, 13 Apr 2009 00:55:42 +0000 (00:55 -0000)]
website: add dream-multimedia-tv.de/ to list of products
using bbox

15 years agohush: pass functions to child shells on NOMMU
Denis Vlasenko [Sun, 12 Apr 2009 20:35:19 +0000 (20:35 -0000)]
hush: pass functions to child shells on NOMMU

function                                             old     new   delta
new_function                                           -     123    +123
hush_main                                           1198    1262     +64
re_execute_shell                                     341     387     +46
run_pipe                                            1872    1790     -82
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 233/-82)           Total: 151 bytes

15 years agodnsd: stop using oversized buffer. trim comment.
Denis Vlasenko [Sun, 12 Apr 2009 19:03:01 +0000 (19:03 -0000)]
dnsd: stop using oversized buffer. trim comment.

15 years agohalt/reboot/powerdown: accept and ignore -i
Denis Vlasenko [Sun, 12 Apr 2009 15:59:35 +0000 (15:59 -0000)]
halt/reboot/powerdown: accept and ignore -i

15 years agomodutils: small optimization
Denis Vlasenko [Sun, 12 Apr 2009 14:21:29 +0000 (14:21 -0000)]
modutils: small optimization

function                                             old     new   delta
bb_init_module_24                                   4570    4565      -5

15 years agomdev: do not complain if /sys/block doesn't exist
Denis Vlasenko [Sun, 12 Apr 2009 14:00:12 +0000 (14:00 -0000)]
mdev: do not complain if /sys/block doesn't exist

15 years agoawk: fix long field separators case. By Ian Wienand (ianw AT vmware.com)
Denis Vlasenko [Sun, 12 Apr 2009 13:54:13 +0000 (13:54 -0000)]
awk: fix long field separators case. By Ian Wienand (ianw AT vmware.com)

15 years agogetty: fix handling of speed 0;
Denis Vlasenko [Sun, 12 Apr 2009 13:05:40 +0000 (13:05 -0000)]
getty: fix handling of speed 0;
 stop using non-portable way of setting speeds.

function                                             old     new   delta
cfsetispeed                                            -      76     +76
cfsetospeed                                            -      57     +57
cfgetispeed                                            -      20     +20

15 years agomount: users report that CIFS support is breaking things,
Denis Vlasenko [Sun, 12 Apr 2009 12:16:21 +0000 (12:16 -0000)]
mount: users report that CIFS support is breaking things,
 mostly remove it.

15 years agodnsd: removed highly questionable setting of signals to SIG_IGN
Denis Vlasenko [Sun, 12 Apr 2009 04:20:22 +0000 (04:20 -0000)]
dnsd: removed highly questionable setting of signals to SIG_IGN

15 years agodnsd: fix a number of bugs. Ideas by Ming-Ching Tiew (mctiew AT yahoo.com)
Denis Vlasenko [Sun, 12 Apr 2009 04:09:09 +0000 (04:09 -0000)]
dnsd: fix a number of bugs. Ideas by Ming-Ching Tiew (mctiew AT yahoo.com)

function                                             old     new   delta
undot                                                  -      42     +42
dnsd_main                                           1394    1213    -181
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 42/-181)          Total: -139 bytes

15 years agoash: fix warning in debug build
Denis Vlasenko [Sun, 12 Apr 2009 00:00:57 +0000 (00:00 -0000)]
ash: fix warning in debug build

15 years agohush: remove functions from TODOs
Denis Vlasenko [Sat, 11 Apr 2009 11:07:22 +0000 (11:07 -0000)]
hush: remove functions from TODOs

15 years agohush: improve debugging output
Denis Vlasenko [Sat, 11 Apr 2009 10:38:47 +0000 (10:38 -0000)]
hush: improve debugging output

15 years agohush: fix "while...do f1() {a;}; f1; f1 {b;}; f1; done" bug
Denis Vlasenko [Sat, 11 Apr 2009 10:37:10 +0000 (10:37 -0000)]
hush: fix "while...do f1() {a;}; f1; f1 {b;}; f1; done" bug

15 years agohush: tweak tests
Denis Vlasenko [Fri, 10 Apr 2009 23:48:03 +0000 (23:48 -0000)]
hush: tweak tests

15 years agohush: add function tests
Denis Vlasenko [Fri, 10 Apr 2009 23:23:41 +0000 (23:23 -0000)]
hush: add function tests

15 years agohush: pass $n to functions
Denis Vlasenko [Fri, 10 Apr 2009 21:57:50 +0000 (21:57 -0000)]
hush: pass $n to functions

function                                             old     new   delta
run_pipe                                            1183    1325    +142
run_list                                            1219    1220      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 143/0)             Total: 143 bytes

15 years agohush: fix a few thinkos in function support; make it work on NOMMU;
Denis Vlasenko [Fri, 10 Apr 2009 21:22:02 +0000 (21:22 -0000)]
hush: fix a few thinkos in function support; make it work on NOMMU;
 functions in child shells now even have $n passed to them! :)
 (in main shell it still doesn't work)

15 years agohush: first stab at function support. argv passing is not coded yet.
Denis Vlasenko [Fri, 10 Apr 2009 19:05:43 +0000 (19:05 -0000)]
hush: first stab at function support. argv passing is not coded yet.
 Only very rudimentary testing was done.
 With function support off, code growth is zero, with it on:

function                                             old     new   delta
run_list                                            2158    2339    +181
parse_stream                                        1929    2044    +115
find_builtin                                          24      67     +43
find_function                                          -      36     +36
file_get                                             244     264     +20
pseudo_exec_argv                                     145     160     +15
free_strings                                           -       7      +7
free_pipe                                            183     181      -2
done_word                                            735     728      -7
expand_variables                                    2227    2204     -23
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 5/3 up/down: 417/-32)           Total: 385 bytes

15 years agohush: reinstate accidentally reverted comment fix
Denis Vlasenko [Fri, 10 Apr 2009 13:51:56 +0000 (13:51 -0000)]
hush: reinstate accidentally reverted comment fix

15 years agohush: fix some TODOs. TODO in export builting: +250 bytes.
Denis Vlasenko [Fri, 10 Apr 2009 13:49:10 +0000 (13:49 -0000)]
hush: fix some TODOs. TODO in export builting: +250 bytes.
 simplify unexpected EOF handling.

function                                             old     new   delta
builtin_export                                       117     374    +257
o_reset_to_empty_unquoted                              -      21     +21
parse_stream                                        1926    1929      +3
syntax_error_unterm_ch                                31      32      +1
handle_dollar                                        644     641      -3
parse_stream_dquoted                                 307     298      -9
add_till_backquote                                   106      97      -9
add_till_closing_paren                               303     286     -17
o_reset                                               21       -     -21
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/4 up/down: 282/-59)           Total: 223 bytes

15 years agohush: tighten up "for" variable name check.
Denis Vlasenko [Fri, 10 Apr 2009 12:03:20 +0000 (12:03 -0000)]
hush: tighten up "for" variable name check.
 Add TODOs.
 Disable redir4.right part where we differ from bash.
 It is not a bug per standards.
 Add a few tests, one is in hush-bugs section:
 and_or_and_backgrounding.right. It will likely bite users
 in real world usage.

15 years agohush: fix typo in comment
Denis Vlasenko [Fri, 10 Apr 2009 11:13:26 +0000 (11:13 -0000)]
hush: fix typo in comment

15 years agofix segfault on syntax error code path
Denis Vlasenko [Fri, 10 Apr 2009 00:45:02 +0000 (00:45 -0000)]
fix segfault on syntax error code path

15 years agohush: readability improvements.
Denis Vlasenko [Fri, 10 Apr 2009 00:20:58 +0000 (00:20 -0000)]
hush: readability improvements.
 fix some more obscure bugs.
 a new redir4.tests is known to fail.

15 years agoadd test cases for parameter substitution with unset/null strings
Mike Frysinger [Thu, 9 Apr 2009 23:01:47 +0000 (23:01 -0000)]
add test cases for parameter substitution with unset/null strings

15 years agodont crash if the variable we do substitution on is not set
Mike Frysinger [Thu, 9 Apr 2009 23:00:33 +0000 (23:00 -0000)]
dont crash if the variable we do substitution on is not set

15 years agohush: shrink and make more versatile error-reporting machinery
Denis Vlasenko [Thu, 9 Apr 2009 20:41:34 +0000 (20:41 -0000)]
hush: shrink and make more versatile error-reporting machinery

function                                             old     new   delta
syntax_error_unterm_ch                                 -      31     +31
syntax_error_unterm_str                                -      14     +14
parse_stream                                        2356    2361      +5
syntax_error_at                                       12      14      +2
syntax_error                                          25      27      +2
syntax_error_unterminated                             28       -     -28
expand_variables                                    2063    2031     -32
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 3/1 up/down: 54/-60)             Total: -6 bytes
   text    data     bss     dec     hex filename
  67278     197    3184   70659   11403 busybox_old
  67228     197    3184   70609   113d1 busybox_unstripped

15 years agohush: deal with some easier TODOs
Denis Vlasenko [Thu, 9 Apr 2009 19:16:15 +0000 (19:16 -0000)]
hush: deal with some easier TODOs

function                                             old     new   delta
is_well_formed_var_name                                -      87     +87
builtin_read                                          49      86     +37
die_if_script                                          -      31     +31
syntax_error_unterminated                              -      28     +28
syntax_error                                          26      51     +25
done_word                                            768     788     +20
syntax_error_at                                        -      12     +12
parse_stream_dquoted                                 320     328      +8
expand_variables                                    2064    2063      -1
run_list                                            1225    1220      -5
add_till_closing_paren                               308     303      -5
add_till_backquote                                   111     106      -5
handle_dollar                                        812     803      -9
parse_stream                                        2378    2356     -22
parse_redirect                                       408     372     -36
maybe_die                                             44       -     -44
is_assignment                                        215     134     -81
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 4/8 up/down: 248/-208)           Total: 40 bytes

15 years agohush: plug the leak of expanded heredoc
Denis Vlasenko [Thu, 9 Apr 2009 14:15:57 +0000 (14:15 -0000)]
hush: plug the leak of expanded heredoc

15 years agohush: fix EXIT trap recursion case; check redirection failures
Denis Vlasenko [Thu, 9 Apr 2009 13:43:11 +0000 (13:43 -0000)]
hush: fix EXIT trap recursion case; check redirection failures

function                                             old     new   delta
run_pipe                                            1299    1328     +29
hush_exit                                             90     102     +12
hush_main                                           1172    1179      +7
run_list                                            1226    1225      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 48/-1)              Total: 47 bytes

15 years ago*: make "pragma GCC visibility push(hidden)" less ugly
Denis Vlasenko [Thu, 9 Apr 2009 12:35:13 +0000 (12:35 -0000)]
*: make "pragma GCC visibility push(hidden)" less ugly

15 years agoskip some tests when fancy echo support is turned off
Mike Frysinger [Thu, 9 Apr 2009 07:50:18 +0000 (07:50 -0000)]
skip some tests when fancy echo support is turned off

15 years agowe arent testing `echo -n` here so use printf instead
Mike Frysinger [Thu, 9 Apr 2009 07:50:02 +0000 (07:50 -0000)]
we arent testing `echo -n` here so use printf instead

15 years agosource the .config so tests can signal they need to be skipped due to feature disable
Mike Frysinger [Thu, 9 Apr 2009 07:49:43 +0000 (07:49 -0000)]
source the .config so tests can signal they need to be skipped due to feature disable

15 years agopatch by Stuart Hughes <seh@zee2.com> and Guenter <lists@gknw.net> to make "0" a...
Mike Frysinger [Thu, 9 Apr 2009 07:08:04 +0000 (07:08 -0000)]
patch by Stuart Hughes <seh@zee2.com> and Guenter <lists@gknw.net> to make "0" a special baud rate for getty where it uses this as "leave baud rate unchanged"

15 years agohush: typo in comment
Denis Vlasenko [Thu, 9 Apr 2009 01:40:15 +0000 (01:40 -0000)]
hush: typo in comment

15 years agohush: fix thinko in re_execute_shell; pass even less junk to heredoc helper
Denis Vlasenko [Thu, 9 Apr 2009 01:39:02 +0000 (01:39 -0000)]
hush: fix thinko in re_execute_shell; pass even less junk to heredoc helper

function                                             old     new   delta
re_execute_shell                                     284     314     +30
setup_heredoc                                        290     303     +13
execv                                                 23       -     -23

15 years agohush: more rodust detection of unterminated strings etc;
Denis Vlasenko [Wed, 8 Apr 2009 21:51:33 +0000 (21:51 -0000)]
hush: more rodust detection of unterminated strings etc;
 fix a case where we forget to copy `cmd` text;
 optimize nommu heredoc helper by not passing environment to it;
 add several tests

function                                             old     new   delta
add_till_closing_paren                               256     308     +52
parse_stream                                        2337    2378     +41
add_till_backquote                                    82     111     +29
re_execute_shell                                     269     284     +15
handle_dollar                                        802     812     +10
parse_stream_dquoted                                 316     320      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 151/0)             Total: 151 bytes

15 years agoexpand leak_all1.tests
Denis Vlasenko [Wed, 8 Apr 2009 16:59:24 +0000 (16:59 -0000)]
expand leak_all1.tests

15 years agoslight tweak to the leak detector
Denis Vlasenko [Wed, 8 Apr 2009 16:46:45 +0000 (16:46 -0000)]
slight tweak to the leak detector

15 years agohush: plug leak in run_pipe(). NOMMU only.
Denis Vlasenko [Wed, 8 Apr 2009 16:40:34 +0000 (16:40 -0000)]
hush: plug leak in run_pipe(). NOMMU only.

15 years agohush: add a leak test which currently fails
Denis Vlasenko [Wed, 8 Apr 2009 12:11:23 +0000 (12:11 -0000)]
hush: add a leak test which currently fails

15 years agohush: add leak detector helper; fix/add tests for it
Denis Vlasenko [Wed, 8 Apr 2009 11:48:57 +0000 (11:48 -0000)]
hush: add leak detector helper; fix/add tests for it

function                                             old     new   delta
builtin_memleak                                        -      92     +92
bltins                                               288     300     +12

15 years agohush: echo \2>file fix
Denis Vlasenko [Wed, 8 Apr 2009 09:29:14 +0000 (09:29 -0000)]
hush: echo \2>file fix

15 years agoFEATURE_FANCY_ECHO needs to be accessible for hush
Denis Vlasenko [Tue, 7 Apr 2009 20:07:23 +0000 (20:07 -0000)]
FEATURE_FANCY_ECHO needs to be accessible for hush

15 years agohush: fix heredoc expansion of $var and `cmd`
Denis Vlasenko [Tue, 7 Apr 2009 19:56:55 +0000 (19:56 -0000)]
hush: fix heredoc expansion of $var and `cmd`

function                                             old     new   delta
expand_pseudo_dquoted                                  -     104    +104
setup_heredoc                                        215     275     +60
done_word                                            669     691     +22
parse_stream                                        1899    1902      +3
setup_redirects                                      196     191      -5
free_pipe                                            189     183      -6
expand_variables                                    2349    2229    -120
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/3 up/down: 189/-131)           Total: 58 bytes

15 years agohush: fix wrong comment
Denis Vlasenko [Tue, 7 Apr 2009 13:29:27 +0000 (13:29 -0000)]
hush: fix wrong comment

15 years agohush: fix heredoc <<- handling.
Denis Vlasenko [Tue, 7 Apr 2009 13:26:18 +0000 (13:26 -0000)]
hush: fix heredoc <<- handling.
 hush-misc/heredoc2.tests testcase needs only one fix now -
 $var and `cmd` expancsion in heredocs

function                                             old     new   delta
parse_redirect                                       265     306     +41
parse_stream                                        1866    1899     +33

15 years agohush: NOMMU-safe support of big heredocs
Denis Vlasenko [Tue, 7 Apr 2009 10:52:40 +0000 (10:52 -0000)]
hush: NOMMU-safe support of big heredocs

function                                             old     new   delta
setup_heredoc                                        116     215     +99

15 years agohere documents have been added, so drop from TODO
Mike Frysinger [Tue, 7 Apr 2009 07:28:25 +0000 (07:28 -0000)]
here documents have been added, so drop from TODO

15 years agouse sleep rather than usleep
Mike Frysinger [Tue, 7 Apr 2009 06:08:14 +0000 (06:08 -0000)]
use sleep rather than usleep

15 years agoadd a pathological test case for here doc related to eof marker and other ugly corner...
Mike Frysinger [Tue, 7 Apr 2009 06:06:05 +0000 (06:06 -0000)]
add a pathological test case for here doc related to eof marker and other ugly corner cases

15 years agoimplement support for parameter substitution via #/% operators
Mike Frysinger [Tue, 7 Apr 2009 06:03:22 +0000 (06:03 -0000)]
implement support for parameter substitution via #/% operators

15 years agohush: heredoc support, based on patch by Mike Frysinger (vapier AT gentoo.org)
Denis Vlasenko [Tue, 7 Apr 2009 02:29:51 +0000 (02:29 -0000)]
hush: heredoc support, based on patch by Mike Frysinger (vapier AT gentoo.org)
 some TODOs are to be attacked later

function                                             old     new   delta
parse_stream                                        1461    1866    +405
parse_redirect                                         -     265    +265
setup_heredoc                                          -     116    +116
setup_redirects                                      151     196     +45
builtin_exit                                          49      47      -2
redirect_opt_num                                      61      55      -6
setup_redirect                                       212       -    -212
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/2 up/down: 831/-220)          Total: 611 bytes

15 years agohush: s/last_return_code/last_exitcode/g
Denis Vlasenko [Mon, 6 Apr 2009 18:42:11 +0000 (18:42 -0000)]
hush: s/last_return_code/last_exitcode/g

15 years agohush: fix "if false; then...fi" exitcode;
Denis Vlasenko [Mon, 6 Apr 2009 18:40:31 +0000 (18:40 -0000)]
hush: fix "if false; then...fi" exitcode;
 trim "keyword"-less hush by 10 bytes

15 years agomake hush-misc/*.tests executable
Denis Vlasenko [Mon, 6 Apr 2009 18:10:20 +0000 (18:10 -0000)]
make hush-misc/*.tests executable

15 years agohush: fix a bunch of obscure while/until/continue bugs
Denis Vlasenko [Mon, 6 Apr 2009 18:08:35 +0000 (18:08 -0000)]
hush: fix a bunch of obscure while/until/continue bugs

function                                             old     new   delta
run_list                                            1159    1214     +55
done_pipe                                            106     123     +17
done_command                                          86      98     +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 84/0)               Total: 84 bytes

15 years ago*.tests should be executable
Denis Vlasenko [Mon, 6 Apr 2009 16:27:51 +0000 (16:27 -0000)]
*.tests should be executable

15 years agomove hush-parsing/and-or.tests to hush-misc/*
Denis Vlasenko [Mon, 6 Apr 2009 16:17:51 +0000 (16:17 -0000)]
move hush-parsing/and-or.tests to hush-misc/*
 (which probably needs to be renamed to hush-execution...)

15 years agoadd some brute force logic tests
Mike Frysinger [Mon, 6 Apr 2009 14:22:54 +0000 (14:22 -0000)]
add some brute force logic tests

15 years agohush: fix "false && echo yes || echo no" bug 265
Denis Vlasenko [Mon, 6 Apr 2009 14:11:13 +0000 (14:11 -0000)]
hush: fix "false && echo yes || echo no" bug 265

function                                             old     new   delta
run_list                                            1159    1189     +30

15 years agohush: beautify re_execute_shell more
Denis Vlasenko [Mon, 6 Apr 2009 13:05:57 +0000 (13:05 -0000)]
hush: beautify re_execute_shell more

15 years agohush: drop allocations in re_execute_shell
Denis Vlasenko [Mon, 6 Apr 2009 12:56:28 +0000 (12:56 -0000)]
hush: drop allocations in re_execute_shell

function                                             old     new   delta
hush_main                                           1127    1138     +11
re_execute_shell                                     286     256     -30
clean_up_after_re_execute                             66      30     -36
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 11/-66)            Total: -55 bytes

15 years agoadd tests for basic fd open/close/dupe
Mike Frysinger [Mon, 6 Apr 2009 12:36:10 +0000 (12:36 -0000)]
add tests for basic fd open/close/dupe

15 years agofix #>&- syntax for closing fds
Mike Frysinger [Mon, 6 Apr 2009 12:35:41 +0000 (12:35 -0000)]
fix #>&- syntax for closing fds

15 years agofix redir1 tests -- usleep isnt standard in $PATH
Mike Frysinger [Mon, 6 Apr 2009 12:34:27 +0000 (12:34 -0000)]
fix redir1 tests -- usleep isnt standard in $PATH

15 years agohush: micro-optimization. -37 bytes
Denis Vlasenko [Mon, 6 Apr 2009 12:28:34 +0000 (12:28 -0000)]
hush: micro-optimization. -37 bytes

15 years agohush: more efficient filtering of "safe" arithmetic
Denis Vlasenko [Mon, 6 Apr 2009 12:24:58 +0000 (12:24 -0000)]
hush: more efficient filtering of "safe" arithmetic

function                                             old     new   delta
expand_variables                                    2170    2147     -23

15 years agohush: add <> and () as "safe" arith chars
Denis Vlasenko [Mon, 6 Apr 2009 12:09:55 +0000 (12:09 -0000)]
hush: add <> and () as "safe" arith chars

15 years agohush: print cd error to stderr; use fopen_or_warn in builtin_source;
Denis Vlasenko [Mon, 6 Apr 2009 12:04:42 +0000 (12:04 -0000)]
hush: print cd error to stderr; use fopen_or_warn in builtin_source;
 prepare builtin_unset for function support
libbb: do not clear errno in fopen_or_warn

function                                             old     new   delta
builtin_unset                                        242     271     +29
fopen_or_warn                                         42      31     -11
builtin_cd                                            90      74     -16
builtin_source                                        89      72     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 29/-44)            Total: -15 bytes

15 years agohush: fix "export a=a b=b" (was not setting and exporting b)
Denis Vlasenko [Mon, 6 Apr 2009 11:33:07 +0000 (11:33 -0000)]
hush: fix "export a=a b=b" (was not setting and exporting b)

function                                             old     new   delta
builtin_export                                       103     117     +14