<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/testsuite/awk.tests, branch waitfor</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=waitfor</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=waitfor'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-07-08T13:32:00+00:00</updated>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2026-07-08T13:32:00+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-07-08T13:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4afa250a0b2d9a5f20176b3a47b0a34bb87b7790'/>
<id>urn:sha1:4afa250a0b2d9a5f20176b3a47b0a34bb87b7790</id>
<content type='text'>
Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>awk: fix printf "%o\n", -1</title>
<updated>2026-07-06T02:37:44+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2026-07-06T02:37:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5de0780eaf4ec779fbcc459f461d961144623082'/>
<id>urn:sha1:5de0780eaf4ec779fbcc459f461d961144623082</id>
<content type='text'>
function                                             old     new   delta
awk_printf                                          1381    1387      +6

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>awk: fix printing of very large numbers with printf("%d")</title>
<updated>2026-07-02T02:58:08+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2026-07-02T02:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a0667b2def4c05aeb333448195127392a22c21a8'/>
<id>urn:sha1:a0667b2def4c05aeb333448195127392a22c21a8</id>
<content type='text'>
function                                             old     new   delta
awk_printf                                          1086    1349    +263
.rodata                                           107108  107121     +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 276/0)             Total: 276 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>awk: add '*' as a valid specifier for width and precision in printf</title>
<updated>2026-07-01T21:38:27+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2026-07-01T21:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6ba81ddb0d47d8c5298999c83f439817b7ec9c7a'/>
<id>urn:sha1:6ba81ddb0d47d8c5298999c83f439817b7ec9c7a</id>
<content type='text'>
Based on a patch by Anubhav Kokane &lt;dev.anubhavk@gmail.com&gt;

function                                             old     new   delta
awk_printf                                           640    1086    +446
.rodata                                           107131  107108     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 446/-23)           Total: 423 bytes
   text	   data	    bss	    dec	    hex	filename
1080210	    555	   4992	1085757	 10913d	busybox_old
1080633	    555	   4992	1086180	 1092e4	busybox_unstripped

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>testing stripts: allow to skip "awk gsub erroneous word start match" test</title>
<updated>2026-05-14T14:26:10+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2026-05-14T14:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=244c0a01eece537e9d7e8318a5c320a836cc604b'/>
<id>urn:sha1:244c0a01eece537e9d7e8318a5c320a836cc604b</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2024-07-10T10:54:23+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-07-10T10:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2dc17b7c80c803119dd2214bce4406b252ae2e9f'/>
<id>urn:sha1:2dc17b7c80c803119dd2214bce4406b252ae2e9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>awk: restore assignment precedence to be lower than ternary ?:</title>
<updated>2024-07-09T13:30:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2024-07-09T13:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=38335df9e9f45378c3407defd38b5b610578bdda'/>
<id>urn:sha1:38335df9e9f45378c3407defd38b5b610578bdda</id>
<content type='text'>
Something is fishy with constrcts like "3==v=3" in gawk,
they should not work, but do. Ignore those for now.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2024-01-05T11:17:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-01-05T11:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=49edb26faaddb81e6333e7891715ce13301aed09'/>
<id>urn:sha1:49edb26faaddb81e6333e7891715ce13301aed09</id>
<content type='text'>
</content>
</entry>
<entry>
<title>awk: fix handling of empty fields</title>
<updated>2023-12-31T14:49:54+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-12-31T14:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=789ccac7d9d1a9e433570ac9628992a01f946643'/>
<id>urn:sha1:789ccac7d9d1a9e433570ac9628992a01f946643</id>
<content type='text'>
Patch by M Rubon &lt;rubonmtz@gmail.com&gt;:
Busybox awk handles references to empty (not provided in the input)
fields differently during the first line of input, as compared to
subsequent lines.

$ (echo a ; echo b) | awk '$2 != 0'    #wrong
b

No field $2 value is provided in the input.  When awk references field
$2 for the "a" line, it is seen to have a different behaviour than
when it is referenced for the "b" line.

Problem in BusyBox v1.36.1 embedded in OpenWrt 23.05.0
Same problem also in 21.02 versions of OpenWrt
Same problem in BusyBox v1.37.0.git

I get the correct expected output from Ubuntu gawk and Debian mawk,
and from my fix.
will@dev:~$ (echo a ; echo b) | awk '$2 != 0'  #correct
a
b
will@dev:~/busybox$ (echo a ; echo b ) | ./busybox awk '$2 != 0'  #fixed
a
b

I built and poked into the source code at editors/awk.c  The function
fsrealloc(int size) is core to allocating, initializing, reallocating,
and reinitializing fields, both real input line fields and imaginary
fields that the script references but do not exist in the input.

When fsrealloc() needs more field space than it has previously
allocated, it initializes those new fields differently than how they
are later reinitialized for the next input line.  This works fine for
fields defined in the input, like $1, but does not work the first time
when there is no input for that field (e.g. field $99)

My one-line fix simply makes the initialization and clrvar()
reinitialization use the same value for .type.  I am not sure if there
are regression tests to run, but I have not done those.

I'm not sure if I understand why clrvar() is not setting .type to a
default constant value, but in any case I have left that untouched.

function                                             old     new   delta
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0)                 Total: 0 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2023-06-16T12:02:47+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-06-16T12:02:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4b3d7e62cff6015e1c4b856165efd90cf9182a5c'/>
<id>urn:sha1:4b3d7e62cff6015e1c4b856165efd90cf9182a5c</id>
<content type='text'>
</content>
</entry>
</feed>
