2022-09-04         Arnold D. Robbins     <arnold@skeeve.com>

	* 5.2.0: Release tar ball made.

2022-09-04         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Updated with real URL of "MPFR is on parole."
	* configure.ac: Bump to release version.

2022-09-02         Arnold D. Robbins     <arnold@skeeve.com>

	* awkgram.c, command.c: Regenerated, using Bison 3.8.2.

2022-08-25         Arnold D. Robbins     <arnold@skeeve.com>

	* awkgram.y (yyerror): Exit at the end, to make syntax errors
	immediately fatal. This prevents problems with fuzzer-generated
	programs at the cost of not continuing to diagnose subsequent
	problems. Oh well, too bad. Hooray for the fuzzers. Bleah.
	* NEWS: Updated.

2022-08-17         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Mention that VAX/VMS is no longer supported.
	* main.c (deprecate_mpfr): Removed the function for now. It
	was causing grief for the translators.
	* builtin.c (call_sub): Fix message text for indirect call
	to gensub. Thanks to Benno Schulenberg
	<coordinator@translationproject.org> for the report.

2022-08-16         Arnold D. Robbins     <arnold@skeeve.com>

	* configure.ac: Remove checks for memset_ulong and memcpy_ulong.
	* awk.h: Remove checks and macro definitions for those two
	functions. They used to be used in the PC code but were
	removed.

2022-08-14         Arnold D. Robbins     <arnold@skeeve.com>

	* awkgram.y (mk_binary): Check for division by constant zero in
	`/' and `%' when numerator is not a constant. Thanks to Ed Morton
	<mortoneccc@comcast.net> for the report.

2022-08-12         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Small update: mention pm-gawk.1 man page.

2022-08-11         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (get_pma_version): Check strchr() return value for
	close parenthesis.  Ooops.

2022-08-10         Arnold D. Robbins     <arnold@skeeve.com>

	* symbol.c (init_the_tables): New function.
	(init_symbol_table): Reword to make functions persistent also
	by saving in the root pointer a struct pointing to both the
	global table and the function table, and restoring this
	on subsequent runs.  The code ended up being nicely cleaner.

2022-08-08         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h: Include "floatmagic.h" here so that we no longer have to
	worry about it on an indvidiual file basis.
	* builtin.c, eval.c, node.c: Remove the include in these files.
	* configure.ac: Check for isnan in libm also. This may not
	be the right way to do this...

2022-08-08  Eli Zaretskii  <eliz@gnu.org>

	* nonposix.h [__MINGW32__]: Add prototype for strsignal.

	* awk.h (flags): Rename BOOL => BOOLVAL, to avoid conflicts with
	MS-Windows headers.  All users changed.

