Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 1999 09:50:02 -0700 (PDT)
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/13615: awk bug 
Message-ID:  <199909081650.JAA94051@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/13615; it has been noted by GNATS.

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Scott Hazen Mueller <scott@zorch.sf-bay.org>
Cc: jraynard@freebsd.org, freebsd-gnats-submit@freebsd.org
Subject: Re: bin/13615: awk bug 
Date: Wed, 08 Sep 1999 18:44:27 +0200

 On Wed, 08 Sep 1999 11:30:46 +0200, Sheldon Hearn wrote:
 
 > I'll see what happens with 3.0.4 (not just one diff) and if it's still a
 > problem, I'll contact the maintainer.
 
 Hmmm.  I upgraded my src/contrib/awk to 3.0.4 and the problem seems to
 be fixed in that version.
 
 You can use the diffs below for now, but I suspect James will want to do
 a proper vendor merge.
 
 Thanks for the useful How-To-Repeat, by the way! :-)
 
 Ciao,
 Sheldon.
 
 Index: ChangeLog
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/ChangeLog,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 ChangeLog
 --- ChangeLog	1997/10/14 18:16:57	1.1.1.1
 +++ ChangeLog	1999/09/08 16:32:51
 @@ -1,3 +1,304 @@
 +Wed Jun 30 16:14:36 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Release 3.0.4: Release tar file made.  This time for sure.
 +
 +Wed Jun 30 16:10:11 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.h: add include of <assert.h>, and comment about config.h
 +	  having to be included before any system headers.  Otherwise,
 +	  with egcs-2.91.66 and later on Linux systems, and possibly
 +	  others, things break badly, due to the LFS macros.
 +	* awk.y, builtin.c, eval.c, field.c, io.c: removed include
 +	  of assert.h
 +
 +Wed Jun  9 11:39:19 1999  Paul Eggert  <eggert@twinsun.com>
 +
 +	Port the large-file code to AIX, HP-UX, and IRIX.
 +	Add cross-compilation support for large files.
 +
 +	* config.guess, config.sub: New files.
 +
 +	* configure.in (AC_CANONICAL_HOST):
 +	  Add; GAWK_AC_SYS_LARGEFILE needs this.
 +	  (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES.
 +
 +	* aclocal.m4 (GAWK_AC_SYS_LARGEFILE): Renamed from GAWK_AC_LARGE_FILES.
 +	  Add support for AIX and HP-UX.
 +	  (GAWK_AC_SYS_LARGEFILE_FLAGS, GAWK_AC_SYS_LARGEFILE_SPACE_APPEND,
 +	  GAWK_AC_SYS_LARGEFILE_MACRO_VALUE): New macros.
 +
 +	* acconfig.h (_FILE_OFFSET_BITS, _LARGEFILE_SOURCE, _LARGE_FILES):
 +	  New macros.
 +
 +	* Makefile.in (MISC): add config.guess and config.sub so they get
 +	  included in the distribution.
 +
 +Wed Jun  9 11:29:29 1999  Paul Eggert  <eggert@twinsun.com>
 +
 +	* io.c (iop_alloc): Don't mmap files whose sizes don't fit in `int'.
 +	  [ This isn't really needed, as HAVE_MMAP is #undef'ed at the top,
 +	  but it's there in case people want to take their life in their hands. ]
 +
 +Sun Jun  6 11:28:07 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.46: Release tar file made.
 +
 +Wed Jun  2 14:36:24 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* PORTS: Updated with a more recent list of systems
 +	  that gawk compiles and tests ok on.
 +
 +Tue Jun  1 14:24:59 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.45: Release tar file made.
 +
 +Tue May 25 16:32:37 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (format_tree): more smarts for weird cases, such as
 +	  zero precisions and zero values used with the `#' flag.
 +	  Thanks to Andreas Schwab (schwab@gnu.org) for pointing these out.
 +
 +Wed May 19 14:02:54 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (do_close): move test for `close(FILENAME)' to after
 +	  loop through all open redirections. Fixes problems in obscure
 +	  cases with redirections in END rules.
 +
 +Sun May 16 14:08:39 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.y (yylex): fix group of characters including ',' to
 +	  set want_assign = FALSE.  Fixes bizarre parsing problems in
 +	  function call lists, for example.
 +	* io.c (get_a_record): repair logic for single-leading-newline
 +	  case.
 +
 +Tue May 11 16:48:11 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* aclocal.m4 (GAWK_AC_AIX_TWEAK): new macro.
 +	* configure.in: call it
 +	* Makefile.in: (awklib/all): pass CFLAGS on to sub-make so
 +	  that password programs will get AIX magic defines. Avoids
 +	  having to tweak program code for those in doc/gawk.texi.
 +
 +Mon May  3 16:56:23 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* array.c (do_delete): don't free_temp(subs) until after all
 +	  references to it are finished.
 +
 +Mon May  3 13:41:16 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.44: Release tar file made.
 +
 +Sun May  2 18:25:43 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (get_a_record): Do a really good job of stripping newlines
 +	  from the front of records when RS = "" and there's only one
 +	  newline at the front of the file, which the regex didn't catch.
 +
 +Wed Apr 28 12:27:49 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* configure.in: more HP stuff: fix the manual alloca code so that
 +	  gawk will compile and link on HP systems. See the comments.
 +
 +Sun Apr 25 13:39:16 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Makefile.in (gawk): add $(CFLAGS) to linking step.
 +	* configure.in: correctly do AC_FUNC_GETPRGP on HP systems too.
 +
 +Tue Apr 13 20:21:00 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.43: Release tar file made.
 +
 +Tue Apr 13 19:02:20 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (useropen, pidopen): add casts to int on arguments to
 +	  silence gcc warnings.
 +	* regex.c (regcomp,regexec,regfree): add ifdef for APPLE.
 +
 +Thu Feb  4 10:38:02 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* custom.h: hacks for BeOS. Not documented in the manual right now.
 +	* configure.in: hacks for BeOS.  Check for HP-UX and define C_ALLOCA
 +	  if not using gcc.  I wish they'd just fix bison already.
 +
 +Sun Dec 20 16:57:38 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.42: Release tar file made.
 +
 +Sun Nov 15 21:05:39 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (gawk_popen): Add WIN32 to list of systems that use
 +	  the non-real-pipe version. From the PC gawk guys.
 +
 +Wed Nov  4 11:32:24 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.41: Release tar file made.
 +
 +Tue Nov  3 16:24:35 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* eval.c (r_get_lhs): Fix the cases for the special variables,
 +	  don't unref their current value if it's the same as the internal
 +	  copy; perhaps the current one is used in a concatenation or some
 +	  other expression somewhere higher up in the call chain.  Ouch.
 +	  See test/getnr2tm.awk.
 +
 +Sun Nov  1 15:24:52 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (format_tree): improve handling of zero-fill
 +	  when a precision is present. See test/zeroflag.awk.
 +
 +Wed Oct 28 20:40:17 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* eval.c (r_tree_eval): Case for Node_concat. Get lengthes
 +	  separately, in case one expression has a side effect that
 +	  that changes another. Ugly, but it keeps gawk from core
 +	  dumping. See test/nasty.awk.
 +
 +Sun Oct 18 21:27:24 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.y (append_right): bug fix, if `list' or `new' are NULL,
 +	  return `list', so that things don't break too badly.
 +	* regex.c (re_compile_fastmap): remove unused variable `num_regs'.
 +
 +Thu Oct  8 19:36:57 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* BETA Release 3.0.40: Release tar file made.
 +
 +Mon Jul 27 10:14:33 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* node.c (parse_escape): Remove assignment with side effects
 +	  from ISXDIGIT test. Thanks to "Mihai T. LAZARESCU"
 +	  <mihai@ccmserv.polito.it> for pointing this out.
 +
 +Mon Apr 27 11:31:32 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* main.c (usage): fix the email address for the bug list.
 +	  (copyleft): update the copyright year.
 +
 +Mon Mar 23 21:22:32 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* eval.c (r_get_lhs): make sure that values of type
 +	  Node_param_list don't have the FUNC flag set. This means
 +	  we don't allow the use of a function name as a variable or
 +	  array from within the function.
 +
 +Sun Mar 22 19:12:32 1998  Paul Eggert  <eggert@twinsun.com>
 +
 +	* aclocal.m4 (GAWK_AC_LARGE_FILES): new macro that checks for
 +	  large file support, and updates CPPFLAGS, LDFLAGS, LIBS as
 +	  needed.
 +	* configure.in: call GAWK_AC_LARGE_FILES.
 +	* Makefile.in (CPPFLAGS, LDFLAGS): Let autoconf configure.
 +	(COMPFLAGS): Add $(CPPFLAGS).
 +
 +Mon Mar 16 14:06:41 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* field.c (using_FIELDWIDTHS): new macro.
 +	  (using_fieldwidths): use new macro.
 +	  (do_split): in case for FS_DFLT, also check that
 +	  we're not using FIELDWIDTHS. Otherwise, split() would use
 +	  FIELDWIDTHS, not current value of FS. Oops.
 +
 +Sun Nov 16 20:08:59 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (sub_common): fix for count of matches in gsub
 +	  from Geert.Debyser@esat.kuleuven.ac.be.
 +
 +Wed Oct 15 03:38:12 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* field.c (set_FS): Use `sc_parsefield' if the value of FS is not
 +	  alphabetic OR if not ignoring case. Bug fix if IGNORECASE
 +	  is true and FS happens to be '^'. Sheesh, talk about obscure.
 +	  (rebuild_record): Add more smarts to the code that sets up the
 +	  fields. Thanks to Alan J. Broder (ajb@dtmr.com).
 +
 +Sun Oct  5 11:56:52 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* configure.in: if ISC add -D_SYSV3 to CFLAGS, per email from
 +	  Mario Vanoni (vanonim@dial.eunet.ch).
 +
 +Fri Sep 26 00:57:49 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.y (append_right): return if either list is NULL. Prevents
 +	  syntax errors from causing core dumps.
 +
 +Wed Sep 17 15:34:15 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* field.c (rebuild_record): set things up so that all fields point
 +	  into the new record and release any changed fields without
 +	  causing memory leaks.  Avoids problems when fields are extended
 +	  with the value of $0 or other fields and then $0 is assigned to.
 +
 +Mon Sep 15 16:12:55 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (do_print): when testing for NUMBER, make sure
 +	  it's not a string too. Thanks to Michael Brennan for
 +	  clarifying the semantics.
 +
 +Sun Sep 14 19:55:12 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* node.c (format_val): always format values ourselves: avoids
 +	  problems if OFMT is bizarre, like %s.
 +
 +Sun Sep 14 00:08:53 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (get_a_record): replace all occurrences of the test
 +	  `grRS == FALSE' with `RS_is_null' which makes ` RS = "\0" '
 + 	  actually work, is clearer code, and actually makes use of
 +	  the `RS_is_null' variable!
 +
 +Sun Aug 17 07:15:12 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* field.c (set_FS): Change logic to always set parse_field, even
 +	  if FS hasn't changed. Thanks to Igor Sheyn for catching this.
 +
 +Wed Aug  6 21:04:37 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* io.c (VMS et al gawk_popen): use pclose, not fclose, if
 +	  iop_alloc fails.
 +
 +Wed Jul 30 19:53:52 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.y [variable]: fix case for subscript if $3 == NULL.
 +
 +Sun Jul 27 22:47:30 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* awk.y (get_src_buf): don't close file if it's stdin.
 +
 +Sun Jul 27 22:47:15 1997  Pat Rankin  <rankin@eql.caltech.edu>
 +
 +	* io.c (#if VMS: vmsrtl_fileno): new routine.
 +	  (#if VMS: fileno): new macro substituted for stdio one.
 +
 +Thu Jul 17 20:05:59 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (do_print): When OFMT != CONVFMT, create a new
 +	  temporary node with just the numeric value valid and format it,
 +	  and use that for printing. Avoids memory corruption.
 +
 +Wed Jul 16 10:01:16 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* regex.c: When SYNTAX_TABLE is defined, but not emacs, then
 +	  CHAR_SET_SIZE is not defined, though used in regcomp.  It should
 +	  be taken out of #ifdef SYNTAX_TABLE. Fix from bug group, from
 +	  Akim Demaille, demaille@inf.enst.fr.
 +	* awk.h (isnondecimal): make test a little smarter.
 +	  builtin.c (nondec2awknum): add bailout for decimal numbers, e.g.
 +	  `00.1'. Fix from Larry Schwimmer <rosebud@cyclone.Stanford.EDU>.
 +
 +Thu Jun 19 19:00:40 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* eval.c (interpret): case Node_K_next, Node_K_nextfile: fatal
 +	  error if called from BEGIN or END.
 +	  (Fixed completely Mon May  3 13:31:42 1999.)
 +
 +Mon Jun  9 22:40:04 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* builtin.c (nondec2awknum): Allow `f' and `F' in hexadecimal numbers.
 +	  Gotta get more sleep...
 +	* array.c (assoc_lookup): Fix from Tom Karzes (karzes@equator.com)
 +	  for memory leak when forcing type to Node_var_array.
 +
  Thu May 15 12:49:08 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us>
  
  	* Release 3.0.3: Release tar file made.
 Index: FREEBSD-upgrade
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/FREEBSD-upgrade,v
 retrieving revision 1.5
 diff -u -d -r1.5 FREEBSD-upgrade
 --- FREEBSD-upgrade	1998/03/10 19:25:14	1.5
 +++ FREEBSD-upgrade	1999/09/08 16:34:38
 @@ -23,6 +23,8 @@
  atari/
  awklib/
  awktab.c
 +config.guess
 +config.sub
  configh.in
  configure
  configure.in
 @@ -33,6 +35,7 @@
  doc/awkforai.txt
  doc/cardfonts
  doc/colors
 +doc/awk.texi
  doc/igawk.1
  doc/macros
  doc/no.colors
 Index: FUTURES
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/FUTURES,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 FUTURES
 --- FUTURES	1997/10/14 18:16:56	1.1.1.1
 +++ FUTURES	1999/09/08 16:32:51
 @@ -73,8 +73,6 @@
  
  	Use GNU malloc.
  
 -	Use rx instead of regex.
 -
  	DONE: Do a reference card.
  
  	? Have strftime() pay attention to the value of ENVIRON["TZ"]
 Index: NEWS
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/NEWS,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 NEWS
 --- NEWS	1997/10/14 18:16:54	1.1.1.1
 +++ NEWS	1999/09/08 16:32:51
 @@ -1,3 +1,79 @@
 +Changes from 3.0.3 to 3.0.4
 +---------------------------
 +
 +This is a bug fix release only, pending further development on 3.1.0.
 +
 +Bugs Fixed:
 +
 + 1. A memory leak when turning a function parameter into an array was
 +    fixed.
 +
 + 2. The non-decimal data option now works correctly.
 +
 + 3. Using an empty pair of brackets as an array subscript no longer causes
 +    a core dump during parsing.  In general, syntax errors should not
 +    cause core dumps any more.
 + 
 + 4. Standard input is no longer closed if it provides program source,
 +    avoiding strange I/O problems.
 +
 + 5. Memory corruption during printing with `print' has been fixed.
 +
 + 6. The gsub function now correctly counts the number of matches.
 +
 + 7. A typo in doc/Makefile.in has been fixed, making installation work.
 +
 + 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal.
 +
 + 9. Subtle problems in rebuilding $0 when fields were changed have been
 +    fixed.
 +
 +10. `FS = FS' now correctly turns off the use of FIELDWIDTHS.
 +
 +11. Gawk now parses fields correctly when FS is a single character.
 +
 +12. It is now possible for RS to be the NUL character ("\0").
 +
 +13. Weird problems with number conversions on MIPS and other systems
 +    have been fixed.
 +
 +14. When parsing using FIELDWIDTHS is in effect, split() with no third
 +    argument will still use the value of FS.
 +
 +15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at
 +    compile time, thanks to Paul Eggert.
 +
 +16. Attempting to use the name of a function as a variable or array
 +    from within the function is now caught as a fatal error, instead
 +    of as a core dump.
 +
 +17. A bug in parsing hex escapes was fixed.
 +
 +18. A weird bug with concatenation where one expression has side effects
 +    that changes another was fixed.
 +
 +19. printf/sprintf now behave much better for uses of the '0' and '#' flags
 +    and with precisions and field widths.
 +
 +20. Further strangenesses with concatenation and multiple accesses of some
 +    of the special variables was fixed.
 +
 +21. The Atari port is marked as no longer supported.
 +
 +22. Build problems on HP-UX have been fixed.
 +
 +23. Minor fixes and additional explanations added to the documentation.
 +
 +24. For RS = "", even a single leading newline is now correctly stripped.
 +
 +25. Obscure parsing problems for regex constants like /=.../ fixed, so
 +    that a regex constant is recognized, and not the /= operator.
 +
 +26. Fixed a bug when closing a redirection that matched the current
 +    or last FILENAME.
 +
 +27. Build problems on AIX fixed.
 +
  Changes from 3.0.2 to 3.0.3
  ---------------------------
  
 Index: PORTS
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/PORTS,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 PORTS
 --- PORTS	1997/10/14 18:16:54	1.1.1.1
 +++ PORTS	1999/09/08 16:32:51
 @@ -1,36 +1,27 @@
 -A recent version of gawk has been successfully compiled and run "make test"
 +Gawk 3.0.4 has been successfully compiled and run "make test"
  on the following:
  
 -Using cc:
 -	Dec Alpha OSF 4.0
 -	HP9000/755 HP-UX 9.01
 -	IBM PowerPC AIX 4.1.4.0
 -	SCO Unix (OpenServer 5)
 -	SGI IRIX 4.0.5
 -	SGI IRIX 5.3
 -	SGI IRIX 6.1
 -	SGI IRIX 6.2
 -	SunOS 4.1.3
 -	SunOS 5.5
 -	IBM SP2 AIX 4.1
 +Linux 2.2.5                     gcc 2.7.2.3
 +Linux 2.0.33                    gcc 2.7.2.1
 +IRIX64 6.4                      gcc 2.8.1
 +IRIX 5.3                        gcc 2.7.2.2
 +UNIX_SV maxion OS 4.2MP         gcc 2.7.2
 +IRIX 6.2                        gcc 2.7.2.2
 +CYGWIN_95-4.0 20.1 (0.3/1/1)    egcs-2.91.66 (has minor problems due to env.)
  
 -Other systems:
 -	DEC Alpha		Linux/AXP
 -	DEC Alpha               OSF/1 3.2
 -	DECstation 5000         ULTRIX 4.3
 -	HP 9000/735             HP-UX 10.01
 -	IBM RS/6000             AIX 3.2
 -	IBM SP2                 AIX 4.1
 -	Intel x86		DOS  (compiler: djgpp v2, emx+gcc,
 -					and MSC 6.00A, 7, and 8)
 -	Intel x86		Linux 2.0.27
 -	Intel x86		Linux 2.1.36
 -	Intel x86		OS+2 (compiler: emx+gcc)
 -	NeXT Turbostation       Mach 3.3
 -	SGI Indigo/2            IRIX 5.3
 -	SGI O2			IRIX 6.2
 -	SGI PowerChallenge      IRIX 6.1
 -	Sun SPARC		Linux 2.0.22
 -	Sun SPARC               Solaris 2.5
 -	Sun SPARC               Solaris 2.5.1
 -	Sun SPARC               SunOS 4.1.3
 +The builds of gawk-3.0.45, and validation and installation, were
 +successful on these systems:
 +
 +        DEC Alpha               OSF/1 3.2
 +        HP 9000/735             HP-UX 10.01
 +        IBM PowerPC             AIX 4.2
 +        Intel Pentium II MMX    GNU/Linux 2.0.35
 +        NeXT Turbostation       Mach 3.3
 +        SGI Indigo/2            IRIX 5.3
 +        SGI O2 R10000-SC        IRIX 6.3
 +        Sun SPARC               Solaris 2.6
 +
 +On 
 +        SGI Origin 200          IRIX 6.4
 +a build with gcc-2.8.1 succeeded, but several tests failed; a rebuild
 +with c89 fixed the problem.
 Index: POSIX.STD
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/POSIX.STD,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 POSIX.STD
 --- POSIX.STD	1997/10/14 18:16:54	1.1.1.1
 +++ POSIX.STD	1999/09/08 16:32:51
 @@ -1,3 +1,8 @@
 +October 1998:
 +
 +The 1003.2 work has been at a stand-still for ages. Who knows if or
 +when a new revision will actually happen...
 +
  August 1995:
  
  Although the published 1003.2 standard contained the incorrect
 Index: README
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/README,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 README
 --- README	1997/10/14 18:17:01	1.1.1.1
 +++ README	1999/09/08 16:32:51
 @@ -1,10 +1,10 @@
  README:
  
 -This is GNU Awk 3.0.3. It should be upwardly compatible with the Bell
 +This is GNU Awk 3.0.4. It should be upwardly compatible with the Bell
  Labs research version of awk.  It is almost completely compliant with
  the 1993 POSIX 1003.2 standard for awk. (See the note below about POSIX.)
  
 -Patches 1 through 3 just fix bugs -- see NEWS and ChangeLog for details.
 +Patches 1 through 4 just fix bugs -- see NEWS and ChangeLog for details.
  
  See the file INSTALL for installation instructions.
  
 @@ -66,7 +66,7 @@
  outlined in the manual.
  
  Arnold Robbins
 -INTERNET:	arnold@gnu.ai.mit.edu
 +INTERNET:	arnold@gnu.org
  
  BUG REPORTS AND FIXES (non-Unix ports):
  
 @@ -81,7 +81,7 @@
  	Pat Rankin
  	rankin@eql.caltech.edu
  
 -Atari ST:
 +Alpha/Linux:
  	Michal Jaegermann
  	michal@gortel.phys.ualberta.ca
  
 Index: acconfig.h
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/acconfig.h,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 acconfig.h
 --- acconfig.h	1997/10/14 18:17:01	1.1.1.1
 +++ acconfig.h	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1995-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1995-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -30,6 +30,9 @@
  #undef SPRINTF_RET	/* return type of sprintf */
  #undef BITOPS		/* bitwise ops (undocumented feature) */
  #undef NONDECDATA	/* non-decimal input data (undocumented feature) */
 +#undef _FILE_OFFSET_BITS /* bits in a file offset, where this matters */
 +#undef _LARGEFILE_SOURCE /* makes fseeko etc. visible on some hosts */
 +#undef _LARGE_FILES	/* emables large files on AIX-style hosts */
  
  @BOTTOM@
  
 Index: array.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/array.c,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 array.c
 --- array.c	1997/10/14 18:17:01	1.1.1.1
 +++ array.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991 - 97 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -272,7 +272,10 @@
  		fatal("attempt to use scalar as array");
  
  	if (symbol->var_array == NULL) {
 -		symbol->type = Node_var_array;
 +		if (symbol->type != Node_var_array) {
 +			unref(symbol->var_value);
 +			symbol->type = Node_var_array;
 +		}
  		symbol->array_size = symbol->table_size = 0;	/* sanity */
  		symbol->flags &= ~ARRAYMAXED;
  		grow_table(symbol);
 @@ -360,13 +363,14 @@
  			last = bucket, bucket = bucket->ahnext)
  		if (cmp_nodes(bucket->ahname, subs) == 0)
  			break;
 -	free_temp(subs);
  	if (bucket == NULL) {
  		if (do_lint)
  			warning("delete: index `%s' not in array `%s'",
  				subs->stptr, symbol->vname);
 +		free_temp(subs);
  		return;
  	}
 +	free_temp(subs);
  	if (last != NULL)
  		last->ahnext = bucket->ahnext;
  	else
 Index: awk.h
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/awk.h,v
 retrieving revision 1.4
 diff -u -d -r1.4 awk.h
 --- awk.h	1997/10/26 12:14:52	1.4
 +++ awk.h	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -25,6 +25,14 @@
  
  /* ------------------------------ Includes ------------------------------ */
  
 +/*
 + * config.h absolutely, positively, *M*U*S*T* be included before
 + * any system headers.  Otherwise, extreme death, destruction
 + * and loss of life results.
 + *
 + * Well, OK, gawk just won't work on systems using egcs and LFS.  But
 + * that's almost as bad.
 + */
  #ifdef HAVE_CONFIG_H
  #include <config.h>
  #endif
 @@ -34,6 +42,7 @@
  #endif /* _GNU_SOURCE */
  
  #include <stdio.h>
 +#include <assert.h>
  #ifdef HAVE_LIMITS_H
  #include <limits.h>
  #endif /* HAVE_LIMITS_H */
 @@ -588,7 +597,8 @@
  /* ------------------------- Pseudo-functions ------------------------- */
  
  #define is_identchar(c)		(isalnum(c) || (c) == '_')
 -#define isnondecimal(str)	(((str)[0]) == '0')
 +#define isnondecimal(str)	(((str)[0]) == '0' && (ISDIGIT((str)[1]) \
 +					|| (str)[1] == 'x' || (str)[1] == 'X'))
  
  #ifdef MPROF
  #define	getnode(n)	emalloc(n, NODE *, sizeof(NODE), "getnode")
 Index: awk.y
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/awk.y,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 awk.y
 --- awk.y	1997/10/14 18:16:58	1.1.1.1
 +++ awk.y	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -830,7 +830,9 @@
  		{ $$ = variable($1, CAN_FREE, Node_var); }
  	| NAME '[' expression_list ']'
  		{
 -		if ($3->rnode == NULL) {
 +		if ($3 == NULL) {
 +			fatal("invalid subscript expression");
 +		} else if ($3->rnode == NULL) {
  			$$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3->lnode);
  			freenode($3);
  		} else
 @@ -1169,7 +1171,8 @@
  				warning("source file `%s' is empty", source);
  			}
  		}
 -		close(fd);
 +		if (fileno(stdin) != fd)	/* safety */
 +			close(fd);
  		samefile = FALSE;
  		nextfile++;
  		if (lexeme)
 @@ -1451,14 +1454,17 @@
  	case ':':
  	case '?':
  		allow_newline();
 -		/* fall through */
 +		return lasttok = c;
 +
  	case ')':
  	case ']':
  	case '(':	
 -	case '[':
  	case ';':
  	case '{':
  	case ',':
 +		want_assign = FALSE;
 +		/* fall through */
 +	case '[':
  		return lasttok = c;
  
  	case '*':
 @@ -2108,6 +2114,9 @@
  {
  	register NODE *oldlist;
  	static NODE *savefront = NULL, *savetail = NULL;
 +
 +	if (list == NULL || new == NULL)
 +		return list;
  
  	oldlist = list;
  	if (savefront == oldlist) {
 Index: builtin.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/builtin.c,v
 retrieving revision 1.5
 diff -u -d -r1.5 builtin.c
 --- builtin.c	1997/10/26 12:14:52	1.5
 +++ builtin.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -25,7 +25,6 @@
  
  
  #include "awk.h"
 -#include <assert.h>
  #undef HUGE
  #undef CHARBITS
  #undef INTBITS
 @@ -410,6 +409,7 @@
  	double tmpval;
  	char signchar = FALSE;
  	size_t len;
 +	int zero_flag = FALSE;
  	static char sp[] = " ";
  	static char zero_string[] = "0";
  	static char lchbuf[] = "0123456789abcdef";
 @@ -437,6 +437,7 @@
  		prec = 0;
  		have_prec = FALSE;
  		signchar = FALSE;
 +		zero_flag = FALSE;
  		lj = alt = big = bigbig = small = FALSE;
  		fill = sp;
  		cp = cend;
 @@ -460,10 +461,9 @@
  			break;
  
  		case '0':
 +			zero_flag = TRUE;
  			if (lj)
  				goto retry;
 -			if (cur == &fw)
 -				fill = zero_string;
  			/* FALL through */
  		case '1':
  		case '2':
 @@ -587,6 +587,8 @@
  			goto retry;
  		case 'c':
  			need_format = FALSE;
 +			if (zero_flag && ! lj)
 +				fill = zero_string;
  			parse_next_arg();
  			/* user input that looks numeric is numeric */
  			if ((arg->flags & (MAYBE_NUM|NUMBER)) == MAYBE_NUM)
 @@ -611,6 +613,8 @@
  			goto pr_tail;
  		case 's':
  			need_format = FALSE;
 +			if (zero_flag && ! lj)
 +				fill = zero_string;
  			parse_next_arg();
  			arg = force_string(arg);
  			if (! have_prec || prec > arg->stlen)
 @@ -622,6 +626,14 @@
  			need_format = FALSE;
  			parse_next_arg();
  			tmpval = force_number(arg);
 +
 +			/*
 +			 * ``The result of converting a zero value with a
 +			 * precision of zero is no characters.''
 +			 */
 +			if (have_prec && prec == 0 && tmpval == 0)
 +				goto pr_tail;
 +
  			if (tmpval < 0) {
  				if (tmpval < LONG_MIN)
  					goto out_of_range;
 @@ -639,17 +651,28 @@
  				*--cp = (char) ('0' + uval % 10);
  				uval /= 10;
  			} while (uval > 0);
 +
 +			/* add more output digits to match the precision */
 +			if (have_prec) {
 +				while (cend - cp < prec)
 +					*--cp = '0';
 +			}
 +
  			if (sgn)
  				*--cp = '-';
  			else if (signchar)
  				*--cp = signchar;
  			/*
 -			 * precision overrides '0' flags. however, for
 -			 * integer formats, precsion is minimum number of
 -			 * *digits*, not characters, thus we want to fill
 -			 * with zeroes.
 +			 * When to fill with zeroes is of course not simple.
 +			 * First: No zero fill if left-justifying.
 +			 * Next: There seem to be two cases:
 +			 * 	A '0' without a precision, e.g. %06d
 +			 * 	A precision with no field width, e.g. %.10d
 +			 * Any other case, we don't want to fill with zeroes.
  			 */
 -			if (have_prec)
 +			if (! lj
 +			    && ((zero_flag && ! have_prec)
 +				 || (fw == 0 && have_prec)))
  				fill = zero_string;
  			if (prec > fw)
  				fw = prec;
 @@ -673,6 +696,22 @@
  			need_format = FALSE;
  			parse_next_arg();
  			tmpval = force_number(arg);
 +
 +			/*
 +			 * ``The result of converting a zero value with a
 +			 * precision of zero is no characters.''
 +			 *
 +			 * If I remember the ANSI C standard, though,
 +			 * it says that for octal conversions
 +			 * the precision is artificially increased
 +			 * to add an extra 0 if # is supplied.
 +			 * Indeed, in C,
 +			 * 	printf("%#.0o\n", 0);
 +			 * prints a single 0.
 +			 */
 +			if (! alt && have_prec && prec == 0 && tmpval == 0)
 +				goto pr_tail;
 +
  			if (tmpval < 0) {
  				if (tmpval < LONG_MIN)
  					goto out_of_range;
 @@ -685,18 +724,29 @@
  				uval = (unsigned long) tmpval;
  			}
  			/*
 -			 * precision overrides '0' flags. however, for
 -			 * integer formats, precsion is minimum number of
 -			 * *digits*, not characters, thus we want to fill
 -			 * with zeroes.
 +			 * When to fill with zeroes is of course not simple.
 +			 * First: No zero fill if left-justifying.
 +			 * Next: There seem to be two cases:
 +			 * 	A '0' without a precision, e.g. %06d
 +			 * 	A precision with no field width, e.g. %.10d
 +			 * Any other case, we don't want to fill with zeroes.
  			 */
 -			if (have_prec)
 +			if (! lj
 +			    && ((zero_flag && ! have_prec)
 +				 || (fw == 0 && have_prec)))
  				fill = zero_string;
  			do {
  				*--cp = chbuf[uval % base];
  				uval /= base;
  			} while (uval > 0);
 -			if (alt) {
 +
 +			/* add more output digits to match the precision */
 +			if (have_prec) {
 +				while (cend - cp < prec)
 +					*--cp = '0';
 +			}
 +
 +			if (alt && tmpval != 0) {
  				if (base == 16) {
  					*--cp = cs1;
  					*--cp = '0';
 @@ -755,7 +805,7 @@
  				*cp++ = signchar;
  			if (alt)
  				*cp++ = '#';
 -			if (fill != sp)
 +			if (zero_flag)
  				*cp++ = '0';
  			cp = strcpy(cp, "*.*") + 3;
  			*cp++ = cs1;
 @@ -1084,6 +1134,7 @@
  	register FILE *fp;
  	int numnodes, i;
  	NODE *save;
 +	NODE *tval;
  
  	if (tree->rnode) {
  		int errflg;		/* not used, sigh */
 @@ -1117,25 +1168,29 @@
  		t[i] = dupnode(n);
  		free_temp(n);
  
 -		if (t[i]->flags & NUMBER) {
 +		if ((t[i]->flags & (NUMBER|STRING)) == NUMBER) {
  			if (OFMTidx == CONVFMTidx)
  				(void) force_string(t[i]);
 -			else
 -				t[i] = format_val(OFMT, OFMTidx, t[i]);
 +			else {
 +				tval = tmp_number(t[i]->numbr);
 +				unref(t[i]);
 +				t[i] = format_val(OFMT, OFMTidx, tval);
 +			}
  		}
  	}
  
  	for (i = 0; i < numnodes; i++) {
  		efwrite(t[i]->stptr, sizeof(char), t[i]->stlen, fp, "print", rp, FALSE);
  		unref(t[i]);
 -		if (i != numnodes - 1) {
 -			if (OFSlen > 0)
 -				efwrite(OFS, sizeof(char), (size_t) OFSlen,
 -					fp, "print", rp, FALSE);
 -		}
 +
 +		if (i != numnodes - 1 && OFSlen > 0)
 +			efwrite(OFS, sizeof(char), (size_t) OFSlen,
 +				fp, "print", rp, FALSE);
 +
  	}
  	if (ORSlen > 0)
  		efwrite(ORS, sizeof(char), (size_t) ORSlen, fp, "print", rp, TRUE);
 +
  	free(t);
  }
  
 @@ -1512,6 +1567,7 @@
  			 */
  			if (lastmatchnonzero && matchstart == matchend) {
  				lastmatchnonzero = FALSE;
 +				matches--;
  				goto empty;
  			}
  			/*
 @@ -2022,6 +2078,7 @@
  			case 'c':
  			case 'd':
  			case 'e':
 +			case 'f':
  				val = *str - 'a' + 10;
  				break;
  			case 'A':
 @@ -2029,6 +2086,7 @@
  			case 'C':
  			case 'D':
  			case 'E':
 +			case 'F':
  				val = *str - 'A' + 10;
  				break;
  			default:
 @@ -2039,11 +2097,12 @@
  	} else if (*str == '0') {
  		for (; len > 0; len--) {
  			if (! isdigit(*str) || *str == '8' || *str == '9')
 -				goto done;
 +				goto decimal;
  			retval = (retval * 8) + (*str - '0');
  			str++;
  		}
  	} else {
 +decimal:
  		save = str[len];
  		retval = atof(str);
  		str[len] = save;
 Index: custom.h
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/custom.h,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 custom.h
 --- custom.h	1997/10/14 18:16:57	1.1.1.1
 +++ custom.h	1999/09/08 16:32:51
 @@ -7,11 +7,11 @@
   * information.
   *
   * If you make additions to this file for your system, please send me
 - * the information, to arnold@gnu.ai.mit.edu.
 + * the information, to arnold@gnu.org.
   */
  
  /* 
 - * Copyright (C) 1995-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1995-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -56,4 +56,11 @@
  /* For sequent, based on email with Aron Griffis <agriffis@calypso.coat.com> */
  #ifdef _SEQUENT_
  #undef HAVE_MMAP
 +#endif
 +
 +/* For BeOS, from mc@whoever.com */
 +#if defined(__dest_os) && __dest_os == __be_os
 +#define BROKEN_STRNCASECMP
 +#define ELIDE_CODE
 +#include <alloca.h>
  #endif
 Index: eval.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/eval.c,v
 retrieving revision 1.3
 diff -u -d -r1.3 eval.c
 --- eval.c	1997/10/26 12:14:53	1.3
 +++ eval.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -25,8 +25,6 @@
  
  #include "awk.h"
  
 -#include <assert.h>
 -
  extern double pow P((double x, double y));
  extern double modf P((double x, double *yp));
  extern double fmod P((double x, double y));
 @@ -566,14 +564,26 @@
  		break;
  
  	case Node_K_next:
 +		if (in_begin_rule)
 +			fatal("`next' cannot be called from a BEGIN rule");
 +		else if (in_end_rule)
 +			fatal("`next' cannot be called from an END rule");
 +
  		if (in_function())
  			pop_fcall_stack();
 +
  		longjmp(rule_tag, TAG_CONTINUE);
  		break;
  
  	case Node_K_nextfile:
 +		if (in_begin_rule)
 +			fatal("`nextfile' cannot be called from a BEGIN rule");
 +		else if (in_end_rule)
 +			fatal("`nextfile' cannot be called from an END rule");
 +
  		if (in_function())
  			pop_fcall_stack();
 +
  		do_nextfile();
  		break;
  
 @@ -759,7 +769,8 @@
  		register size_t len;
  		char *str;
  		register char *dest;
 -		int count;
 +		int alloc_count, str_count;
 +		int i;
  
  		/*
  		 * This is an efficiency hack for multiple adjacent string
 @@ -773,16 +784,16 @@
  		/*
  		 * But first, no arbitrary limits. Count the number of
  		 * nodes and malloc the treelist and strlist arrays.
 -		 * There will be count + 1 items to concatenate. We
 +		 * There will be alloc_count + 1 items to concatenate. We
  		 * also leave room for an extra pointer at the end to
 -		 * use as a sentinel.  Thus, start count at 2.
 +		 * use as a sentinel.  Thus, start alloc_count at 2.
  		 */
  		save_tree = tree;
 -		for (count = 2; tree && tree->type == Node_concat; tree = tree->lnode)
 -			count++;
 +		for (alloc_count = 2; tree && tree->type == Node_concat; tree = tree->lnode)
 +			alloc_count++;
  		tree = save_tree;
 -		emalloc(treelist, NODE **, sizeof(NODE *) * count, "tree_eval");
 -		emalloc(strlist, NODE **, sizeof(NODE *) * count, "tree_eval");
 +		emalloc(treelist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval");
 +		emalloc(strlist, NODE **, sizeof(NODE *) * alloc_count, "tree_eval");
  
  		/* Now, here we go. */
  		treep = treelist;
 @@ -795,15 +806,26 @@
  		 * Now, evaluate to strings in LIFO order, accumulating
  		 * the string length, so we can do a single malloc at the
  		 * end.
 +		 *
 +		 * Evaluate the expressions first, then get their
 +		 * lengthes, in case one of the expressions has a
 +		 * side effect that changes one of the others.
 +		 * See test/nasty.awk.
  		 */
  		strp = strlist;
  		len = 0;
  		while (treep >= treelist) {
  			*strp = force_string(tree_eval(*treep--));
 -			len += (*strp)->stlen;
  			strp++;
  		}
  		*strp = NULL;
 +
 +		str_count = strp - strlist;
 +		strp = strlist;
 +		for (i = 0; i < str_count; i++) {
 +			len += (*strp)->stlen;
 +			strp++;
 +		}
  		emalloc(str, char *, len+2, "tree_eval");
  		str[len] = str[len+1] = '\0';	/* for good measure */
  		dest = str;
 @@ -1397,6 +1419,11 @@
   * r_get_lhs:
   * This returns a POINTER to a node pointer. get_lhs(ptr) is the current
   * value of the var, or where to store the var's new value 
 + *
 + * For the special variables, don't unref their current value if it's
 + * the same as the internal copy; perhaps the current one is used in
 + * a concatenation or some other expression somewhere higher up in the
 + * call chain.  Ouch.
   */
  
  NODE **
 @@ -1409,8 +1436,11 @@
  
  	if (assign)
  		*assign = NULL;	/* for safety */
 -	if (ptr->type == Node_param_list)
 +	if (ptr->type == Node_param_list) {
 +		if ((ptr->flags & FUNC) != 0)
 +			fatal("can't use function name `%s' as variable or array", ptr->vname);
  		ptr = stack_ptr[ptr->param_cnt];
 +	}
  
  	switch (ptr->type) {
  	case Node_var_array:
 @@ -1444,26 +1474,32 @@
  		break;
  
  	case Node_FNR:
 -		unref(FNR_node->var_value);
 -		FNR_node->var_value = make_number((AWKNUM) FNR);
 +		if (FNR_node->var_value->numbr != FNR) {
 +			unref(FNR_node->var_value);
 +			FNR_node->var_value = make_number((AWKNUM) FNR);
 +		}
  		aptr = &(FNR_node->var_value);
  		if (assign != NULL)
  			*assign = set_FNR;
  		break;
  
  	case Node_NR:
 -		unref(NR_node->var_value);
 -		NR_node->var_value = make_number((AWKNUM) NR);
 +		if (NR_node->var_value->numbr != NR) {
 +			unref(NR_node->var_value);
 +			NR_node->var_value = make_number((AWKNUM) NR);
 +		}
  		aptr = &(NR_node->var_value);
  		if (assign != NULL)
  			*assign = set_NR;
  		break;
  
  	case Node_NF:
 -		if (NF == -1)
 -			(void) get_field(HUGE-1, assign); /* parse record */
 -		unref(NF_node->var_value);
 -		NF_node->var_value = make_number((AWKNUM) NF);
 +		if (NF == -1 || NF_node->var_value->numbr != NF) {
 +			if (NF == -1)
 +				(void) get_field(HUGE-1, assign); /* parse record */
 +			unref(NF_node->var_value);
 +			NF_node->var_value = make_number((AWKNUM) NF);
 +		}
  		aptr = &(NF_node->var_value);
  		if (assign != NULL)
  			*assign = set_NF;
 Index: field.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/field.c,v
 retrieving revision 1.3
 diff -u -d -r1.3 field.c
 --- field.c	1997/10/26 12:14:53	1.3
 +++ field.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -24,7 +24,6 @@
   */
  
  #include "awk.h"
 -#include <assert.h>
  
  typedef void (* Setfunc) P((long, char *, long, NODE *));
  
 @@ -63,6 +62,9 @@
  Regexp *FS_regexp = NULL;
  static NODE *Null_field = NULL;
  
 +/* using_FIELDWIDTHS --- static function, macro to avoid overhead */
 +#define using_FIELDWIDTHS()	(parse_field == fw_parse_field)
 +
  /* init_fields --- set up the fields array to start with */
  
  void
 @@ -140,7 +142,6 @@
  	char *ops;
  	register char *cops;
  	long i;
 -	char *f0start, *f0end;
  
  	assert(NF != -1);
  
 @@ -184,15 +185,27 @@
  	 * any fields that still point into it, and have them point
  	 * into the new field zero.
  	 */
 -	f0start = fields_arr[0]->stptr;
 -	f0end = fields_arr[0]->stptr + fields_arr[0]->stlen;
  	for (cops = ops, i = 1; i <= NF; i++) {
 -		char *field_data = fields_arr[i]->stptr;
 +		if (fields_arr[i]->stlen > 0) {
 + 		        NODE *n;
 +		        getnode(n);
  
 -		if (fields_arr[i]->stlen > 0
 -		    && f0start <= field_data && field_data < f0end)
 -			fields_arr[i]->stptr = cops;
 +			if ((fields_arr[i]->flags & FIELD) == 0) {
 +				*n = *Null_field;
 +				n->stlen = fields_arr[i]->stlen;
 +				if ((fields_arr[i]->flags & (NUM|NUMBER)) != 0) {
 +					n->flags |= (fields_arr[i]->flags & (NUM|NUMBER));
 +					n->numbr = fields_arr[i]->numbr;
 +				}
 +			} else {
 +				*n = *(fields_arr[i]);
 +				n->flags &= ~(MALLOC|TEMP|PERM|STRING);
 +			}
  
 +			n->stptr = cops;
 +			unref(fields_arr[i]);
 +			fields_arr[i] = n;
 +		}
  		cops += fields_arr[i]->stlen + ofslen;
  	}
  
 @@ -751,7 +764,7 @@
  	arr->type = Node_var_array;
  	assoc_clear(arr);
  
 -	if (sep->re_flags & FS_DFLT) {
 +	if ((sep->re_flags & FS_DFLT) != 0 && ! using_FIELDWIDTHS()) {
  		parseit = parse_field;
  		fs = force_string(FS_node->var_value);
  		rp = FS_regexp;
 @@ -851,20 +864,20 @@
  	if (fields_arr != NULL)
  		(void) get_field(HUGE - 1, 0);
  
 -	if (save_fs && cmp_nodes(FS_node->var_value, save_fs) == 0
 -	 && save_rs && cmp_nodes(RS_node->var_value, save_rs) == 0)
 -		return;
 -	unref(save_fs);
 -	save_fs = dupnode(FS_node->var_value);
 -	unref(save_rs);
 -	save_rs = dupnode(RS_node->var_value);
 -	resave_fs = TRUE;
 -  	buf[0] = '\0';
 -  	default_FS = FALSE;
 -  	if (FS_regexp) {
 -		refree(FS_regexp);
 -		FS_regexp = NULL;
 +	if (! (save_fs && cmp_nodes(FS_node->var_value, save_fs) == 0
 +		&& save_rs && cmp_nodes(RS_node->var_value, save_rs) == 0)) {
 +		unref(save_fs);
 +		save_fs = dupnode(FS_node->var_value);
 +		unref(save_rs);
 +		save_rs = dupnode(RS_node->var_value);
 +		resave_fs = TRUE;
 +		if (FS_regexp) {
 +			refree(FS_regexp);
 +			FS_regexp = NULL;
 +		}
  	}
 +	buf[0] = '\0';
 +	default_FS = FALSE;
  	fs = force_string(FS_node->var_value);
  	if (! do_traditional && fs->stlen == 0)
  		parse_field = null_parse_field;
 @@ -887,7 +900,7 @@
  		if (fs->stptr[0] == ' ' && fs->stlen == 1)
  			default_FS = TRUE;
  		else if (fs->stptr[0] != ' ' && fs->stlen == 1) {
 -			if (! IGNORECASE)
 +			if (! IGNORECASE || ! isalpha(fs->stptr[0]))
  				parse_field = sc_parse_field;
  			else if (fs->stptr[0] == '\\')
  				/* yet another special case */
 @@ -910,6 +923,5 @@
  int
  using_fieldwidths()
  {
 -	return 	parse_field == fw_parse_field;
 +	return using_FIELDWIDTHS();
  }
 -
 Index: gawkmisc.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/gawkmisc.c,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 gawkmisc.c
 --- gawkmisc.c	1997/10/14 18:16:56	1.1.1.1
 +++ gawkmisc.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991 - 97 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 Index: io.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/io.c,v
 retrieving revision 1.3
 diff -u -d -r1.3 io.c
 --- io.c	1997/10/26 12:14:53	1.3
 +++ io.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1976, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -49,8 +49,6 @@
  #define O_ACCMODE	(O_RDONLY|O_WRONLY|O_RDWR)
  #endif
  
 -#include <assert.h>
 -
  #if ! defined(S_ISREG) && defined(S_IFREG)
  #define	S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  #endif
 @@ -95,20 +93,9 @@
  static int pidopen P((IOBUF *iop, const char *name, const char *mode));
  static int useropen P((IOBUF *iop, const char *name, const char *mode));
  
 -#if defined (MSDOS) && !defined (__GO32__)
 +#if defined (HAVE_POPEN_H)
  #include "popen.h"
 -#define popen(c, m)	os_popen(c, m)
 -#define pclose(f)	os_pclose(f)
 -#else
 -#if defined (OS2)	/* OS/2, but not family mode */
 -#if defined (_MSC_VER)
 -#define popen(c, m)	_popen(c, m)
 -#define pclose(f)	_pclose(f)
  #endif
 -#else
 -extern FILE	*popen();
 -#endif
 -#endif
  
  static struct redirect *red_head = NULL;
  static NODE *RS;
 @@ -125,6 +112,15 @@
  
  static jmp_buf filebuf;		/* for do_nextfile() */
  
 +#ifdef VMS
 +/* File pointers have an extra level of indirection, and there are cases where
 +   `stdin' can be null.  That can crash gawk if fileno() is used as-is.  */
 +static int vmsrtl_fileno P((FILE *));
 +static int vmsrtl_fileno(fp) FILE *fp; { return fileno(fp); }
 +#undef fileno
 +#define fileno(FP) (((FP) && *(FP)) ? vmsrtl_fileno(FP) : -1)
 +#endif	/* VMS */
 +
  /* do_nextfile --- implement gawk "nextfile" extension */
  
  void
 @@ -487,9 +483,10 @@
  			/* too many files open -- close one and try again */
  			if (errno == EMFILE || errno == ENFILE)
  				close_one();
 -#ifdef HAVE_MMAP
 +#if defined __MINGW32__ || defined HAVE_MMAP
  			/* this works for solaris 2.5, not sunos */
 -			else if (errno == 0)	/* HACK! */
 +			/* it is also needed for MINGW32 */
 +			else if (errno == 0)    /* HACK! */
  				close_one();
  #endif
  			else {
 @@ -573,24 +570,22 @@
  
  	tmp = force_string(tree_eval(tree->subnode));
  
 -	/* icky special case: close(FILENAME) called. */
 -	if (tree->subnode == FILENAME_node
 -	    || (tmp->stlen == FILENAME_node->var_value->stlen
 -		&& STREQN(tmp->stptr, FILENAME_node->var_value->stptr, tmp->stlen))) {
 -		(void) nextfile(TRUE);
 -		free_temp(tmp);
 -		return tmp_number((AWKNUM) 0.0);
 -	}
 -
  	for (rp = red_head; rp != NULL; rp = rp->next) {
  		if (strlen(rp->value) == tmp->stlen
  		    && STREQN(rp->value, tmp->stptr, tmp->stlen))
  			break;
  	}
 +
  	if (rp == NULL) {	/* no match */
 -		if (do_lint)
 +		/* icky special case: close(FILENAME) called. */
 +		if (tree->subnode == FILENAME_node
 +		    || (tmp->stlen == FILENAME_node->var_value->stlen
 +			&& STREQN(tmp->stptr, FILENAME_node->var_value->stptr, tmp->stlen))) {
 +			(void) nextfile(TRUE);
 +		} else if (do_lint)
  			warning("close: `%.*s' is not an open file or pipe",
  				tmp->stlen, tmp->stptr);
 +
  		free_temp(tmp);
  		return tmp_number((AWKNUM) 0.0);
  	}
 @@ -888,11 +883,11 @@
  	int i;
  
  	if (name[6] == 'g')
 -		sprintf(tbuf, "%d\n", getpgrp(getpgrp_arg()));
 +		sprintf(tbuf, "%d\n", (int) getpgrp(getpgrp_arg()));
  	else if (name[6] == 'i')
 -		sprintf(tbuf, "%d\n", getpid());
 +		sprintf(tbuf, "%d\n", (int) getpid());
  	else
 -		sprintf(tbuf, "%d\n", getppid());
 +		sprintf(tbuf, "%d\n", (int) getppid());
  	i = strlen(tbuf);
  	spec_setup(iop, i, TRUE);
  	strcpy(iop->buf, tbuf);
 @@ -923,7 +918,7 @@
  	int ngroups;
  #endif
  
 -	sprintf(tbuf, "%d %d %d %d", getuid(), geteuid(), getgid(), getegid());
 +	sprintf(tbuf, "%d %d %d %d", (int) getuid(), (int) geteuid(), (int) getgid(), (int) getegid());
  
  	cp = tbuf + strlen(tbuf);
  #if defined(NGROUPS_MAX) && NGROUPS_MAX > 0
 @@ -1008,7 +1003,7 @@
  	if (openfd == INVALID_HANDLE)
  		openfd = open(name, flag, 0666);
  	if (openfd != INVALID_HANDLE && fstat(openfd, &buf) > 0) 
 -		if ((buf.st_mode & S_IFMT) == S_IFDIR)
 +		if (S_ISDIR(buf.st_mode))
  			fatal("file `%s' is a directory", name);
  	return iop_alloc(openfd, name, iop);
  }
 @@ -1120,7 +1115,7 @@
   * except if popen() provides real pipes too
   */
  
 -#if defined(VMS) || defined(OS2) || defined (MSDOS)
 +#if defined(VMS) || defined(OS2) || defined (MSDOS) || defined(WIN32)
  
  /* gawk_popen --- open an IOBUF on a child process */
  
 @@ -1135,7 +1130,7 @@
  		return NULL;
  	rp->iop = iop_alloc(fileno(current), cmd, NULL);
  	if (rp->iop == NULL) {
 -		(void) fclose(current);
 +		(void) pclose(current);
  		current = NULL;
  	}
  	rp->ifp = current;
 @@ -1434,7 +1429,12 @@
  	iop->name = name;
  	iop->getrec = get_a_record;
  #ifdef HAVE_MMAP
 -	if (S_ISREG(sbuf.st_mode) && sbuf.st_size > 0) {
 +	/* Use mmap only for regular files with positive sizes.
 +	   The size must fit into size_t, so that mmap works correctly.
 +	   Also, it must fit into int, so that iop->cnt won't overflow.  */
 +	if (S_ISREG(sbuf.st_mode) && sbuf.st_size > 0
 +	    && sbuf.st_size == (size_t) sbuf.st_size
 +	    && sbuf.st_size == (int) sbuf.st_size) {
  		register char *cp;
  
  		iop->buf = iop->off = mmap((caddr_t) 0, sbuf.st_size,
 @@ -1535,7 +1535,7 @@
  		return EOF;
  	}
  
 -	if (grRS == FALSE)	/* special case:  RS == "" */
 +	if (RS_is_null)	/* special case:  RS == "" */
  		rs = '\n';
  	else
  		rs = (char) grRS;
 @@ -1648,7 +1648,7 @@
  		 */
  		if (! do_traditional && RSre != NULL)	/* regexp */
  			rsre = RSre;
 -		else if (grRS == FALSE)		/* RS = "" */
 +		else if (RS_is_null)		/* RS = "" */
  			rsre = RS_null_re;
  		else
  			rsre = NULL;
 @@ -1675,6 +1675,21 @@
  			/* cases 1 and 2 are simple, just keep going */
  			if (research(rsre, start, 0, iop->end - start, TRUE) == -1
  			    || RESTART(rsre, start) == REEND(rsre, start)) {
 +				/*
 +				 * Leading newlines at the beginning of the file
 +				 * should be ignored. Whew!
 +				 */
 +				if (RS_is_null && *start == '\n') {
 +					/*
 +					 * have to catch the case of a
 +					 * single newline at the front of
 +					 * the record, which the regex
 +					 * doesn't. gurr.
 +					 */
 +					while (*start == '\n' && start < iop->end)
 +						start++;
 +					goto again;
 +				}
  				bp = iop->end;
  				continue;
  			}
 @@ -1690,8 +1705,10 @@
  			/*
  			 * Leading newlines at the beginning of the file
  			 * should be ignored. Whew!
 +			 *
 +			 * Is this code ever executed?
  			 */
 -			if (grRS == FALSE && RESTART(rsre, start) == 0) {
 +			if (RS_is_null && RESTART(rsre, start) == 0) {
  				start += REEND(rsre, start);
  				goto again;
  			}
 @@ -1737,7 +1754,7 @@
  			bstart = bp;
  		}
  		*bp = '\0';
 -	} else if (grRS == FALSE && iop->cnt == EOF) {
 +	} else if (RS_is_null && iop->cnt == EOF) {
  		/*
  		 * special case, delete trailing newlines,
  		 * should never be more than one.
 @@ -1811,7 +1828,7 @@
  		return EOF;
  	}
  
 -	if (grRS == FALSE)	/* special case:  RS == "" */
 +	if (RS_is_null)	/* special case:  RS == "" */
  		rs = '\n';
  	else
  		rs = (char) grRS;
 @@ -1821,7 +1838,7 @@
  		rs = casetable[rs];
  
  	/* if RS = "", skip leading newlines at the front of the file */
 -	if (grRS == FALSE && iop->off == iop->buf) {
 +	if (RS_is_null && iop->off == iop->buf) {
  		for (bp = iop->off; *bp == '\n'; bp++)
  			continue;
  
 @@ -1835,7 +1852,7 @@
  	 */
  	if (! do_traditional && RSre != NULL)	/* regexp */
  		rsre = RSre;
 -	else if (grRS == FALSE)		/* RS = "" */
 +	else if (RS_is_null)		/* RS = "" */
  		rsre = RS_null_re;
  	else
  		rsre = NULL;
 @@ -1862,7 +1879,7 @@
  			iop->off = iop->end;	/* all done with the record */
  			set_RT_to_null();
  			/* special case, don't allow trailing newlines */
 -			if (grRS == FALSE && *(iop->end - 1) == '\n')
 +			if (RS_is_null && *(iop->end - 1) == '\n')
  				return iop->end - start - 1;
  			else
  				return iop->end - start;
 Index: main.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/main.c,v
 retrieving revision 1.3
 diff -u -d -r1.3 main.c
 --- main.c	1997/10/26 12:14:54	1.3
 +++ main.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -439,8 +439,8 @@
  	fputs("\t-W traditional\t\t--traditional\n", fp);
  	fputs("\t-W usage\t\t--usage\n", fp);
  	fputs("\t-W version\t\t--version\n", fp);
 -	fputs("\nReport bugs to bug-gnu-utils@prep.ai.mit.edu,\n", fp);
 -	fputs("with a Cc: to arnold@gnu.ai.mit.edu\n", fp);
 +	fputs("\nReport bugs to bug-gnu-utils@gnu.org,\n", fp);
 +	fputs("with a Cc: to arnold@gnu.org\n", fp);
  	exit(exitval);
  }
  
 @@ -450,7 +450,7 @@
  copyleft()
  {
  	static char blurb_part1[] =
 -"Copyright (C) 1989, 1991-1997 Free Software Foundation.\n\
 +"Copyright (C) 1989, 1991-1999 Free Software Foundation.\n\
  \n\
  This program is free software; you can redistribute it and/or modify\n\
  it under the terms of the GNU General Public License as published by\n\
 Index: msg.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/msg.c,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 msg.c
 --- msg.c	1997/10/14 18:16:54	1.1.1.1
 +++ msg.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 Index: node.c
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/node.c,v
 retrieving revision 1.3
 diff -u -d -r1.3 node.c
 --- node.c	1997/10/26 12:14:54	1.3
 +++ node.c	1999/09/08 16:32:51
 @@ -3,7 +3,7 @@
   */
  
  /* 
 - * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc.
 + * Copyright (C) 1986, 1988, 1989, 1991-1999 the Free Software Foundation, Inc.
   * 
   * This file is part of GAWK, the GNU implementation of the
   * AWK Programming Language.
 @@ -36,6 +36,7 @@
  	char save;
  	char *ptr;
  	unsigned int newflags;
 +	extern double strtod();
  
  #ifdef DEBUG
  	if (n == NULL)
 @@ -140,7 +141,16 @@
  	/* not an integral value, or out of range */
  	if ((val = double_to_int(s->numbr)) != s->numbr
  	    || val < LONG_MIN || val > LONG_MAX) {
 -#ifdef GFMT_WORKAROUND
 +		/*
 +		 * Once upon a time, if GFMT_WORKAROUND wasn't defined,
 +		 * we just blindly did this:
 +		 *	sprintf(sp, format, s->numbr);
 +		 *	s->stlen = strlen(sp);
 +		 *	s->stfmt = (char) index;
 +		 * but that's no good if, e.g., OFMT is %s. So we punt,
 +		 * and just always format the value ourselves.
 +		 */
 +
  		NODE *dummy, *r;
  		unsigned short oflags;
  		extern NODE *format_tree P((const char *, int, NODE *));
 @@ -161,15 +171,6 @@
  		freenode(dummy);	/* to keep s->stptr == r->stpr.  */
  
  		goto no_malloc;
 -#else
 -		/*
 -		 * no need for a "replacement" formatting by gawk,
 -		 * just use sprintf
 -		 */
 -		sprintf(sp, format, s->numbr);
 -		s->stlen = strlen(sp);
 -		s->stfmt = (char) index;
 -#endif /* GFMT_WORKAROUND */
  	} else {
  		/* integral value */
  	        /* force conversion to long only once */
 @@ -183,11 +184,9 @@
  		}
  		s->stfmt = -1;
  	}
 -	emalloc(s->stptr, char *, s->stlen + 2, "force_string");
 +	emalloc(s->stptr, char *, s->stlen + 2, "format_val");
  	memcpy(s->stptr, sp, s->stlen+1);
 -#ifdef GFMT_WORKAROUND
  no_malloc:
 -#endif /* GFMT_WORKAROUND */
  	s->stref = 1;
  	s->flags |= STR;
  	return s;
 @@ -495,7 +494,9 @@
  		}
  		i = 0;
  		for (;;) {
 -			if (ISXDIGIT((c = *(*string_ptr)++))) {
 +			/* do outside test to avoid multiple side effects */
 +			c = *(*string_ptr)++;
 +			if (ISXDIGIT(c)) {
  				i *= 16;
  				if (ISDIGIT(c))
  					i += c - '0';
 Index: patchlevel.h
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/patchlevel.h,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 patchlevel.h
 --- patchlevel.h	1997/10/14 18:16:54	1.1.1.1
 +++ patchlevel.h	1999/09/08 16:32:51
 @@ -1 +1 @@
 -#define PATCHLEVEL	3
 +#define PATCHLEVEL	4
 Index: README_d/README.FIRST
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/README_d/README.FIRST,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 README.FIRST
 --- README.FIRST	1997/10/14 18:17:01	1.1.1.1
 +++ README.FIRST	1999/09/08 16:32:51
 @@ -18,4 +18,4 @@
  file, I will yell at you.
  
  Arnold Robbins
 -arnold@gnu.ai.mit.edu
 +arnold@gnu.org
 Index: doc/ChangeLog
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/doc/ChangeLog,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 ChangeLog
 --- ChangeLog	1997/10/14 18:17:11	1.1.1.1
 +++ ChangeLog	1999/09/08 16:32:51
 @@ -1,3 +1,30 @@
 +Wed Jun 30 16:14:36 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Release 3.0.4: Release tar file made.  This time for sure.
 +
 +Wed Oct  7 21:59:33 1998  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* texinfo.tex: Updated to version 2.227, from Texinfo 3.12.
 +
 +Sun Oct 19 12:26:08 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* ALL: change references to arnold@gnu.ai.mit.edu to arnold@gnu.org.
 +
 +Tue Sep 23 10:31:17 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* texinfo.tex: Updated to version 2.218, from Texinfo 3.11.
 +
 +Fri Jul  4 08:19:00 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Makefile.in ($(infodir)/gawk.info): Don't make dependent upon
 +	  gawk.info, in case installed one is newer. Instead, check that
 +	  an installed gawk.info exists and is identical to current one.
 +	  If so, just exit; otherwise do the install.
 +
 +Wed Jul  2 14:55:12 1997  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Makefile.in ($(infodir)/gawk.info): typo fix.
 +
  Thu May 15 12:49:08 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us>
  
  	* Release 3.0.3: Release tar file made.
 Index: doc/awk.1
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/doc/awk.1,v
 retrieving revision 1.4
 diff -u -d -r1.4 awk.1
 --- awk.1	1999/04/10 20:42:06	1.4
 +++ awk.1	1999/09/08 16:32:51
 @@ -1,7 +1,7 @@
  .ds PX \s-1POSIX\s+1
  .ds UX \s-1UNIX\s+1
  .ds AN \s-1ANSI\s+1
 -.TH GAWK 1 "Dec 19 1996" "Free Software Foundation" "Utility Commands"
 +.TH GAWK 1 "Apr 28 1999" "Free Software Foundation" "Utility Commands"
  .SH NAME
  gawk \- pattern scanning and processing language
  .SH SYNOPSIS
 @@ -2150,6 +2150,12 @@
  Function parameters used as local variables are initialized
  to the null string and the number zero upon function invocation.
  .PP
 +Use
 +.BI return " expr"
 +to return a value from a function. The return value is undefined if no
 +value is provided, or if the function returns by ``falling off'' the
 +end.
 +.PP
  If
  .B \-\^\-lint
  has been provided,
 @@ -2535,7 +2541,7 @@
  .SH VERSION INFORMATION
  This man page documents
  .IR gawk ,
 -version 3.0.2.
 +version 3.0.4.
  .SH AUTHORS
  The original version of \*(UX
  .I awk
 @@ -2566,10 +2572,10 @@
  If you find a bug in
  .IR gawk ,
  please send electronic mail to
 -.BR bug-gnu-utils@prep.ai.mit.edu ,
 +.BR bug-gnu-utils@gnu.org ,
  .I with
  a carbon copy to
 -.BR arnold@gnu.ai.mit.edu .
 +.BR arnold@gnu.org .
  Please include your operating system and its revision, the version of
  .IR gawk ,
  what C compiler you used to compile it, and a test program
 @@ -2598,7 +2604,7 @@
  provided valuable assistance during testing and debugging.
  We thank him.
  .SH COPYING PERMISSIONS
 -Copyright \(co\) 1996 Free Software Foundation, Inc.
 +Copyright \(co\) 1996,97,98,99 Free Software Foundation, Inc.
  .PP
  Permission is granted to make and distribute verbatim copies of
  this manual page provided the copyright notice and this permission
 Index: posix/ChangeLog
 ===================================================================
 RCS file: /home/ncvs/src/contrib/awk/posix/ChangeLog,v
 retrieving revision 1.1.1.1
 diff -u -d -r1.1.1.1 ChangeLog
 --- ChangeLog	1997/10/14 18:17:01	1.1.1.1
 +++ ChangeLog	1999/09/08 16:32:51
 @@ -1,3 +1,7 @@
 +Wed Jun 30 16:14:36 1999  Arnold D. Robbins  <arnold@gnu.org>
 +
 +	* Release 3.0.4: Release tar file made.  This time for sure.
 +
  Thu May 15 12:49:08 1997  Arnold D. Robbins  <arnold@skeeve.atl.ga.us>
  
  	* Release 3.0.3: Release tar file made.
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909081650.JAA94051>