Thu May  6 20:55:14 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* Release 3.1.8: Release tar file made.

Fri Apr 30 11:37:54 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac: Remove check for libsnprintf.

Tue Apr 27 22:23:26 2010  Andreas Schwab  <schwab@linux-m68k.org>

	* builtin.c (do_mktime): Make lint check more sane.
	Fix overflow check.  Removes GCC warning that Arnold
	incorrectly didn't like.

Mon Apr 26 20:16:07 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* ltmain.sh: Removed.
	* builtin.c (do_mktime): Restored old code to match the
	documentation. We now have a warning that we just have to
	live with. Sigh. Stupid GCC. Added a lint warning though.
	(format_tree): More code so that %'d acts like %d on systems
	without <locale.h>.
	* main.c (main): Add `&& #if defined(HAVE_LOCALE_H)' for
	call to setlocale.

Wed Apr 21 23:35:43 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* Makefile.am: Change quoting of -Dargs so that even tcsh
	users will be happy.
	* regex_internal.c (MAX): Add `#undef MAX', just in case.
	* configure.ac: Don't look for libsigsegv on OSF/1, gives
	us severe headaches.

Tue Apr 20 12:01:01 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h, dfa.c: Sync with GNU grep. The long-standing x{0} bug
	is now gone.  Matching UTF-8 with "." is now much faster.
	* re.c (avoid_dfa): Remove call to dfabroken() which is now gone.
	* builtin.c (do_mktime): Simply check of values passed in to be
	more readable and to avoid a weird compiler warning from GCC.

Fri Apr 16 15:02:26 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* array.c (assoc_lookup): Add cast in error message to turn
	off compiler warning.
	* dfa.c (is_blank): New function. Use it everywhere instead of
	ctype.h `isblank' macro which isn't available universally.

Tue Apr 13 22:36:31 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* array.c, awkgram.y, builtin.c, dfa.c, eval.c, ext.c, main.c,
	node.c, re.c: Remove old ISxxx and TOxxx macros in favor of
	standard versions.  ``We're two wild and crazy guys!''

Tue Apr 13 22:07:18 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* getopt.c, getopt.h, getopt1.c, getopt_int.h, regcomp.c, regex.c,
	regex.h, regex_internal.c, regex_internal.h, regexec.c: Sync with
	glibc. What the heck.

Thu Apr  8 21:33:09 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h, dfa.c: All leading indentation is now spaces only. Yet
	another sync with grep.

Thu Apr  8 20:45:25 2010  Arnold D. Robbins  <arnold@skeeve.com>

	Move dfa internals into dfa.c and sync with grep. Avoids VMS and
	z/OS compile problems in order to avoid cygwin issue when used
	with ligsigsegv.  ("Portability?  We don't need no stinkin'
	portability!")

	* dfa.h: Move all the internals into dfa.c.
	(dfaalloc, dfamusts, dfabroken): Add declarations.
	* dfa.c: Accept all the internals.
	(dfaalloc, dfamusts, dfabroken): New functions.
	* awk.h (Regexp): Use a `struct dfa *'.
	* re.c (make_regexp): Call dfaalloc. Adjust uses of dfareg
	in other routines.
	(refree): Free the dfa struct too.

Tue Apr  6 23:06:55 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h, dfa.c: Further sync with GNU grep for enum change
	and other misc changes.

Tue Apr  6 20:13:45 2010  Michal Jaegermann  <michal@harddata.com>

	* main.c: Wrap declarations and bodies of `catchsegv' and
	`catchstackoverflow' in #ifdef HAVE_LIBSIGSEGV to avoid
	"not used" warnings.

Tue Apr  6 20:11:47 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h: Move definition of token enum to dfa.c to avoid conflict
	with Windows WCHAR introduced by libsigsegv. Thanks to Corinna
	Vinschen.
	* dfa.c: Enum body here.
	(in_coll_range): z/OS fix: Initialize array to all zeros and assign
	values instead of putting them into the initializer. Thanks to Dave
	Pitts for reporting the problem.

Fri Apr  2 12:32:40 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c: Sync with grep 2.6.3.

