Commit Graph

11544 Commits

Author SHA1 Message Date
Denys Vlasenko
3f78cec347 hush: handle expansions in ${var?expanded_word} constructs
function                                             old     new   delta
expand_vars_to_list                                 2209    2229     +20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 17:54:46 +02:00
Denys Vlasenko
349ef96bb5 hush: reorganized TODO comment at top
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 15:46:24 +02:00
Denys Vlasenko
214b8ca3dc hush: add a list of unsupported builtins
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 15:35:44 +02:00
Denys Vlasenko
73e013fca7 hush: handle ${var:NUM:} too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 15:24:12 +02:00
Bernhard Reutner-Fischer
a88585a931 trylink: gold may not support --sort-common (yet)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-05-21 12:11:34 +02:00
Bernhard Reutner-Fischer
e91bc53d0c lxdialog: fix ncursesw include detection
the lib was checked but the include not, do so.
TODO: check if upstream fixed that already or fix it there, too.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-05-21 11:49:11 +02:00
Denys Vlasenko
4f2c59b267 hush: remove extra comparison from prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 01:25:16 +02:00
Denys Vlasenko
4d8e5fdc1d hush: optional support for ${var:N:M} bashism
function                                             old     new   delta
expand_vars_to_list                                 1999    2183    +184
handle_dollar                                        682     623     -59

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-21 01:15:42 +02:00
Denys Vlasenko
53b513331a hush: explain various parameter expansion ops in comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 21:46:45 +02:00
Denys Vlasenko
ee0775dd13 hush: small code shrink
function                                             old     new   delta
expand_vars_to_list                                 2012    1999     -13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 16:37:53 +02:00
Denys Vlasenko
e3be7842be hush: shrink variable expansion code
function                                             old     new   delta
expand_vars_to_list                                 2164    2012    -152

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 16:27:42 +02:00
Denys Vlasenko
cddbb610cb hush: fix var=exit 2 not setting $? to 2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 14:27:09 +02:00
Denys Vlasenko
131ed3bcc9 update shell/README
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 12:56:14 +02:00
Denys Vlasenko
a0ec4f500c ash: eliminate 16 bytes in bss
text   data    bss    dec    hexfilename
 841423    441   7572 849436  cf61cbusybox_old
 841430    441   7556 849427  cf613busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 12:50:42 +02:00
Denys Vlasenko
44c86ce5d7 hush: code shrink
text    data     bss     dec     hex filename
 843121     453    6828  850402   cf9e2 busybox_old
 843108     453    6828  850389   cf9d5 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 04:22:55 +02:00
