aboutsummaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2010-09-10hush: do fewer strdups in % and hash expansionsDenys Vlasenko
function old new delta builtin_umask 133 132 -1 expand_one_var 1552 1543 -9 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-10hush: better function and parameter namesDenys Vlasenko
Also, trim code which isn't needed for non-bash compat. No logic changes. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-10hush: fixes to testsuiteDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-10hush: fix var_bash5.tests failureDenys Vlasenko
function old new delta expand_one_var 1513 1552 +39 expand_pseudo_dquoted 118 135 +17 expand_string_to_string 110 126 +16 setup_heredoc 298 308 +10 expand_and_evaluate_arith 69 79 +10 parse_stream_dquoted 233 241 +8 setup_redirects 220 225 +5 run_list 956 961 +5 expand_assignments 76 81 +5 run_pipe 1587 1590 +3 parse_stream 2371 2374 +3 builtin_umask 132 133 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 12/0 up/down: 122/0) Total: 122 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-10hush: fix var_bash3.tests failureDenys Vlasenko
function old new delta expand_one_var 1513 1538 +25 parse_stream_dquoted 233 241 +8 expand_pseudo_dquoted 118 126 +8 setup_heredoc 298 303 +5 expand_and_evaluate_arith 69 74 +5 parse_stream 2371 2374 +3 builtin_umask 132 133 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/0 up/down: 55/0) Total: 55 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-10hush: remove useless ESC_GLOB_CHARS clears/resotresDenys Vlasenko
function old new delta o_addQstr 43 165 +122 expand_on_ifs 210 189 -21 expand_vars_to_list 1122 1094 -28 o_addqblock 139 - -139 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 122/-188) Total: -66 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09hush: fix a bug where expand_one_var wasn't restoring 1st char of the ↵Denys Vlasenko
encoded $var function old new delta expand_one_var 1515 1513 -2 expand_vars_to_list 1133 1122 -11 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09hush: make parse_dollar flag quited status regardless of glob escaping statusDenys Vlasenko
function old new delta parse_stream_dquoted 228 233 +5 parse_stream 2369 2371 +2 parse_dollar 730 717 -13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 7/-13) Total: -6 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09hush: simplification in parse_stream, parse_stream_dquotedDenys Vlasenko
function old new delta parse_stream 2354 2369 +15 parse_stream_dquoted 250 228 -22 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09hush: simplify parse_stream_dquotedDenys Vlasenko
function old new delta parse_stream_dquoted 303 250 -53 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09hush: straighten out the logic in parse_streamDenys Vlasenko
function old new delta parse_stream 2399 2354 -45 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-09Avoid side effects in putc(), which may be implemented as a macroDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-08hush: eliminate redundant parameter of expand_vars_to_list()Denys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-08hush: replace flag bytes in struct o_string with bit flagsDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-08hush: remove unused enum typedefDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-08hush: fix set -- q w e; (IFS='' echo "$*"; IFS=''; echo "$*"); echo "$*"Denys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-07shell: unify endofname() in hush and ashDenys Vlasenko
function old new delta builtin_umask 132 133 +1 changepath 195 194 -1 expand_and_evaluate_arith 77 69 -8 ash_arith 143 135 -8 expand_one_var 1551 1515 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 1/-53) Total: -52 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-07hush: a few relatively trivial simplificationsDenys Vlasenko
function old new delta helper_export_local 130 135 +5 set_vars_and_save_old 89 85 -4 expand_variables 147 141 -6 get_ptr_to_local_var 77 70 -7 get_local_var_value 171 164 -7 delete_finished_bg_job 31 16 -15 hush_exit 101 84 -17 free_pipe_list 31 12 -19 check_and_run_traps 232 205 -27 free_pipe 205 130 -75 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/9 up/down: 5/-177) Total: -172 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-07hush: style cleanups. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06hush: revert a recent buggy change which resulted in two HUSH_VERSIONsDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06fix typo in commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06hush: fix another corner case with backslashes in heredocsDenys Vlasenko
function old new delta parse_stream 2395 2432 +37 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06hush: fix backslash and terminator handling in <<[-]["]heredoc["]Denys Vlasenko
function old new delta parse_stream 2339 2395 +56 expand_pseudo_dquoted 104 118 +14 parse_stream_dquoted 296 300 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 74/0) Total: 74 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06hush: fix globbing+backslashes in unquoted $var expansionDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06hush: remove disabled CMD_SINGLEWORD_NOGLOB_COND, rename o_glob->perform_globDenys Vlasenko
+ other small tweaks to comments and such Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06shell: remove lash and bbshDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-05hush: big reordering: move parser functions to the beginning. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-05hush: rename o_quoted to has_quoted_part; small code shrinkDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-05hush: move variable expansion into a separate function. No logic changesDenys Vlasenko
function old new delta expand_one_var - 1551 +1551 expand_vars_to_list 2833 1175 -1658 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 1551/-1658) Total: -107 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-05hush: add support for ${var/pattern/repl}, conditional on bash compatDenys Vlasenko
function old new delta expand_vars_to_list 2386 2833 +447 expand_string_to_string 69 110 +41 parse_dollar 681 721 +40 hush_main 963 945 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 528/-18) Total: 510 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-04hush: optimize #[#] and %[%] for speed. size -2 bytes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-04hush: fix handling of backslashes in variable assignmentDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-31libbb: add xfstat functionDenys Vlasenko
function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-30ash: small code shrink (-21 bytes)Denys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-30ash: add another ${v/a/b} test we currently failDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-29nandwrite: complain on malformed -s NUMDenys Vlasenko
Elsewhere: use common error message. -30 bytes net size change Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
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-12*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_iDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-07ash: fix another bit of var_bash4 bugDenys Vlasenko
But it _still_ doesn't pass! quoted case is a tough nut to crack function old new delta redirect 1281 1286 +5 subevalvar 1141 1142 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-07ash: cosmetic fixes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06ash: fix another bug detected by var_bash4.testsDenys Vlasenko
... but var_bash4.tests still does not pass! function old new delta expandarg 959 962 +3 localcmd 259 257 -2 readtoken1 3275 3260 -15 subevalvar 1178 1141 -37 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 3/-54) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06var_bash4.tests: better wording in commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06ash: fix dequoting error detected by var_bash4 testDenys Vlasenko
But the test still fails (one more bug to fix) function old new delta changepath 195 192 -3 readtoken1 3247 3240 -7 subevalvar 1204 1184 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-30) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06update var_bash4 test. one more bug revealed by it now...Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-05ash: extend var_bash4.tests; nocode changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-05ash: add a testcase for bug 2281 (currently fails). Small code cleanups.Denys Vlasenko
function old new delta changepath 195 192 -3 subevalvar 1204 1200 -4 readtoken1 3247 3240 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-14) Total: -14 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30cttyhack: make it survive WERROR buildDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30cttyhack: serial console detection is Linux-specificJeremie Koenig
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-27ulimit: set both hard and soft limits by defaultAlexander Shishkin
function old new delta shell_builtin_ulimit 494 498 +4 Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26*: trailing empty lines removedDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>