2022-08-07         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (get_pma_version): New function.
	(version): Call it.

	Unrelated:

	* eval.c: Include "floatmagic.h" as it also calls isnan().
	Thanks to John Malmberg for the report.

	Unrelated:

	* main.c (load_environ): Force ENVIRON_node to point to
	str_array_func before loading it. Fixes issues on MinGW
	while still solving the original `environ[0] = "0=foo"'
	problem. Move the call to init_env_array back to after the
	loop.

2022-08-06         John E. Malmberg      <wb8tyw@qsl.net>

	* custom.h: Update for new VMS Versions

2022-08-03         Arnold D. Robbins     <arnold@skeeve.com>

	* mpfr.c (mpfr_mem_alloc, mpfr_mem_realloc, mpfr_mem_free):
	New functions that just call malloc/realloc/free. Those are
	redefined to the pma_* functions if using pma.
	* awk.h (mpfr_mem_alloc, mpfr_mem_realloc, mpfr_mem_free):
	Add declarations.
	* main.c (main): Call mp_set_memory_functions with the new
	functions as arguments.

2022-08-03         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (format_tree): When collecting positional field widths or
	precisions, check for wrap around to negative values. Thanks to
	YU Jiongchi <jcyu.2022@phdcs.smu.edu.sg> for the report.

2022-07-29         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (efwrite): Check ferror() also, fixes some weird
	cases. Reported by Nikita Zlobin <cook60020tmp@mail.ru>.
	* io.c (gawk_fwrite): Remove static from definition.
	* awk.h (gawk_fwrite): Add declaration.

2022-07-27         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.c (awk_value_to_node): Put tval declaration inside
	MPFR ifdef. Avoids warning if no MPFR when compiling.

2022-07-26         Arnold D. Robbins     <arnold@skeeve.com>

	* io.c (iopflags2str): Remove 'static' from declaration, causes
	the compiler to stop complaining. Thanks to Pat Rankin for the
	suggestion.
	* re.c (reflags2str): Ditto.
	* debug.c (debug_prog): Translate the "Restarting ..." message.
	Thanks to Antonio Colombo for pointing this out.

2022-07-22         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Updated.

2022-07-21         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Updated.

2022-07-19         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (catchsig): Adjust error message in cant_happen() call.
	* configure.ac: Add check for strsignal function. It doesn't
	exist on z/OS.
	* replace.c: Include missing_d/strsignal.c if needed.

2022-07-18         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (main): Don't use fatal() if pma_init() fails, apparently
	it tries deep down to allocate memory.  Print return value and
	pma_errno value. Thanks to Terence Kelly for the analysis and
	suggestion.
	* custom.h (pma_errno): Define to 0 if not using persisent malloc.

2022-07-17         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (parse_args): Handle --persist with no argument to issue a
	better error message. Thanks to Terence Kelly for the suggestion.

2022-07-14         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkmisc.c, replace.c: Update copyright.

2022-07-11         Arnold D. Robbins     <arnold@skeeve.com>

	* Makefile.am (base_sources): Remove mbsupport.h.

2022-07-07         Arnold D. Robbins     <arnold@skeeve.com>

	* mbsupport.h: Removed.

2022-07-06         Arnold D. Robbins     <arnold@skeeve.com>

	* README: Updated. Remove mention of DJGPP.
	* awk.h, custom.h, eval.c, gawkmisc.c, io.c, main.c, nonposix.h,
	re.c, replace.c: Remove all code for __DJGPP__.

2022-07-03         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (TOP_SCALAR): Put converted value back on the stack
	for any subsequent use.

2022-06-30         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (POP_SCALAR): Convert Node_elem_new into a scalar.
	(TOP_SCALAR): Ditto.

	Unrelated:
	* README: Updated. Remove mention of OS/2.
	* awk.h, awgram.y. gawkmisc.c, io.c, main.c, nonposix.h:
	Remove all code for __EMX__.

2022-06-20         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: MPFR is now "on parole" instead of deprecated.
	* main.c (deprecate_mpfr): ifdef'ed out.
	(parse_args): Comment out call to deprecate_mpfr().

2022-06-20         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (optab): Add --persist.
	(parse_args): For --persist, fatal message to use the
	environment variable. Thanks to Terence Kelly for suggesting
	the option, since it's mentioned in his paper.

2022-06-17         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Typo fix.
	* main.c (main): Correct the return value check in the call
	to pma_init(). Thanks to Terence Kelly for the report.

2022-06-15         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* main.c (load_environ): Init ENVIRON_node before filling
	it. Fixes a crash if something like "0=foo" is the first thing
	in the environment. Thanks to David Arroyo <david@aqwari.net>
	for the report.

2022-06-14         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (main): Set gawk_name first thing, in case we fatal out
	on pma_init.
	* configure.ac: Add --disable-pma option.

2022-06-13         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (main): If persistent memory not available and
	GAWK_PERSIST_FILE supplied, issue a warnning. Similarly, don't
	do mtrace if using persistent malloc.
	(version): Include PMA version in the output.

2022-06-10         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (using_persistent_malloc): Declare new variable
	* main.c (main): Check for error from pma_init. Set
	using_persistent_malloc.
	* symbol.c (init_symbol_table): Check using_persistent_malloc
	appropriately. Adjust the flow for it.
	* NEWS: Updated.
	* Makefile.am (LDADD): Add $(LDFLAGS).
	* custom.h (pma_init): Define to 0.

2022-06-09         Arnold D. Robbins     <arnold@skeeve.com>

	* custom.h: Deal with use/non-use of persistent malloc.
	* main.c (main): Bracket mtrace call in #ifndef. Call pma_init()
	first thing.
	* configure.ac (GAWK_USE_PERSISTENT_MALLOC): Add call.

2022-06-06         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* gawkapi.h (gawk_api_t): Add new api_destroy_array hook to clear
	and free an array.
	(destroy_array): New macro wrapper for api_destroy_array.
	* gawkapi.c (api_destroy_array): Add new function to clear and free
	an array.
	(api_impl): Add hook for api_destroy_array.

2022-06-03         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (elem_new_to_scalar): Add declaration.
	* eval.c (elem_new_to_scalar): No longer static. Make it handle
	things when valref is > 1. Returns a NODE * instead of being void.
	(cmp_scalars): Change usage of elem_new_to_scalar().
	* interpret.h (r_interpret): Op_push*: Make Node_elem_new into
	a separate case, using elem_new_to_scalar().
	* array.c (force_array): For Node_elem_new, clear symbol->stptr.
	* eval.r (r_get_lhs): Use efree() intstead of free() in Node_elem_new
	case.

2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Fix memory corruption when substituting
	into a value that is a typed regex. Thanks to valgrind.

2022-06-02         Arnold D. Robbins     <arnold@skeeve.com>

	Fix a nasty memory corruption problem. Thanks to
	Andrew Schorr for the report.

	* eval.c (r_get_lhs): Handle Node_elem_new separately
	to free the string value. This was not the problem.
	* interpret.h (r_interpret): For Op_assign, when turning
	Node_elem_new into the null string, DEREF the old value
	and dupnode the new one. THIS was the problem.

2022-05-24         Adam Van Scyoc        <avanscy@g.clemson.edu>

	* awkgram.y (make_assignable): Handle Op_field_assign.
	Avoids a core dump upon a certain kind of syntax error;
	see test/getlnfa.awk.

2022-05-22         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (force_array): When converting Node_elem_new to an array,
	release the string storage. Thanks to valgrind, by way of Andrew
	Schorr, for the report.

2022-05-11         Arnold D. Robbins     <arnold@skeeve.com>

	* profile.c (pp_list): Typo fix in a comment.

2022-05-10         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkbug.in: Add attestation for having read bug reporting
	section in the manual. (Yes, I'm pretty paranoid.)

2022-05-03         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (deprecate_mpfr): New function.
	(parse_args): Call it for -M.

2022-04-28         Arnold D. Robbins     <arnold@skeeve.com>

	Disallow SYMTAB["x"]["y"]. Reported by Jason C. Kwan.

	* interpret.h (r_interpret): Add checks at Op_sub_array case.

	Unrelated. Fix MPFR mode unary minus applied to a variable with
	a zero MPG value. Also reported by Jason C. Kwan.

	* mpfr.c (mpg_interpret): Fix Op_unary_minus to create an
	MPFR -0 value. MPG doesn't distinguish negative zero from
	positive zero.

2022-04-21         Arnold D. Robbins     <arnold@skeeve.com>

	Fix some profiling issues related to comments in switch / case
	statements.

	* awkgram.y (merge_comments): Remove newline between comments being
	merged.
	* profile.c (pprint): Improve code for Op_K_switch, Op_K_case.

2022-04-20         Arnold D. Robbins     <arnold@skeeve.com>

	* mpfr.c (mpg_force_number): Small whitespace fix.
	* node.c (r_force_number): Ditto.

2022-04-18         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkbug.in: Small changes.

2022-04-06         Arnold D. Robbins     <arnold@skeeve.com>

	Further cleanups.

	* array.c (new_array_element): Set s->stfmt to STFMT_UNUSED.
	* awk.h (force_string_fmt): No need to set s->stfmt anymore.
	* builtin.c (do_typeof): Collapse Node_var_new and Node_elem_new
	cases.
	* symbol.c (print_vars): Node_elem_new can't be in a top level
	variable. Remove check and add a call to cant_happen if some
	other node type is received.
	* NEWS: Updated.

2022-04-01         Arnold D. Robbins     <arnold@skeeve.com>

	Small fix from the persistent-gawk guys.

	* profile.c (pprint): Use estrdup instead of strdup.

2022-03-31         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (new_array_element): Make a full null string instead of
	an empty node; it can be more easily converted to scalar that way.
	* awk.h (force_string_fmt): Change the node type, remove NUMBER flag,
	set STFMT_UNUSED.
	* cint_array.c (lear_clear): Remove check for not equal Node_elem_new.
	* int_array.c (int_clear): Ditto.
	* str_array.c (str_clear): Ditto.
	* eval.c (elem_new_to_scalar): Now only needs to change the node type.
	* interpret.h (r_interpret): Treat Node_elem_new like Node_val, and
	UPREF it when pushed. Remove test before DEREFing when popping.
	* mpfr.c (mpg_force_number): Simplify converting Node_elem_new to
	Node_val. Fix the string value.
	* node.c (r_force_number): Ditto.

2022-03-28         Arnold D. Robbins     <arnold@skeeve.com>

	Allow unreferenced array elements to turn into subarrays.

	* awk.h (Node_elem_new): New node type.
	(new_array_element): Add declaration.
	(POP_ARRAY): Handle Node_elem_new.
	(force_string_fmt): Ditto. Make sure valref has the right value.
	* array.c (force_array): Handle Node_elem_new.
	(do_sort_up_value_type): Ditto.
	(new_array_element): New function, creates Node_elem_new node.
	* builtin.c (do_length): Handle Node_elem_new.
	(do_typeof): Ditto.
	* cint_array.c (leaf_lookup): Use new_array_element() when creating
	a new element.
	(left_clear): Don't unref Node_elem_new.
	* debug.c (print_symbol, do_set_var,watchpont_triggered,
	initialize_watch_item, print_memory, do_print_f): Handle Node_elem_new.
	* eval.c (nodetypes): Add Node_elem_new.
	(r_get_lhs, setup_frame): Handle Node_elem_new.
	(elem_new_to_scalar): New function.
	(cmp_scalars): Use elem_new_to_scalar.
	* ext.c (get_actual_argument): Handle Node_elem_new.
	* gawkapi.c (api_get_argument, api_set_argument, node_to_awk_value,
	api_sym_update): Handle Node_elem_new.
	* int_array.c (int_clear): Don't unref Node_elem_new.
	(int_insert): Use new_array_element() when creating a new element.
	* interpret.h (r_interpret): Handle Node_elem_new as appropriate.
	* mpfr.c (mpg_force_number): Handle Node_elem_new.Make sure valref has
	the right value.
	* node.c (r_force_number): Ditto.
	* str_array.c (str_lookup): Use new_array_element() when creating a
	new element.
	(str_clear): Don't unref Node_elem_new.
	* symbol.c (print_vars): Handle Node_elem_new.

2022-03-27         Arnold D. Robbins     <arnold@skeeve.com>

	Allow nested indirect function calls. Thanks to
	Kaz Kylheku <kaz@kylheku.com> for the report.

	* awkgram.y (at_seen): Turn into an int that is incremented
	and decremented as appropriate.

2022-03-22         Arnold D. Robbins     <arnold@skeeve.com>

	Make lint checks for builtin functions smarter. Initial
	report from Timothy Sample <samplet@ngyro.com>.

	* builtin.c (do_fflush): Require string type.
	(printf_common): Ditto.
	(do_index): Allow strnum for both arguments.
	(do_length): Ditto.
	(do_strftime): Ditto.
	(do_substr): Require numbers for arguments 2 and 3, string or
	strnum for argument 1.
	(do_match): Require string or strnum for argument 1.
	(do_dcgettext): Require strings for all arguments.
	(do_bindtextdomain): Ditto.
	(do_dcngettext): Require strings for arguments 5, 4, 2, and 1, and
	number for argument 3.

2022-03-03         Arnold D. Robbins     <arnold@skeeve.com>

	* NEWS: Updated.

2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (usage): Update the message for the gawkbug program.

2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>

	Add `gawkbug' reporting program.

	* gawkbug.in: New file.
	* Makefile.am (bin_SCRIPTS): New, for  gawkbug.
	* configure.ac: Add gawkbug to AC_CONFIG_FILES list.
	* NEWS: Updated.
	* .gitignore: Updated.

