1*b5253557SWarner LoshList of bugs fixed. 2*b5253557SWarner Losh 3*b5253557SWarner Losh1. ofs-rebuild: OFS value used to rebuild the record was incorrect. 4*b5253557SWarner LoshFixed August 19, 2014. Revised fix August 2018. 5*b5253557SWarner Losh 6*b5253557SWarner Losh2. system-status: Instead of a floating-point division by 256, use 7*b5253557SWarner Loshthe wait(2) macros to create a reasonable exit status. Fixed March 12, 2016. 8*b5253557SWarner Losh 9*b5253557SWarner Losh3. space: Use provided xisblank() function instead of ispace() for 10*b5253557SWarner Loshmatching [[:blank:]]. 11*b5253557SWarner Losh 12*b5253557SWarner Losh4. a-format: Add POSIX standard %a and %A to supported formats. Check 13*b5253557SWarner Loshat runtime that this format is available. 14*b5253557SWarner Losh 15*b5253557SWarner Losh5. decr-NF: Decrementing NF did not change $0. This is a decades-old 16*b5253557SWarner Loshbug. There are interactions with the old and new value of OFS as well. 17*b5253557SWarner LoshMost of the fix came from the NetBSD awk. 18*b5253557SWarner Losh 19*b5253557SWarner Losh6. string-conv: String conversions of scalars were sticky. Once a 20*b5253557SWarner Loshconversion to string happened, even with OFMT, that value was used until 21*b5253557SWarner Losha new numeric value was assigned, even if OFMT differed from CONVFMT, 22*b5253557SWarner Loshand also if CONVFMT changed. 23*b5253557SWarner Losh 24*b5253557SWarner Losh7. unary-plus: Unary plus on a string constant returned the string. 25*b5253557SWarner LoshInstead, it should convert the value to numeric and give that value. 26*b5253557SWarner Losh 27*b5253557SWarner Losh8. concat-assign-same: Concatenation previously evaluated both sides of the 28*b5253557SWarner Loshexpression before doing its work, which, since assign() evaluates to the cell 29*b5253557SWarner Loshbeing assigned to, meant that expressions like "print (a = 1) (a = 2)" would 30*b5253557SWarner Loshprint "22" rather than "12". 31*b5253557SWarner Losh 32*b5253557SWarner Losh9. missing-precision: When using the format string "%*s", the precision 33*b5253557SWarner Loshargument was used without checking if it was present first. 34*b5253557SWarner Losh 35*b5253557SWarner Losh10. missing-precision: When using the format string "%*s", the precision 36*b5253557SWarner Loshargument was used without checking if it was present first. 37*b5253557SWarner Losh 38*b5253557SWarner Losh11. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written 39*b5253557SWarner Loshto with sprintf(), which meant that some conversions could write past the 40*b5253557SWarner Loshend. 41*b5253557SWarner Losh 42*b5253557SWarner Losh12. numeric-subsep, numeric-fs, numeric-output-seps, numerics-rs: If SUBSEP, 43*b5253557SWarner LoshFS, RS, OFS, or ORS were set to a numeric value, then their string values 44*b5253557SWarner Loshwouldn't always be generated before being needed. 45*b5253557SWarner Losh 46*b5253557SWarner Losh13. subsep-overflow: The length of SUBSEP needs to be rechecked after 47*b5253557SWarner Loshcalling execute(), in case SUBSEP itself has been changed. 48*b5253557SWarner Losh 49*b5253557SWarner Losh14. split-fs-from-array: If the third argument to split() comes from the 50*b5253557SWarner Losharray passed as the second argument, then split() would previously read 51*b5253557SWarner Loshfrom the freed memory and possibly produce incorrect results (depending 52*b5253557SWarner Loshon the system's malloc()/free() behaviour.) 53*b5253557SWarner Losh 54*b5253557SWarner Losh15. getline-numeric: The `getline xx < file' syntax did not check if 55*b5253557SWarner Loshvalues were numeric, in discordance from POSIX. Test case adapted from 56*b5253557SWarner Loshone posted by Ben Bacarisse <ben.usenet@bsb.me.uk> in comp.lang.awk, 57*b5253557SWarner LoshJanuary 2019. 58