Wed Mar 31 15:50:34 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c (dfaexec): Move decl of `saved_end' up to top of function.
	Fixes compilation on C89 compilers.

Mon Mar 29 08:40:29 2010  Arnold D. Robbins  <arnold@skeeve.com>

	Remove local copy of libsigsegv. Use an external copy if available.

	* Makefile.am: Remove SEGVSUBDIR and SEGVINCLUDE.
	* configure.ac: Remove previous code that handled the library and use
	gl_LIBSIGSEGV library.
	* custom.h: Remove code for HAVE_SIGSEGV_H.
	* main.c: Move to HAVE_LIBSIGSEGV.
	* libsigegv/ : Removed.

Mon Mar 29 05:41:35 2010  Corinna Vinschen  <vinschen@redhat.com>

	* dfa.c: Include hard-locale.h after xalloc.h because it needs
	xmalloc.
	* hard-locale.h (xmalloc): Remove declaration.
	(hard_locale): Cast xmalloc to correct target type.

Mon Mar 29 05:38:47 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c: (two_way_open): In counting down retries, test for > 0
	instead of >= 0 since retries is unsigned. Thanks to Pat Rankin
	for noticing.
	* configure.ac: Remove use of -export-dynamic on cygwin.

Thu Mar 25 21:48:13 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c: Sync to grep 2.6.1.  That's probably enough for now.

Wed Mar 24 19:48:01 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c: More sync with grep.

Tue Mar 23 19:42:48 2010  Jeff Chua	     <jeff.chua.linux@gmail.com>

	* io.c (two_way_open):  Bug fix in management of timeout value.

Tue Mar 23 19:40:04 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h, dfa.c: Synced with released grep 2.6.  Oh Frabjous Day!
	Callou! Callay!

Mon Mar 22 22:49:44 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.c: Regenerated using bison 2.4.2.

Fri Mar 19 10:19:20 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c: Minor edits for compat with grep.

Fri Mar 19 09:19:56 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (two_way_open): Cleanup new code for socket opens.
	* replace.c: Include missing_d/usleep.c based HAVE_USLEEP.
	* configure.ac: Add usleep to list of functions to look for.

Thu Mar 18 23:30:33 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.h, dfa.c: Imported from GNU grep and merged. Passes "make test".
	* xalloc.h: New file, needed by dfa.c.
	* Makefile.am (base_sources ): Added xalloc.h.

Thu Mar 18 07:29:45 2010  Jeff Chua	     <jeff.chua.linux@gmail.com>

	* io.c (two_way_open):  Make failure to open a socket a non-fatal error.
	Allow the amount of time to sleep during socket retries to come from an
	undocumented env variable giving time in milliseconds.

Mon Mar  8 20:58:05 2010  Paolo Bonzini      <bonzini@gnu.org>

	More fixes from GNU grep.

	* dfa.c (dfaexec): Remove register keywords.
	(FETCH): Use do..while(0) idiom.
	(parse_bracket_exp_mb): Return MBCSET.
	(in_coll_range): New.
	(lex): Assign return value of parse_bracket_exp_mb to lasttok,
	return it.  Use in_coll_range instead of regcomp/regexec.

Mon Mar  8 20:36:35 2010  Jim Meyering       <jim@meyering.net>

	Fixes from GNU grep development version:

	build: avoid shadowing warnings
	* dfa.c (match_mb_charset): Rename parameter: s/index/idx/.
	(check_matching_with_multibyte_ops, match_anychar): Likewise.

	build: avoid shadowing warning for unused "rs"
	* dfa.c (transit_state): Remove dead stores;
	Ignore transit_state_consume_1char return value.

	syntax: remove trailing blanks
	* dfa.c: Remove trailing blanks, to ease synchronization with grep.

	clean-up: limit visibility of an internal function
	* dfa.c (match_mb_charset): Declare static.

	build: rename local to avoid shadowing global, dfa
	* dfa.c (dfamust): Rename parameter: s/dfa/d/.

Thu Feb 18 22:44:01 2010  Arnold D. Robbins  <arnold@skeeve.com>0

	* eval.c (push_args): Clear the stack to NULL pointers after mallocing
	it. Fixes yesterday's problem when called from a rule.
	See test/fcall_exit2.awk.  Thanks to Seb <sbb@tuxfamily.org>.

Wed Feb 17 23:19:32 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* eval.c (pop_fcall): Check that argument on stack is not NULL before
	attempting to clear it; add comment explaining it.
	(push_args): Set nodes to zero for argument to make sure that values
	are NULL for testing later in pop_fcall. See test/fcall_exit.awk.
	Thanks to Seb <sbb@tuxfamily.org>.

Sun Jan 31 22:46:49 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (prec_level): Add Node_regex to the switch so that
	`! /xxx/' works.  Thanks to Hermann Peifer <peifer@gmx.eu> for
	reporting the bug.

Thu Jan 28 17:40:14 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* configure, Makefile.am: Updated to Autoconf 2.65 and Automake 1.11.1,
	libsigsegv 2.8.

Thu Jan 21 23:24:56 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (pprint): Separate out code for Node_switch_body and only
	print the lnode; avoids printing the default case twice. Thanks to
	Hermann Peifer <peifer@gmx.eu> for reporting the bug.

Sun Jan  3 21:03:01 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c: Added casts as needed to silence warnings about
	signedness of pointers from GCC 4.x.

Fri Jan  1 11:41:50 2010  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): At pr_tail, remember to take the precision
	into account when determining how many characters to copy out.
	Thanks to tczy <cy@wre.ath.cx> for the bug report.

Tue Dec  8 12:29:30 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac, awk.h: Remove use of <signum.h> header file.