2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (cant_happen): Change to allow a format string and arguments,
	in order to provide a clue as to what went wrong, and not just
	print "internal error".
	* awkgram.y, debug.c, eval.c, interpret.h, io.c, main.c, mpfr.c,
	profile.c, re.c, symbol.c: Fix all uses of cant_happen().

2022-02-25         Arnold D. Robbins     <arnold@skeeve.com>

	Memory issues with MPFR, fix part 2. (Part 1 is in the
	extension directory.)

	* gawkapi.c (awk_value_to_node): Clear the GMP/MPFR values
	returned from the C extension after setting the internal
	variable.
	
2022-02-22         Arnold D. Robbins     <arnold@skeeve.com>

	Enable interval expressions even for --traditional, as BWK
	awk has supported them since 2019.

	* NEWS: Updated.
	* main.c (main): Add lint warning for --re-interval.
	(parse_args): Add explanatory comment.
	* re.c (resetup): Update the comment w.r.t. interval expressions.
	Change the test for enabled them to if do_traditional.

2022-02-22         Arnold D. Robbins     <arnold@skeeve.com>

	Fix resource links found by Coverity. Thanks to
	Jakub Martisko <jamartis@redhat.com> for the report.

	* ext.c (make_builtin): Free install_name before returning.
	* io.c (remap_std_file): Unconditionally close newfd.
	* symbol.c (load_symbols): Unref built_in also.

