12a55deb1SDavid E. O'Brien/**************************************************************** 22a55deb1SDavid E. O'BrienCopyright (C) Lucent Technologies 1997 32a55deb1SDavid E. O'BrienAll Rights Reserved 42a55deb1SDavid E. O'Brien 52a55deb1SDavid E. O'BrienPermission to use, copy, modify, and distribute this software and 62a55deb1SDavid E. O'Brienits documentation for any purpose and without fee is hereby 72a55deb1SDavid E. O'Briengranted, provided that the above copyright notice appear in all 82a55deb1SDavid E. O'Briencopies and that both that the copyright notice and this 92a55deb1SDavid E. O'Brienpermission notice and warranty disclaimer appear in supporting 102a55deb1SDavid E. O'Briendocumentation, and that the name Lucent Technologies or any of 112a55deb1SDavid E. O'Brienits entities not be used in advertising or publicity pertaining 122a55deb1SDavid E. O'Briento distribution of the software without specific, written prior 132a55deb1SDavid E. O'Brienpermission. 142a55deb1SDavid E. O'Brien 152a55deb1SDavid E. O'BrienLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 162a55deb1SDavid E. O'BrienINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. 172a55deb1SDavid E. O'BrienIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY 182a55deb1SDavid E. O'BrienSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 192a55deb1SDavid E. O'BrienWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER 202a55deb1SDavid E. O'BrienIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 212a55deb1SDavid E. O'BrienARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 222a55deb1SDavid E. O'BrienTHIS SOFTWARE. 232a55deb1SDavid E. O'Brien****************************************************************/ 242a55deb1SDavid E. O'Brien 25f32a6403SWarner LoshThis file lists all bug fixes, changes, etc., made since the 26f32a6403SWarner Loshsecond edition of the AWK book was published in September 2023. 272a55deb1SDavid E. O'Brien 28*dd78d987SWarner LoshJan 14, 2025 29*dd78d987SWarner Losh Fix incorrect error line number issues. unput has 30*dd78d987SWarner Losh no business managing lineno. Thanks to Ozan Yigit. 31*dd78d987SWarner Losh 32*dd78d987SWarner LoshJan 05, 2025 33*dd78d987SWarner Losh Fix hex detection in is_valid_number. 34*dd78d987SWarner Losh Fix indirect field specification with non-numeric string 35*dd78d987SWarner Losh eg. $("foo") in indirect. This is not illegal. 36*dd78d987SWarner Losh Thanks to Arnold Robbins. 37*dd78d987SWarner Losh 38*dd78d987SWarner LoshJan 01, 2025 39*dd78d987SWarner Losh Fixed openfile to not try to read from a directory. 40*dd78d987SWarner Losh Thanks to Arnold Robbins. 41*dd78d987SWarner Losh 428d457988SWarner LoshJul 28, 2024 438d457988SWarner Losh Fixed readcsvrec resize segfault when reading csv records longer 448d457988SWarner Losh than 8k. Thanks to Ozan Yigit. 458d457988SWarner Losh mktime() added to bsd-features branch. Thanks to Todd Miller. 468d457988SWarner Losh 4717853db4SWarner LoshJun 23, 2024 4817853db4SWarner Losh Fix signal for system-status test. Thanks to Tim van der Molen. 4917853db4SWarner Losh Rewrite if-else chain as switch. Thanks to Andrew Sukach. 5017853db4SWarner Losh 5117853db4SWarner LoshMay 27, 2024 5217853db4SWarner Losh Spelling fixes and removal of unneeded prototypes and extern. 5317853db4SWarner Losh Thanks to Jonathan Gray. 5417853db4SWarner Losh 5517853db4SWarner LoshMay 4, 2024 5617853db4SWarner Losh Fixed a use-after-free bug with ARGV for "delete ARGV". 5717853db4SWarner Losh Also ENVtab is no longer global. Thanks to Benjamin Sturz 5817853db4SWarner Losh for spotting the ARGV issue and Todd Miller for the fix. 5917853db4SWarner Losh 6017853db4SWarner LoshMay 3, 2024: 6117853db4SWarner Losh Remove warnings when compiling with g++. Thanks to Arnold Robbins. 6217853db4SWarner Losh 631023317aSWarner LoshApr 22, 2024: 6417853db4SWarner Losh Fixed regex engine gototab reallocation issue that was 6517853db4SWarner Losh Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins. 661023317aSWarner Losh Fixed a scan bug in split in the case the separator is a single 6717853db4SWarner Losh character. Thanks to Oguz Ismail for spotting the issue. 681023317aSWarner Losh 691023317aSWarner LoshMar 10, 2024: 7017853db4SWarner Losh Fixed use-after-free bug in fnematch due to adjbuf invalidating 7117853db4SWarner Losh the pointers to buf. Thanks to github user caffe3 for spotting 721023317aSWarner Losh the issue and providing a fix, and to Miguel Pineiro Jr. 731023317aSWarner Losh for the alternative fix. 741023317aSWarner Losh MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max. 751023317aSWarner Losh thanks to Miguel Pineiro Jr. 761023317aSWarner Losh 77f32a6403SWarner LoshJan 22, 2024: 78f32a6403SWarner Losh Restore the ability to compile with g++. Thanks to 79b2376a5fSWarner Losh Arnold Robbins. 80f39dd6a9SWarner Losh 81f32a6403SWarner LoshDec 24, 2023: 82f32a6403SWarner Losh Matchop dereference after free problem fix when the first 83f32a6403SWarner Losh argument is a function call. Thanks to Oguz Ismail Uysal. 84f32a6403SWarner Losh Fix inconsistent handling of --csv and FS set in the 85f32a6403SWarner Losh command line. Thanks to Wilbert van der Poel. 86f32a6403SWarner Losh Casting changes to int for is* functions. 87f39dd6a9SWarner Losh 88f32a6403SWarner LoshNov 27, 2023: 89f32a6403SWarner Losh Fix exit status of system on MacOS. Update to REGRESS. 90b2376a5fSWarner Losh Thanks to Arnold Robbins. 91f32a6403SWarner Losh Fix inconsistent handling of -F and --csv, and loss of csv 92f32a6403SWarner Losh mode when FS is set. 93b2376a5fSWarner Losh 94f32a6403SWarner LoshNov 24, 2023: 95f32a6403SWarner Losh Fix issue #199: gototab improvements to dynamically resize the 96f32a6403SWarner Losh table, qsort and bsearch to improve the lookup speed as the 97f32a6403SWarner Losh table gets larger for multibyte input. Thanks to Arnold Robbins. 98b2376a5fSWarner Losh 99f32a6403SWarner LoshNov 23, 2023: 100f32a6403SWarner Losh Fix Issue #169, related to escape sequences in strings. 101f32a6403SWarner Losh Thanks to Github user rajeevvp. 102f32a6403SWarner Losh Fix Issue #147, reported by Github user drawkula, and fixed 103f32a6403SWarner Losh by Miguel Pineiro Jr. 104b2376a5fSWarner Losh 105f32a6403SWarner LoshNov 20, 2023: 106f32a6403SWarner Losh Rewrite of fnematch to fix a number of issues, including 107f32a6403SWarner Losh extraneous output, out-of-bounds access, number of bytes 108f32a6403SWarner Losh to push back after a failed match etc. 109f32a6403SWarner Losh Thanks to Miguel Pineiro Jr. 110b2376a5fSWarner Losh 111f32a6403SWarner LoshNov 15, 2023: 112f32a6403SWarner Losh Man page edit, regression test fixes. Thanks to Arnold Robbins 113f32a6403SWarner Losh Consolidation of sub and gsub into dosub, removing duplicate 114f32a6403SWarner Losh code. Thanks to Miguel Pineiro Jr. 115f32a6403SWarner Losh gcc replaced with cc everywhere. 116b2376a5fSWarner Losh 117f32a6403SWarner LoshOct 30, 2023: 118f32a6403SWarner Losh Multiple fixes and a minor code cleanup. 119f32a6403SWarner Losh Disabled utf-8 for non-multibyte locales, such as C or POSIX. 120f32a6403SWarner Losh Fixed a bad char * cast that causes incorrect results on big-endian 121f32a6403SWarner Losh systems. Also fixed an out-of-bounds read for empty CCL. 122f32a6403SWarner Losh Fixed a buffer overflow in substr with utf-8 strings. 123f32a6403SWarner Losh Many thanks to Todd C Miller. 124b2376a5fSWarner Losh 125f32a6403SWarner LoshSep 24, 2023: 126f32a6403SWarner Losh fnematch and getrune have been overhauled to solve issues around 127f32a6403SWarner Losh unicode FS and RS. Also fixed gsub null match issue with unicode. 128f32a6403SWarner Losh Big thanks to Arnold Robbins. 129b2376a5fSWarner Losh 130f32a6403SWarner LoshSep 12, 2023: 131f32a6403SWarner Losh Fixed a length error in u8_byte2char that set RSTART to 132f32a6403SWarner Losh incorrect (cannot happen) value for EOL match(str, /$/). 133b2376a5fSWarner Losh 134b2376a5fSWarner Losh 135f32a6403SWarner Losh----------------------------------------------------------------- 136b2376a5fSWarner Losh 137f32a6403SWarner Losh[This entry is a summary, not a precise list of changes.] 138b2376a5fSWarner Losh 139f32a6403SWarner Losh Added --csv option to enable processing of comma-separated 140f32a6403SWarner Losh values inputs. When --csv is enabled, fields are separated 141f32a6403SWarner Losh by commas, fields may be quoted with " double quotes, fields 142f32a6403SWarner Losh may contain embedded newlines. 143b2376a5fSWarner Losh 144f32a6403SWarner Losh If no explicit separator argument is provided, split() uses 145f32a6403SWarner Losh the setting of --csv to determine how fields are split. 146b2376a5fSWarner Losh 147f32a6403SWarner Losh Strings may now contain UTF-8 code points (not necessarily 148f32a6403SWarner Losh characters). Functions that operate on characters, like 149f32a6403SWarner Losh length, substr, index, match, etc., use UTF-8, so the length 150f32a6403SWarner Losh of a string of 3 emojis is 3, not 12 as it would be if bytes 151f32a6403SWarner Losh were counted. 152b2376a5fSWarner Losh 153f32a6403SWarner Losh Regular expressions are processed as UTF-8. 154b2376a5fSWarner Losh 155f32a6403SWarner Losh Unicode literals can be written as \u followed by one 156f32a6403SWarner Losh to eight hexadecimal digits. These may appear in strings and 157f32a6403SWarner Losh regular expressions. 158