Mon Dec  7 15:25:02 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* node.c (format_val):  Use <= and >= in the comparisons with
	LONG_xxx instead of < and > so that things work correctly on systems
	with 64 bit integers.  Thanks to Stephen Davies for pointing out
	the problem.

Sat Nov 21 23:14:59 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): If there is not an actual thousands
	separator character, don't let `quote_flag' have an effect. Fixes
	test failure on Solaris 10, which bizarrely says to use the
	thousands separator character every three digits, but then doesn't
	actually supply one. Thanks to Nelson Beebe for the initial
	report.

Mon Nov 16 22:27:44 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awk.h (getnode): If MPROF wrap body in parentheses; remove
	incorrect trailing semicolon.
	* bisonfix.awk: Convert "y.tab.c" to "awkgram.c" for those rare
	instances where we need to use a debugger on the parser so
	that gdb will find the right source file.

2009-10-26  Andreas Schwab  <schwab@linux-m68k.org>

	* io.c (iop_open): Set errno when rejecting a directory.

Tue Oct 20 22:48:14 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.y (constant_fold): Fix check for two strings to look
	at `right->flags'. Fix division code to check for division by
	zero first. Thanks to Stephen Davies <scldad@sdc.com.au>
	for both.

Fri Oct 16 08:41:29 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (redirect): Do the close-on-exec setting before
	attempt to get a FILE *. Thanks to Andreas Schwab.

Wed Oct 14 23:25:47 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (redirect): When opening a file, set the close-on-exec flag.
	Thanks to Chris Pearson <kermit4@gmail.com> for the bug report.

Tue Oct  6 21:07:23 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (main): When an option requires an argument and we print a
	message, call `usage' and exit.

	Fix all calls to `usage' to use EXIT_FAILURE and EXIT_SUCCESS
	instead of 1 and 0.

Sun Oct  4 21:46:11 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (main): Don't reset argv[0] to myname. In call
	to `init_args', pass argv[0] if do_posix. Based on
	Fedora bug report.

Sun Oct  4 18:45:06 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* array.c (assoc_lookup): In lint warning, don't clobber
	the character at the end of the subscript; instead use the
	length to limit the number of characters printed. Thanks to
	Nick Hobson <nick.hobson@yahoo.com>.

Sun Aug 30 22:40:12 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (do_length): Handle the case where Node_var_new
	was passed in as a parameter via a function call parameter.
	Thanks to Greg Johnson <gregfjohnson@yahoo.com> for reporting
	the bug.

Tue Aug 11 19:23:51 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (parenthesize_expr): New function.
	(tree_eval): Use it for Node_and and Node_or. Thanks to
	Hermann Peifer <peifer@gmx.eu> for reporting the bug.

Tue Aug  4 06:04:23 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): zero_flag does not apply to
	%c and %s conversions. Thanks to Mike Brennan and Thomas Dickey
	for the bug report.

Tue Jul 21 22:28:56 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* Release 3.1.7: Release tar file made.

Fri Jul 17 08:35:10 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.c: Rebuilt with current Bison (2.4.1).

Thu Jul  9 22:55:17 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* (NEWS README array.c awk.h awkgram.y builtin.c configure 
	configure.ac custom.h dfa.c ext.c field.c floatcomp.c io.c
	main.c node.c profile.c re.c replace.c): Update copyrights
	and other prep for a release.

Thu Jul  9 22:20:04 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (init_locale): New function to make a deep copy of the
	struct lconv. Thanks to KIMURA Koichi <kimura.koichi@canon.co.jp>
	for the info.
	* eval.c (r_tree_eval): Further improve Node_assign_concat code to
	temporarily to keep reference counts correct and to get the
	desired behavior.

Mon Jul  6 20:29:12 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* floatmagic.h: Remove @ signs copied from Texinfo.
	It would help if I were more awake.

Sat Jul  4 21:55:18 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* Makefile.am (base_sources): Add floatmagic.h so it'll
	go into the tar ball.

Fri Jul  3 13:47:36 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (is_scalar): Add Node_func_call to list.
	(pp_concat): Make logic smarter for tree created by Node_assign_concat.

Fri Jul  3 13:01:49 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.y (optimize_concat): New function that applies
	Node_assign_concat more generally.
	* eval.c (r_tree_eval): Improve Node_assign_concat code to temporarily
	increase the stref on `l' to avoid side effects during evaluation of
	`r'. This makes test/nasty.awk work. Ouch.

Tue Jun 30 22:10:37 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* floatmagic.h: New file.
	* builtin.c (format_tree): Use functions defined in floatmagic.h.

Tue Jun 30 21:57:47 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac, Makefile.am: Add new --disable-libsigsegv command line
	option to configure.
	(LIBSIGSEGV, SEGVINCLUDE, SEGVSUBDIR): New variables that will be empty
	if libsigsegv is disabled so nothing will happen, and that will have the
	right values otherwise. They are then substituted into the Makefile.