2022-12-10         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* io.c (wait_any): When saving a saved exit status returned by
	_cwait or waitpid or wait in struct redirect's status field, we
	should actually save the valued returned by sanitize_exit_status
	instead of the raw status. This fixes a bug whereby a saved status
	for a previously exited process was being returned by gawk_pclose
	without first being sanitized. Thanks to Jakub Martisko
	<jamartis@redhat.com> for reporting the bug.

2022-02-10         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (sanitize_exit_status): Fix formatting.

2022-02-07         Arnold D. Robbins     <arnold@skeeve.com>

	Continue fixing indirect calls of builtins.

	* awk.h (check_exact_args, check_args_min_max): Add declarations.
	* builtin.c (check_exact_args, check_args_min_max): New functions.
	(do_exp, do_fflush, do_index, do_int, do_isarray, do_length, do_log,
	do_sqrt, do_strftime, do_systime, do_mktime, do_system, do_tolower,
	do_toupper, do_atan2, do_sin, do_cos, do_rand, do_srand, do_match,
	do_sub, do_lshift, do_rshift, do_compl, do_strtonum, do_dcgettext,
	do_dcngettext, do_bindtextdomain, do_intdiv, do_typeof): Call
	the argument checking functions.
	(call_sub, call_match): Manually check argument count.
	* field.c (do_split, do_patsplit): Call the argument checking
	functions.
	* interpret.h (r_interpret): For indirect call of extension functions,
	pop the function name off the stack when done.
	* mpfr.c (do_atan2, do_mpfr_func, do_mpfr_int, do_mpfr_compl,
	do_mpfr_lshift, do_mpfr_rshift, do_mpfr_strtonum, do_mpfr_rand,
	do_mpfr_srand, do_mpfr_intdiv): Call the argument checking functions.

