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