Wed Jun 24 23:00:10 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* bootstrap.sh: Revised. Now works again. We think. (CVS-only file)

Wed Jun 24 21:57:30 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* custom.h: Move z/OS EXIT_FAILURE definition from here to ...
	* awk.h: Here. Define at end after regular definition.

Thu Jun 18 06:17:38 2009  Scott Deifik  <scottd@amgen.com>

	* awk.h: Don't define HAVE_SIGSEGV_H for DJGPP.

Thu Jun 18 05:38:42 2009  Dave Pitts         <dpitts@cozx.com>

	* custom.h: Changes needed for z/OS.

Wed Jun 10 08:22:53 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* node.c (parse_escape): Add a lint warning if \x.. has more than two
	hex digits.

2009-06-08  gettextize  <bug-gnu-gettext@gnu.org>

	* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.

Mon Jun  8 22:13:49 2009  Arnold D. Robbins  <arnold@skeeve.com>

	Update to Autoconf 2.63, Automake 1.11, Libtool 2.2.6a

	* ltmain.sh: New file.
	* configure.ac: Changes to keep infrastructure tools happy.
	* alocal.m4, configure: Regenerated.
	* Makefile.in, */Makefile.in: Regenerated.

Mon Jun  8 07:43:25 2009  John DuBois        <spcecdt@armory.com>

	* builtin.c (mbc_byte_count, mbc_char_count): Make sure all declarations
	come before executable code, for older compilers.
	* dfa.c (insert): Ditto.
	* io.c (devoopen): Ditto.

Thu May 21 21:11:44 2009  Arnold D. Robbins  <arnold@skeeve.com>
 
 	Add simple constant folding.
 
	* awk.h (do_optimize): New declaration.
	(calc_exp): Add declaration.
	* eval.c (calc_exp): Make non-static.
	* main.c (do_optimize): New variable.
	(opttab): Add new entry for --optimize.
	(main): Add 'O' to optlist and code for argument parsing.
	(usage): Update for new option.
	* awkgram.y (Node_concat, Node_exp, Node_times, Node_quotient, Node_mod,
	Node_plus, Node_minus): Call `constant_fold' to create the node in
 	the tree.
	(constant_fold): New function.

Fri May 15 16:02:01 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awk.h (getnode): For MPROF: Fix a typo.

Fri May 15 14:10:44 2009  Arnold D. Robbins  <arnold@skeeve.com>

	Function arguments cannot be reserved variable names, per POSIX.

	* main.c (struct varinit): Add flags member.
	(varinit): Add values for flags member (one or both of NON_STANDARD
	or NO_INSTALL). Add entries for the rest of the gawk variables and
	sort them, so that the table can be searched by ...
	(is_std_var): New routine to see if a name is a standard variable.
	* awk.h (is_std_var): Add declaration.
	* awkgram.y (func_install): Use new routine and issue error.

Wed Apr 22 07:42:05 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (sub_common): In code for handling \<dig> replacements,
	first make sure that <dig> is within the range of parentheses sets
	given, and then make sure that the subpattern start is not -1, meaning
	that something actually matched. Thanks to  Martin Olsson
	<mnemo@minimum.se> for the bug report.
	(do_length): Add a lint warning if `length' is passed an untyped
	argument.

Thu Apr 16 22:59:32 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* eval.c (func_call): Save nloops_active; if after function returns
	the actual nloops_active is greater than the saved value, it means
	there was a return inside the loop body, so pop off the necessary
	number of loops.  Bug reported by Aleksey Cheusov <a.cheusov@gmail.com>.
	Gawk was not leaking memory - that is, things were still pointed
	to, but memory use could keep on growing.

Fri Mar 27 10:59:11 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): Add lint warnings for fieldwidth and/or
	precision in %%, and add lint warning for unknown format specifier
	(e.g. %b). Thanks to "joanes.polus" <joanes.polus@laposte.net> for
	the report.

Wed Mar 18 18:15:41 2009	Pat Rankin	<rankin@pactechdata.com>

	* awk.h (EXIT_SUCCESS, EXIT_FAILURE): Move VMS-specific values
	to vms/vms-conf.h.
	(EXIT_FATAL): Define here instead of in msg.c.
	* msg.c (EXIT_FATAL): Move definition to awk.h.

