xref: /aosp_15_r20/external/one-true-awk/FIXES (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott Hughes/****************************************************************
2*9a7741deSElliott HughesCopyright (C) Lucent Technologies 1997
3*9a7741deSElliott HughesAll Rights Reserved
4*9a7741deSElliott Hughes
5*9a7741deSElliott HughesPermission to use, copy, modify, and distribute this software and
6*9a7741deSElliott Hughesits documentation for any purpose and without fee is hereby
7*9a7741deSElliott Hughesgranted, provided that the above copyright notice appear in all
8*9a7741deSElliott Hughescopies and that both that the copyright notice and this
9*9a7741deSElliott Hughespermission notice and warranty disclaimer appear in supporting
10*9a7741deSElliott Hughesdocumentation, and that the name Lucent Technologies or any of
11*9a7741deSElliott Hughesits entities not be used in advertising or publicity pertaining
12*9a7741deSElliott Hughesto distribution of the software without specific, written prior
13*9a7741deSElliott Hughespermission.
14*9a7741deSElliott Hughes
15*9a7741deSElliott HughesLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16*9a7741deSElliott HughesINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17*9a7741deSElliott HughesIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18*9a7741deSElliott HughesSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19*9a7741deSElliott HughesWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20*9a7741deSElliott HughesIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21*9a7741deSElliott HughesARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22*9a7741deSElliott HughesTHIS SOFTWARE.
23*9a7741deSElliott Hughes****************************************************************/
24*9a7741deSElliott Hughes
25*9a7741deSElliott HughesThis file lists all bug fixes, changes, etc., made since the
26*9a7741deSElliott Hughessecond edition of the AWK book was published in September 2023.
27*9a7741deSElliott Hughes
28*9a7741deSElliott HughesJul 28, 2024
29*9a7741deSElliott Hughes	Fixed readcsvrec resize segfault when reading csv records longer
30*9a7741deSElliott Hughes	than 8k. Thanks to Ozan Yigit.
31*9a7741deSElliott Hughes	mktime() added to bsd-features branch. Thanks to Todd Miller.
32*9a7741deSElliott Hughes
33*9a7741deSElliott HughesJun 23, 2024
34*9a7741deSElliott Hughes	Fix signal for system-status test. Thanks to Tim van der Molen.
35*9a7741deSElliott Hughes	Rewrite if-else chain as switch. Thanks to Andrew Sukach.
36*9a7741deSElliott Hughes
37*9a7741deSElliott HughesMay 27, 2024
38*9a7741deSElliott Hughes	Spelling fixes and removal of unneeded prototypes and extern.
39*9a7741deSElliott Hughes	Thanks to Jonathan Gray.
40*9a7741deSElliott Hughes
41*9a7741deSElliott HughesMay 4, 2024
42*9a7741deSElliott Hughes	Fixed a use-after-free bug with ARGV for "delete ARGV".
43*9a7741deSElliott Hughes	Also ENVtab is no longer global. Thanks to Benjamin Sturz
44*9a7741deSElliott Hughes	for spotting the ARGV issue and	Todd Miller for the fix.
45*9a7741deSElliott Hughes
46*9a7741deSElliott HughesMay 3, 2024:
47*9a7741deSElliott Hughes	Remove warnings when compiling with g++. Thanks to Arnold Robbins.
48*9a7741deSElliott Hughes
49*9a7741deSElliott HughesApr 22, 2024:
50*9a7741deSElliott Hughes	Fixed regex engine gototab reallocation issue that was
51*9a7741deSElliott Hughes	Introduced during the Nov 24 rewrite. Thanks to Arnold Robbins.
52*9a7741deSElliott Hughes	Fixed a scan bug in split in the case the separator is a single
53*9a7741deSElliott Hughes	character. Thanks to Oguz Ismail for spotting the issue.
54*9a7741deSElliott Hughes
55*9a7741deSElliott HughesMar 10, 2024:
56*9a7741deSElliott Hughes	Fixed use-after-free bug in fnematch due to adjbuf invalidating
57*9a7741deSElliott Hughes	the pointers to buf. Thanks to github user caffe3 for spotting
58*9a7741deSElliott Hughes	the issue and providing a fix, and to Miguel Pineiro Jr.
59*9a7741deSElliott Hughes	for the alternative fix.
60*9a7741deSElliott Hughes	MAX_UTF_BYTES in fnematch has been replaced with awk_mb_cur_max.
61*9a7741deSElliott Hughes	thanks to Miguel Pineiro Jr.
62*9a7741deSElliott Hughes
63*9a7741deSElliott HughesJan 22, 2024:
64*9a7741deSElliott Hughes	Restore the ability to compile with g++. Thanks to
65*9a7741deSElliott Hughes	Arnold Robbins.
66*9a7741deSElliott Hughes
67*9a7741deSElliott HughesDec 24, 2023:
68*9a7741deSElliott Hughes	Matchop dereference after free problem fix when the first
69*9a7741deSElliott Hughes	argument is a function call. Thanks to Oguz Ismail Uysal.
70*9a7741deSElliott Hughes	Fix inconsistent handling of --csv and FS set in the
71*9a7741deSElliott Hughes	command line. Thanks to Wilbert van der Poel.
72*9a7741deSElliott Hughes	Casting changes to int for is* functions.
73*9a7741deSElliott Hughes
74*9a7741deSElliott HughesNov 27, 2023:
75*9a7741deSElliott Hughes	Fix exit status of system on MacOS. Update to REGRESS.
76*9a7741deSElliott Hughes	Thanks to Arnold Robbins.
77*9a7741deSElliott Hughes	Fix inconsistent handling of -F and --csv, and loss of csv
78*9a7741deSElliott Hughes	mode when FS is set.
79*9a7741deSElliott Hughes
80*9a7741deSElliott HughesNov 24, 2023:
81*9a7741deSElliott Hughes        Fix issue #199: gototab improvements to dynamically resize the
82*9a7741deSElliott Hughes        table, qsort and bsearch to improve the lookup speed as the
83*9a7741deSElliott Hughes        table gets larger for multibyte input. Thanks to Arnold Robbins.
84*9a7741deSElliott Hughes
85*9a7741deSElliott HughesNov 23, 2023:
86*9a7741deSElliott Hughes	Fix Issue #169, related to escape sequences in strings.
87*9a7741deSElliott Hughes	Thanks to Github user rajeevvp.
88*9a7741deSElliott Hughes	Fix Issue #147, reported by Github user drawkula, and fixed
89*9a7741deSElliott Hughes	by Miguel Pineiro Jr.
90*9a7741deSElliott Hughes
91*9a7741deSElliott HughesNov 20, 2023:
92*9a7741deSElliott Hughes	Rewrite of fnematch to fix a number of issues, including
93*9a7741deSElliott Hughes	extraneous output, out-of-bounds access, number of bytes
94*9a7741deSElliott Hughes	to push back after a failed match etc.
95*9a7741deSElliott Hughes	Thanks to Miguel Pineiro Jr.
96*9a7741deSElliott Hughes
97*9a7741deSElliott HughesNov 15, 2023:
98*9a7741deSElliott Hughes	Man page edit, regression test fixes. Thanks to Arnold Robbins
99*9a7741deSElliott Hughes	Consolidation of sub and gsub into dosub, removing duplicate
100*9a7741deSElliott Hughes	code. Thanks to Miguel Pineiro Jr.
101*9a7741deSElliott Hughes	gcc replaced with cc everywhere.
102*9a7741deSElliott Hughes
103*9a7741deSElliott HughesOct 30, 2023:
104*9a7741deSElliott Hughes	Multiple fixes and a minor code cleanup.
105*9a7741deSElliott Hughes	Disabled utf-8 for non-multibyte locales, such as C or POSIX.
106*9a7741deSElliott Hughes	Fixed a bad char * cast that causes incorrect results on big-endian
107*9a7741deSElliott Hughes	systems. Also fixed an out-of-bounds read for empty CCL.
108*9a7741deSElliott Hughes	Fixed a buffer overflow in substr with utf-8 strings.
109*9a7741deSElliott Hughes	Many thanks to Todd C Miller.
110*9a7741deSElliott Hughes
111*9a7741deSElliott HughesSep 24, 2023:
112*9a7741deSElliott Hughes	fnematch and getrune have been overhauled to solve issues around
113*9a7741deSElliott Hughes	unicode FS and RS. Also fixed gsub null match issue with unicode.
114*9a7741deSElliott Hughes	Big thanks to Arnold Robbins.
115*9a7741deSElliott Hughes
116*9a7741deSElliott HughesSep 12, 2023:
117*9a7741deSElliott Hughes	Fixed a length error in u8_byte2char that set RSTART to
118*9a7741deSElliott Hughes	incorrect (cannot happen) value for EOL match(str, /$/).
119*9a7741deSElliott Hughes
120*9a7741deSElliott Hughes
121*9a7741deSElliott Hughes-----------------------------------------------------------------
122*9a7741deSElliott Hughes
123*9a7741deSElliott Hughes[This entry is a summary, not a precise list of changes.]
124*9a7741deSElliott Hughes
125*9a7741deSElliott Hughes	Added --csv option to enable processing of comma-separated
126*9a7741deSElliott Hughes	values inputs.  When --csv is enabled, fields are separated
127*9a7741deSElliott Hughes	by commas, fields may be quoted with " double quotes, fields
128*9a7741deSElliott Hughes	may contain embedded newlines.
129*9a7741deSElliott Hughes
130*9a7741deSElliott Hughes	If no explicit separator argument is provided, split() uses
131*9a7741deSElliott Hughes	the setting of --csv to determine how fields are split.
132*9a7741deSElliott Hughes
133*9a7741deSElliott Hughes	Strings may now contain UTF-8 code points (not necessarily
134*9a7741deSElliott Hughes	characters).  Functions that operate on characters, like
135*9a7741deSElliott Hughes	length, substr, index, match, etc., use UTF-8, so the length
136*9a7741deSElliott Hughes	of a string of 3 emojis is 3, not 12 as it would be if bytes
137*9a7741deSElliott Hughes	were counted.
138*9a7741deSElliott Hughes
139*9a7741deSElliott Hughes	Regular expressions are processed as UTF-8.
140*9a7741deSElliott Hughes
141*9a7741deSElliott Hughes	Unicode literals can be written as \u followed by one
142*9a7741deSElliott Hughes	to eight hexadecimal digits.  These may appear in strings and
143*9a7741deSElliott Hughes	regular expressions.
144