diff options
author | Brian Kernighan <fakeuser@fake.com> | 2018-08-24 09:09:59 -0400 |
---|---|---|
committer | Brian Kernighan <fakeuser@fake.com> | 2018-08-24 09:09:59 -0400 |
commit | 0f4e1ba922ccd45f7bd47701e923d98566ceb7c5 (patch) | |
tree | 374cb9c2ec978afa312a12e52aed3817c3945a22 | |
parent | b619480f94c4710be9fc7990551a4fa4c876fc0e (diff) | |
download | one-true-awk-0f4e1ba922ccd45f7bd47701e923d98566ceb7c5.tar.gz |
added Arnold's fixes, updates to awktest.tar
-rw-r--r-- | FIXES | 31 | ||||
-rw-r--r-- | TODO | 20 | ||||
-rw-r--r-- | awktest.tar | bin | 6819840 -> 6850560 bytes | |||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | makefile | 10 |
5 files changed, 38 insertions, 25 deletions
@@ -25,6 +25,37 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +Aug 23, 2018: + A long list of fixes courtesy of Arnold Robbins, + to whom profound thanks. + + 1. ofs-rebuild: OFS value used to rebuild the record was incorrect. + Fixed August 19, 2014. Revised fix August 2018. + + 2. system-status: Instead of a floating-point division by 256, use + the wait(2) macros to create a reasonable exit status. + Fixed March 12, 2016. + + 3. space: Use provided xisblank() function instead of ispace() for + matching [[:blank:]]. + + 4. a-format: Add POSIX standard %a and %A to supported formats. Check + at runtime that this format is available. + + 5. decr-NF: Decrementing NF did not change $0. This is a decades-old + bug. There are interactions with the old and new value of OFS as well. + Most of the fix came from the NetBSD awk. + + 6. string-conv: String conversions of scalars were sticky. Once a + conversion to string happened, even with OFMT, that value was used until + a new numeric value was assigned, even if OFMT differed from CONVFMT, + and also if CONVFMT changed. + + 7. unary-plus: Unary plus on a string constant returned the string. + Instead, it should convert the value to numeric and give that value. + + Also added Arnold's tests for these to awktest.tar as T.arnold. + Aug 15, 2018: fixed mangled awktest.tar (thanks, Arnold), posted all current (very minor) fixes to github / onetrueawk @@ -1,20 +0,0 @@ -Fri Aug 10 11:11:11 IDT 2018 -============================ - -A semi-random list of things to look into. - -1. DONE. Make sure the FIXES file has everything after the date order -was reversed. - -2. DONE. Look into the problem that NF-- doesn't throw away the last field. -This a long-standing issue. - -3. DONE. Add suport for %a and %A printf formats. - -4. DONE. Look into the problem that string conversions are sticky; once -done they never change, even if OFMT or CONVFMT do. Similarly, a -conversion from OFMT becomes the permanent string value, which is -incorrect. - -5. MAYBE: Improve the test suite enough so that it can be cleaned up after -it was run, and old results can be saved for comparison. diff --git a/awktest.tar b/awktest.tar Binary files differindex 959b452..31c6ad9 100644 --- a/awktest.tar +++ b/awktest.tar @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20130105 + fixes by arnold@skeeve.com 20180822"; +const char *version = "version 20180823"; #define DEBUG #include <stdio.h> @@ -23,17 +23,19 @@ # ****************************************************************/ CFLAGS = -g -CFLAGS = -O2 CFLAGS = +CFLAGS = -O2 +# compiler options #CC = gcc -Wall -g -Wwrite-strings -CC = gcc -g -Wall -pedantic #CC = gcc -O4 -Wall -pedantic -fno-strict-aliasing #CC = gcc -fprofile-arcs -ftest-coverage # then gcov f1.c; cat f1.c.gcov +CC = gcc -g -Wall -pedantic -YACC = bison -d -y -# YACC = yacc -d +# yacc options. pick one; this varies a lot by system. #YFLAGS = -d -S +#YACC = bison -d -y +YACC = yacc -d # -S uses sprintf in yacc parser instead of sprint OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o |