Mon Mar 16 18:58:09 2009	Pat Rankin	<rankin@pactechdata.com>

	* main.c [#if HAVE_SIGSEGV_H]: For the #else case (VMS),
	(stackoverflow_context_t): Dummy typedef for use in prototypes;
	(stackoverflow_install_handler): Make macro expand to 0 rather
	than nothing so that (void) cast on invocation of it works.

	* main.c (catchstackoverflow): Don't return 0 from void function.

Wed Feb 25 21:34:14 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.y (tokentab): Have only one copy of BEGIN / END.
	(tokcompare): New function.
	(check_special): Sort tokentab for EBCDIC systems.

Sun Feb 15 22:39:30 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (pp_delete): Print tree->exec_count to actually get
	the value printed. Thanks to Hermann Peifer <peifer@gmx.eu>
	for reporting the bug.

Thu Feb 12 21:54:34 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awkgram.y: Change to use EXIT_FAILURE.
	* msg.c [EXIT_FATAL]: New macro.
	* msg.c (r_fatal): Change to use EXIT_FATAL.
	Thanks to Pat Rankin for pointing these out.
	* re.c (reflags2str): Account for RE_SYNTAX_EMACS.
	* awk.h: If not VMS, define HAVE_SIGSEGV_H.
	* main.c: Check HAVE_SIGSEGV_H before including <sigsegv.h>. If not
	there, define dummy macros.
	(catchsegv, catchstackoverflow): Remove unneeded comment. Add return 0
	for compilers that care.

Mon Feb  9 05:24:52 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* awk.h [CONST]: Renamed CONSTANT to avoid conflict with libsigsegv
	on Windows.
	* awkgram.y, field.c, re.c: Update all uses.

Tue Feb  3 22:46:59 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (do_close): Wrap updating of ERRNO in check for not
	do_traditional.

Sat Jan 31 23:14:00 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): For '%s', don't count the multibyte
	characters if we are just copying all the characters. Gives
	big speedup. Thanks to Hirofumi Saito <hi_saito@yk.rim.or.jp>
	for reporting the problem.

Thu Jan 29 21:14:30 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* field.c (parse_field, re_parse_field, def_parse_field,
	posix_def_parse_field, null_parse_field, sc_parse_field,
	fw_parse_field): Add new last arg `in_middle'.  Ignored by all
	except re_parse_field.
	(re_parse_field): Enhance logic to only allow ^ in a regex to match
	if indeed at the beginning of a record.
	(getfield): Adjust call to parse_field.

Tue Jan 27 21:42:47 2009  Arnold D. Robbins  <arnold@skeeve.com>

	Changes suggested by Toni Schilling <Schilling@equicon.de>,
	as modified by feedback from Pat Rankin, and some help
	from me.

	* awk.h [WEXITSTATUS]: Improve definition for MSC and VMS.
	[EXIT_SUCCESS, EXIT_FAILURE]: Define if they aren't.
	* io.c, main.c, profile.c: Switch to using EXIT_xxx instead of
	0 and 1.
	(main): Use constants instead of 0/1 for exit_val variable.
	* eval.c (interpret): Map exit value from `exit' statement into
	success / fail constants for VMS for exit_val variable.

Tue Jan 20 07:35:34 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* regex.h: Define __USE_GNU if not _LIBC; needed for non-GLIBC
	systems such as, oh say, Mac OS X.

Tue Jan 13 09:23:40 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* regex.c, regex_internal.h: Remove some changes that are no
	longer needed after sync with GLIBC.

Mon Jan 12 22:27:10 2009  Arnold D. Robbins  <arnold@skeeve.com>

	Bi-annual sync with GLIBC.

	* regexec.c, regex.h, regex_internal.c, regcomp.c, regex_internal.h,
	regex.c: Reapply any portability patches specific to gawk.
	* getopt.c: Sync with GLIBC.

	Base versions:
		getopt.c		1.57	Thu Jan  8 20:02:05 2009		
		getopt.h		1.21	Fri Mar 19 00:19:32 2004		
		getopt1.c		1.10	Tue Mar  9 10:35:37 2004		
		getopt_int.h		1.1	Tue Mar  9 10:31:19 2004		
		regex.c			1.129	Tue Sep  6 20:49:44 2005		
		regexec.c		1.99	Thu Jan  8 20:02:06 2009		
		regexec.c		1.99	Thu Jan  8 20:02:06 2009		
		regex.h			1.43	Wed Jan 16 10:09:47 2008		
		regex_internal.c	1.69	Thu Jan  8 20:02:06 2009		
		regex_internal.h	1.76	Thu Jan  8 20:02:06 2009		
		regcomp.c		1.120	Thu Jan  8 20:02:06 2009		

Mon Jan  5 23:07:58 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (devopen): Add a retry to calls to socketopen. Tunable
	via undocumented GAWK_SOCK_RETRIES environment variable. Based
	on code from Juergen Kahrs <Juergen.Kahrs@vr-web.de> after a
	suggestion from Hermann Peifer <peifer@gmx.eu>.

Mon Jan  5 22:48:39 2009  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (redirect): A getline from a directory is no longer
	fatal; instead it returns -1. Thanks to Paolo <oopla@users.sf.net>
	for the report.

Mon Dec 29 22:04:57 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): Case for 's', improve logic for setting
	the number of characters to copy, also at pr_tail. Based on
	bug report by Hermann Peifer <peifer@gmx.net>.