2022-02-04         Arnold D. Robbins     <arnold@skeeve.com>

	Start fixing issues with indirect calls of builtins.
	Thanks to Denis Shirokov <cosmogen@gmail.com> for the initial report.
	Much more remains to be done.

	* builtin.c (do_length): Check number of arguments, fatal if not one.
	If passed Node_var_new, turn it into the null string.
	* interpret.h (r_interpret): For Op_indirect_call, pop the function
	name off the stack.

2022-01-05         Arnold D. Robbins     <arnold@skeeve.com>

	* awkgram.y (change_namespace): New function. Extracted from
	set_namespace.
	(want_namespace): New variable.
	[grammar]: Add explanatory comment about the change.
	(yylex): Change the namespace immediately from the lexer.
	(set_namespace): Adjust code.
	* symbol.c (load_symbols): Strip off leading awk:: so that
	PROCINFO["identifiers"] is like SYMTAB and FUNCTAB. This makes
	the code match the documentation. Thanks to John Naman
	<gawker@703n.com> for the bug report.

2021-12-17         Yuri Gribov           <tetra2005@gmail.com>

	Make a number of functions and variables static.

	* cint_array.c (argv_array_func): Make static.
	* debug.c (cur_rule, check_until): Ditto.
	* field.c (default_FS, FS_re_yes_case, FS_re_no_case, FS_regexp,
	FPAT_re_yes_case, FPAT_re_no_case, invalidate_field0: Ditto.
	* io.c (iopflags2str): Ditto.
	* main.c (ENVIRON_node): Ditto.
	* re.c (reflags2str): Ditto.
	* str_array.c (env_array_func): Ditto.

2021-12-08         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* gawkapi.c (api_sym_update): Allow undefined Node_var_new variables
	to be converted to arrays, otherwise API functions have no way
	of creating an array that is referenced in an undefined fashion in
	the program. This is somewhat comparable to how the set_argument
	API allows an undefined argument variable to be converted to an array.

2021-12-02         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* builtin.c (efwrite): Don't use return in call of function
	returning void. Some compilers might not like it.

2021-12-01         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (efflush): Don't use return in call of function
	returning void. It works, but is funky, and I think some
	compilers will complain.

	Unrelated. Clean up the calls to w32_maybe_set_errno.

	* awk.h (os_maybe_set_errno): Add declaration.
	* builtin.c (wrerror): Replaced ifdef'ed code calling
	w32_maybe_set_errno() with simple call to os_maybe_set_errno().
	* io.c (non_fatal_flush_std_file, close_io): Ditto.
	* main.c (usage, copyleft): Ditto.
	* nonposix.h (w32_maybe_set_errno): Remove declaration.

2021-11-30         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	Improve output redirection error handling for problems not detected
	until the final flush or close. Thanks to Miguel Pineiro Jr.
	<mpj@pineiro.cc> for the bug report and suggesting a fix.

	* awk.h (efflush): Add declaration.
	* builtin.c (efwrite): Break up into 3 functions by moving the
	flushing logic into efflush and the error handling logic into
	wrerror.
	(wrerror): New function containing the error-handling logic extracted
	from efwrite.
	(efflush): New function containing the fflush logic extracted from
	efwrite.
	* io.c (close_redir): Call efflush prior to closing the redirection
	to identify any problems with flushing output and to take advantage
	of the error-handling logic used for print and printf.

2021-11-21         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_typeof): Make Node_array_ref handling smarter.
	See test/stupid5.awk.

2021-11-18         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.c (awk_value_to_node): Fix handling of MPFR values
	coming back from an extension.

2021-11-07         Arnold D. Robbins     <arnold@skeeve.com>

	* mkinstalldirs: Removed, it wasn't used.
	* Makefile.in: Regenerated.

