summaryrefslogtreecommitdiffstats
path: root/usr.bin/awk (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use a journal reference instead of cstr when possiblejsg2021-03-081-5/+8
|
* Add some references, most of these were removed when we stopped buildingjsg2021-03-081-2/+13
| | | | | | and installing USD/SMM/PSD docs. jmc@ agrees with the direction, ok millert@ on an earlier diff
* Fix size computation in replace_repeat() for special_case REPEAT_WITH_Q.millert2021-03-021-7/+4
| | | | | | | | This resulted in the NUL terminator being written to the end of the buffer which was not the same as the end of the string. That in turn caused garbage bytes from malloc() to be processed. Also change the NUL termination to be less error prone by writing the NUL immediately after the last byte copied. OK sthen@
* Fix typo in mktime() year format description. From Paul de Weerd.millert2020-12-211-3/+3
|
* Update awk to December 18, 2020 version.millert2020-12-184-30/+49
| | | | Includes the official fix for +-inf and +-nan handling.
* Fix some breakage in handling +-inf and +-nan introduced in last version.millert2020-12-171-15/+23
|
* Update awk to December 8, 2020 version.millert2020-12-0911-109/+272
| | | | | | Prevents strings beginning with "inf" or "nan" from being interpreted as infinity or not-a-number respectively which still parsing "inf" and "nan" (with or without a leading sign) correctly.
* double word fixes;jmc2020-11-051-3/+3
|
* Implement mktime() function for compatibility with mawk and gawk.millert2020-08-284-6/+66
| | | | | This is the only missing time function compared to those two implementations. Doc changes OK jmc@
* Update awk to August 7, 2020 version.millert2020-08-114-15/+31
|
* Don't print extra newlines on error before awk starts parsing.millert2020-07-301-6/+5
| | | | | | | If awk prints an error message while when compile_time is still set to ERROR_PRINTING, don't try to print the context since there is none. This can happen due to a problem with, e.g., unknown command line options.
* Update awk to July 30, 2020 version.millert2020-07-3010-29/+33
|
* Improved handling of an unescaped '/' in a bracket expression.millert2020-07-301-2/+4
|
* Regular expression support in RS is an extension.millert2020-07-241-2/+4
|
* If closefile() is called on std{in,out,err}, freopen() /dev/null instead.millert2020-07-201-2/+6
| | | | | Otherwise, awk will continue trying to perform I/O on a closed stdio stream. This appears to be consistent with how gawk behaves. OK tim@
* In closeall(), skip stdin and flush std{err,out} instead of closing.millert2020-07-201-1/+5
| | | | | | Otherwise awk could fclose(stdin) twice (it may appear more than once) and closing stderr means awk cannot report errors closing other streams. OK tim@
* Cast to uschar when storing a char in an int that will be used as an index.millert2020-07-132-4/+4
| | | | | Fixed as crash reported by Jan Stary when the input char has the high bit set and FS is a regex.
* Update awk to July 2, 2020 version.millert2020-07-024-16/+34
|
* Fix regression with changed SUBSEP in subscript in version 20191024.millert2020-07-011-3/+3
| | | | | The length of SUBSEP needs to be rechecked after calling execute(), in case SUBSEP itself has been changed. From tim@
* Fix concatenation regression introduced in version 20201024.millert2020-07-011-4/+4
| | | | | | | Concatenation evaluated both sides of the expression before doing its work, which, since assign() evaluates to the cell being assigned to, meant that expressions like "print (a = 1) (a = 2)" would print "22" rather than "12". From Tim van der Molen
* Improve description of field splitting and document FS special cases.millert2020-06-271-17/+20
| | | | OK jmc@ kn@
* Document that FS is applied at the time the input line is read.millert2020-06-261-2/+12
| | | | | | | Previously, our awk suffered from a bug where FS was applied too late. This fix has the potential to cause problems for awk scripts written to the old (buggy) behavior. The current behavior is consistent with other awk implementations such as mawk and gawk.
* Update awk to June 25, 2020 version.millert2020-06-268-63/+72
|
* Update awk to June 12, 2020 version.millert2020-06-263-5/+18
|
* When parsing a character class don't increment openclass for a literal '['.millert2020-06-231-3/+5
| | | | | This allows expressions like '/[[/[]/' to parse which are also allowed by gawk.
* Document that rand() returns non-deterministic random numbers unless atim2020-06-171-3/+12
| | | | | | seed is explicitly set. OK millert@
* Fix strlcpy() size parameter in refldbld(), it was a byte too small.millert2020-06-162-17/+21
| | | | | While here, add proper bounds checking for the partial match case in refldbld() too and check strlcpy() return values throughout.
* Integrate the bsd-features branch from awk github.millert2020-06-138-14/+339
| | | | | Implements the gensub(), systime() and strftime() functions for greater gawk compatibility.
* POSIX doesn't permit an unescaped '/' in an extended regular expression.millert2020-06-135-21/+35
| | | | | | | | Unlike upstream awk, ours has historically allowed unescaped '/' inside a bracket expression for compatibility with other awk implementations but the check was too simple-minded. This improves the matching to allow things like /[]/]/, /[^]// and '/[abc[:digit:]/@#]/' To enable strict POSIX compliance, set POSIXLY_CORRECT.
* Use setlocale(LC_CTYPE, "") instead of setlocale(LC_ALL, "")millert2020-06-111-2/+2
| | | | This matches upstream awk and OpenBSD only implements LC_CTYPE anyway.
* Fix length parameter to strlcpy, inputFS is a pointer.millert2020-06-111-2/+2
|
* Update awk to June 5, 2020 version.millert2020-06-105-11/+35
|
* Update awk to Feb 28, 2020 version.millert2020-06-109-253/+422
|
* Update awk to Jan 31, 2020 version.millert2020-06-1011-54/+120
|
* Update awk to Jan 5, 2020 version.millert2020-06-108-132/+175
|
* Update awk to Nov 10, 2019 version.millert2020-06-1010-104/+130
|
* Update awk to Oct 24, 2019 version.millert2020-06-1011-197/+204
|
* Update awk to Oct 17, 2019 version.millert2020-06-105-110/+125
|
* Update awk to Oct 6, 2019 version.millert2020-06-106-33/+143
|
* Update awk to Sep 10, 2019 version.millert2020-06-1013-129/+196
|
* Update awk to Jun 17, 2019 version.millert2020-06-106-10/+52
|
* Update awk to March 5, 2019 version.millert2020-06-106-19/+277
|
* Update awk to Jan 25, 2019 version.millert2020-06-108-56/+113
|
* Update awk to Oct 25, 2018 version.millert2020-06-103-4/+11
| | | | | Add test in maketab.c to prevent generating a proctab entry for YYSTYPE_IS_DEFINED.
* Update awk to Aug 27, 2018 version.millert2020-06-104-13/+19
| | | | | Disallow '$' in printf formats Added some casts to silence warnings on debugging printfs.
* Update awk to Aug 23, 2018 version.millert2020-06-1011-44/+293
|
* Update awk to Jan 5, 2013 version, no real code changes.millert2020-06-103-14/+31
|
* The errcheck() function treats an errno of ERANGE or EDOM as somethingguenther2020-06-081-3/+11
| | | | | | | | | | | | to report, so make sure errno is set to zero before invoking a function to check so that a previous such errno value won't result in a false positive. This could happen simply due to input line fields that looked enough like floating-point input to trigger ERANGE. Problem noted by Jordan Geoghegan (jordan (at) geoghegan.ca), with clue from Ze' Loff (zeloff (at) zeloff.org) ok millert@
* Merge a missing fix from awk-12202012 and update the version and FIXES.millert2020-02-274-7/+25
| | | | This was the last awk release before the move to github.
* claudio noticed that "exit" inside the main {} clause still runs the EXITderaadt2020-01-221-7/+10
| | | | | | clause, this was poorly documented as "immediately", and "after the last line" which is inaccurate there are other causes. Explain this a bit better. ok millert claudio