Thu Dec 11 21:23:50 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (do_length): If the wide string has zero length
	but the bytes are more than zero, use the number of bytes.
	(do_index): Similar also: fall back to byte count if the
	bytes don't make a wide-character string.
	Bug reported by "Carlos G." <charlie.brown.uy@gmail.com>

	(do_substr): If defaulting to length of rest of the string,
	do it based on the wide char string if it's valid.

Fri Dec  5 11:12:11 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (free_rp): New function.
	(redirect): Improved logic for yesterday's change, including
	use of free_rp.
	(close_redir): Use free_rp.

Thu Dec  4 22:35:05 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (redirect): Only put the new struct redirect into
	the list if the file or pipe could actually be opened. Fixes
	a bug with the wrong return value of close, noticed by
	Seb <sbb@tuxfamily.org>.
	* dfa.c (parse_bracket_exp_mb): Don't zero out work_mbc->chars
	after we malloc'ed it. Fixes a leak found by valgrind when
	using UTF-8.  (Hmmm. This got fixed in January 2007; It seems
	to have crept back into the code in the August 2007 merge with
	GNU grep. Sigh.)

Mon Oct 20 11:47:59 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac: Add -g3 and -gdwarf-2 to CFLAGS if compiling with
	GCC and doing development. Should have done this ages ago.

Sun Aug 31 22:03:55 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* eval.c (set_BINMODE): Tighten up the code even more so
	that it matches the documentation.

Mon Aug 25 22:41:47 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* eval.c (set_BINMODE): Tighten up the code to only allow
	certain reasonable values when setting BINMODE.

Fri Aug 22 14:43:49 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (nextfile): Users Strong In The Ways Of The Source can use
	non-existant files on the command line without it being a fatal error.

Wed Jul 30 23:10:51 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* re.c (research): Don't ever use DFA if need_start. It can
	break on some weird cases.  Reported by
	 "T. X. G." <leopardie333@yahoo.com>.

Wed Jul 30 22:27:20 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (do_match): Add MAYBE_NUM flag to elements of array
	created by `match' since data could come from user. Similar
	semantics to `split'. Thanks to Dr. Dirk Zimoch <dirk.zimoch@psi.ch>
	for reporting the bug.

Tue Jun 24 07:44:06 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c (insert): Reworked for significant speed improvement
	by Johan Walles <johan.walles@gmail.com>. Imported from grep
	bug list.
	* profile.c (tree_eval): Do a return after all the built-in
	variables instead of a break. Thanks again to Hermann Peifer
	<peifer@gmx.eu> for finding the problem.

Sun Jun 22 23:08:14 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* node.c (format_val): Restore old code to use %ld when the value
	is within the range of a long; improves performance noticably for
	applications that convert integers to strings.  Use %.0f only for
	integral values that are outside the range of a long. Thanks to
	Hermann Peifer <peifer@gmx.eu> for pointing out the existence
	of a problem.

Fri May 23 12:08:24 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c (epsclosure): Change type of `visited' from int to char for
	potential speedup. Based on bug report to bug-grep list from
	Johan Walles <johan.walles@gmail.com>.

Wed May 14 05:55:48 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (format_tree): For `%c' case, add a lint warning
	if the value is greater than 255.
	(mbc_byte_count, mbc_char_count): Remove unused variable `i'.

Thu Apr 24 20:31:03 2008  Bruno Haible       <bruno@clisp.org>

	* main.c (main): Move call to catch SIGBUS to before installation of
	libsigsegv handler, since on some systems libsigsegv installs its
	own handler for SIGBUS.
	[STACK_SIZE]: Add a constant instead of inline. ADR.

Wed Apr 23 22:30:27 2008  Duncan Moore       <duncan.m00re@btinternet.com>

	* builtin.c (state): Do as an integer array for systems that need it.
	(do_rand, init_rand): Modify call to `initstate' as needed.

Wed Apr 23 22:22:06 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c (prednames): Add an extra zero to final initializer to
	silence a compiler warning. Reported by Duncan Moore
	<duncan.m00re@btinternet.com>.

Wed Apr 23 21:36:06 2008  Steffen Schuler    <schuler.steffen@googlemail.com>

	* field.c (fw_parse_field): Add code for multibyte case.

Sat Mar 15 22:17:21 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (do_length): Handle the case of the parameter being
	an array that was a function parameter.

Tue Mar 11 22:49:11 2008  Kimura Koichi      <kimura.koichi@canon.co.jp>

	* builtin.c (format_tree): Fix call to mbc_byte_count to pass the
	right number of characters based on the format type.

Tue Mar 11 22:31:58 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* libsigsegv: Incorporated into the dist.
	* Makefile.am (SUBDIRS): Added. Make it first so that the library
	is built before gawk is.
	(LDADD): Add the library.
	(AM_CPPFLAGS): Add -I option to find <sigsegv.h> header.
	* configure.ac: Add call to AC_CONFIG_SUBDIRS for libsigsegv.
	* main.c (catchsegv, catchstackoverflow): New functions.
	(main): Call into sigsegv library with them.

