<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/shell_common.h, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2023-06-17T19:13:13+00:00</updated>
<entry>
<title>shell: move varcmp() to shell_common.h and use it in hush</title>
<updated>2023-06-17T19:13:13+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-06-17T19:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=96769486e20fd5f1142cae0db2cbacef31dc75e9'/>
<id>urn:sha1:96769486e20fd5f1142cae0db2cbacef31dc75e9</id>
<content type='text'>
function                                             old     new   delta
unset_local_var                                        -     112    +112
findvar                                               31      35      +4
set_vars_and_save_old                                144     141      -3
helper_export_local                                  235     230      -5
set_local_var                                        425     416      -9
handle_changed_special_names                          38      27     -11
builtin_unset                                        154     141     -13
builtin_getopts                                      404     391     -13
get_local_var_value                                  281     260     -21
get_ptr_to_local_var                                  71      45     -26
unset_local_var_len                                  139       -    -139
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/8 up/down: 116/-240)         Total: -124 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix "export PS1=xyz" and "local PS1=xyz" messing up prompt</title>
<updated>2019-05-14T16:56:04+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-05-14T16:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d8bd7012a30c6ce9efe26d06880ac223143709ad'/>
<id>urn:sha1:d8bd7012a30c6ce9efe26d06880ac223143709ad</id>
<content type='text'>
function                                             old     new   delta
helper_export_local                                  215     253     +38
leave_var_nest_level                                 107     127     +20
run_pipe                                            1840    1857     +17
handle_changed_special_names                         101     105      +4
shell_builtin_read                                  1399    1398      -1
done_word                                            767     766      -1
parse_stream                                        2249    2245      -4
set_local_var                                        437     430      -7
is_well_formed_var_name                               66       -     -66
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 79/-79)              Total: 0 bytes
   text	   data	    bss	    dec	    hex	filename
 952376	    485	   7296	 960157	  ea69d	busybox_old
 952400	    485	   7296	 960181	  ea6b5	busybox_unstripped

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash,hush: fold shell_builtin_read() way-too-many params into a struct param</title>
<updated>2018-08-05T16:11:15+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-08-05T13:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=19358cc31317dca4642417066c1445ce00438e18'/>
<id>urn:sha1:19358cc31317dca4642417066c1445ce00438e18</id>
<content type='text'>
function                                             old     new   delta
getoptscmd                                           587     584      -3
readcmd                                              240     224     -16
shell_builtin_read                                  1426    1399     -27
builtin_read                                         210     182     -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74)             Total: -74 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: more efficient check for EOL in read</title>
<updated>2017-08-09T12:04:07+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-08-09T12:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=cde46f75cbe8069e06b68396a7f6dc9564fbf2c4'/>
<id>urn:sha1:cde46f75cbe8069e06b68396a7f6dc9564fbf2c4</id>
<content type='text'>
function                                             old     new   delta
shell_builtin_read                                  1334    1320     -14

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: implement -d DELIM option for read</title>
<updated>2017-08-09T11:52:17+00:00</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2017-08-08T14:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3bef5d89b0c667e9fb7d1d9b44ba9b30d4d084e4'/>
<id>urn:sha1:3bef5d89b0c667e9fb7d1d9b44ba9b30d4d084e4</id>
<content type='text'>
The POSIX standard only requires the read builtin to handle -r:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html

However, Bash introduced the option -d &lt;DELIM&gt; to override IFS for
just one invocation, and it is quite useful.

It is also super easy to implement in BusyBox' ash, so let's do that.

The motivation: This option is used by Git's test suite.

function                                             old     new   delta
.rodata                                           163505  163587     +82
shell_builtin_read                                  1244    1289     +45
readcmd                                              233     259     +26
builtin_read                                         258     263      +5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 158/0)             Total: 158 bytes

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: [VAR] Initialise OPTIND after importing environment</title>
<updated>2016-09-30T12:46:41+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-09-30T12:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e627ac95bef4d61c2d264fc87d767cb7a948c38f'/>
<id>urn:sha1:e627ac95bef4d61c2d264fc87d767cb7a948c38f</id>
<content type='text'>
Upstream commit 1:

    Date: Fri, 23 Aug 2013 21:27:42 +1000
    [VAR] Initialise OPTIND after importing environment

    On Sat, Mar 23, 2013 at 01:46:20AM +0000, Chris F.A. Johnson wrote:
    &gt;   According to both the dash man page and the POSIX spec, "When the
    &gt;   shell is invoked, OPTIND is initialized to 1."
    &gt;
    &gt;   However, it actually takes the value of the environment variable
    &gt;   if it exists:
    &gt;
    &gt; $ OPTIND=4 dash -c 'echo "$OPTIND"'
    &gt; 4
    &gt; $ OPTIND=4 bash -c 'echo "$OPTIND"'
    &gt; 1
    &gt; $ OPTIND=4 ksh -c 'echo "$OPTIND"'
    &gt; 1
    &gt; $ OPTIND=4 ksh93 -c 'echo "$OPTIND"'
    &gt; 1

    This patch fixes this by initialising OPTIND after importing the
    environment.

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

Upstream commit 2:

    Date: Tue, 7 Oct 2014 22:24:42 +0800
    [VAR] Use setvareq to set OPTIND initially

    There is no need to setvarint to set the initial value of OPTIND
    of one.  This patch switchs to setvareq which also lets us avoid
    an unnecessary memory allocation.

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

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: declare strings with ALIGN1, as appropriate</title>
<updated>2012-07-24T13:56:37+00:00</updated>
<author>
<name>Michael Tokarev</name>
<email>mjt@tls.msk.ru</email>
</author>
<published>2012-07-24T13:56:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=32f774cd344cf12336c22b0947f102274a99ee31'/>
<id>urn:sha1:32f774cd344cf12336c22b0947f102274a99ee31</id>
<content type='text'>
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: make GNU licensing statement forms more regular</title>
<updated>2010-08-16T18:14:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-08-16T18:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0ef64bdb40c54681e8dd5ab8df42ac88e4ab1d4a'/>
<id>urn:sha1:0ef64bdb40c54681e8dd5ab8df42ac88e4ab1d4a</id>
<content type='text'>
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 &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell: consolidate builtin_foo.? into shell_common.?; delete obsolete shells</title>
<updated>2010-05-23T15:49:50+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-05-23T15:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=599ae1eb9f20b4731735e14f9bac6371ad89b6d7'/>
<id>urn:sha1:599ae1eb9f20b4731735e14f9bac6371ad89b6d7</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shell/read: check that variable names are sane</title>
<updated>2010-01-13T17:22:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2010-01-13T17:22:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=25d9b91d94688b9b022224b95c06cbd4b75da085'/>
<id>urn:sha1:25d9b91d94688b9b022224b95c06cbd4b75da085</id>
<content type='text'>
function                                             old     new   delta
shell_builtin_read                                  1000    1055     +55
parse_command                                       1460    1463      +3
builtin_umask                                        121     123      +2
is_well_formed_var_name                               73      66      -7

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