aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FIXES11
-rw-r--r--main.c2
-rwxr-xr-xtestdir/T.int-expr42
-rwxr-xr-xtestdir/T.misc2
4 files changed, 52 insertions, 5 deletions
diff --git a/FIXES b/FIXES
index 1299c18..8854044 100644
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,11 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+January 31, 2020:
+ Merge PR #70, which avoids use of variable length arrays. Thanks
+ to GitHub user michaelforney. Fix issue #60 ({0} in interval
+ expressions doesn't work). Thanks to Arnold Robbins.
+
January 24, 2020:
A number of small cleanups from Christos Zoulas. Add the close
on exec flag to files/pipes opened for redirection; courtesy of
@@ -77,13 +82,13 @@ October 25, 2019:
October 24, 2019:
Import second round of code cleanups from NetBSD. Much thanks
- to Christos Zoulas (Github user zoulasc). Merges PR 53.
+ to Christos Zoulas (GitHub user zoulasc). Merges PR 53.
Add an optimization for string concatenation, also from
Christos.
October 17, 2019:
Import code cleanups from NetBSD. Much thanks to Christos
- Zoulas (Github user zoulasc). Merges PR 51.
+ Zoulas (GitHub user zoulasc). Merges PR 51.
October 6, 2019:
Import code from NetBSD awk that implements RS as a regular
@@ -91,7 +96,7 @@ October 6, 2019:
September 10, 2019:
Fixes for various array / memory overruns found via gcc's
- -fsanitize=unknown. Thanks to Alexander Richardson (Github
+ -fsanitize=unknown. Thanks to Alexander Richardson (GitHub
user arichardson). Merges PRs 47 and 48.
July 28, 2019:
diff --git a/main.c b/main.c
index efd6d1a..2476320 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
****************************************************************/
-const char *version = "version 20200124";
+const char *version = "version 20200131";
#define DEBUG
#include <stdio.h>
diff --git a/testdir/T.int-expr b/testdir/T.int-expr
index e71a075..de77532 100755
--- a/testdir/T.int-expr
+++ b/testdir/T.int-expr
@@ -18,6 +18,34 @@ pat ab{0}c
ac 1
abc 0
+pat a(b{0})c
+ac 1
+abc 0
+
+pat ab{0}*c
+ac 1
+abc 0
+
+pat a(b{0})*c
+ac 1
+abc 0
+
+pat ab{0,}c
+ac 1
+abc 1
+
+pat a(b{0,})c
+ac 1
+abc 1
+
+pat ab{0,}*c
+ac 1
+abc 1
+
+pat a(b{0,})*c
+ac 1
+abc 1
+
pat ab{1}c
ac 0
abc 1
@@ -53,6 +81,20 @@ EOF
cat << \EOF > foo1
ac ~ /ab{0}c/ -> should be 1, is 1
abc ~ /ab{0}c/ -> should be 0, is 0
+ac ~ /a(b{0})c/ -> should be 1, is 1
+abc ~ /a(b{0})c/ -> should be 0, is 0
+ac ~ /ab{0}*c/ -> should be 1, is 1
+abc ~ /ab{0}*c/ -> should be 0, is 0
+ac ~ /a(b{0})*c/ -> should be 1, is 1
+abc ~ /a(b{0})*c/ -> should be 0, is 0
+ac ~ /ab{0,}c/ -> should be 1, is 1
+abc ~ /ab{0,}c/ -> should be 1, is 1
+ac ~ /a(b{0,})c/ -> should be 1, is 1
+abc ~ /a(b{0,})c/ -> should be 1, is 1
+ac ~ /ab{0,}*c/ -> should be 1, is 1
+abc ~ /ab{0,}*c/ -> should be 1, is 1
+ac ~ /a(b{0,})*c/ -> should be 1, is 1
+abc ~ /a(b{0,})*c/ -> should be 1, is 1
ac ~ /ab{1}c/ -> should be 0, is 0
abc ~ /ab{1}c/ -> should be 1, is 1
abbc ~ /ab{1}c/ -> should be 0, is 0
diff --git a/testdir/T.misc b/testdir/T.misc
index a191ae2..3903606 100755
--- a/testdir/T.misc
+++ b/testdir/T.misc
@@ -382,7 +382,7 @@ $awk 'BEGIN \
print "hello, world"
}
}}}' >foo1 2>foo2
-grep 'source line 5' foo2 >/dev/null 2>&1 || echo 'BAD: T.misc continuation line number'
+grep 'source line 4' foo2 >/dev/null 2>&1 || echo 'BAD: T.misc continuation line number'
echo 111 222 333 >foo