Tue Mar  4 21:02:25 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (mbc_char_count, mbc_byte_count): New functions to return
	the number of m.b. chars there are and the number of bytes needed to
	copy them.
	(format_tree): Use them for %s and %c cases to adjust precision and
	for copying characters at pr_tail label.

Thu Feb 14 14:05:01 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (init_args): Adjust type of third arg to remove warning from
	GCC 4.2, add cast in call to make_string.  Bleah.

Fri Jan 25 12:13:39 2008  Dave Pitts         <dpitts@cozx.com>

	* README_d/README.zos: New file.
	* Makefile.am: Add sed on y.tab.c to convert older Bison "parse error"
	messages to "syntax error" messages.
	* configure.ac: Added ZOS_USS changes.
	* m4/arch.m4: Added ZOS_USS changes.
	* m4/inttypes_h.m4: Added ZOS_USS changes.
	* m4/inttypes.m4: Added ZOS_USS changes.
	* m4/stdint_h.m4: Added ZOS_USS changes.
	* awkgram.y: Added USE_EBCDIC changes for EBCDIC collating sequence.
	* awk.h: Added ZOS_USS compile changes.
	* eval.c: Added EBCDIC casetable and ZOS_USS changes.
	* regcomp.c: Added btowc function for ZOS_USS.
	* regex.h: Changed __string to __cstring to avoid ZOS_USS header usage.
	* regex_internal.h: Added ZOS_USS changes and type defines.

Sun Jan 13 08:16:38 2008  Arnold D. Robbins  <arnold@skeeve.com>

	* dfa.c (epsclosure): Replace MALLOC + zero-out-loop with CALLOC for
	large potential speedup, based on bug report to bug-grep list from
	Johan Walles <johan.walles@gmail.com>.
	(dfaanalyze): Made a similar change.

Fri Dec 21 11:22:16 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (pprint): Add a missing `#ifdef PROFILING'.

Thu Dec 13 22:19:19 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* profile.c (parenthesize): Remove "!" from output string.
	(tree_eval): Fix quotes for delete array case.
	(pp_var): New function, call it as appropriate everywhere else.

Fri Nov 30 11:11:52 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (socketopen): Use NULL as first argument to `getaddrinfo'
	if any_remote_host is true. Should help on Non-GLIBC systems.

Thu Nov 15 22:01:36 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* io.c (two_way_open): Case for ptys. Change search for letters
	to avoid ASCII / EBCDIC problems.

Mon Oct 22 08:49:05 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* Release 3.1.6: Release tar file made.

Sun Oct 14 23:19:12 2007  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	* Makefile.am: Avoid GNU make-specific `make -C'.

Sun Oct 14 19:37:01 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac: Add check for `atexit', needed by replacement
	version of `snprintf'.

Sun Sep 30 21:50:59 2007  Arnold D. Robbins  <arnold@skeeve.com>

	Rationalize locale's influence on %'g, strtonum, and input.

	* awk.h (use_lc_numeric): Add declaration.
	* builtin.c (format_tree): Add check for quote_flag and set
	LC_NUMERIC so that The Right Thing gets done, then reset it.
	(do_strtonum): Pass use_lc_numeric as second arg to isnondecimal.
	* main.c (main): Have do_posix set use_lc_numeric also.

Thu Sep 27 21:36:23 2007  Stepan Kasal       <skasal@redhat.com>

	* configure.ac: Do not instantiate version.c; remove the hack
	to keep version.c from being removed upon `make distclean'.
	* Makefile.am (version.c): New rule.
	(.c.i, SUFFIXES): Remove, `.i' is unused.
	(MAINTAINERCLEANFILES): Remove awkgram.c; Automake takes care of that.

Wed Sep 26 14:40:13 2007  Eli Zaretskii      <eliz@gnu.org>

	* builtin.c (format_tree): Handle non-standard snprintf that
	returns a negative value when the buffer is too small.

Tue Sep 25 23:27:41 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* ChangeLog: Removed all leading spaces. Fixed up formatting of
	entries to have capital letter after the colon. Fixed a number of
	entries to have the '*' in the right place. ASCII instead of ascii.
	Capitalize Linux. (Is this anal-retentive or what? Sheesh.)

Tue Sep 25 08:24:11 2007  KIMURA Koichi      <kimura.koichi@canon.co.jp>

	* awk.h: Add include of <io.h> for Visual Studio.
	* regex_internal.h: Do the right thing for replacing alloca.

Sat Sep 22 23:26:27 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* field.c (set_FIELDWIDTHS): Restore behavior of 3.1.4 that allowed
	FIELDWIDTHS to be "" without crashing, and such a value has NF = 0.
	Yet Another Dark Corner. Thanks to Glenn Zazulia <gnu@t1.zazu.com>
	for pointing out the problem.

	Unrelated:

	* builtin.c (format_free): Make `quote_flag' not sticky. Thanks to
	Ulrich Drepper for pointing this out.
	* main.c (main): Adjust calls to `setlocale' and `localeconv' so that
	the %'d flag will work even if not using the locale's decimal point.