2021-11-03         Sam James             <sam@gentoo.org>

	* configure.ac: Fix AR_FLAGS assignment typo.
	* configure.ac: Rename AR_FLAGS to ARFLAGS.

2021-10-27         Arnold D. Robbins     <arnold@skeeve.com>

	* 5.1.1: Release tar ball made.

2021-10-24         Arnold D. Robbins     <arnold@skeeve.com>

	* README: Updated.

2021-10-20         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* msg.c (err): Need to check that FNR_node->var_value is non-NULL
	before testing with is_mpg_number.

2021-10-18         Arnold D. Robbins     <arnold@skeeve.com>

	Factor duplicated code out into a separate function.
	D.R.Y. principle.

	* symbol.c (get_name_from_awk_ns): New function.
	(lookup): Use it.
	(install): Use it.

	* awkgram.y (check_qualified_special): Use awk_namespace instead of a
	string constant.
	* profile.c (pprint): Ditto.
	(adjust_namespace): Ditto. Also, fix the check for the qualified
	name to look for the "::" in case one namespace is a prefix of
	another.

2021-10-13         Arnold D. Robbins     <arnold@skeeve.com>

	* README: Update version, copyright year.
	* custom.h: Update copyright year.

2021-09-26         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_mktime): Update that ISO 8601 does not allow
	hours > 23. Thanks to Nethox <nethox+awk@gmail.com> for the info.

2021-09-23         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.h: Some clean-up of comments in the header file.

2021-09-12         Arnold D. Robbins     <arnold@skeeve.com>

	* interpret.h: Remove subscript_in_array variable.

	Unrelated:

	* builtin.c (add_thousands): Fix insertion of thousands_sep
	string. Do it in reverse order.

2021-09-10         Arnold D. Robbins     <arnold@skeeve.com>

	* interpret.h: For Op_subscript, don't allow references into
	FUNCTAB and SYMTAB to create new elements.  Thanks to
	Jason C. Kwan <jasonckwan@yahoo.com> for the bug report.

	Unrelated:

	* aclocal.m4: Regenerated: Automake 1.16.4.
	* NEWS: Updated.

	Unrelated:

	* awkgram.y (YYERROR_IS_DECLARED): Added for Bison 3.8.
	* command.y (YYERROR_IS_DECLARED): Ditto.
	* NEWS: Updated.

2021-09-09         Arnold D. Robbins     <arnold@skeeve.com>

	Move to Autoconf 2.71 (finally!)

	* configure.ac: Updated.
	* aclocal.m4, configh.in configure: Regenerated.
	* NEWS: Updated.

2021-09-06         Arnold D. Robbins     <arnold@skeeve.com>

	Have the ' flag work for %d in MPFR mode also. Thanks to
	Dan Nielsen <catskill549@yahoo.com> for the report.

	* builtin.c (add_thousands):  New function.
	(reverse): New helper function.
	(format_tree): Use add_thousands if MPFR and an integer
	format.

2021-09-03         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (UPDATE_YEAR): Update to 2021.

2021-09-03         Arnold D. Robbins     <arnold@skeeve.com>

	* mpfr.c (mpg_cmp_as_numbers): Avoid compiler warning about possibly
	used before set.  Thanks to Michal Jaegermann for the report.

2021-08-18         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (main): Change have_srcfile from int to bool.

2021-08-15         Arnold D. Robbins     <arnold@skeeve.com>

	Allow setting AR and ARFLAGS on the configure command line.
	Thanks to Jacob Burkholder <jake.burkholder2@gmail.com> for
	the report.

	* configure.ac (AR_FLAGS): Provide default value.
	(AR): Call AC_SUBST on it.

2021-08-13         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (do_sub): Rationalize handling of strongly typed
	regex as argument to sub/gsub, as well as rationalize the return
	value from gensub to always be string. Thanks to John Naman
	<gawker@703n.com> for the bug report.

2021-08-05         Andrew J. Schorr      <aschorr@telemetry-investments.com>

	* mpfr.c (do_mpfr_func): New argument, warn_negative. If true,
	print a warning message about a negative argument. Bring -M
	code into line with regular code. Bug report from Neil Ormos
	in the help-gawk list.

	Unrelated:

	* mpfr.c (do_mpfr_int_div, mpg_div, mpg_mod): If dividing by
	zero, print a fatal error messages. Brings MPFR code into line
	with the regular code. Thanks to Peng Yu for noticing the bug, in
	the help-gawk list.

2021-07-23         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (exec_count_t): Add typedef for Vax VMS C and everyone else.
	(EXEC_COUNT_FMT, EXEC_COUNT_PROFILE_FMT): Corresponding format
	strings for printf.
	* debug.c (print_instruction): Use EXEC_COUNT_FMT.
	* profile.c (indent): Ditto and use EXEC_COUNT_PROFILE_FMT.

