Fixes from Christo Zoulas.

This commit is contained in:
Arnold D. Robbins 2020-02-28 13:47:42 +02:00
parent 92b775b3ec
commit 2017c2e6ea
2 changed files with 12 additions and 1 deletions

6
FIXES
View File

@ -25,6 +25,12 @@ THIS SOFTWARE.
This file lists all bug fixes, changes, etc., made since the AWK book This file lists all bug fixes, changes, etc., made since the AWK book
was sent to the printers in August, 1987. was sent to the printers in August, 1987.
February 28, 2020:
More cleanups from Christos Zoulas: notably backslash continuation
inside strings removes the newline and a fix for RS = "^a".
Fix for address sanitizer-found problem. Thanks to GitHub user
enh-google.
February 19, 2020: February 19, 2020:
More small cleanups from Christos Zoulas. More small cleanups from Christos Zoulas.

7
main.c
View File

@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE. THIS SOFTWARE.
****************************************************************/ ****************************************************************/
const char *version = "version 20200219"; const char *version = "version 20200228";
#define DEBUG #define DEBUG
#include <stdio.h> #include <stdio.h>
@ -214,6 +214,11 @@ int main(int argc, char *argv[])
if (!safe) if (!safe)
envinit(environ); envinit(environ);
yyparse(); yyparse();
#if 0
// Doing this would comply with POSIX, but is not compatible with
// other awks and with what most users expect. So comment it out.
setlocale(LC_NUMERIC, ""); /* back to whatever it is locally */
#endif
if (fs) if (fs)
*FS = qstring(fs, '\0'); *FS = qstring(fs, '\0');
dprintf( ("errorflag=%d\n", errorflag) ); dprintf( ("errorflag=%d\n", errorflag) );