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