2021-07-07         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (asort_actual): Add a lint warning for passing the
	same array as the first two arguments without a third.
	Thanks to Peng Yu <pengyu.ut@gmail.com> for the report.

2021-06-30         Arnold D. Robbins     <arnold@skeeve.com>

	* custom.h: Add a bunch of defines to work around the continous,
	needless churn in support/dfa.c.

2021-06-04         Arnold D. Robbins     <arnold@skeeve.com>

	* builtin.c (format_tree): In MPFR prints, cast values to
	int for proper int vs. unsigned comparison. Fixes things
	for HP-UX. Thanks to Daniel Richard G. for the report.

2021-05-21         Arnold D. Robbins     <arnold@skeeve.com>

	* debug.c: For z/OS, use %#p to print pointers, %p everything else.

2021-05-13         Arnold D. Robbins     <arnold@skeeve.com>

	* custom.h: For z/OS, define _REGEX_INCLUDE_LIMITS_H.
	* profile.c (pprint): Add a diagnostic print for an
	unexprected node type.

2021-05-05         Arnold D. Robbins     <arnold@skeeve.com>

	* CMakeLists.txt: Removed.
	* cmake: Removed directory and its contents.

2021-05-05         Arnold D. Robbins     <arnold@skeeve.com>

	Move to Automake 1.16.3.

	* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects option.
	* NEWS: Updated.

	Get `make distcheck' working again:

	* Makefile.am (EXTRA_DIST): Remove files that are now in build-aux.

	Unrelated:

	* builtin.c (do_sub): Remove check for BOOL as target. It's not
	correct anymore.

2021-05-03         Arnold D. Robbins     <arnold@skeeve.com>

	* eval.c (flags2str): Move BOOL entry into the right place in the
	list.
	* NEWS: Update with info on mkbool.

2021-05-02         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (do_bool): Renamed do_mkbool.
	* awkgram.y (tokentab): Rename bool to mkbool.
	* builtin.c (do_bool): Renamed do_mkbool.

2021-04-30         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (boolval): Remove check for BOOL flag. It was incorrect.
	Thanks to Andrew Schorr for the catch.
	For Node_val, update the comment to describe the BOOL flag, and
	move BOOL up to be alongside the flags for Node_val.

2021-04-28         Arnold D. Robbins     <arnold@skeeve.com>

	Make bools plain numbers that have bool flag instead of
	being weird string values.

	* array.c (do_sort_up_value_type): Remove special ordering
	for booleans.
	* awk.h (warn_bool): Remove declaration.
	* builtin.c (warn_bool): Remove function and all calls.
	* gawkapi.c (node_to_awk_value): Update switches to look for
	NUMBER|BOOL.
	* node.c (make_bool_node): Revise string values and flag bits.

2021-04-16         Arnold D. Robbins     <arnold@skeeve.com>

	* main.c (arg_assign): For -v '@/...' make sure that there are
	at least three characters there. Thanks to Ed Morton
	<mortoneccc@comcast.net> for the report.

2021-04-14         Arnold D. Robbins     <arnold@skeeve.com>

	Fix up lint warnings for "no effect" to avoid false warnings.
	Straighten out the messages, and remove the run-time warning,
	since a parse-time warning is already issued. Thanks to
	Arkadiusz Drabczyk <arkadiusz@drabczyk.org> for the initial
	bug report.

	* awkgram.y (isnoeffect): Add more opcodes that are "no effect".
	(add_lint): For LINT_no_effect, check that all the opcodes in the
	list are "no effect". Only if so, issue the warning. Remove the
	addition of the run-time warning.
	* interpret.h (r_interpret): Remove LINT_no_effect from Op_lint
	case.

2021-04-14         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (do_sort_up_value_type): Fix order with bools.

2021-03-30         Arnold D. Robbins     <arnold@skeeve.com>

	* gawk_api.h (gawk_api_minor_version): Increase to 2.
	* gawk_api.c (assign_bool): New function.
	(node_to_awk_value): Finish updating for bool types and values.

2021-03-22         Arnold D. Robbins     <arnold@skeeve.com>

	* gawkapi.h (make_bool): New inline function.
	Update table of request/return types.
	* gawkapi.c (awk_value_to_node): Add support for AWK_BOOL.
	(node_to_awk_value): Start on same. Not yet complete.

2021-03-21         Arnold D. Robbins     <arnold@skeeve.com>

	* str_array.c (fnv1a_hash_string): New function.
	(str_array_init): Use fnv1a_hash_string if AWK_HASH env var
	set to "fnv1a".

2021-03-20         Arnold D. Robbins     <arnold@skeeve.com>

	* array.c (do_sort_up_value_type): Add logic for handling bools.

2021-03-08         Arnold D. Robbins     <arnold@skeeve.com>

	* awk.h (warn_bool, do_bool): Add function declarations.
	* awkgram.y (tokentab): Add entry for "bool" builtin.
	* builtin.c (warn_bool): New function.
	(do_index, do_substr, do_toupper, do_tolower, do_match,
	do_length): Call it.
	(do_sub): If first arg to sub/gsub is bool, fatal error.
	(do_bool): New function.
	* field.c (do_split, do_patsplit): Call warn_bool.
	* main.c (load_procinfo_bools): Removed function and call.

2021-03-05         Arnold D. Robbins     <arnold@skeeve.com>

	Start on a bool type for gawk.

	* awk.h (BOOL): New flag value.
	(make_bool_node): Add declaration of new function.
	(bool_val): Check for BOOL along with NUMBER.
	* builtin.c (do_typeof): Add support for BOOL.
	* eval.c (flags2str): Ditto.
	* gawkapi.h (awk_val_type): Add AWK_BOOL.
	(awk_value_t): Add awk_bool_t element to the union and macro for it.
	(struct gawk_api): Update the table of request/return values.
	* main.c (load_procinfo_bools): New function.
	(load_procinfo): Call it.
	* node.c (make_bool_node): New function.

2021-02-13         Arnold D. Robbins     <arnold@skeeve.com>

	* io.c (nextfile): Use the value of ARGC directly in the for
	loop, in case it gets changed by code or by a command line
	assignment. Thanks to the discussion in comp.lang.awk for
	the report.

2021-01-28         Arnold D. Robbins     <arnold@skeeve.com>

	Fix a Day One Bug!

	* main.c (main): For -b option, only set LC_ALL to C if
	not --posix. Ooops.

2021-01-09         Arnold D. Robbins     <arnold@skeeve.com>

	Fix problems turning something like 018 into decimal.
	Thanks to Arkadiusz Drabczyk <arkadiusz@drabczyk.org> and to
	Jean-Philippe Guérard <jean-philippe.guerard@xn--tigreray-i1a.org>
	for the reports.

	* builtin.c (nondec2awknum): Use a copy of len, in case we detect
	8 or 9 and have to restart as decimal.
	* mpfr.c (mpg_strtoui): For 8 or 9, set base to 10.

	Unrelated:
	* array.c, awk.h, awkgram., builtin.c, cmd.h, command.y, debug.c,
	eval.c, gawk.api.c, gawkapi.h, interpret.h, io.c, main.c, mfpr.c,
	node.c, profile.c, re.c: Update copyright year.

2021-01-08         Arnold D. Robbins     <arnold@skeeve.com>

	General tightening up use of const and types. Thanks to
	the C++ porting experiment.

	* array.c (null_array): Separate out multiple assignment of zero.
	* awk.h: Add <math.h> here and pull it out of individual files.
	(CONVFMT): Make const char *.
	(quote): Make const char *.
	(defpath): Make const char *.
	(deflibpath): Make const char *.
	(envsep): Make const char *.
	(DO_FLAG_NONE): New zero enum value.
	(getblock): Add a cast to the ty argument.
	(make_regnode): First argument is now NODETYPE.
	(gawk_name): Returns const char *.
	* awkgram.y: Include argument types in read_func pointer.
	(make_regnode): First argument is now NODETYPE.
	* builtin.c (do_typeof): Use const char *.
	(format_nan_inf): Move declaration of val to top of function.
	* cmd.h (dbg_prompt, commands_prompt, eval_prompt, dgawk_prompt):
	Make const char *.
	(struct cmd_token): Use const char *. Rename `class' to `lex_class'.
	* command.y (lex_class): Update all uses.
	(find_command): Use const char *.
	* debug.c (dbg_prompt, commands_prompt, eval_prompt, dgawk_prompt,
	output_file): Make const char *.
	(struct dbg_option): Use const char *.
	(do_info): Use const char *. Cast stop.command to enum argtype.
	(do_finish): Cast stop.command to enum argtype.
	(do_return, do_until): Ditto.
	(print_instruction, set_gawk_output, set_prompt): Add casts to
	some function parameters.
	* eval.c (update_ERRNO_int): Use const char *.
	* gawk.api.c (valtype2str): Return const char *.
	(api_get_argument): Use awk_true instead of true in return statements.
	(awk_value_to_node): Move declaration of tval to top of function.
	(api_release): Cast a_cookie to NODE *.
	* gawkapi.h (struct awk_input): Include argument types in
	read_func pointer.