Thu Sep 20 21:02:41 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* array.c (hash, awk_hash, gst_hash_string): Add fourth argument
	pointer to retrieve code. Only assign a value if not NULL.
	Fix most places to pass NULL for fourth argument.
	(assoc_lookup): Save the code in the node for use in growing the
	array later.
	(grow_table): Use the saved code instead of recomputing each time.
	* awk.h (NODE hash): Add `code' member and `ahcode' macro.
	(hash): Revise declaration.
	* awkgram.y: Revise calls to `hash'.

Tue Aug 21 17:47:07 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (copyleft): Cite version 3 of the license.
	* dfa.c: Minor edits to sync with grep 2.5.3.

Sat Aug 11 22:48:11 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* COPYING: Replaced with GPL 3.
	* All other relevent files: Upgraded to GPL 3.

Fri Aug  3 15:01:38 2007  Andrew J. Schorr <ajschorr@users.sourceforge.net>

	* builtin.c (format_tree): Free `obuf' before call to `fatal'
	to keep valgrind happy.

Mon Jun  4 01:12:21 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* All relevant files: Updated copyright year to 2007.

Mon May 28 08:06:15 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* main.c (use_lc_numeric): New variable, true for new
	option `--use-lc-numeric'.
	(optab): Add option "use-lc-numeric".
	(usage): Add to usage message.
	(main): Allow the --use-lc-numeric option to also use the
	local decimal point.

Fri May 18 16:26:00 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* awk.h (_TANDME_SOURCE): Add test for ! _SCO_DS for
	SCO systems.  Thanks to John DuBois <spcecdt@armory.com>

Tue May 15 13:14:04 2007  Arnold D. Robbins  <arnold@skeeve.com>

	General capability suggested by Michael May <mmlpz@t-online.de>.

	* configure.ac: New option --disable-directories-fatal. Makes gawk
	silently skip directories on the command line.
	* io.c (iop_open): Add fourth parameter, pointer to flag which is set
	to true if the file is a directory. In this case, close the fd and
	return NULL.
	(nextfile): Modify call to iop_open. Add logic to check for directory
	and skip if --disable-directories-fatal was used. If the configure flag
	was not used, then if do_traditional also skip.
	(redirect): Modify call to iop_open and call fatal if isdir is true.

Mon May  7 14:51:54 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* POSIX.STD: Updated.

Wed May  2 19:29:56 2007  Stepan Kasal  <kasal@ucw.cz>

	Revert precedence of concatenation and | getline.
	From mail dated 2005-10-31.

	* awkgram.y (common_exp): Move the two rules for naked regexp and
	the rule for "(...) in arr" to ...
	(non_post_simp_exp): ... here ...
	(simp_exp): ... and here, respectively. Fixes test/parsefld.awk/.
	(simp_exp_nc): New nonterminal, needed to fix the
	precedence of concatenation over "|getline".
	(common_exp): Can also start with simp_exp_nc.

Tue May  1 19:53:11 2007  Arnold D. Robbins  <arnold@skeeve.com>

	Work around problem with /ab{0}c/.
	* dfa.h (struct dfa): Add member `broken'.
	* dfa.c (dfainit): Initialize it to false.
	(lex): Set it if `minrep == maxrep && minrep == 0'.
	* re.c (avoid_dfa): Check flag and return TRUE if set.

Tue May  1 05:34:53 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* configure.ac: Add calls to AM_LANGINFO_CODESET, and gt_LC_MESSAGES.
	Thanks to Matthew Burgess <matthew@linuxfromscratch.org>.

Sun Apr 29 22:55:12 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* regcomp.c (utf8_sb_map): Remove const if not __GNUC__ >= 3.
	* regex_internal.h (re_dfa_t): Bracket bizarre macro call with
	check for _LIBC.
	Thanks to Nelson Beebe for finding both problems.

Sun Apr 29 13:10:31 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* builtin.c (do_strftime): Add optional third argument to strftime()
	which if non-zero or non-null means to use UTC.
	* awkgram.y (tokentab): Allow three arguments to strftime.

Fri Apr 27 11:44:27 2007  Arnold D. Robbins  <arnold@skeeve.com>

	* README.cvs, bootstrap.sh: Added to CVS archive, not for
	inclusion in tarballs.

Fri Apr 20 16:48:30 2007        Pat Rankin      <rankin@pactechdata.com>

	* awk.h: Move inclusion of redirect.h before HAVE_func blocks.
[--snip--]
