<feed xmlns='http://www.w3.org/2005/Atom'>
<title>forks/busybox/shell/hush_test/hush-heredoc, branch master</title>
<subtitle>Busybox tree with Carbs Linux patches
</subtitle>
<id>https://git.carbslinux.org/forks/busybox/atom?h=master</id>
<link rel='self' href='https://git.carbslinux.org/forks/busybox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/'/>
<updated>2018-07-24T15:10:18+00:00</updated>
<entry>
<title>hush: add "heredoc.tests" from ash, tweak ash "is a function" message</title>
<updated>2018-07-24T15:10:18+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-24T15:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=63c42afaa43d42def05dfbca1f4e10c7314b1f77'/>
<id>urn:sha1:63c42afaa43d42def05dfbca1f4e10c7314b1f77</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix nested redirects colliding with script fds</title>
<updated>2018-07-24T14:54:41+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-24T14:54:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=41ef41b3e0a16c9f8524870a2dc4f768c237939e'/>
<id>urn:sha1:41ef41b3e0a16c9f8524870a2dc4f768c237939e</id>
<content type='text'>
This necessitates switch from libc FILE api to a simple
homegrown replacement.
The change which fixes the bug here is the deleting of

	restore_redirected_FILEs();

line. It was prematurely moving (restoring) script fd#3.
The fix is: we don't even _want_ to restore scrit fds,
we are perfectly fine with them being moved.
The only reason we tried to restore them is that FILE api
did not allow moving of FILE-&gt;fd.

function                                             old     new   delta
refill_HFILE_and_getc                                  -      93     +93
hfopen                                                 -      90     +90
hfclose                                                -      66     +66
pseudo_exec_argv                                     591     597      +6
hush_main                                           1089    1095      +6
builtin_source                                       209     214      +5
save_fd_on_redirect                                  197     200      +3
setup_redirects                                      320     321      +1
fgetc_interactive                                    235     236      +1
i_peek_and_eat_bkslash_nl                             99      97      -2
expand_vars_to_list                                 1103    1100      -3
restore_redirects                                     99      52     -47
fclose_and_forget                                     57       -     -57
remember_FILE                                         63       -     -63
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 6/3 up/down: 271/-172)           Total: 99 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: handle backslash-newline in heredoc terminators</title>
<updated>2018-07-24T12:03:18+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-24T12:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=dfc739476343244371636d58561f7b743faf50d6'/>
<id>urn:sha1:dfc739476343244371636d58561f7b743faf50d6</id>
<content type='text'>
function                                             old     new   delta
fetch_heredocs                                       479     527     +48

(ash fails this test)

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix handling of heredocs not enclosed in groups where they are "declared"</title>
<updated>2018-07-24T11:03:03+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-24T11:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=474cb205554919e4d017b7aeb3722d6a4ffee41d'/>
<id>urn:sha1:474cb205554919e4d017b7aeb3722d6a4ffee41d</id>
<content type='text'>
function                                             old     new   delta
fetch_heredocs                                         -     479    +479
parse_and_run_stream                                 146     148      +2
parse_stream                                        2787    2296    -491
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 481/-491)          Total: -10 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix heredoc handling in the "cmd &lt;&lt;EOF ;&lt;newline&gt;" case</title>
<updated>2018-07-23T14:31:21+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-23T14:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=3675c37b9b0bb4ba565b690b95b0b9c7d0ce8123'/>
<id>urn:sha1:3675c37b9b0bb4ba565b690b95b0b9c7d0ce8123</id>
<content type='text'>
function                                             old     new   delta
parse_stream                                        2759    2787     +28

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix handling of heredocs starting with empty lines</title>
<updated>2018-07-23T13:43:57+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-07-23T13:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=d73cdbf84c9c7d509baf69eb3256dcaf733f4d93'/>
<id>urn:sha1:d73cdbf84c9c7d509baf69eb3256dcaf733f4d93</id>
<content type='text'>
function                                             old     new   delta
parse_stream                                        2748    2759     +11

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: add a comment where we differ from bash wrt heredoc EOF mark handling</title>
<updated>2018-04-01T16:55:00+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-01T16:55:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=bb6f573ad204887e2447a40628efd98f334fb520'/>
<id>urn:sha1:bb6f573ad204887e2447a40628efd98f334fb520</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>parser: Fix backquote support in here-document EOF mark</title>
<updated>2018-04-01T14:38:32+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-01T14:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=41fddb43729373740bfba82da83373ec5ba49fc8'/>
<id>urn:sha1:41fddb43729373740bfba82da83373ec5ba49fc8</id>
<content type='text'>
Upstream commit:

    Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Date:   Thu Mar 15 18:27:30 2018 +0800
    parser: Fix backquote support in here-document EOF mark

    Currently using backquotes in a here-document EOF mark is broken
    because dash tries to do command substitution on it.  This patch
    fixes it by checking whether we're looking for an EOF mark during
    tokenisation.

    Reported-by: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

With added fix for quoted-ness of the EOF mark.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: use pgetc_eatbnl() in more places</title>
<updated>2018-03-31T17:40:56+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-03-31T17:21:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=220be537a03f029e1e619003d6f7def10103a156'/>
<id>urn:sha1:220be537a03f029e1e619003d6f7def10103a156</id>
<content type='text'>
Part of upstream commit:

    Date:   Thu Mar 8 08:37:11 2018 +0100
    Author: Harald van Dijk &lt;harald@gigawatt.nl&gt;
    parser: use pgetc_eatbnl() in more places

    dash has a pgetc_eatbnl function in parser.c which skips any
    backslash-newline combinations. It's not used everywhere it could be.
    There is also some duplicated backslash-newline handling elsewhere in
    parser.c. Replace most of the calls to pgetc() with calls to
    pgetc_eatbnl() and remove the duplicated backslash-newline handling.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

Not adding "readtoken1(pgetc_eatbnl(), DQSYNTAX..." changes, since
readtoken1() handles the "starts with backslash + newline" case itself.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix handling of empty heredoc EOF marker</title>
<updated>2017-07-29T18:43:26+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-29T18:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.carbslinux.org/forks/busybox/commit/?id=0f018b30700989462de0a15b8285206d16170c1f'/>
<id>urn:sha1:0f018b30700989462de0a15b8285206d16170c1f</id>
<content type='text'>
function                                             old     new   delta
parse_stream                                        2609    2634     +25

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
