head 1.1; branch 1.1.1; access; symbols perseant-exfatfs-base-20261102:1.1.1.1 netbsd-11-1-RELEASE:1.1.1.1 netbsd-10-2-RELEASE:1.1.1.1 netbsd-11-0-RELEASE:1.1.1.1 netbsd-11-0-RC7:1.1.1.1 netbsd-11-0-RC6:1.1.1.1 netbsd-11-0-RC5:1.1.1.1 netbsd-11-0-RC4:1.1.1.1 NAWK20260426:1.1.1.1 netbsd-11-0-RC3:1.1.1.1 netbsd-11-0-RC2:1.1.1.1 netbsd-11-0-RC1:1.1.1.1 perseant-exfatfs-base-20250801:1.1.1.1 netbsd-11:1.1.1.1.0.14 netbsd-11-base:1.1.1.1 netbsd-10-1-RELEASE:1.1.1.1 NAWK20240817:1.1.1.1 perseant-exfatfs-base-20240630:1.1.1.1 perseant-exfatfs:1.1.1.1.0.12 perseant-exfatfs-base:1.1.1.1 netbsd-10-0-RELEASE:1.1.1.1 netbsd-10-0-RC6:1.1.1.1 netbsd-10-0-RC5:1.1.1.1 netbsd-10-0-RC4:1.1.1.1 netbsd-10-0-RC3:1.1.1.1 netbsd-10-0-RC2:1.1.1.1 netbsd-10-0-RC1:1.1.1.1 netbsd-10:1.1.1.1.0.10 netbsd-10-base:1.1.1.1 cjep_sun2x-base1:1.1.1.1 cjep_sun2x:1.1.1.1.0.8 cjep_sun2x-base:1.1.1.1 cjep_staticlib_x-base1:1.1.1.1 cjep_staticlib_x:1.1.1.1.0.6 cjep_staticlib_x-base:1.1.1.1 phil-wifi-20200421:1.1.1.1 phil-wifi:1.1.1.1.0.4 phil-wifi-20200411:1.1.1.1 is-mlppp:1.1.1.1.0.2 is-mlppp-base:1.1.1.1 phil-wifi-20200406:1.1.1.1 NAWK20200218:1.1.1.1 NAWK:1.1.1; locks; strict; comment @# @; 1.1 date 2020.02.18.20.50.48; author christos; state Exp; branches 1.1.1.1; next ; commitid 1DQROEYOeROjmcXB; 1.1.1.1 date 2020.02.18.20.50.48; author christos; state Exp; branches 1.1.1.1.4.1; next ; commitid 1DQROEYOeROjmcXB; 1.1.1.1.4.1 date 2020.02.18.20.50.48; author martin; state dead; branches; next 1.1.1.1.4.2; commitid X01YhRUPVUDaec4C; 1.1.1.1.4.2 date 2020.04.13.08.02.17; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; desc @@ 1.1 log @Initial revision @ text @List of bugs fixed. 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. 8. concat-assign-same: Concatenation previously evaluated both sides of the expression before doing its work, which, since assign() evaluates to the cell being assigned to, meant that expressions like "print (a = 1) (a = 2)" would print "22" rather than "12". 9. missing-precision: When using the format string "%*s", the precision argument was used without checking if it was present first. 10. missing-precision: When using the format string "%*s", the precision argument was used without checking if it was present first. 11. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written to with sprintf(), which meant that some conversions could write past the end. 12. numeric-subsep, numeric-fs, numeric-output-seps, numerics-rs: If SUBSEP, FS, RS, OFS, or ORS were set to a numeric value, then their string values wouldn't always be generated before being needed. 13. subsep-overflow: The length of SUBSEP needs to be rechecked after calling execute(), in case SUBSEP itself has been changed. 14. split-fs-from-array: If the third argument to split() comes from the array passed as the second argument, then split() would previously read from the freed memory and possibly produce incorrect results (depending on the system's malloc()/free() behaviour.) 15. getline-numeric: The `getline xx < file' syntax did not check if values were numeric, in discordance from POSIX. Test case adapted from one posted by Ben Bacarisse in comp.lang.awk, January 2019. @ 1.1.1.1 log @Last import was 2010 when there was no ChangeLog yet. I've worked with upstream to merge all our changes and this includes many other fixes including new operator support etc. The change to pass an extra "isnew" argument to open was not preserved as none of the tests supplied with the PR fail. This also adds the testsuite and all the bugs fixed since then. @ text @@ 1.1.1.1.4.1 log @file README was added on branch phil-wifi on 2020-04-13 08:02:17 +0000 @ text @d1 57 @ 1.1.1.1.4.2 log @Mostly merge changes from HEAD upto 20200411 @ text @a0 57 List of bugs fixed. 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. 8. concat-assign-same: Concatenation previously evaluated both sides of the expression before doing its work, which, since assign() evaluates to the cell being assigned to, meant that expressions like "print (a = 1) (a = 2)" would print "22" rather than "12". 9. missing-precision: When using the format string "%*s", the precision argument was used without checking if it was present first. 10. missing-precision: When using the format string "%*s", the precision argument was used without checking if it was present first. 11. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written to with sprintf(), which meant that some conversions could write past the end. 12. numeric-subsep, numeric-fs, numeric-output-seps, numerics-rs: If SUBSEP, FS, RS, OFS, or ORS were set to a numeric value, then their string values wouldn't always be generated before being needed. 13. subsep-overflow: The length of SUBSEP needs to be rechecked after calling execute(), in case SUBSEP itself has been changed. 14. split-fs-from-array: If the third argument to split() comes from the array passed as the second argument, then split() would previously read from the freed memory and possibly produce incorrect results (depending on the system's malloc()/free() behaviour.) 15. getline-numeric: The `getline xx < file' syntax did not check if values were numeric, in discordance from POSIX. Test case adapted from one posted by Ben Bacarisse in comp.lang.awk, January 2019. @