Denys Vlasenko
b131ccec9c hush: support "cd -- DIR" and such
function                                             old     new   delta
skip_dash_dash                                         -      33     +33
builtin_exit                                          43      48      +5
builtin_umask                                        121     125      +4
builtin_shift                                        115     119      +4
builtin_cd                                            71      75      +4
builtin_wait                                         271     274      +3
builtin_source                                       171     174      +3
builtin_exec                                          57      60      +3
builtin_eval                                          46      45      -1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/1 up/down: 59/-1)              Total: 58 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 03:39:43 +02:00
Denys Vlasenko
40477e2fdb shell: make it possible to alias one of shells to "bash"
function                                             old     new   delta
packed_usage                                       27047   27054      +7
applet_names                                        2227    2232      +5
applet_main                                         1304    1308      +4
applet_nameofs                                       652     654      +2
applet_install_loc                                   163     164      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 19/0)               Total: 19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 02:09:45 +02:00
Denys Vlasenko
2e068e725c setkeycodes: fix handling of 0exx scancodes
function                                             old     new   delta
setkeycodes_main                                     143     130     -13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-19 17:15:54 +02:00
Denys Vlasenko
dc1fd2e52a mount: handle EDQUOT > 255 properly. closes bug 1579
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-19 17:01:29 +02:00
Denys Vlasenko
9f82d0be61 vi: fix "set ic" command; code shrink while at it. closes bug 1765
function                                             old     new   delta
colon                                               2970    2848    -122

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-19 01:54:37 +02:00
Denys Vlasenko
92510141e2 losetup: support /dev/loop10 and higher. closes bug 1627
function                                             old     new   delta
query_loop                                            91      95      +4
losetup_main                                         288     285      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-19 00:39:17 +02:00
Denys Vlasenko
42c4b2e3b5 ash: fix var_leak.tests so that it actually catches the NOFORK bug
+ document the bug better

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 16:13:56 +02:00
Denys Vlasenko
c7f95d23f6 typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 15:52:23 +02:00
Denys Vlasenko
238bf187ba ash: fix bug which causes signal6.tests to fail
function                                             old     new   delta
trapcmd                                              271     277      +6
localcmd                                             277     275      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 15:49:07 +02:00
Denys Vlasenko
51b4a9e2f1 ash: fix var_leak testcase
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 14:35:20 +02:00
Denys Vlasenko
5e2d572381 ash: fix testsuite false positives
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 14:11:21 +02:00
Denys Vlasenko
e66cf821cf ash,hush: make bare "." set exitcode to 2
function                                             old     new   delta
dotcmd                                               300     305      +5
builtin_source                                       176     171      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 09:12:53 +02:00
Denys Vlasenko
a1db8b8415 make scripts/gen_build_files.sh standard-clean
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-18 00:24:17 +02:00
Denys Vlasenko
0e81e488fd shell/README: describe special builtins
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 23:51:00 +02:00
Denys Vlasenko
adc0e20892 hush: update bash compat todo comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 18:56:58 +02:00
Denys Vlasenko
82731b4b7a ash,hush: make "source" a synonym for . if bash compat is on
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 17:49:52 +02:00
Denys Vlasenko
cd10dc40e4 ash: fix ". empty_file" exitcode. +5 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 17:10:46 +02:00
Denys Vlasenko
bbf1aa1eaf typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 12:33:13 +02:00
Denys Vlasenko
1118d9b213 lineedit: fix insertion deep inside line (*several lines* before end)
function                                             old     new   delta
input_backward                                       212     229     +17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 12:30:44 +02:00
Denys Vlasenko
786cce1871 fix false positive in signal5.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 10:14:20 +02:00
Denys Vlasenko
82dd14a510 ash: use CONFIG_FEATURE_EDITING_MAX_LEN
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 10:10:01 +02:00
Denys Vlasenko
ef215558fa typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 09:55:13 +02:00
Denys Vlasenko
3227d3f982 hush: fix hush-bugs/parse_err.tests
function                                             old     new   delta
parse_stream                                        2325    2339     +14
builtin_umask                                        121     123      +2
builtin_type                                         116     114      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 09:49:47 +02:00
Denys Vlasenko
0f01b00d74 add two more tests which currently fail
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 04:57:55 +02:00
Denys Vlasenko
7c1ed9fbde ash: fix signal5.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 04:42:40 +02:00
Denys Vlasenko
9963fe36c2 lineedit: trivial simplifications. -7 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 04:05:53 +02:00
Denys Vlasenko
27ff681cfa ash: add two testcases for (not yet fixed) ash bugs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 02:56:18 +02:00
Denys Vlasenko
3015a1351a scripts/gen_build_files.sh: revert to using /bin/sh
People want busybox to build w/o bash, with /bin/sh = ash

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 01:59:16 +02:00
Denys Vlasenko
248c324f7c lineedit: fix moving backwards across lines with wide chars
function                                             old     new   delta
input_backward                                       212     208      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 00:45:44 +02:00
Denys Vlasenko
d9a3e89f50 consolidate ESC sequences
function                                             old     new   delta
bell                                                   2       -      -2
CMdown                                                 2       -      -2
Ceos                                                   4       -      -4
Ceol                                                   4       -      -4
CMup                                                   4       -      -4
SOs                                                    5       -      -5
SOn                                                    5       -      -5
CMrc                                                   9       -      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 23:42:13 +02:00
Denys Vlasenko
26e2c1db0d stop using LAST_SUPPORTED_WCHAR and CONFIG_LAST_SUPPORTED_WCHAR, it's confusing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 21:15:03 +02:00
Tomas Heinrich
b8909c52fe lineedit: partially fix wide and combining chars editing
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 20:46:53 +02:00
Peter Tyser
0b7412e66b findutils: Add Config.in and Kbuild to .gitignore
These are auto-generated files and should be ignored by git.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 02:51:00 +02:00
Peter Tyser
748139332a scripts/Makefile.clean: Make Kbuild and Makefile optional
During cleaning, some directories might not have a Makefile or Kbuild
file.  Previously scripts/Makefile.clean would spit out the following
error when neither file could be found:
ptyser@petert busybox $ make mrproper
scripts/Makefile.clean:17: /home/user/busybox/findutils/Makefile: No such file or directory
make[1]: *** No rule to make target `/home/user/busybox/findutils/Makefile'.  Stop.
make: *** [_clean_findutils] Error 2

This issue can be triggered by running 'make mrproper' in a freshly
cloned busybox repository.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 02:50:07 +02:00
Peter Tyser
0bb2980605 Makefile: Clean up auto-generated Kbuild and Config.in files
Previously these auto-generated files were left behind after a 'make
mrproper' was ran.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 02:48:21 +02:00