12020-07-30         Arnold D. Robbins     <arnold@skeeve.com>
2
3          By fiat, we use bison for $(YACC). Trying to accommodate
4          different versions didn't work.
5
6          * makefile: Significant cleanup. Replace all ytab* references
7          with awkgram.tab.* and simplify definition of YACC.
8          * .gitignore: Remove ytab* references.
9          * b.c, lex.c, maketab.c, parse.c, run.c: Replace include of ytab.h
10          with awkgram.tab.h.
11          * lib.c, main.c, tran.c: Remove include of ytab.h, wasn't needed.
12
132020-01-20         Arnold D. Robbins     <arnold@skeeve.com>
14
15          * run.c (openfile): Set the close-on-exec flag for file
16          and pipe redirections that aren't stdin/stdout/stderr.
17
182020-01-06         Arnold D. Robbins     <arnold@skeeve.com>
19
20          Minor fixes.
21          * b.c (replace_repeat): Turn init_q back into an int.
22          * lex.c (string): Use \a instead of \007.
23          * tran.c (catstr): Use snprintf instead of sprintf.
24
252020-01-01         Arnold D. Robbins     <arnold@skeeve.com>
26
27          * tran.c (syminit, arginit, envinit): Free sval member before
28          setting it. Thanks to valgrind.
29          * b.c: Small formatting cleanups in several routines.
30
312019-12-27         Arnold D. Robbins     <arnold@skeeve.com>
32
33          * b.c (replace_repeat): Fix a bug whereby a{0,3} could match
34          four a's.  Thanks to Anonymous AWK fan <awkfan77@mailfence.com>
35          for the report. Also, minor code formatting cleanups.
36          * testdir/T.int-expr: New file.
37
382019-12-11         Arnold D. Robbins     <arnold@skeeve.com>
39
40          * README: Renamed to ...
41          * README.md: ... this. Cleaned up some as well,
42          including moving to Markdown.
43
442019-11-08         Arnold D. Robbins     <arnold@skeeve.com>
45
46          * test/T.chem: Use $oldawk instead of hardwiring 'awk'.
47          * test/T.lilly: Remove gawk warnings from output, improves
48          portability.
49
502019-10-17         Arnold D. Robbins     <arnold@skeeve.com>
51
52          Pull in systime() and strftime() from the NetBSD awk.
53
54          * awk.1: Document the functions.
55          * run.c (bltin): Implement the functions.
56          * awk.h: Add defines for systime and strftime.
57          * lex.c: Add support for systime and strftime.
58
592019-10-07         Arnold D. Robbins     <arnold@skeeve.com>
60
61          Integrate features from different *BSD versions of awk.
62          Gensub support from NetBSD. Bitwise functions from OpenBSD.
63
64          * awk.h: Add defines for and, or, xor, compl, lshift and rshift.
65          * awkgram.y: Add support for gensub.
66          * maketab.c: Ditto.
67          * lex.c: Add support for gensub and bitwise functions.
68          * parse.c (node5, op5): New functions.
69          * proto.h (node5, op5): New declarations.
70          * run.c (bltin): Implement the bitwise functions.
71          (gensub): New function.
72          * awk.1: Document additional functions.
73
742019-10-07         Arnold D. Robbins     <arnold@skeeve.com>
75
76          * b.c (fnematch): Change type of pbuf from unsigned char to char.
77          * proto.h (fnematch): Ditto.
78
792019-10-06         Arnold D. Robbins     <arnold@skeeve.com>
80
81          * lib.c (readrec): Allow RS a regular expression. Imported
82          the code from the NetBSD awk.
83          * b.c (fnematch): New function for implementing the feature.
84          * awk.1: Updated.
85          * main.c (version): Updated.
86
872019-06-24         Arnold D. Robbins     <arnold@skeeve.com>
88
89          * makefile: Revise to take into account there is no more awktest.tar,
90          add targets 'check' and 'test', and also 'testclean' to clean up
91          after test run.  Have 'clean' and 'cleaner' depend upon 'testclean'.
92
932019-06-23         Arnold D. Robbins     <arnold@skeeve.com>
94
95          * testdir: Extracted from awktest.tar and added to Git.
96          * awktest.tar: Removed.
97
982019-06-06         Arnold D. Robbins     <arnold@skeeve.com>
99
100          * awk.1: Fix a typo, minor edits.
101
1022019-06-05         Arnold D. Robbins     <arnold@skeeve.com>
103
104          * b.c (relex): Count parentheses and treat umatched right paren
105          as a literal character.
106          * awktest.tar (testdir/T.re): Added a test case.
107          * main.c (version): Updated.
108
1092019-05-29         Arnold D. Robbins     <arnold@skeeve.com>
110
111          * lib.c (isclvar): Remove check for additional '=' after
112          first one. No longer needed.
113
1142019-01-26         Arnold D. Robbins     <arnold@skeeve.com>
115
116          * main.c (version): Updated.
117
1182019-01-25         Arnold D. Robbins     <arnold@skeeve.com>
119
120          * run.c (awkgetline): Check for numeric value in all getline
121          variants. See the numeric-getline.* files in bugs-fixed directory.
122
1232018-08-29         Arnold D. Robbins     <arnold@skeeve.com>
124
125          * REGRESS: Check for existence of a.out. If not there, run
126          make.  Enable core dumps for T.arnold system status test
127          to work on MacOS X.
128
1292018-08-22         Arnold D. Robbins     <arnold@skeeve.com>
130
131          * awktest.tar (testdir/T.expr): Fix test for unary plus.
132
1332018-08-22         Arnold D. Robbins     <arnold@skeeve.com>
134
135          * REGRESS: Extract tests if necessary, set PATH to include '.'.
136          * regdir/beebe.tar (Makefile): Fix longwrds test to prefix
137          sort with LC_ALL=C.
138          * awktest.tar: Updated from fixed test suite, directory
139          it extracts is now called 'testdir' to match what's in top-level
140          REGRESS script.
141          * regdir: Removed, as Brian wants to keep the test suite in
142          the tar file.
143
1442018-08-22         Arnold D. Robbins     <arnold@skeeve.com>
145
146          * FIXES, lib.c, run.c, makefile, main.c: Merge from Brian's tree.
147          * REGRESS: New file, from Brian.
148          * awktest.tar: Restored from Brian's tree.
149
1502018-08-22         Arnold D. Robbins     <arnold@skeeve.com>
151
152          * awkgram.y (UPLUS): New token. In the grammar, call op1()
153          with it.
154          * maketab.c (proc): Add entry for UPLUS.
155          * run.c (arith): Handle UPLUS.
156          * main.c (version): Updated.
157          * bugs-fixed/unary-plus.awk, bugs-fixed/unary-plus.bad,
158          bugs-fixed/unary-plus.ok: New files.
159
1602018-08-10         Arnold D. Robbins     <arnold@skeeve.com>
161
162          * TODO: Updated.
163          * awk.1: Improve use of macros, add some additional explanation
164          in a few places, alphabetize list of variables.
165
1662018-08-08         Arnold D. Robbins     <arnold@skeeve.com>
167
168          * awk.h (Cell): Add new field `fmt' to track xFMT value used
169          for a string conversion.
170          [CONVC, CONVO]: New flag macros.
171          * bugs-fixed/README: Updated.
172          * bugs-fixed/string-conv.awk, bugs-fixed/string-conv.bad,
173          bugs-fixed/string-conv.ok: New files.
174          * main.c (version): Updated.
175          * proto.h (flags2str): Add declaration.
176          * tran.c (setfval): Clear CONVC and CONVO flags and set vp->fmt
177          to NULL.
178          (setsval): Ditto. Add large comment and new code to manage
179          correct conversion of number to string based on various flags
180          and the value of vp->fmt. The idea is to not convert again
181          if xFMT is the same as before and we're doing the same conversion.
182          Otherwise, clear the old flags, set the new, and reconvert.
183          (flags2str): New function. For debug prints and for use from a debugger.
184
1852018-08-05         Arnold D. Robbins     <arnold@skeeve.com>
186
187          Fix filename conflicts in regdir where the only difference was
188          in letter case. This caused problems on Windows systems.
189
190          * regdir/Compare.T1: Renamed from regdir/Compare.T.
191          * regdir/t.delete0: Renamed from regdir/t.delete.
192          * regdir/t.getline1: Renamed from regdir/t.getline.
193          * regdir/t.redir1: Renamed from regdir/t.redir.
194          * regdir/t.split1: Renamed from regdir/t.split.
195          * regdir/t.sub0: Renamed from regdir/t.sub.
196          * regdir/REGRESS: Adjusted.
197
1982018-08-04         Arnold D. Robbins     <arnold@skeeve.com>
199
200          With scalpel, tweasers, magnifying glass and bated breath,
201          borrow code from the NetBSD version of nawk to fix the years-old
202          bug whereby decrementing the value of NF did not change the
203          record.
204
205          * lib.c (fldbld): Set donerec to 1 when done.
206          (setlastfld): New function.
207          * proto.h (setlastfld): Add declaration.
208          * run.c (copycell): Make code smarter about flags (from NetBSD code).
209          * tran.c (setfree): New function.
210          * tran.c (setfval): Normalize negative zero to positive zero.
211          If setting NF, clear donerec and call setlastfld().
212          (setsval): Remove call to save_old_OFS().  If setting OFS, call
213          recbld(). If setting NF, clear donerec and call setlastfld().
214
215          As part of the process, revert OFS-related changes of 2018-05-22:
216
217          * awk.h (saveOFS, saveOFSlen, save_old_OFS): Remove declarations.
218          * lib.c (recbld): Use *OFS instead of saveOFS.
219          * run.c (saveOFS, saveOFSlen, save_old_OFS): Remove.
220          * tran.c (syminit): Remove initialization of saveOFS and saveOFSlen.
221
222          General stuff that goes along with all this:
223
224          * bugs-fixed/README: Updated.
225          * bugs-fixed/decr-NF.awk, bugs-fixed/decr-NF.bad,
226          bugs-fixed/decr-NF.ok: New files.
227          * main.c (version): Updated.
228          * regdir/README.TESTS: Fix awk book title.
229          * regdir/T.misc: Revise test to match fixed code.
230          * run.c (format): Increase size of buffer used for %a test. (Unrelated
231          to NF or OFS, but fixes a compiler complaint.)
232
2332018-06-07         Arnold D. Robbins     <arnold@skeeve.com>
234
235          * regdir/beebe.tar: Fix longwrds.ok so that the test will pass.
236          The file was incorrectly sorted.
237
2382018-06-06         Arnold D. Robbins     <arnold@skeeve.com>
239
240          * regdir/T.lilly: Fix the bug again in the second instance
241          of the code. Thanks to BWK for pointing this out.
242
2432018-05-31         Arnold D. Robbins     <arnold@skeeve.com>
244
245          * regdir/T.lilly: Fix a syntax error and ordering bug
246          in creating the 'foo' file.
247
2482018-05-23         Arnold D. Robbins     <arnold@skeeve.com>
249
250          * awk.1: Remove standalone 'awk' at the top of file, it messed up
251          the formatting. Arrange built-in variable list in alphabetical
252          order.
253
2542018-05-23         Arnold D. Robbins     <arnold@skeeve.com>
255
256          * main.c (version): Add my email address and a date so that
257          users can tell this isn't straight BWK awk.
258          * README.md: Minor updates.
259          * TODO: Updated.
260
2612018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
262
263          Add POSIX-required formats %a and %A.
264
265          * run.c (format): Check for %a support in C library. If there,
266          allow %a and %A as valid formats.
267          * TODO: Updated.
268          * bugs-fixed/README: Updated.
269          * bugs-fixed/a-format.awk, bugs-fixed/a-format.bad,
270          bugs-fixed/a-format.ok: New files.
271
2722018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
273
274          * FIXES: Restored a line from a much earlier version that
275          apparently got lost when the dates were reordered.
276          * TODO: Updated.
277
2782018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
279
280          * README.md: New file.
281
2822018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
283
284          * regdir/echo.c, regdir/time.c: Minor fixes to compile without
285          warning on current GCC / Linux.
286
2872018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
288
289          * TODO: New file.
290
2912018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
292
293          * makefile (gitadd, gitpush): Remove these targets. They
294          should not be automated and were incorrect for things that
295          would be done regularly.
296
2972018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
298
299          Fix nawk so that [[:blank:]] only matches space and tab instead
300          of any whitespace character, originally made May 10, 2018.
301          See bugs-fixed/space.awk.
302
303          This appears to have been a thinko on Brian's part.
304
305          * b.c (charclasses): Use xisblank() function for [[:blank:]].
306          * bugs-fixed/README: Updated.
307          * bugs-fixed/space.awk, bugs-fixed/space.bad,
308          bugs-fixed/space.ok: New files.
309
3102018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
311
312          * .gitignore: New file.
313
3142018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
315
316          Fix nawk to provide reasonable exit status for system(),
317          a la gawk, originally made March 12, 2016. See
318          bugs-fixed/system-status.awk.
319
320          * run.c (bltin): For FSYSTEM, use the macros defined for wait(2)
321          to produce a reasonable exit value, instead of doing a floating-point
322          division by 256.
323          * awk.1: Document the return status values.
324          * bugs-fixed/README: Updated.
325          * bugs-fixed/system-status.awk, bugs-fixed/system-status.bad,
326          bugs-fixed/system-status.ok: New files.
327
3282018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
329
330          Bug fix with respect to rebuilding a record, originally
331          made August 19, 2014. See bugs-fixed/ofs-rebuild.awk.
332
333          * awk.h (saveOFS, saveOFSlen): Declare new variables.
334          * lib.c (recbld): Use them when rebuilding the record.
335          * run.c (saveOFS, saveOFSlen): Define new variables.
336          (save_old_OFS): New function to save OFS aside.
337          * tran.c (syminit): Initialize saveOFS and saveOFSlen.
338          (setsval): If setting a field, call save_old_OFS().
339          * bugs-fixed/README, bugs-fixed/ofs-rebuild.awk,
340          bugs-fixed/ofs-rebuild.bad, bugs-fixed/ofs-rebuild.ok: New files.
341
3422018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
343
344          * makefile (YACC): Use bison.
345
3462018-05-22         Arnold D. Robbins     <arnold@skeeve.com>
347
348          * ChangeLog: Created.
349          * regdir: Created. Based on contents of awktest.a.
350          * .gitattributes: Created, to preserve CR LF in regdir/t.crlf.
351          * awktest.a: Removed.
352          * regdir/T.gawk, regdir/T.latin1: Updated from awktest.tar.
353          * awktest.tar: Removed.
354