aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozan yigit <ozan.yigit@gmail.com>2021-07-25 14:37:03 -0400
committerozan yigit <ozan.yigit@gmail.com>2021-07-25 14:37:03 -0400
commitaa8731ea81594dc036469dcfe16c7c5eb571eca0 (patch)
tree9f52ddadd66dd67587404f1ce21327436722dc97
parent39133291204ab182e6fd24baacab0bb3a3f86606 (diff)
downloadone-true-awk-aa8731ea81594dc036469dcfe16c7c5eb571eca0.tar.gz
PR #112, #116, #117
-rw-r--r--FIXES13
-rw-r--r--README.md8
-rw-r--r--lib.c4
-rw-r--r--main.c2
4 files changed, 22 insertions, 5 deletions
diff --git a/FIXES b/FIXES
index 516458e..d046710 100644
--- a/FIXES
+++ b/FIXES
@@ -25,6 +25,19 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987.
+July 24, 2021:
+ Fix readrec's definition of a record. This fixes an issue
+ with NetBSD's RS regular expression support that can cause
+ an infinite read loop. Thanks to Miguel Pineiro Jr.
+
+ Fix regular expression RS ^-anchoring. RS ^-anchoring needs to
+ know if it is reading the first record of a file. This change
+ restores a missing line that was overlooked when porting NetBSD's
+ RS regex functionality. Thanks to Miguel Pineiro Jr.
+
+ Fix size computation in replace_repeat() for special case
+ REPEAT_WITH_Q. Thanks to Todd C. Miller.
+
February 15, 2021:
Small fix so that awk will compile again with g++. Thanks to
Arnold Robbins.
diff --git a/README.md b/README.md
index b8089b3..76ae3d4 100644
--- a/README.md
+++ b/README.md
@@ -107,13 +107,17 @@ astonishly slow. If `awk` seems slow, you might try fixing that.
More generally, turning on optimization can significantly improve
`awk`'s speed, perhaps by 1/3 for highest levels.
+## A Note About Releases
+
+We don't do releases.
+
## A Note About Maintenance
-NOTICE! Maintenance of this program is on a ``best effort''
+NOTICE! Maintenance of this program is on a ''best effort''
basis. We try to get to issues and pull requests as quickly
as we can. Unfortunately, however, keeping this program going
is not at the top of our priority list.
#### Last Updated
-Fri Dec 25 16:53:34 EST 2020
+Sat Jul 25 14:00:07 EDT 2021
diff --git a/lib.c b/lib.c
index 8c8f477..c7709f7 100644
--- a/lib.c
+++ b/lib.c
@@ -242,7 +242,7 @@ int readrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* read one rec
}
if (found)
setptr(patbeg, '\0');
- isrec = (found == 0 && *buf == '\0') ? 0 : 1;
+ isrec = (found == 0 && *buf == '\0') ? false : true;
} else {
if ((sep = *rs) == 0) {
sep = '\n';
@@ -272,7 +272,7 @@ int readrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* read one rec
if (!adjbuf(&buf, &bufsize, 1+rr-buf, recsize, &rr, "readrec 3"))
FATAL("input record `%.30s...' too long", buf);
*rr = 0;
- isrec = (c == EOF && rr == buf) ? 0 : 1;
+ isrec = (c == EOF && rr == buf) ? false : true;
}
*pbuf = buf;
*pbufsize = bufsize;
diff --git a/main.c b/main.c
index f393634..2528f74 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 20210215";
+const char *version = "version 20210724";
#define DEBUG
#include <stdio.h>