xref: /freebsd/contrib/one-true-awk/FIXES (revision 1023317ac491090f8d84a62999ffc303cf88528c)
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*1023317aSWarner LoshApr 22, 2024:
29*1023317aSWarner Losh	fixed regex engine gototab reallocation issue that was
30*1023317aSWarner Losh	introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
31*1023317aSWarner Losh	Fixed a scan bug in split in the case the separator is a single
32*1023317aSWarner Losh	character. thanks to Oguz Ismail for spotting the issue.
33*1023317aSWarner Losh
34*1023317aSWarner LoshMar 10, 2024:
35*1023317aSWarner Losh	fixed use-after-free bug in fnematch due to adjbuf invalidating
36*1023317aSWarner Losh	the pointers to buf. thanks to github user caffe3 for spotting
37*1023317aSWarner Losh	the issue and providing a fix, and to Miguel Pineiro Jr.
38*1023317aSWarner Losh	for the alternative fix.
39*1023317aSWarner Losh	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
40*1023317aSWarner Losh	thanks to Miguel Pineiro Jr.
41*1023317aSWarner Losh
42f32a6403SWarner LoshJan 22, 2024:
43f32a6403SWarner Losh	Restore the ability to compile with g++. Thanks to
44b2376a5fSWarner Losh	Arnold Robbins.
45f39dd6a9SWarner Losh
46f32a6403SWarner LoshDec 24, 2023:
47f32a6403SWarner Losh	Matchop dereference after free problem fix when the first
48f32a6403SWarner Losh	argument is a function call. Thanks to Oguz Ismail Uysal.
49f32a6403SWarner Losh	Fix inconsistent handling of --csv and FS set in the
50f32a6403SWarner Losh	command line. Thanks to Wilbert van der Poel.
51f32a6403SWarner Losh	Casting changes to int for is* functions.
52f39dd6a9SWarner Losh
53f32a6403SWarner LoshNov 27, 2023:
54f32a6403SWarner Losh	Fix exit status of system on MacOS. Update to REGRESS.
55b2376a5fSWarner Losh	Thanks to Arnold Robbins.
56f32a6403SWarner Losh	Fix inconsistent handling of -F and --csv, and loss of csv
57f32a6403SWarner Losh	mode when FS is set.
58b2376a5fSWarner Losh
59f32a6403SWarner LoshNov 24, 2023:
60f32a6403SWarner Losh        Fix issue #199: gototab improvements to dynamically resize the
61f32a6403SWarner Losh        table, qsort and bsearch to improve the lookup speed as the
62f32a6403SWarner Losh        table gets larger for multibyte input. Thanks to Arnold Robbins.
63b2376a5fSWarner Losh
64f32a6403SWarner LoshNov 23, 2023:
65f32a6403SWarner Losh	Fix Issue #169, related to escape sequences in strings.
66f32a6403SWarner Losh	Thanks to Github user rajeevvp.
67f32a6403SWarner Losh	Fix Issue #147, reported by Github user drawkula, and fixed
68f32a6403SWarner Losh	by Miguel Pineiro Jr.
69b2376a5fSWarner Losh
70f32a6403SWarner LoshNov 20, 2023:
71f32a6403SWarner Losh	Rewrite of fnematch to fix a number of issues, including
72f32a6403SWarner Losh	extraneous output, out-of-bounds access, number of bytes
73f32a6403SWarner Losh	to push back after a failed match etc.
74f32a6403SWarner Losh	Thanks to Miguel Pineiro Jr.
75b2376a5fSWarner Losh
76f32a6403SWarner LoshNov 15, 2023:
77f32a6403SWarner Losh	Man page edit, regression test fixes. Thanks to Arnold Robbins
78f32a6403SWarner Losh	Consolidation of sub and gsub into dosub, removing duplicate
79f32a6403SWarner Losh	code. Thanks to Miguel Pineiro Jr.
80f32a6403SWarner Losh	gcc replaced with cc everywhere.
81b2376a5fSWarner Losh
82f32a6403SWarner LoshOct 30, 2023:
83f32a6403SWarner Losh	Multiple fixes and a minor code cleanup.
84f32a6403SWarner Losh	Disabled utf-8 for non-multibyte locales, such as C or POSIX.
85f32a6403SWarner Losh	Fixed a bad char * cast that causes incorrect results on big-endian
86f32a6403SWarner Losh	systems. Also fixed an out-of-bounds read for empty CCL.
87f32a6403SWarner Losh	Fixed a buffer overflow in substr with utf-8 strings.
88f32a6403SWarner Losh	Many thanks to Todd C Miller.
89b2376a5fSWarner Losh
90f32a6403SWarner LoshSep 24, 2023:
91f32a6403SWarner Losh	fnematch and getrune have been overhauled to solve issues around
92f32a6403SWarner Losh	unicode FS and RS. Also fixed gsub null match issue with unicode.
93f32a6403SWarner Losh	Big thanks to Arnold Robbins.
94b2376a5fSWarner Losh
95f32a6403SWarner LoshSep 12, 2023:
96f32a6403SWarner Losh	Fixed a length error in u8_byte2char that set RSTART to
97f32a6403SWarner Losh	incorrect (cannot happen) value for EOL match(str, /$/).
98b2376a5fSWarner Losh
99b2376a5fSWarner Losh
100f32a6403SWarner Losh-----------------------------------------------------------------
101b2376a5fSWarner Losh
102f32a6403SWarner Losh[This entry is a summary, not a precise list of changes.]
103b2376a5fSWarner Losh
104f32a6403SWarner Losh	Added --csv option to enable processing of comma-separated
105f32a6403SWarner Losh	values inputs.  When --csv is enabled, fields are separated
106f32a6403SWarner Losh	by commas, fields may be quoted with " double quotes, fields
107f32a6403SWarner Losh	may contain embedded newlines.
108b2376a5fSWarner Losh
109f32a6403SWarner Losh	If no explicit separator argument is provided, split() uses
110f32a6403SWarner Losh	the setting of --csv to determine how fields are split.
111b2376a5fSWarner Losh
112f32a6403SWarner Losh	Strings may now contain UTF-8 code points (not necessarily
113f32a6403SWarner Losh	characters).  Functions that operate on characters, like
114f32a6403SWarner Losh	length, substr, index, match, etc., use UTF-8, so the length
115f32a6403SWarner Losh	of a string of 3 emojis is 3, not 12 as it would be if bytes
116f32a6403SWarner Losh	were counted.
117b2376a5fSWarner Losh
118f32a6403SWarner Losh	Regular expressions are processed as UTF-8.
119b2376a5fSWarner Losh
120f32a6403SWarner Losh	Unicode literals can be written as \u followed by one
121f32a6403SWarner Losh	to eight hexadecimal digits.  These may appear in strings and
122f32a6403SWarner Losh	regular expressions.
123