#! /bin/sh # # This is patch #4 to gawk 3.0. cd to gawk-3.0.3 and sh this file. # Then remove all the .orig files and rename the directory gawk-3.0.4. # Changes to files that are automatically recreated have been omitted. # They will be recreated the first time you run make. # This includes all the extracted example files in awklib. # first, slight rearranging (cd test/reg mkdir Obsolete mv exp.* log.* Obsolete) # Now, apply the patch patch -p1 << \EOF diff -crN gawk-3.0.3/ChangeLog gawk-3.0.4/ChangeLog *** gawk-3.0.3/ChangeLog Thu May 15 19:49:48 1997 --- gawk-3.0.4/ChangeLog Wed Jun 30 16:15:06 1999 *************** *** 1,3 **** --- 1,304 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + + Wed Jun 30 16:10:11 1999 Arnold D. Robbins + + * awk.h: add include of , 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 + + 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 + + * 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 + + * BETA Release 3.0.46: Release tar file made. + + Wed Jun 2 14:36:24 1999 Arnold D. Robbins + + * 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 + + * BETA Release 3.0.45: Release tar file made. + + Tue May 25 16:32:37 1999 Arnold D. Robbins + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * BETA Release 3.0.44: Release tar file made. + + Sun May 2 18:25:43 1999 Arnold D. Robbins + + * 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 + + * 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 + + * 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 + + * BETA Release 3.0.43: Release tar file made. + + Tue Apr 13 19:02:20 1999 Arnold D. Robbins + + * 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 + + * 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 + + * BETA Release 3.0.42: Release tar file made. + + Sun Nov 15 21:05:39 1998 Arnold D. Robbins + + * 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 + + * BETA Release 3.0.41: Release tar file made. + + Tue Nov 3 16:24:35 1998 Arnold D. Robbins + + * 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 + + * 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 + + * 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 + + * 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 + + * BETA Release 3.0.40: Release tar file made. + + Mon Jul 27 10:14:33 1998 Arnold D. Robbins + + * node.c (parse_escape): Remove assignment with side effects + from ISXDIGIT test. Thanks to "Mihai T. LAZARESCU" + for pointing this out. + + Mon Apr 27 11:31:32 1998 Arnold D. Robbins + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * awk.y [variable]: fix case for subscript if $3 == NULL. + + Sun Jul 27 22:47:30 1997 Arnold D. Robbins + + * awk.y (get_src_buf): don't close file if it's stdin. + + Sun Jul 27 22:47:15 1997 Pat Rankin + + * 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 + + * 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 + + * 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 . + + Thu Jun 19 19:00:40 1997 Arnold D. Robbins + + * 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 + + * 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 * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/FUTURES gawk-3.0.4/FUTURES *** gawk-3.0.3/FUTURES Wed Dec 11 06:18:53 1996 --- gawk-3.0.4/FUTURES Mon Oct 19 22:21:11 1998 *************** *** 73,80 **** Use GNU malloc. - Use rx instead of regex. - DONE: Do a reference card. ? Have strftime() pay attention to the value of ENVIRON["TZ"] --- 73,78 ---- diff -crN gawk-3.0.3/Makefile.in gawk-3.0.4/Makefile.in *** gawk-3.0.3/Makefile.in Tue May 13 19:37:41 1997 --- gawk-3.0.4/Makefile.in Wed Jun 9 11:36:30 1999 *************** *** 1,6 **** # Makefile for GNU Awk. # ! # Copyright (C) 1986, 1988-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. --- 1,6 ---- # Makefile for GNU Awk. # ! # Copyright (C) 1986, 1988-1999 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. *************** *** 33,38 **** --- 33,39 ---- INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ + LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ALLOCA = @ALLOCA@ *************** *** 57,64 **** DEFPATH = ".:$(datadir)" SHELL = /bin/sh CFLAGS = @CFLAGS@ ! COMPFLAGS = -DGAWK -I. -I$(srcdir) @DEFS@ $(CFLAGS) # object files AWKOBJS = array.o builtin.o eval.o field.o gawkmisc.o io.o main.o \ --- 58,66 ---- DEFPATH = ".:$(datadir)" SHELL = /bin/sh + CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ ! COMPFLAGS = -DGAWK -I. -I$(srcdir) $(CPPFLAGS) @DEFS@ $(CFLAGS) # object files AWKOBJS = array.o builtin.o eval.o field.o gawkmisc.o io.o main.o \ *************** *** 95,101 **** MISC = NEWS COPYING FUTURES Makefile.in PROBLEMS README PORTS POSIX.STD \ configure configure.in acconfig.h configh.in ACKNOWLEDGMENT \ ChangeLog INSTALL LIMITATIONS install-sh mkinstalldirs aclocal.m4 \ ! stamp-h.in OTHERS= doc pc atari vms README_d posix awklib --- 97,103 ---- MISC = NEWS COPYING FUTURES Makefile.in PROBLEMS README PORTS POSIX.STD \ configure configure.in acconfig.h configh.in ACKNOWLEDGMENT \ ChangeLog INSTALL LIMITATIONS install-sh mkinstalldirs aclocal.m4 \ ! stamp-h.in config.sub config.guess OTHERS= doc pc atari vms README_d posix awklib *************** *** 139,145 **** # Note: if you need something at both compile time and link time, like -pg, # you will have to edit the Makefile manually to set LDFLAGS. gawk: $(ALLOBJS) $(LIBOBJS) $(REOBJS) ! $(CC) -o gawk $(LDFLAGS) $(ALLOBJS) $(LIBOBJS) $(REOBJS) $(LIBS) $(ALLOBJS): awk.h dfa.h regex.h config.h custom.h --- 141,147 ---- # Note: if you need something at both compile time and link time, like -pg, # you will have to edit the Makefile manually to set LDFLAGS. gawk: $(ALLOBJS) $(LIBOBJS) $(REOBJS) ! $(CC) -o gawk $(CFLAGS) $(LDFLAGS) $(ALLOBJS) $(LIBOBJS) $(REOBJS) $(LIBS) $(ALLOBJS): awk.h dfa.h regex.h config.h custom.h *************** *** 252,258 **** cd doc && $(MAKE) all awklib/all: gawk ! cd awklib && $(MAKE) all dist: $(AWKSRC) $(LIBSRC) $(DOCS) $(MISC) $(COPIES) awklib/stamp-eg info distclean -rm -rf gawk-$(REL)* --- 254,260 ---- cd doc && $(MAKE) all awklib/all: gawk ! cd awklib && $(MAKE) CFLAGS="$(CFLAGS)" all dist: $(AWKSRC) $(LIBSRC) $(DOCS) $(MISC) $(COPIES) awklib/stamp-eg info distclean -rm -rf gawk-$(REL)* diff -crN gawk-3.0.3/NEWS gawk-3.0.4/NEWS *** gawk-3.0.3/NEWS Sun May 11 22:42:55 1997 --- gawk-3.0.4/NEWS Wed Jun 9 11:40:24 1999 *************** *** 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 --------------------------- diff -crN gawk-3.0.3/PORTS gawk-3.0.4/PORTS *** gawk-3.0.3/PORTS Wed May 14 21:10:57 1997 --- gawk-3.0.4/PORTS Sun Jun 27 13:33:27 1999 *************** *** 1,36 **** ! A recent version of gawk 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 ! 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 --- 1,27 ---- ! Gawk 3.0.4 has been successfully compiled and run "make test" on the following: ! 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.) ! 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. diff -crN gawk-3.0.3/POSIX.STD gawk-3.0.4/POSIX.STD *** gawk-3.0.3/POSIX.STD Wed Dec 27 18:58:10 1995 --- gawk-3.0.4/POSIX.STD Wed Oct 7 21:06:52 1998 *************** *** 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 diff -crN gawk-3.0.3/README gawk-3.0.4/README *** gawk-3.0.3/README Fri May 2 04:36:10 1997 --- gawk-3.0.4/README Sun May 9 14:03:52 1999 *************** *** 1,10 **** README: ! This is GNU Awk 3.0.3. 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. See the file INSTALL for installation instructions. --- 1,10 ---- README: ! 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 4 just fix bugs -- see NEWS and ChangeLog for details. See the file INSTALL for installation instructions. *************** *** 66,72 **** outlined in the manual. Arnold Robbins ! INTERNET: arnold@gnu.ai.mit.edu BUG REPORTS AND FIXES (non-Unix ports): --- 66,72 ---- outlined in the manual. Arnold Robbins ! INTERNET: arnold@gnu.org BUG REPORTS AND FIXES (non-Unix ports): *************** *** 81,87 **** Pat Rankin rankin@eql.caltech.edu ! Atari ST: Michal Jaegermann michal@gortel.phys.ualberta.ca --- 81,87 ---- Pat Rankin rankin@eql.caltech.edu ! Alpha/Linux: Michal Jaegermann michal@gortel.phys.ualberta.ca diff -crN gawk-3.0.3/README_d/README.FIRST gawk-3.0.4/README_d/README.FIRST *** gawk-3.0.3/README_d/README.FIRST Thu Jan 11 06:04:41 1996 --- gawk-3.0.4/README_d/README.FIRST Wed Apr 28 16:45:19 1999 *************** *** 18,21 **** file, I will yell at you. Arnold Robbins ! arnold@gnu.ai.mit.edu --- 18,21 ---- file, I will yell at you. Arnold Robbins ! arnold@gnu.org diff -crN gawk-3.0.3/README_d/README.atari gawk-3.0.4/README_d/README.atari *** gawk-3.0.3/README_d/README.atari Wed Dec 27 06:54:55 1995 --- gawk-3.0.4/README_d/README.atari Mon May 3 12:59:48 1999 *************** *** 1,3 **** --- 1,8 ---- + Sun May 2 18:40:46 IDT 1999 + + See the README.1st file in the atari directory. + + -------------------------------------------------------- Gawk on the Atari has been compiled and tested using gcc, both with and without -mshort flag. Other compilers can be used but if sizeof(pointer) != sizeof(int) this code will not compile correctly diff -crN gawk-3.0.3/README_d/README.linux gawk-3.0.4/README_d/README.linux *** gawk-3.0.3/README_d/README.linux Thu Apr 17 21:46:16 1997 --- gawk-3.0.4/README_d/README.linux Wed Apr 28 16:46:20 1999 *************** *** 10,13 **** post-4.1 RedHat Linux. Arnold Robbins ! arnold@gnu.ai.mit.edu --- 10,13 ---- post-4.1 RedHat Linux. Arnold Robbins ! arnold@gnu.org diff -crN gawk-3.0.3/README_d/README.pc gawk-3.0.4/README_d/README.pc *** gawk-3.0.3/README_d/README.pc Sun May 11 21:51:36 1997 --- gawk-3.0.4/README_d/README.pc Sat Jun 26 23:44:43 1999 *************** *** 1,16 **** ! This is the README for GNU awk 3.0 under OS/2 and DOS. Gawk has been compiled and tested under OS/2, DOS, and Win32 using ! the GNU development tools from DJ Delorie (DJGPP; DOS with special support ! for long filenames under Win95) and Eberhard Mattes (EMX; OS/2, DOS, and ! Win32 with rsxnt). Microsoft Visual C/C++ can be used to build a Win32 ! version for Windows 95/NT, and MSC can be used to build 16-bit versions ! for DOS and OS/2. Building gawk ------------- Copy the files in the `pc' directory (EXCEPT for `ChangeLog') to the directory with the rest of the gawk sources. (The subdirectories of `pc' need not be copied.) The makefile contains a configuration --- 1,29 ---- ! This is the README for GNU awk 3.0 under Win32, OS/2, and DOS. Gawk has been compiled and tested under OS/2, DOS, and Win32 using ! the GNU development tools from DJ Delorie (DJGPP; DOS with special ! support for long filenames under Win95), Eberhard Mattes (EMX; OS/2, ! DOS, and Win32 with rsxnt), and Jan-Jaap van der Heijden (Mingw32; ! Win32). Microsoft Visual C/C++ can be used to build a Win32 version for ! Windows 9x/NT, and MSC can be used to build 16-bit versions for DOS and ! OS/2. Building gawk ------------- + Building on DOS or Windows environments can be troublesome, in part due + to shell limitations, the long filename issue, and various Win32 pipe + considerations. The situation is somewhat better on OS/2. The general + recommendation is to use tools (especially make) which are compatible + or built with the compiler to be used on gawk. + + Building versions which do not understand long filenames on systems + that offer long names is a special case. The maintainers unpack the + distribution and process using utilities (unzip, make, cmp) which do not + use long filenames. (For example, the djgpp tools will work if LFN=n is + set in the environment.) + Copy the files in the `pc' directory (EXCEPT for `ChangeLog') to the directory with the rest of the gawk sources. (The subdirectories of `pc' need not be copied.) The makefile contains a configuration *************** *** 45,50 **** --- 58,70 ---- files in the test directory may need to have their end-of-line markers converted, as described in Makefile.tst. + As with building gawk, the OS, shell, and long filename issues come into + play when testing, too. If you are testing gawk on a LFN aware system with + some LFN aware tools, you may have problems if the shell that you specify in + test/Makefile is not LFN aware. This problem will apply whether or not + you are building a LFN aware gawk. See the comments in pc/Makefile.tst + for more information on this. + It is routine to install by hand, but note that the install target also builds igawk.bat and igawk.cmd, which are used to add an include facility to gawk (and which require sh). *************** *** 59,74 **** The GNUish Project was designed to bring GNU-like programs to small systems running OS/2 and DOS. Binary distributions of gawk are ! maintained in GNUish, and include 16bit OS/2 and DOS versions and a ! djgpp-compiled version. Information on GNUish is available via http://www.simtel.net/simtel.net/ - http://www.leo.org/pub/comp/platforms/pc/gnuish - http://wuarchive.wustl.edu/systems/msdos/gnuish/ or ftp://ftp.simtel.net/simtelnet/gnu/gnuish - ftp://oak.oakland.edu/pub/simtelnet/gnu/gnuish - ftp://wuarchive.wustl.edu/systems/msdos/gnuish/ Documentation appears in gnuish.htm (html) or gnuish.inf (info). --- 79,90 ---- The GNUish Project was designed to bring GNU-like programs to small systems running OS/2 and DOS. Binary distributions of gawk are ! maintained in GNUish, and include 16bit OS/2 and DOS, 32bit djgpp, ! and Win32 versions. Information on GNUish is available via http://www.simtel.net/simtel.net/ or ftp://ftp.simtel.net/simtelnet/gnu/gnuish Documentation appears in gnuish.htm (html) or gnuish.inf (info). *************** *** 87,92 **** --- 103,115 ---- contains a djgpp-compiled (32bit) version of gawk, along with many djgpp-compiled utilities. + The Mingw32 collection at + + http://agnes.dida.physik.uni-essen.de/~janjaap/ + + may contain a Win32 version of gawk, along with a Windows help + version of the gawk manual. + 2. The following table illustrates some of the differences among the various compiled versions of gawk. For example, the djgpp version runs on all the *************** *** 101,110 **** emx(1) | N N N N OS2 emxbnd(2) | VCPI,DPMI DPMI DPMI,NoLFN DPMI,NoLFN DPMI,OS2 emxnt(3) | N N Win32 Win32 N ! msc | 16 16 16,NoLFN 16,NoLFN 16,DOS msc6bnd | 16 16 16,NoLFN 16,NoLFN 16,DOS,OS2 msc6os2 | N N N N 16,OS2 vcWin32 | N N Win32 Win32 N (1) Requires emxrt. --- 124,134 ---- emx(1) | N N N N OS2 emxbnd(2) | VCPI,DPMI DPMI DPMI,NoLFN DPMI,NoLFN DPMI,OS2 emxnt(3) | N N Win32 Win32 N ! msc(4) | 16 16 16,NoLFN 16,NoLFN 16,DOS msc6bnd | 16 16 16,NoLFN 16,NoLFN 16,DOS,OS2 msc6os2 | N N N N 16,OS2 vcWin32 | N N Win32 Win32 N + mingw32 | N N Win32 Win32 N (1) Requires emxrt. *************** *** 114,119 **** --- 138,147 ---- (3) Requires rsxnt. + (4) When compiling, MSC 8, when run in Windows 9x, will require that if + files are listed in #include statements with LFNs + (eg. ), that the file be named with the LFN. + 16 16bit; limited capacity, especially under DOS. DOS Runs as a DOS application. *************** *** 139,151 **** Win32 Uses/supports Win32 features (such as long filenames). Reportedly, NTEmacs (another Win32 program) can run programs such as ! Win32-gawk asynchronously. Currently, NTEmacs supports async subprocesses ! only if the child is a Win32 app. Similarly, like native OS/2 versions are ! a plus under OS/2 even for command-line programs, native Win32 versions are ! nice to have under NT and Win95. ! ! Users interested in Win32 applications may also wish to examine the Cygnus ! GNU-Win32 Project at http://www.cygnus.com. 3. An sh-like shell may be useful for awk programming (and is essential --- 167,181 ---- Win32 Uses/supports Win32 features (such as long filenames). Reportedly, NTEmacs (another Win32 program) can run programs such as ! Win32-gawk asynchronously. Similarly, as native OS/2 versions are a ! plus under OS/2 even for command-line programs, native Win32 versions ! may be desired under NT and Win95. ! ! Users interested in Win32 applications may also wish to examine the ! Cygnus GNU-Win32 Project at http://www.cygnus.com, or the Mingw32 work ! at http://agnes.dida.physik.uni-essen.de/~janjaap/. Win32 gawk will ! often require that utilities run from within gawk be Win32 (e.g., the ! tests place this requirement on the cat utility). 3. An sh-like shell may be useful for awk programming (and is essential *************** *** 169,179 **** in order to match your specific collection of programs. Daisuke Aoyama has ported Bash 1.14.7 to djgpp. ! This version worked flawlessly in tests with djgpp gawk and make. It ! is now part of the djgpp collection and also from ! http://www.st.rim.or.jp/~jack/alpha/ ! http://www.neongenesis.com/~jack/djgpp-work/alpha/ Under OS/2, bash should be a good choice; however, there has been some trouble getting a solid version. As of Feb-95, there are two bash ports, --- 199,208 ---- in order to match your specific collection of programs. Daisuke Aoyama has ported Bash 1.14.7 to djgpp. ! This version worked flawlessly in tests with djgpp gawk and make. bash ! is now part of the djgpp collection, and may also found on ! http://www.neongenesis.com/~jack/djgpp-work/beta/index.html Under OS/2, bash should be a good choice; however, there has been some trouble getting a solid version. As of Feb-95, there are two bash ports, *************** *** 192,200 **** for emx-compiled programs (although djgpp-bash almost works with emx on DOS). GNU make is recommended if using djgpp-bash. ! 4. GNU make is available at LEO for OS/2 and in the djgpp collection ! for DOS. dmake is by Dennis Vadura (dvadura@watdragon.uwaterloo.ca), CS Dept., University of Waterloo. OS/2 and DOS versions can be found as --- 221,235 ---- for emx-compiled programs (although djgpp-bash almost works with emx on DOS). GNU make is recommended if using djgpp-bash. + Beginning with 3.0.4, the MSC (DOS/Win32) and Mingw32 versions write + pipe and system() commands to a temporary file, and then execute + with SHELL or COMSPEC. The current mechanism defaults to dos-style + shell conventions unless the shell is one of sh, bash, csh, tcsh, sh32, + sh16, or ksh. + ! 4. GNU make is available at LEO for OS/2, in the djgpp collection ! for DOS, and in the Mingw32 collection for Win32. dmake is by Dennis Vadura (dvadura@watdragon.uwaterloo.ca), CS Dept., University of Waterloo. OS/2 and DOS versions can be found as *************** *** 284,291 **** 7. MSC 6 fails the strftlng test. The funstack test exhausts memory on the 16bit DOS versions. ! Gawk-3.0.3 thanks ----------------- The DOS maintainers wish to express their thanks to Eli Zaretskii --- 319,336 ---- 7. MSC 6 fails the strftlng test. The funstack test exhausts memory on the 16bit DOS versions. + 8. Eli Zaretskii writes: "Make can crash with SIGFPE after finishing all + the tests. This happens on Windows 95 only, and Gawk 3.0.3 does that as + well (as do older versions of Make). The cause for this is the log(-1) + call in the last test. Based on some limited testing, I'd say that the + problem is in sloppy Windows handling of the FPU: it doesn't clean up the + FPU after a program exits, so if Make has SIGFPE unmasked, it crashes." + + 9. gawk built from the mingw32 and vcWin32 targets continues to have + problems with pipes; in particular, the pipeio1 test fails. + ! Gawk-3.0.4 thanks ----------------- The DOS maintainers wish to express their thanks to Eli Zaretskii *************** *** 313,316 **** Juan Grigera, j-grigera@usa.net (Visual C++ version) ! with a copy to Scott Deifik. --- 358,362 ---- Juan Grigera, j-grigera@usa.net (Visual C++ version) ! with a copy to Scott Deifik. Other Win32 reports may go to Darrel ! Hankerson. diff -crN gawk-3.0.3/README_d/README.sco gawk-3.0.4/README_d/README.sco *** gawk-3.0.3/README_d/README.sco Wed Dec 25 05:45:28 1996 --- gawk-3.0.4/README_d/README.sco Wed Apr 28 16:46:52 1999 *************** *** 19,22 **** done your homework. Arnold Robbins ! arnold@gnu.ai.mit.edu --- 19,22 ---- done your homework. Arnold Robbins ! arnold@gnu.org diff -crN gawk-3.0.3/README_d/README.solaris gawk-3.0.4/README_d/README.solaris *** gawk-3.0.3/README_d/README.solaris Fri Feb 7 13:34:17 1997 --- gawk-3.0.4/README_d/README.solaris Wed Apr 28 16:47:22 1999 *************** *** 1,3 **** --- 1,15 ---- + Tue Apr 13 16:57:45 IDT 1999 + + There is a known problem in that the `manyfiles' test will fail under + Solaris if you set your soft limit on the number of file descriptors to + above 256. This is due to a "feature" of fdopen that an fd must be + less than 256 (see fdopen(3)). + + IMHO this is Sun's problem, not mine. + + Arnold Robbins + arnold@gnu.org + ---------------------------- From dragon!lehman.com!carson Fri Feb 7 01:12:09 1997 Return-Path: From: carson@lehman.com diff -crN gawk-3.0.3/README_d/README.sony gawk-3.0.4/README_d/README.sony *** gawk-3.0.3/README_d/README.sony Mon Jan 20 06:15:05 1997 --- gawk-3.0.4/README_d/README.sony Wed Apr 28 16:47:33 1999 *************** *** 9,11 **** --- 9,12 ---- has. See the README.ultrix file for details. Arnold Robbins + arnold@gnu.org diff -crN gawk-3.0.3/README_d/README.sunos4 gawk-3.0.4/README_d/README.sunos4 *** gawk-3.0.3/README_d/README.sunos4 Wed Oct 16 18:32:23 1996 --- gawk-3.0.4/README_d/README.sunos4 Wed Apr 28 16:47:57 1999 *************** *** 8,14 **** fuss at you! Arnold Robbins ! arnold@gnu.ai.mit.edu Tue Jan 30 07:01:39 EST 1996 --- 8,14 ---- fuss at you! Arnold Robbins ! arnold@gnu.org Tue Jan 30 07:01:39 EST 1996 diff -crN gawk-3.0.3/README_d/README.yacc gawk-3.0.4/README_d/README.yacc *** gawk-3.0.3/README_d/README.yacc Wed Oct 16 18:33:15 1996 --- gawk-3.0.4/README_d/README.yacc Wed Apr 28 16:48:34 1999 *************** *** 7,10 **** The problem goes away if you use either bison or Berkeley yacc. Arnold Robbins ! arnold@gnu.ai.mit.edu --- 7,10 ---- The problem goes away if you use either bison or Berkeley yacc. Arnold Robbins ! arnold@gnu.org diff -crN gawk-3.0.3/acconfig.h gawk-3.0.4/acconfig.h *** gawk-3.0.3/acconfig.h Fri May 2 04:36:11 1997 --- gawk-3.0.4/acconfig.h Wed Jun 9 11:34:12 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1995-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * Copyright (C) 1995-1999 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. *************** *** 30,35 **** --- 30,38 ---- #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@ diff -crN gawk-3.0.3/aclocal.m4 gawk-3.0.4/aclocal.m4 *** gawk-3.0.3/aclocal.m4 Wed Dec 18 17:25:47 1996 --- gawk-3.0.4/aclocal.m4 Wed Jun 9 11:35:41 1999 *************** *** 1,7 **** dnl dnl aclocal.m4 --- autoconf input file for gawk dnl ! dnl Copyright (C) 1995, 96 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. --- 1,7 ---- dnl dnl aclocal.m4 --- autoconf input file for gawk dnl ! dnl Copyright (C) 1995, 1996, 1998, 1999 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. *************** *** 37,40 **** --- 37,167 ---- AC_DEFINE(HAVE_STRINGIZE) fi AC_MSG_RESULT([${gawk_cv_c_stringize}]) + ])dnl + + + dnl By default, many hosts won't let programs access large files; + dnl one must use special compiler options to get large-file access to work. + dnl For more details about this brain damage please see: + dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html + + dnl Written by Paul Eggert . + + dnl Internal subroutine of GAWK_AC_SYS_LARGEFILE. + dnl GAWK_AC_SYS_LARGEFILE_FLAGS(FLAGSNAME) + AC_DEFUN(GAWK_AC_SYS_LARGEFILE_FLAGS, + [AC_CACHE_CHECK([for $1 value to request large file support], + gawk_cv_sys_largefile_$1, + [gawk_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || { + gawk_cv_sys_largefile_$1=no + ifelse($1, CFLAGS, + [case "$host_os" in + # IRIX 6.2 and later require cc -n32. + changequote(, )dnl + irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*) + changequote([, ])dnl + if test "$GCC" != yes; then + gawk_cv_sys_largefile_CFLAGS=-n32 + fi + gawk_save_CC="$CC" + CC="$CC $gawk_cv_sys_largefile_CFLAGS" + AC_TRY_LINK(, , , gawk_cv_sys_largefile_CFLAGS=no) + CC="$gawk_save_CC" + esac]) + }])]) + + dnl Internal subroutine of GAWK_AC_SYS_LARGEFILE. + dnl GAWK_AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL) + AC_DEFUN(GAWK_AC_SYS_LARGEFILE_SPACE_APPEND, + [case $2 in + no) ;; + ?*) + case "[$]$1" in + '') $1=$2 ;; + *) $1=[$]$1' '$2 ;; + esac ;; + esac]) + + dnl Internal subroutine of GAWK_AC_SYS_LARGEFILE. + dnl GAWK_AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, CODE-TO-SET-DEFAULT) + AC_DEFUN(GAWK_AC_SYS_LARGEFILE_MACRO_VALUE, + [AC_CACHE_CHECK([for $1], $2, + [$2=no + changequote(, )dnl + $3 + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + -D$1) + $2=1 ;; + -D$1=*) + $2=`expr " $gawk_flag" : '[^=]*=\(.*\)'` ;; + esac + done + changequote([, ])dnl + ]) + if test "[$]$2" != no; then + AC_DEFINE_UNQUOTED([$1], [$]$2) + fi]) + + AC_DEFUN(GAWK_AC_SYS_LARGEFILE, + [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) + if test "$enable_largefile" != no; then + AC_CHECK_TOOL(GETCONF, getconf) + GAWK_AC_SYS_LARGEFILE_FLAGS(CFLAGS) + GAWK_AC_SYS_LARGEFILE_FLAGS(LDFLAGS) + GAWK_AC_SYS_LARGEFILE_FLAGS(LIBS) + + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + no) ;; + -D_FILE_OFFSET_BITS=*) ;; + -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;; + -D_LARGE_FILES | -D_LARGE_FILES=*) ;; + -D?* | -I?*) + GAWK_AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$gawk_flag") ;; + *) + GAWK_AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$gawk_flag") ;; + esac + done + GAWK_AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$gawk_cv_sys_largefile_LDFLAGS") + GAWK_AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$gawk_cv_sys_largefile_LIBS") + GAWK_AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, + gawk_cv_sys_file_offset_bits, + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + gawk_cv_sys_file_offset_bits=64 ;; + esac]) + GAWK_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, + gawk_cv_sys_largefile_source, + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + gawk_cv_sys_largefile_source=1 ;; + esac]) + GAWK_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, + gawk_cv_sys_large_files, + [case "$host_os" in + # AIX 4.2 and later + aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) + gawk_cv_sys_large_files=1 ;; + esac]) + fi + ]) + + dnl Check for AIX and add _XOPEN_SOURCE_EXTENDED + AC_DEFUN(GAWK_AC_AIX_TWEAK, [ + AC_MSG_CHECKING([for AIX compilation hacks]) + AC_CACHE_VAL(gawk_cv_aix_hack, [ + if test -d /lpp/bos + then + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1" + gawk_cv_aix_hack=yes + else + gawk_cv_aix_hack=no + fi + ])dnl + AC_MSG_RESULT([${gawk_cv_aix_hack}]) ])dnl diff -crN gawk-3.0.3/array.c gawk-3.0.4/array.c *** gawk-3.0.3/array.c Fri May 2 04:36:11 1997 --- gawk-3.0.4/array.c Mon May 3 16:55:48 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991 - 97 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,278 **** fatal("attempt to use scalar as array"); if (symbol->var_array == NULL) { ! symbol->type = Node_var_array; symbol->array_size = symbol->table_size = 0; /* sanity */ symbol->flags &= ~ARRAYMAXED; grow_table(symbol); --- 272,281 ---- fatal("attempt to use scalar as array"); if (symbol->var_array == NULL) { ! 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,372 **** 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); return; } if (last != NULL) last->ahnext = bucket->ahnext; else --- 363,376 ---- last = bucket, bucket = bucket->ahnext) if (cmp_nodes(bucket->ahname, subs) == 0) break; 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 diff -crN gawk-3.0.3/atari/ChangeLog gawk-3.0.4/atari/ChangeLog *** gawk-3.0.3/atari/ChangeLog Thu May 15 19:50:07 1997 --- gawk-3.0.4/atari/ChangeLog Wed Jun 30 16:15:17 1999 *************** *** 1,3 **** --- 1,7 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/atari/README.1st gawk-3.0.4/atari/README.1st *** gawk-3.0.3/atari/README.1st Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/atari/README.1st Sun Nov 29 17:34:04 1998 *************** *** 0 **** --- 1,6 ---- + Sun Nov 29 10:34:01 EST 1998 + + The atari port is no longer supported. In 3.1 this directory will + be moved into a new `unsupported' directory. If you have an atari, + you are welcome to try and use the port here, but we no longer have + the hardware to test gawk on. diff -crN gawk-3.0.3/awk.h gawk-3.0.4/awk.h *** gawk-3.0.3/awk.h Fri May 2 04:36:12 1997 --- gawk-3.0.4/awk.h Wed Jun 30 16:06:13 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,30 **** --- 25,38 ---- /* ------------------------------ 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 #endif *************** *** 34,39 **** --- 42,48 ---- #endif /* _GNU_SOURCE */ #include + #include #ifdef HAVE_LIMITS_H #include #endif /* HAVE_LIMITS_H */ *************** *** 584,590 **** /* ------------------------- Pseudo-functions ------------------------- */ #define is_identchar(c) (isalnum(c) || (c) == '_') ! #define isnondecimal(str) (((str)[0]) == '0') #ifdef MPROF #define getnode(n) emalloc(n, NODE *, sizeof(NODE), "getnode") --- 593,600 ---- /* ------------------------- Pseudo-functions ------------------------- */ #define is_identchar(c) (isalnum(c) || (c) == '_') ! #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") diff -crN gawk-3.0.3/awk.y gawk-3.0.4/awk.y *** gawk-3.0.3/awk.y Sun May 11 14:10:13 1997 --- gawk-3.0.4/awk.y Wed Jun 30 16:06:24 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,836 **** { $$ = variable($1, CAN_FREE, Node_var); } | NAME '[' expression_list ']' { ! if ($3->rnode == NULL) { $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3->lnode); freenode($3); } else --- 830,838 ---- { $$ = variable($1, CAN_FREE, Node_var); } | NAME '[' expression_list ']' { ! 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,1175 **** warning("source file `%s' is empty", source); } } ! close(fd); samefile = FALSE; nextfile++; if (lexeme) --- 1171,1178 ---- warning("source file `%s' is empty", source); } } ! if (fileno(stdin) != fd) /* safety */ ! close(fd); samefile = FALSE; nextfile++; if (lexeme) *************** *** 1451,1464 **** case ':': case '?': allow_newline(); ! /* fall through */ case ')': case ']': case '(': - case '[': case ';': case '{': case ',': return lasttok = c; case '*': --- 1454,1470 ---- case ':': case '?': allow_newline(); ! return lasttok = c; ! case ')': case ']': case '(': case ';': case '{': case ',': + want_assign = FALSE; + /* fall through */ + case '[': return lasttok = c; case '*': *************** *** 2108,2113 **** --- 2114,2122 ---- { register NODE *oldlist; static NODE *savefront = NULL, *savetail = NULL; + + if (list == NULL || new == NULL) + return list; oldlist = list; if (savefront == oldlist) { diff -crN gawk-3.0.3/awklib/ChangeLog gawk-3.0.4/awklib/ChangeLog *** gawk-3.0.3/awklib/ChangeLog Thu May 15 19:50:16 1997 --- gawk-3.0.4/awklib/ChangeLog Wed Jun 30 16:15:27 1999 *************** *** 1,3 **** --- 1,7 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/awklib/Makefile.in gawk-3.0.4/awklib/Makefile.in *** gawk-3.0.3/awklib/Makefile.in Fri May 2 04:36:13 1997 --- gawk-3.0.4/awklib/Makefile.in Wed Oct 7 22:33:20 1998 *************** *** 1,6 **** # Makefile for GNU Awk support library. # ! # Copyright (C) 1995-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. --- 1,6 ---- # Makefile for GNU Awk support library. # ! # Copyright (C) 1995-1998 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. diff -crN gawk-3.0.3/awklib/extract.awk gawk-3.0.4/awklib/extract.awk *** gawk-3.0.3/awklib/extract.awk Wed Dec 27 18:02:56 1995 --- gawk-3.0.4/awklib/extract.awk Fri Sep 11 11:41:43 1998 *************** *** 1,6 **** # extract.awk --- extract files and run programs # from texinfo files ! # Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain # May 1993 BEGIN { IGNORECASE = 1 } --- 1,6 ---- # extract.awk --- extract files and run programs # from texinfo files ! # Arnold Robbins, arnold@gnu.org, Public Domain # May 1993 BEGIN { IGNORECASE = 1 } *************** *** 71,77 **** close(curfile) } # join.awk --- join an array into a string ! # Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain # May 1993 function join(array, start, end, sep, result, i) --- 71,77 ---- close(curfile) } # join.awk --- join an array into a string ! # Arnold Robbins, arnold@gnu.org, Public Domain # May 1993 function join(array, start, end, sep, result, i) diff -crN gawk-3.0.3/builtin.c gawk-3.0.4/builtin.c *** gawk-3.0.3/builtin.c Tue May 13 19:13:50 1997 --- gawk-3.0.4/builtin.c Wed Jun 30 16:06:45 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,31 **** #include "awk.h" - #include #undef HUGE #undef CHARBITS #undef INTBITS --- 25,30 ---- *************** *** 408,413 **** --- 407,413 ---- double tmpval; char signchar = FALSE; size_t len; + int zero_flag = FALSE; static char sp[] = " "; static char zero_string[] = "0"; static char lchbuf[] = "0123456789abcdef"; *************** *** 435,440 **** --- 435,441 ---- prec = 0; have_prec = FALSE; signchar = FALSE; + zero_flag = FALSE; lj = alt = big = bigbig = small = FALSE; fill = sp; cp = cend; *************** *** 458,467 **** break; case '0': if (lj) goto retry; - if (cur == &fw) - fill = zero_string; /* FALL through */ case '1': case '2': --- 459,467 ---- break; case '0': + zero_flag = TRUE; if (lj) goto retry; /* FALL through */ case '1': case '2': *************** *** 585,590 **** --- 585,592 ---- 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) *************** *** 609,614 **** --- 611,618 ---- 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) *************** *** 620,625 **** --- 624,637 ---- 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; *************** *** 637,653 **** *--cp = (char) ('0' + uval % 10); uval /= 10; } while (uval > 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. */ ! if (have_prec) fill = zero_string; if (prec > fw) fw = prec; --- 649,676 ---- *--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; /* ! * 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 (! lj ! && ((zero_flag && ! have_prec) ! || (fw == 0 && have_prec))) fill = zero_string; if (prec > fw) fw = prec; *************** *** 671,676 **** --- 694,715 ---- 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; *************** *** 683,700 **** 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. */ ! if (have_prec) fill = zero_string; do { *--cp = chbuf[uval % base]; uval /= base; } while (uval > 0); ! if (alt) { if (base == 16) { *--cp = cs1; *--cp = '0'; --- 722,750 ---- uval = (unsigned long) tmpval; } /* ! * 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 (! lj ! && ((zero_flag && ! have_prec) ! || (fw == 0 && have_prec))) fill = zero_string; do { *--cp = chbuf[uval % base]; uval /= base; } while (uval > 0); ! ! /* 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'; *************** *** 753,759 **** *cp++ = signchar; if (alt) *cp++ = '#'; ! if (fill != sp) *cp++ = '0'; cp = strcpy(cp, "*.*") + 3; *cp++ = cs1; --- 803,809 ---- *cp++ = signchar; if (alt) *cp++ = '#'; ! if (zero_flag) *cp++ = '0'; cp = strcpy(cp, "*.*") + 3; *cp++ = cs1; *************** *** 1082,1087 **** --- 1132,1138 ---- register FILE *fp; int numnodes, i; NODE *save; + NODE *tval; if (tree->rnode) { int errflg; /* not used, sigh */ *************** *** 1115,1139 **** t[i] = dupnode(n); free_temp(n); ! if (t[i]->flags & NUMBER) { if (OFMTidx == CONVFMTidx) (void) force_string(t[i]); ! else ! t[i] = format_val(OFMT, OFMTidx, t[i]); } } 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 (ORSlen > 0) efwrite(ORS, sizeof(char), (size_t) ORSlen, fp, "print", rp, TRUE); free(t); } --- 1166,1194 ---- t[i] = dupnode(n); free_temp(n); ! if ((t[i]->flags & (NUMBER|STRING)) == NUMBER) { if (OFMTidx == CONVFMTidx) (void) force_string(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 && 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); } *************** *** 1506,1511 **** --- 1561,1567 ---- */ if (lastmatchnonzero && matchstart == matchend) { lastmatchnonzero = FALSE; + matches--; goto empty; } /* *************** *** 2016,2021 **** --- 2072,2078 ---- case 'c': case 'd': case 'e': + case 'f': val = *str - 'a' + 10; break; case 'A': *************** *** 2023,2028 **** --- 2080,2086 ---- case 'C': case 'D': case 'E': + case 'F': val = *str - 'A' + 10; break; default: *************** *** 2033,2043 **** } else if (*str == '0') { for (; len > 0; len--) { if (! isdigit(*str) || *str == '8' || *str == '9') ! goto done; retval = (retval * 8) + (*str - '0'); str++; } } else { save = str[len]; retval = atof(str); str[len] = save; --- 2091,2102 ---- } else if (*str == '0') { for (; len > 0; len--) { if (! isdigit(*str) || *str == '8' || *str == '9') ! goto decimal; retval = (retval * 8) + (*str - '0'); str++; } } else { + decimal: save = str[len]; retval = atof(str); str[len] = save; diff -crN gawk-3.0.3/config.guess gawk-3.0.4/config.guess *** gawk-3.0.3/config.guess Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/config.guess Wed Jun 9 11:34:12 1999 *************** *** 0 **** --- 1,1034 ---- + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. + # + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Written by Per Bothner . + # The master version of this file is at the FSF in /home/gd/gnu/lib. + # Please send patches to the Autoconf mailing list . + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # + # The plan is that this can be called by configure scripts if you + # don't specify an explicit system type (host/target name). + # + # Only a few systems have been added to this list; please add others + # (but try to keep the structure clean). + # + + # Use $HOST_CC if defined. $CC may point to a cross-compiler + if test x"$CC_FOR_BUILD" = x; then + if test x"$HOST_CC" != x; then + CC_FOR_BUILD="$HOST_CC" + else + if test x"$CC" != x; then + CC_FOR_BUILD="$CC" + else + CC_FOR_BUILD=cc + fi + fi + fi + + + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. + # (ghazi@noc.rutgers.edu 8/24/94.) + if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH + fi + + UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown + UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + + dummy=dummy-$$ + trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 + + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main + EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + macppc:NetBSD:*:*) + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c + #ifdef __cplusplus + int main (int argc, char *argv[]) { + #else + int main (argc, argv) int argc; char *argv[]; { + #endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 ) + sed 's/^ //' << EOF >$dummy.c + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } + EOF + ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + rm -f $dummy.c $dummy + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE*:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*T3E:*:*:*) + echo t3e-cray-unicosmk${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + if test -x /usr/bin/objformat; then + if test "elf" = "`/usr/bin/objformat`"; then + echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` + exit 0 + fi + fi + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + armv*) UNAME_MACHINE=$UNAME_MACHINE ;; + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_help_string=`cd /; ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <$dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main + EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < + #ifdef __cplusplus + int main (int argc, char *argv[]) { + #else + int main (argc, argv) int argc; char *argv[]; { + #endif + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + # else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + # endif + # else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + # endif + #else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + #endif + return 0; + } + EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + fi ;; + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions + # are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:UnixWare:*:*) + if /bin/uname -X 2>/dev/null >/dev/null ; then + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + fi + echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + esac + + #echo '(No uname command or uname output not recognized.)' 1>&2 + #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + + cat >$dummy.c < + # include + #endif + main () + { + #if defined (sony) + #if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); + #else + #include + printf ("m68k-sony-newsos%s\n", + #ifdef NEWSOS4 + "4" + #else + "" + #endif + ); exit (0); + #endif + #endif + + #if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); + #endif + + #if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); + #endif + + #if defined (NeXT) + #if !defined (__ARCHITECTURE__) + #define __ARCHITECTURE__ "m68k" + #endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); + #endif + + #if defined (MULTIMAX) || defined (n16) + #if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); + #else + #if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); + #else + printf ("ns32k-encore-bsd\n"); exit (0); + #endif + #endif + #endif + + #if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); + #endif + + #if defined (sequent) + #if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); + #endif + #if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); + #endif + #endif + + #if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + + #endif + + #if defined (vax) + #if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); + #else + printf ("vax-dec-ultrix\n"); exit (0); + #endif + #endif + + #if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); + #endif + + exit (1); + } + EOF + + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + + # Apollos put the system type in the environment. + + test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + + # Convex versions that predate uname can use getsysinfo(1) + + if [ -x /usr/convex/getsysinfo ] + then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac + fi + + #echo '(Unable to guess system type)' 1>&2 + + exit 1 diff -crN gawk-3.0.3/config.sub gawk-3.0.4/config.sub *** gawk-3.0.3/config.sub Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/config.sub Wed Jun 9 11:34:12 1999 *************** *** 0 **** --- 1,993 ---- + #! /bin/sh + # Configuration validation subroutine script, version 1.1. + # Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software + # can handle that machine. It does not imply ALL GNU software can. + # + # This file is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place - Suite 330, + # Boston, MA 02111-1307, USA. + + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under + # the same distribution terms that you use for the rest of that program. + + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. + # Each package is responsible for reporting which valid configurations + # it does not support. The user should be able to distinguish + # a failure to support a valid configuration from a meaningless + # configuration. + + # The goal of this file is to map all the various variations of a given + # machine specification into a single specification in the form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # or in some cases, the newer four-part form: + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # It is wrong to echo any other type of specification. + + if [ x$1 = x ] + then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 + fi + + # First pass through any local machine types. + case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; + esac + + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; + esac + + ### Let's recognize common machines as not being operating systems so + ### that things like config.sub decstation-3100 work. We also + ### recognize some manufacturers as not being operating systems, so we + ### can provide default operating systems below. + case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + esac + + # Decode aliases for certain CPU-COMPANY combinations. + case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \ + | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ + | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67] \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-* | armv*-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; + # I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netwinder) + basic_machine=armv4l-corel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + *mint | *MiNT) + basic_machine=m68k-atari + os=-mint + ;; + none) + basic_machine=none-none + os=-none + ;; + + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + esac + + # Here we canonicalize certain aliases for manufacturers. + case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; + esac + + # Decode manufacturer-specific aliases for certain operating systems. + + if [ x"$os" != x"" ] + then + case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ + | -openstep* | -mpeix* | -oskit*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -*mint | -*MiNT) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; + esac + else + + # Here we handle the default operating systems that come with various machines. + # The value should be what the vendor currently ships out the door with their + # machine or put another way, the most popular os provided with the machine. + + # Note that if you're going to try to match "-MANUFACTURER" here (say, + # "-sun"), then you have to tell the case statement up towards the top + # that MANUFACTURER isn't an operating system. Otherwise, code above + # will signal an error saying that MANUFACTURER isn't an operating + # system, and we'll never get to this point. + + case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-corel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; + esac + fi + + # Here we handle the case where we know the os, and the CPU type, but not the + # manufacturer. We pick the logical manufacturer. + vendor=unknown + case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; + esac + + echo $basic_machine$os diff -crN gawk-3.0.3/configh.in gawk-3.0.4/configh.in *** gawk-3.0.3/configh.in Fri May 2 04:36:15 1997 --- gawk-3.0.4/configh.in Wed Jun 9 11:37:17 1999 *************** *** 4,10 **** */ /* ! * Copyright (C) 1995-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 4,10 ---- */ /* ! * Copyright (C) 1995-1999 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. *************** *** 130,135 **** --- 130,138 ---- #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 */ /* Define if you have the fmod function. */ #undef HAVE_FMOD diff -crN gawk-3.0.3/configure gawk-3.0.4/configure *** gawk-3.0.3/configure Wed May 14 03:59:00 1997 --- gawk-3.0.4/configure Wed Jun 9 11:37:35 1999 *************** *** 15,20 **** --- 15,22 ---- --enable-bitops Enable Octal and Hex constants and bit functions" ac_help="$ac_help --enable-non-decimal-data Enable Octal and Hex constants as valid input data" + ac_help="$ac_help + --disable-largefile omit support for large files" # Initialize some variables set by options. # The variables have the same names as the options, with *************** *** 524,529 **** --- 526,577 ---- + ac_aux_dir= + for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi + done + if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + fi + ac_config_guess=$ac_aux_dir/config.guess + ac_config_sub=$ac_aux_dir/config.sub + ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + + # Make sure we can run config.sub. + if $ac_config_sub sun4 >/dev/null 2>&1; then : + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } + fi + + echo $ac_n "checking host system type""... $ac_c" 1>&6 + echo "configure:556: checking host system type" >&5 + + host_alias=$host + case "$host_alias" in + NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; + esac + + host=`$ac_config_sub $host_alias` + host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo "$ac_t""$host" 1>&6 + # Check whether --enable-bitops or --disable-bitops was given. if test "${enable_bitops+set}" = set; then *************** *** 549,555 **** # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:553: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 597,603 ---- # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:601: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 579,585 **** test -n "$YACC" || YACC="yacc" echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:583: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 627,633 ---- test -n "$YACC" || YACC="yacc" echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 ! echo "configure:631: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 602,608 **** # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:606: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 650,656 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:654: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 631,637 **** # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:635: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 679,685 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:683: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 679,685 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. --- 727,733 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:731: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. *************** *** 689,699 **** cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then --- 737,747 ---- cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then *************** *** 713,724 **** { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:722: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 761,772 ---- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:770: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 727,733 **** yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no --- 775,781 ---- yes; #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no *************** *** 742,748 **** ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:746: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 790,796 ---- ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:794: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 770,776 **** fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:774: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= --- 818,824 ---- fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:822: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= *************** *** 785,797 **** # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : --- 833,845 ---- # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : *************** *** 802,814 **** rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : --- 850,862 ---- rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : *************** *** 834,858 **** # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. INSTALL="$srcdir/install-sh -c"; export INSTALL - ac_aux_dir= - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi - done - if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } - fi - ac_config_guess=$ac_aux_dir/config.guess - ac_config_sub=$ac_aux_dir/config.sub - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: --- 882,887 ---- *************** *** 864,870 **** # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:868: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 893,899 ---- # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:897: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 915,921 **** echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:919: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 944,950 ---- echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 ! echo "configure:948: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 953,962 **** fi echo $ac_n "checking for AIX""... $ac_c" 1>&6 ! echo "configure:958: checking for AIX" >&5 cat > conftest.$ac_ext <&6 + echo "configure:987: checking build system type" >&5 + + build_alias=$build + case "$build_alias" in + NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; + esac + + build=`$ac_config_sub $build_alias` + build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` + build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` + build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + echo "$ac_t""$build" 1>&6 + + if test $host != $build; then + ac_tool_prefix=${host_alias}- + else + ac_tool_prefix= + fi + + + # Check whether --enable-largefile or --disable-largefile was given. + if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + : + fi + + if test "$enable_largefile" != no; then + # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. + set dummy ${ac_tool_prefix}getconf; ac_word=$2 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 + echo "configure:1021: checking for $ac_word" >&5 + if eval "test \"`echo '$''{'ac_cv_prog_GETCONF'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + if test -n "$GETCONF"; then + ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. + else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_GETCONF="${ac_tool_prefix}getconf" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="getconf" + fi + fi + GETCONF="$ac_cv_prog_GETCONF" + if test -n "$GETCONF"; then + echo "$ac_t""$GETCONF" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + + + + echo $ac_n "checking for CFLAGS value to request large file support""... $ac_c" 1>&6 + echo "configure:1050: checking for CFLAGS value to request large file support" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_largefile_CFLAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_largefile_CFLAGS=`($GETCONF LFS_CFLAGS) 2>/dev/null` || { + gawk_cv_sys_largefile_CFLAGS=no + case "$host_os" in + # IRIX 6.2 and later require cc -n32. + irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*) + if test "$GCC" != yes; then + gawk_cv_sys_largefile_CFLAGS=-n32 + fi + gawk_save_CC="$CC" + CC="$CC $gawk_cv_sys_largefile_CFLAGS" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + : + else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gawk_cv_sys_largefile_CFLAGS=no + fi + rm -f conftest* + CC="$gawk_save_CC" + esac + } + fi + + echo "$ac_t""$gawk_cv_sys_largefile_CFLAGS" 1>&6 + echo $ac_n "checking for LDFLAGS value to request large file support""... $ac_c" 1>&6 + echo "configure:1088: checking for LDFLAGS value to request large file support" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_largefile_LDFLAGS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_largefile_LDFLAGS=`($GETCONF LFS_LDFLAGS) 2>/dev/null` || { + gawk_cv_sys_largefile_LDFLAGS=no + + } + fi + + echo "$ac_t""$gawk_cv_sys_largefile_LDFLAGS" 1>&6 + echo $ac_n "checking for LIBS value to request large file support""... $ac_c" 1>&6 + echo "configure:1100: checking for LIBS value to request large file support" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_largefile_LIBS'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_largefile_LIBS=`($GETCONF LFS_LIBS) 2>/dev/null` || { + gawk_cv_sys_largefile_LIBS=no + + } + fi + + echo "$ac_t""$gawk_cv_sys_largefile_LIBS" 1>&6 + + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + no) ;; + -D_FILE_OFFSET_BITS=*) ;; + -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;; + -D_LARGE_FILES | -D_LARGE_FILES=*) ;; + -D?* | -I?*) + case "$gawk_flag" in + no) ;; + ?*) + case "$CPPFLAGS" in + '') CPPFLAGS="$gawk_flag" ;; + *) CPPFLAGS=$CPPFLAGS' '"$gawk_flag" ;; + esac ;; + esac ;; + *) + case "$gawk_flag" in + no) ;; + ?*) + case "$CFLAGS" in + '') CFLAGS="$gawk_flag" ;; + *) CFLAGS=$CFLAGS' '"$gawk_flag" ;; + esac ;; + esac ;; + esac + done + case "$gawk_cv_sys_largefile_LDFLAGS" in + no) ;; + ?*) + case "$LDFLAGS" in + '') LDFLAGS="$gawk_cv_sys_largefile_LDFLAGS" ;; + *) LDFLAGS=$LDFLAGS' '"$gawk_cv_sys_largefile_LDFLAGS" ;; + esac ;; + esac + case "$gawk_cv_sys_largefile_LIBS" in + no) ;; + ?*) + case "$LIBS" in + '') LIBS="$gawk_cv_sys_largefile_LIBS" ;; + *) LIBS=$LIBS' '"$gawk_cv_sys_largefile_LIBS" ;; + esac ;; + esac + echo $ac_n "checking for _FILE_OFFSET_BITS""... $ac_c" 1>&6 + echo "configure:1155: checking for _FILE_OFFSET_BITS" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_file_offset_bits'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_file_offset_bits=no + case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + gawk_cv_sys_file_offset_bits=64 ;; + esac + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + -D_FILE_OFFSET_BITS) + gawk_cv_sys_file_offset_bits=1 ;; + -D_FILE_OFFSET_BITS=*) + gawk_cv_sys_file_offset_bits=`expr " $gawk_flag" : '[^=]*=\(.*\)'` ;; + esac + done + + fi + + echo "$ac_t""$gawk_cv_sys_file_offset_bits" 1>&6 + if test "$gawk_cv_sys_file_offset_bits" != no; then + cat >> confdefs.h <&6 + echo "configure:1184: checking for _LARGEFILE_SOURCE" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_largefile_source'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_largefile_source=no + case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + gawk_cv_sys_largefile_source=1 ;; + esac + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + -D_LARGEFILE_SOURCE) + gawk_cv_sys_largefile_source=1 ;; + -D_LARGEFILE_SOURCE=*) + gawk_cv_sys_largefile_source=`expr " $gawk_flag" : '[^=]*=\(.*\)'` ;; + esac + done + + fi + + echo "$ac_t""$gawk_cv_sys_largefile_source" 1>&6 + if test "$gawk_cv_sys_largefile_source" != no; then + cat >> confdefs.h <&6 + echo "configure:1213: checking for _LARGE_FILES" >&5 + if eval "test \"`echo '$''{'gawk_cv_sys_large_files'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + gawk_cv_sys_large_files=no + case "$host_os" in + # AIX 4.2 and later + aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) + gawk_cv_sys_large_files=1 ;; + esac + for gawk_flag in $gawk_cv_sys_largefile_CFLAGS no; do + case "$gawk_flag" in + -D_LARGE_FILES) + gawk_cv_sys_large_files=1 ;; + -D_LARGE_FILES=*) + gawk_cv_sys_large_files=`expr " $gawk_flag" : '[^=]*=\(.*\)'` ;; + esac + done + + fi + + echo "$ac_t""$gawk_cv_sys_large_files" 1>&6 + if test "$gawk_cv_sys_large_files" != no; then + cat >> confdefs.h <&6 ! echo "configure:1245: checking for AIX" >&5 cat > conftest.$ac_ext <&6 ! echo "configure:982: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then --- 1265,1271 ---- echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 ! echo "configure:1269: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then *************** *** 1000,1016 **** ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ! echo "configure:1004: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 1287,1303 ---- ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ! echo "configure:1291: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 1048,1060 **** fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1053: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1335,1370 ---- fi + echo $ac_n "checking for AIX compilation hacks""... $ac_c" 1>&6 + echo "configure:1340: checking for AIX compilation hacks" >&5 + if eval "test \"`echo '$''{'gawk_cv_aix_hack'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + + if test -d /lpp/bos + then + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1" + gawk_cv_aix_hack=yes + else + gawk_cv_aix_hack=no + fi + + fi + echo "$ac_t""${gawk_cv_aix_hack}" 1>&6 + + + if test "$ISC" = 1 # will be set by test for ISC + then + CFLAGS="$CFLAGS -D_SYSV3" + fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 ! echo "configure:1363: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 1062,1068 **** #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 1372,1378 ---- #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 1079,1085 **** if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1389,1395 ---- if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 1097,1103 **** if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF --- 1407,1413 ---- if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF *************** *** 1118,1124 **** : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') --- 1428,1434 ---- : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') *************** *** 1129,1135 **** exit (0); } EOF ! if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else --- 1439,1445 ---- exit (0); } EOF ! if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else *************** *** 1153,1164 **** fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:1157: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1463,1474 ---- fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 ! echo "configure:1467: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 1174,1180 **** s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:1178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else --- 1484,1490 ---- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF ! if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else *************** *** 1198,1214 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1202: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 1508,1524 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1512: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 1240,1256 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1244: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 1550,1566 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1554: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 1281,1297 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1285: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 1591,1607 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1595: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 1320,1331 **** fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:1324: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 1630,1641 ---- fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 ! echo "configure:1634: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** *** 1353,1364 **** fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1357: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 1663,1674 ---- fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1667: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 1375,1381 **** int i; ; return 0; } EOF ! if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else --- 1685,1691 ---- int i; ; return 0; } EOF ! if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else *************** *** 1394,1405 **** echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:1398: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS --- 1704,1715 ---- echo $ac_n "checking for size_t""... $ac_c" 1>&6 ! echo "configure:1708: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS *************** *** 1427,1438 **** fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:1431: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF --- 1737,1748 ---- fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:1741: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF *************** *** 1461,1467 **** fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 ! echo "configure:1465: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 1771,1777 ---- fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 ! echo "configure:1775: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1469,1475 **** ac_cv_type_getgroups=cross else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else --- 1804,1810 ---- } EOF ! if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else *************** *** 1508,1514 **** if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF --- 1818,1824 ---- if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext < EOF *************** *** 1532,1538 **** cat > conftest.$ac_ext < EOF --- 1842,1848 ---- cat > conftest.$ac_ext < EOF *************** *** 1559,1577 **** # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:1563: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else --- 1869,1887 ---- # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 ! echo "configure:1873: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF ! if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else *************** *** 1592,1603 **** fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 ! echo "configure:1596: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1906: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else --- 1930,1936 ---- char *p = (char *) alloca(1); ; return 0; } EOF ! if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else *************** *** 1652,1663 **** echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 ! echo "configure:1656: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1966: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1686: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1996: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 2020,2026 ---- ; return 0; } EOF ! if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 1737,1743 **** fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:1741: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2047,2053 ---- fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 ! echo "configure:2051: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 1745,1751 **** ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else --- 2074,2080 ---- exit (find_stack_direction() < 0); } EOF ! if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else *************** *** 1791,1802 **** EOF echo $ac_n "checking for vprintf""... $ac_c" 1>&6 ! echo "configure:1795: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2105: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else --- 2129,2135 ---- ; return 0; } EOF ! if { (eval echo configure:2133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else *************** *** 1843,1854 **** if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 ! echo "configure:1847: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2157: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else --- 2181,2187 ---- ; return 0; } EOF ! if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else *************** *** 1897,1903 **** echo $ac_n "checking for fmod in -lm""... $ac_c" 1>&6 ! echo "configure:1901: checking for fmod in -lm" >&5 ac_lib_var=`echo m'_'fmod | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 2207,2213 ---- echo $ac_n "checking for fmod in -lm""... $ac_c" 1>&6 ! echo "configure:2211: checking for fmod in -lm" >&5 ac_lib_var=`echo m'_'fmod | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1905,1911 **** ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else --- 2226,2232 ---- fmod() ; return 0; } EOF ! if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else *************** *** 1947,1958 **** strftime strncasecmp strtod system tzset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1951: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2261: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 2285,2291 ---- ; return 0; } EOF ! if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 2004,2020 **** do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2008: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* --- 2314,2330 ---- do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:2318: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* *************** *** 2043,2054 **** for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:2047: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2357: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else --- 2381,2387 ---- ; return 0; } EOF ! if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else *************** *** 2096,2102 **** done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:2100: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2406,2412 ---- done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 ! echo "configure:2410: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2104,2110 **** ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else --- 2554,2560 ---- } EOF ! if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else *************** *** 2270,2281 **** if (uname) > /dev/null 2>&1 then case `uname` in ! *VMS*) cat >> confdefs.h <<\EOF #define GETPGRP_VOID 1 EOF ! ;; *) echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 ! echo "configure:2279: checking whether getpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2580,2695 ---- if (uname) > /dev/null 2>&1 then case `uname` in ! *VMS*|*BeOS*) ! cat >> confdefs.h <<\EOF ! #define GETPGRP_VOID 1 ! EOF ! ! ;; ! *HP-UX*) # not getpgrp related ! if test "$GCC" = yes ! then ! : ! else ! # stupid HP linker leaves the output file ! # around even when a link fails. This confuses ! # the alloca tests, so we have to do this ! # manually. Sucks big time. ! LIBS="$LIBS -lPW" ! fi ! ! # have to do the getpgrp test since won't ! # fall into the default ! echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 ! echo "configure:2605: checking whether getpgrp takes no argument" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! if test "$cross_compiling" = yes; then ! { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } ! else ! cat > conftest.$ac_ext < ! #include ! ! int pid; ! int pg1, pg2, pg3, pg4; ! int ng, np, s, child; ! ! main() ! { ! pid = getpid(); ! pg1 = getpgrp(0); ! pg2 = getpgrp(); ! pg3 = getpgrp(pid); ! pg4 = getpgrp(1); ! ! /* ! * If all of these values are the same, it's pretty sure that ! * we're on a system that ignores getpgrp's first argument. ! */ ! if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) ! exit(0); ! ! child = fork(); ! if (child < 0) ! exit(1); ! else if (child == 0) { ! np = getpid(); ! /* ! * If this is Sys V, this will not work; pgrp will be ! * set to np because setpgrp just changes a pgrp to be ! * the same as the pid. ! */ ! setpgrp(np, pg1); ! ng = getpgrp(0); /* Same result for Sys V and BSD */ ! if (ng == pg1) { ! exit(1); ! } else { ! exit(0); ! } ! } else { ! wait(&s); ! exit(s>>8); ! } ! } ! ! EOF ! if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null ! then ! ac_cv_func_getpgrp_void=yes ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_getpgrp_void=no ! fi ! rm -fr conftest* ! fi ! ! ! fi ! ! echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6 ! if test $ac_cv_func_getpgrp_void = yes; then ! cat >> confdefs.h <<\EOF #define GETPGRP_VOID 1 EOF ! ! fi ! ! ;; *) echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 ! echo "configure:2693: checking whether getpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2283,2289 **** { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getpgrp_void=yes else --- 2752,2758 ---- } EOF ! if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getpgrp_void=yes else *************** *** 2365,2371 **** esac else echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 ! echo "configure:2369: checking whether getpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else --- 2779,2785 ---- esac else echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 ! echo "configure:2783: checking whether getpgrp takes no argument" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else *************** *** 2373,2379 **** { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getpgrp_void=yes else --- 2842,2848 ---- } EOF ! if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_getpgrp_void=yes else *************** *** 2454,2465 **** fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 ! echo "configure:2458: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2868,2879 ---- fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 ! echo "configure:2872: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 2467,2473 **** struct stat s; s.st_blksize; ; return 0; } EOF ! if { (eval echo configure:2471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else --- 2881,2887 ---- struct stat s; s.st_blksize; ; return 0; } EOF ! if { (eval echo configure:2885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else *************** *** 2488,2499 **** fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:2492: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2902,2913 ---- fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 ! echo "configure:2906: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 2502,2508 **** struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else --- 2916,2922 ---- struct tm *tp; ; return 0; } EOF ! if { (eval echo configure:2920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else *************** *** 2523,2534 **** fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:2527: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include --- 2937,2948 ---- fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 ! echo "configure:2941: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include *************** *** 2536,2542 **** struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:2540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else --- 2950,2956 ---- struct tm *tp; tp->tm_sec; ; return 0; } EOF ! if { (eval echo configure:2954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else *************** *** 2557,2568 **** fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 ! echo "configure:2561: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> --- 2971,2982 ---- fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 ! echo "configure:2975: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> *************** *** 2570,2576 **** struct tm tm; tm.tm_zone; ; return 0; } EOF ! if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else --- 2984,2990 ---- struct tm tm; tm.tm_zone; ; return 0; } EOF ! if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else *************** *** 2590,2601 **** else echo $ac_n "checking for tzname""... $ac_c" 1>&6 ! echo "configure:2594: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ --- 3004,3015 ---- else echo $ac_n "checking for tzname""... $ac_c" 1>&6 ! echo "configure:3008: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ *************** *** 2605,2611 **** atoi(*tzname); ; return 0; } EOF ! if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else --- 3019,3025 ---- atoi(*tzname); ; return 0; } EOF ! if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else *************** *** 2628,2641 **** echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 ! echo "configure:2632: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&6 ! echo "configure:3046: checking whether char is unsigned" >&5 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else --- 3081,3087 ---- volatile char c = 255; exit(c < 0); } EOF ! if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else *************** *** 2691,2702 **** fi echo $ac_n "checking for working const""... $ac_c" 1>&6 ! echo "configure:2695: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3109: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else --- 3159,3165 ---- ; return 0; } EOF ! if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else *************** *** 2768,2779 **** echo $ac_n "checking for ANSI stringizing capability""... $ac_c" 1>&6 ! echo "configure:2772: checking for ANSI stringizing capability" >&5 if eval "test \"`echo '$''{'gawk_cv_c_stringize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:3186: checking for ANSI stringizing capability" >&5 if eval "test \"`echo '$''{'gawk_cv_c_stringize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /dev/null 2>&1 then case `uname` in ! *VMS*) AC_DEFINE(GETPGRP_VOID) ;; *) AC_FUNC_GETPGRP ;; esac --- 118,142 ---- if (uname) > /dev/null 2>&1 then case `uname` in ! *VMS*|*BeOS*) ! AC_DEFINE(GETPGRP_VOID) ! ;; ! *HP-UX*) # not getpgrp related ! if test "$GCC" = yes ! then ! : ! else ! # stupid HP linker leaves the output file ! # around even when a link fails. This confuses ! # the alloca tests, so we have to do this ! # manually. Sucks big time. ! LIBS="$LIBS -lPW" ! fi ! ! # have to do the getpgrp test since won't ! # fall into the default ! AC_FUNC_GETPGRP ! ;; *) AC_FUNC_GETPGRP ;; esac diff -crN gawk-3.0.3/custom.h gawk-3.0.4/custom.h *** gawk-3.0.3/custom.h Fri May 2 04:36:17 1997 --- gawk-3.0.4/custom.h Wed Apr 28 17:10:44 1999 *************** *** 7,17 **** * information. * * If you make additions to this file for your system, please send me ! * the information, to arnold@gnu.ai.mit.edu. */ /* ! * Copyright (C) 1995-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 7,17 ---- * information. * * If you make additions to this file for your system, please send me ! * the information, to arnold@gnu.org. */ /* ! * Copyright (C) 1995-1999 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. *************** *** 56,59 **** --- 56,66 ---- /* For sequent, based on email with Aron Griffis */ #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 #endif diff -crN gawk-3.0.3/doc/ChangeLog gawk-3.0.4/doc/ChangeLog *** gawk-3.0.3/doc/ChangeLog Thu May 15 19:50:34 1997 --- gawk-3.0.4/doc/ChangeLog Wed Jun 30 16:15:09 1999 *************** *** 1,3 **** --- 1,30 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + + Wed Oct 7 21:59:33 1998 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.227, from Texinfo 3.12. + + Sun Oct 19 12:26:08 1997 Arnold D. Robbins + + * ALL: change references to arnold@gnu.ai.mit.edu to arnold@gnu.org. + + Tue Sep 23 10:31:17 1997 Arnold D. Robbins + + * texinfo.tex: Updated to version 2.218, from Texinfo 3.11. + + Fri Jul 4 08:19:00 1997 Arnold D. Robbins + + * 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 + + * Makefile.in ($(infodir)/gawk.info): typo fix. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/doc/Makefile.in gawk-3.0.4/doc/Makefile.in *** gawk-3.0.3/doc/Makefile.in Thu May 15 04:36:15 1997 --- gawk-3.0.4/doc/Makefile.in Wed Apr 28 17:21:56 1999 *************** *** 1,6 **** # Makefile for GNU Awk documentation. # ! # Copyright (C) 1993-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. --- 1,6 ---- # Makefile for GNU Awk documentation. # ! # Copyright (C) 1993-1999 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. *************** *** 71,90 **** install: $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info ! $(infodir)/gawk.info: gawk.info -if test -f gawk.info; then d=.; \ else d=$(srcdir); fi; \ for i in $$d/gawk.info*; do \ ! $(INSTALL_DATA) $$i $(infodir)/$i ; \ done; \ if $(SHELL) -c 'install-info --version' > /dev/null 2>&1 ; \ then install-info --info-dir=$(infodir) gawk.info ; \ else true ; fi; exit 0 ! $(mandir)/gawk$(manext): gawk.1 $(INSTALL_DATA) $(srcdir)/gawk.1 $(mandir)/gawk$(manext) ! $(mandir)/igawk$(manext): igawk.1 $(INSTALL_DATA) $(srcdir)/igawk.1 $(mandir)/igawk$(manext) uninstall: --- 71,95 ---- install: $(mandir)/gawk$(manext) $(mandir)/igawk$(manext) $(infodir)/gawk.info ! $(infodir)/gawk.info:: -if test -f gawk.info; then d=.; \ else d=$(srcdir); fi; \ + if [ -f $(infodir)/dir -a -f $(infodir)/gawk.info ] \ + && cmp $$d/gawk.info $(infodir)/gawk.info > /dev/null \ + && grep '(gawk\.info)' $(infodir)/dir > /dev/null; then \ + exit 0; \ + fi; \ for i in $$d/gawk.info*; do \ ! $(INSTALL_DATA) $$i $(infodir)/$$i ; \ done; \ if $(SHELL) -c 'install-info --version' > /dev/null 2>&1 ; \ then install-info --info-dir=$(infodir) gawk.info ; \ else true ; fi; exit 0 ! $(mandir)/gawk$(manext):: gawk.1 $(INSTALL_DATA) $(srcdir)/gawk.1 $(mandir)/gawk$(manext) ! $(mandir)/igawk$(manext):: igawk.1 $(INSTALL_DATA) $(srcdir)/igawk.1 $(mandir)/igawk$(manext) uninstall: diff -crN gawk-3.0.3/doc/ad.block gawk-3.0.4/doc/ad.block *** gawk-3.0.3/doc/ad.block Mon Dec 9 19:55:23 1996 --- gawk-3.0.4/doc/ad.block Mon May 3 13:09:28 1999 *************** *** 1,7 **** ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.ai.mit.edu .\" This file is the Ad block (included in cover) .\" ! .\" Copyright (C) 1996 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission --- 1,7 ---- ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" This file is the Ad block (included in cover) .\" ! .\" Copyright (C) 1996, 98 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission *************** *** 27,40 **** .vs 12 .ES .nf ! .ce 6 \*(CBFree Software Foundation, Inc. .ft H 59 Temple Place \(em Suite 330 Boston, MA 02111-1307 USA Phone: +1-617-542-5942 Fax (including Japan): +1-617-542-2652 ! E-mail: gnu@prep.ai.mit.edu .ce 7 .ft HB --- 27,41 ---- .vs 12 .ES .nf ! .ce 7 \*(CBFree Software Foundation, Inc. .ft H 59 Temple Place \(em Suite 330 Boston, MA 02111-1307 USA Phone: +1-617-542-5942 Fax (including Japan): +1-617-542-2652 ! E-mail: gnu@gnu.org ! URL: http://www.gnu.org .ce 7 .ft HB diff -crN gawk-3.0.3/doc/awkcard.in gawk-3.0.4/doc/awkcard.in *** gawk-3.0.3/doc/awkcard.in Fri Feb 21 13:38:56 1997 --- gawk-3.0.4/doc/awkcard.in Wed May 5 17:45:34 1999 *************** *** 1,6 **** ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.ai.mit.edu .\" ! .\" Copyright (C) 1996, 97 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission --- 1,6 ---- ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" ! .\" Copyright (C) 1996, 97, 98, 99 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission *************** *** 95,101 **** \*(CD .SL .nf ! \*(FR\(co Copyright, 1996, 1997 Free Software Foundation 59 Temple Place \(em Suite 330 Boston, MA 02111-1307 USA .nf --- 95,101 ---- \*(CD .SL .nf ! \*(FR\(co Copyright 1996-1999, Free Software Foundation 59 Temple Place \(em Suite 330 Boston, MA 02111-1307 USA .nf *************** *** 934,943 **** --- 934,945 ---- .EB "\s+2\f(HBLOCALIZATION\*(FR\s0" .. + .ig .ps +2 .ce 1 \*(CD\fHISBN: 0-916151-97-2\*(FR .ps -2 + .. .BT *************** *** 1128,1134 **** pad the field to this width. The field is normally padded with spaces. If the \*(FC0\fP flag has been used, pad with zeroes. ! The meaning of the \*(FIwidth\*(FR varies by control letter: T} \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR, \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{ --- 1130,1139 ---- pad the field to this width. The field is normally padded with spaces. If the \*(FC0\fP flag has been used, pad with zeroes. ! T} ! \*(FC.\fP\*(FIprec\fP T{ ! precision. ! The meaning varies by control letter: T} \*(FC%d\*(FR, \*(FC%o\*(FR, \*(FC%i\*(FR, \*(FC%u\*(FR, \*(FC%x\*(FR, \*(FC%X\fP T{ *************** *** 1433,1438 **** --- 1438,1447 ---- Function parameters used as local variables are initialized to the null string and the number zero upon function invocation. .sp .5 + Use \*(FCreturn\fP 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. + .sp .5 \*(CLThe word \*(FCfunc\fP may be used in place of *************** *** 1446,1452 **** .ES .fi \*(CDIf you find a bug in this reference card, please report it via electronic ! mail to \*(FCarnold@gnu.ai.mit.edu\*(FR.\*(CX .EB "\s+2\f(HBBUG REPORTS\*(FR\s0" .BT --- 1455,1461 ---- .ES .fi \*(CDIf you find a bug in this reference card, please report it via electronic ! mail to \*(FCarnold@gnu.org\*(FR.\*(CX .EB "\s+2\f(HBBUG REPORTS\*(FR\s0" .BT *************** *** 1493,1500 **** .\" --- FTP Information .ES .nf ! \*(CDHost: \*(FCftp.gnu.ai.mit.edu\*(FR ! File: \*(FC/pub/gnu/gawk-3.0.3.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. --- 1502,1509 ---- .\" --- FTP Information .ES .nf ! \*(CDHost: \*(FCgnudist.gnu.org\*(FR ! File: \*(FC/gnu/gawk/gawk-3.0.4.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. *************** *** 1502,1508 **** .nf .sp .5 Host: \*(FCnetlib.bell-labs.com\*(FR ! File: \*(FC/netlib/research/awk.bundle.Z\fP .in +.2i .fi \*(NK. This version requires an ANSI C compiler; --- 1511,1517 ---- .nf .sp .5 Host: \*(FCnetlib.bell-labs.com\*(FR ! File: \*(FC/netlib/research/awk.bundle.gz\fP .in +.2i .fi \*(NK. This version requires an ANSI C compiler; diff -crN gawk-3.0.3/doc/cardfonts gawk-3.0.4/doc/cardfonts *** gawk-3.0.3/doc/cardfonts Mon Nov 4 20:16:49 1996 --- gawk-3.0.4/doc/cardfonts Tue Sep 8 21:08:33 1998 *************** *** 1,4 **** ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.ai.mit.edu .\" cardfonts --- this file sets the fonts to use for the reference card .\" .\" Copyright (C) 1996 Free Software Foundation, Inc. --- 1,4 ---- ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" cardfonts --- this file sets the fonts to use for the reference card .\" .\" Copyright (C) 1996 Free Software Foundation, Inc. diff -crN gawk-3.0.3/doc/colors gawk-3.0.4/doc/colors *** gawk-3.0.3/doc/colors Thu May 15 04:36:22 1997 --- gawk-3.0.4/doc/colors Wed Apr 28 17:26:11 1999 *************** *** 1,7 **** ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.ai.mit.edu .\" This file sets the colors to use. .\" ! .\" Copyright (C) 1996,97 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission --- 1,7 ---- ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" This file sets the colors to use. .\" ! .\" Copyright (C) 1996,97,99 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission diff -crN gawk-3.0.3/doc/gawk.1 gawk-3.0.4/doc/gawk.1 *** gawk-3.0.3/doc/gawk.1 Fri Dec 20 04:43:46 1996 --- gawk-3.0.4/doc/gawk.1 Wed Apr 28 17:23:33 1999 *************** *** 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" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS --- 1,7 ---- .ds PX \s-1POSIX\s+1 .ds UX \s-1UNIX\s+1 .ds AN \s-1ANSI\s+1 ! .TH GAWK 1 "Apr 28 1999" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS *************** *** 2150,2155 **** --- 2150,2161 ---- 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,2541 **** .SH VERSION INFORMATION This man page documents .IR gawk , ! version 3.0.2. .SH AUTHORS The original version of \*(UX .I awk --- 2541,2547 ---- .SH VERSION INFORMATION This man page documents .IR gawk , ! version 3.0.4. .SH AUTHORS The original version of \*(UX .I awk *************** *** 2566,2575 **** If you find a bug in .IR gawk , please send electronic mail to ! .BR bug-gnu-utils@prep.ai.mit.edu , .I with a carbon copy to ! .BR arnold@gnu.ai.mit.edu . 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 --- 2572,2581 ---- If you find a bug in .IR gawk , please send electronic mail to ! .BR bug-gnu-utils@gnu.org , .I with a carbon copy to ! .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,2604 **** provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS ! Copyright \(co) 1996 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 --- 2604,2610 ---- provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS ! 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 diff -crN gawk-3.0.3/doc/gawk.texi gawk-3.0.4/doc/gawk.texi *** gawk-3.0.3/doc/gawk.texi Fri Mar 7 04:34:52 1997 --- gawk-3.0.4/doc/gawk.texi Wed May 5 18:05:13 1999 *************** *** 21,30 **** @c applies to, and when the document was updated. @set TITLE Effective AWK Programming @set SUBTITLE A User's Guide for GNU Awk ! @set PATCHLEVEL 3 @set EDITION 1.0.@value{PATCHLEVEL} @set VERSION 3.0 ! @set UPDATE-MONTH February 1997 @iftex @set DOCUMENT book @end iftex --- 21,30 ---- @c applies to, and when the document was updated. @set TITLE Effective AWK Programming @set SUBTITLE A User's Guide for GNU Awk ! @set PATCHLEVEL 4 @set EDITION 1.0.@value{PATCHLEVEL} @set VERSION 3.0 ! @set UPDATE-MONTH April, 1999 @iftex @set DOCUMENT book @end iftex *************** *** 74,80 **** This is Edition @value{EDITION} of @cite{@value{TITLE}}, for the @value{VERSION}.@value{PATCHLEVEL} version of the GNU implementation of AWK. ! Copyright (C) 1989, 1991, 92, 93, 96, 97 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice --- 74,80 ---- This is Edition @value{EDITION} of @cite{@value{TITLE}}, for the @value{VERSION}.@value{PATCHLEVEL} version of the GNU implementation of AWK. ! Copyright (C) 1989, 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice *************** *** 138,144 **** Registered Trademark of Paramount Pictures Corporation. @* @c sorry, i couldn't resist @sp 3 ! Copyright @copyright{} 1989, 1991, 92, 93, 96, 97 Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}}, @* --- 138,144 ---- Registered Trademark of Paramount Pictures Corporation. @* @c sorry, i couldn't resist @sp 3 ! Copyright @copyright{} 1989, 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}}, @* *************** *** 153,168 **** @item Seattle, WA 98155 USA @tab Boston, MA 02111-1307 USA @item Phone: +1-206-782-7733 @tab Phone: +1-617-542-5942 @item Fax: +1-206-782-7191 @tab Fax: +1-617-542-2652 ! @item E-mail: @code{sales@@ssc.com} @tab E-mail: @code{gnu@@prep.ai.mit.edu} @item URL: @code{http://www.ssc.com/} @tab URL: @code{http://www.fsf.org/} @end multitable @sp 1 @c this ISBN can change! Check with SSC @c This one is correct for gawk 3.0 and edition 1.0 from the FSF ! @c ISBN 1-882114-26-4 @* @c This one is correct for gawk 3.0.3 and edition 1.0.3 from SSC ! ISBN 1-57831-000-8 @* Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice --- 153,168 ---- @item Seattle, WA 98155 USA @tab Boston, MA 02111-1307 USA @item Phone: +1-206-782-7733 @tab Phone: +1-617-542-5942 @item Fax: +1-206-782-7191 @tab Fax: +1-617-542-2652 ! @item E-mail: @code{sales@@ssc.com} @tab E-mail: @code{gnu@@gnu.org} @item URL: @code{http://www.ssc.com/} @tab URL: @code{http://www.fsf.org/} @end multitable @sp 1 @c this ISBN can change! Check with SSC @c This one is correct for gawk 3.0 and edition 1.0 from the FSF ! ISBN 1-882114-26-4 @* @c This one is correct for gawk 3.0.3 and edition 1.0.3 from SSC ! @c ISBN 1-57831-000-8 @* Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice *************** *** 1387,1392 **** --- 1387,1398 ---- program which users can invoke without their having to know that the program is written in @code{awk}. + @strong{Caution:} You should not put more than one argument on the @samp{#!} + line after the path to @code{awk}. This will not work. The operating system + treats the rest of the line as a single agument, and passes it to @code{awk}. + Doing this will lead to confusing behavior: most likely a usage diagnostic + of some sort from @code{awk}. + @cindex shell scripts @cindex scripts, shell Some older systems do not support the @samp{#!} mechanism. You can get a *************** *** 1441,1446 **** --- 1447,1467 ---- comment is to help you or another person understand the program at a later time. + @strong{Caution:} As mentioned in + @ref{One-shot, ,One-shot Throw-away @code{awk} Programs}, + you can enclose small to medium programs in single quotes, in order to keep + your shell scripts self-contained. When doing so, @emph{don't} put + an apostrophe (i.e., a single quote) into a comment (or anywhere else + in your program). The shell will interpret the quote as the closing + quote for the entire program. As a result, usually the shell will + print a message about mismatched quotes, and if @code{awk} actually + runs, it will probably print strange messages about syntax errors. + For example: + + @example + awk 'BEGIN @{ print "hello" @} # let's be cute' + @end example + @node Very Simple, Two Rules, Running gawk, Getting Started @section A Very Simple Example *************** *** 2142,2148 **** Another interesting question arises. Suppose you use an octal or hexadecimal escape to represent a regexp metacharacter (@pxref{Regexp Operators, , Regular Expression Operators}). ! Does @code{awk} treat the character as literal character, or as a regexp operator? @cindex dark corner --- 2163,2169 ---- Another interesting question arises. Suppose you use an octal or hexadecimal escape to represent a regexp metacharacter (@pxref{Regexp Operators, , Regular Expression Operators}). ! Does @code{awk} treat the character as a literal character, or as a regexp operator? @cindex dark corner *************** *** 4450,4455 **** --- 4471,4478 ---- because the concatenation operator is not parenthesized, and you should write it as @samp{("echo " "date") | getline} if you want your program to be portable to other @code{awk} implementations. + (It happens that @code{gawk} gets it right, but you should not + rely on this. Parentheses make it easier to read, anyway.) @node Getline/Variable/Pipe, Getline Summary, Getline/Pipe, Getline @subsection Using @code{getline} Into a Variable from a Pipe *************** *** 4482,4487 **** --- 4505,4512 ---- because the concatenation operator is not parenthesized, and you should write it as @samp{("echo " "date") | getline @var{var}} if you want your program to be portable to other @code{awk} implementations. + (It happens that @code{gawk} gets it right, but you should not + rely on this. Parentheses make it easier to read, anyway.) @end ifinfo @node Getline Summary, , Getline/Variable/Pipe, Getline *************** *** 4616,4622 **** Here is an example of printing a string that contains embedded newlines (the @samp{\n} is an escape sequence, used to represent the newline ! character; see @ref{Escape Sequences}): @example @group --- 4641,4647 ---- Here is an example of printing a string that contains embedded newlines (the @samp{\n} is an escape sequence, used to represent the newline ! character; @pxref{Escape Sequences}): @example @group *************** *** 6975,6980 **** --- 7000,7007 ---- However, you cannot put a newline in front of either character without using backslash continuation (@pxref{Statements/Lines, ,@code{awk} Statements Versus Lines}). + If @samp{--posix} is specified + (@pxref{Options, , Command Line Options}), then this extension is disabled. @node Function Calls, Precedence, Conditional Exp, Expressions @section Function Calls *************** *** 8264,8270 **** @example @group BEGIN @{ ! if (("date" | getline date_now) < 0) @{ print "Can't get system date" > "/dev/stderr" exit 1 @} --- 8291,8297 ---- @example @group BEGIN @{ ! if (("date" | getline date_now) <= 0) @{ print "Can't get system date" > "/dev/stderr" exit 1 @} *************** *** 8627,8635 **** Notice that the @code{awk} program is not entered in @code{ARGV}. The other special command line options, with their arguments, are also not ! entered. But variable assignments on the command line @emph{are} treated as arguments, and do show up in the @code{ARGV} array. Your program can alter @code{ARGC} and the elements of @code{ARGV}. Each time @code{awk} reaches the end of an input file, it uses the next element of @code{ARGV} as the name of the next input file. By storing a --- 8654,8680 ---- Notice that the @code{awk} program is not entered in @code{ARGV}. The other special command line options, with their arguments, are also not ! entered. This includes variable assignments done with the @samp{-v} ! option (@pxref{Options, ,Command Line Options}). ! Normal variable assignments on the command line @emph{are} treated as arguments, and do show up in the @code{ARGV} array. + @example + $ cat showargs.awk + @print{} BEGIN @{ + @print{} printf "A=%d, B=%d\n", A, B + @print{} for (i = 0; i < ARGC; i++) + @print{} printf "\tARGV[%d] = %s\n", i, ARGV[i] + @print{} @} + @print{} END @{ printf "A=%d, B=%d\n", A, B @} + $ awk -v A=1 -f showargs.awk B=2 /dev/null + @print{} A=1, B=0 + @print{} ARGV[0] = awk + @print{} ARGV[1] = B=2 + @print{} ARGV[2] = /dev/null + @print{} A=1, B=2 + @end example + Your program can alter @code{ARGC} and the elements of @code{ARGV}. Each time @code{awk} reaches the end of an input file, it uses the next element of @code{ARGV} as the name of the next input file. By storing a *************** *** 9172,9177 **** --- 9217,9230 ---- apart the null string. Since there is no data to split out, the function simply clears the array and then returns. + @strong{Caution:} Deleting an array does not change its type; you cannot + delete an array and then use the array's name as a scalar. For + example, this will not work: + + @example + a[1] = 3; delete a; a = 3 + @end example + @node Numeric Array Subscripts, Uninitialized Subscripts, Delete, Arrays @section Using Numbers to Subscript Arrays *************** *** 9785,9790 **** --- 9838,9847 ---- Before splitting the string, @code{split} deletes any previously existing elements in the array @var{array} (d.c.). + If @var{string} does not match @var{fieldsep} at all, @var{array} will have + one element. The value of that element will be the original + @var{string}. + @item sprintf(@var{format}, @var{expression1},@dots{}) @findex sprintf This returns (without printing) the string that @code{printf} would *************** *** 9901,9906 **** --- 9958,9966 ---- object as the third parameter will cause a fatal error, and your program will not run. + Finally, if the @var{regexp} is not a regexp constant, it is converted into a + string and then the value of that string is treated as the regexp to match. + @item gsub(@var{regexp}, @var{replacement} @r{[}, @var{target}@r{]}) @findex gsub This is similar to the @code{sub} function, except @code{gsub} replaces *************** *** 9980,9985 **** --- 10040,10048 ---- @samp{G}, or if it is a number that is less than zero, only one substitution is performed. + If @var{regexp} does not match @var{target}, @code{gensub}'s return value + is the original, unchanged value of @var{target}. + @cindex differences between @code{gawk} and @code{awk} @code{gensub} is a @code{gawk} extension; it is not available in compatibility mode (@pxref{Options, ,Command Line Options}). *************** *** 10310,10316 **** @item system(@var{command}) @findex system @cindex interaction, @code{awk} and other programs ! The system function allows the user to execute operating system commands and then return to the @code{awk} program. The @code{system} function executes the command given by the string @var{command}. It returns, as its value, the status returned by the command that was executed. --- 10373,10379 ---- @item system(@var{command}) @findex system @cindex interaction, @code{awk} and other programs ! The @code{system} function allows the user to execute operating system commands and then return to the @code{awk} program. The @code{system} function executes the command given by the string @var{command}. It returns, as its value, the status returned by the command that was executed. *************** *** 10329,10335 **** finishes processing input and begins its end-of-input processing. Note that redirecting @code{print} or @code{printf} into a pipe is often ! enough to accomplish your task. However, if your @code{awk} program is interactive, @code{system} is useful for cranking up large self-contained programs, such as a shell or an editor. --- 10392,10408 ---- finishes processing input and begins its end-of-input processing. Note that redirecting @code{print} or @code{printf} into a pipe is often ! enough to accomplish your task. If you need to run many commands, it ! will be more efficient to simply print them to a pipe to the shell: ! ! @example ! while (@var{more stuff to do}) ! print @var{command} | "/bin/sh" ! close("/bin/sh") ! @end example ! ! @noindent ! However, if your @code{awk} program is interactive, @code{system} is useful for cranking up large self-contained programs, such as a shell or an editor. *************** *** 11889,11895 **** @c file eg/lib/nextfile.awk # nextfile --- skip remaining records in current file # correctly handle successive occurrences of the same file ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May, 1993 # this should be read in before the "main" awk program --- 11962,11968 ---- @c file eg/lib/nextfile.awk # nextfile --- skip remaining records in current file # correctly handle successive occurrences of the same file ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May, 1993 # this should be read in before the "main" awk program *************** *** 11983,11989 **** @c @group @c file eg/lib/assert.awk # assert --- assert that a condition is true. Otherwise exit. ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May, 1993 function assert(condition, string) --- 12056,12062 ---- @c @group @c file eg/lib/assert.awk # assert --- assert that a condition is true. Otherwise exit. ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May, 1993 function assert(condition, string) *************** *** 12038,12044 **** @end example There is a problem with this version of @code{assert}, that it may not ! be possible to work around. An @code{END} rule is automatically added to the program calling @code{assert}. Normally, if a program consists of just a @code{BEGIN} rule, the input files and/or standard input are not read. However, now that the program has an @code{END} rule, @code{awk} --- 12111,12118 ---- @end example There is a problem with this version of @code{assert}, that it may not ! be possible to work around with standard @code{awk}. ! An @code{END} rule is automatically added to the program calling @code{assert}. Normally, if a program consists of just a @code{BEGIN} rule, the input files and/or standard input are not read. However, now that the program has an @code{END} rule, @code{awk} *************** *** 12069,12075 **** @c file eg/lib/round.awk # round --- do normal rounding # ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, August, 1996 # Public Domain function round(x, ival, aval, fraction) --- 12143,12149 ---- @c file eg/lib/round.awk # round --- do normal rounding # ! # Arnold Robbins, arnold@@gnu.org, August, 1996 # Public Domain function round(x, ival, aval, fraction) *************** *** 12130,12136 **** # _ord_init: function to initialize _ord_ # # Arnold Robbins ! # arnold@@gnu.ai.mit.edu # Public Domain # 16 January, 1992 # 20 July, 1992, revised --- 12204,12210 ---- # _ord_init: function to initialize _ord_ # # Arnold Robbins ! # arnold@@gnu.org # Public Domain # 16 January, 1992 # 20 July, 1992, revised *************** *** 12254,12260 **** @group @c file eg/lib/join.awk # join.awk --- join an array into a string ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 function join(array, start, end, sep, result, i) --- 12328,12334 ---- @group @c file eg/lib/join.awk # join.awk --- join an array into a string ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 function join(array, start, end, sep, result, i) *************** *** 12329,12335 **** @c file eg/lib/mktime.awk # mktime.awk --- convert a canonical date representation # into a timestamp ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 BEGIN \ --- 12403,12409 ---- @c file eg/lib/mktime.awk # mktime.awk --- convert a canonical date representation # into a timestamp ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 BEGIN \ *************** *** 12624,12630 **** @c @group @c file eg/lib/gettime.awk # gettimeofday --- get the time of day in a usable format ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain, May 1993 # # Returns a string in the format of output of date(1) # Populates the array argument time with individual values: --- 12698,12704 ---- @c @group @c file eg/lib/gettime.awk # gettimeofday --- get the time of day in a usable format ! # Arnold Robbins, arnold@@gnu.org, Public Domain, May 1993 # # Returns a string in the format of output of date(1) # Populates the array argument time with individual values: *************** *** 12732,12738 **** # that each take the name of the file being started or # finished, respectively. # ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, January 1992 # Public Domain FILENAME != _oldfilename \ --- 12806,12812 ---- # that each take the name of the file being started or # finished, respectively. # ! # Arnold Robbins, arnold@@gnu.org, January 1992 # Public Domain FILENAME != _oldfilename \ *************** *** 12784,12790 **** # # user supplies beginfile() and endfile() functions # ! # Arnold Robbins, arnold@@gnu.ai.mit.edu. November 1992 # Public Domain FNR == 1 @{ --- 12858,12864 ---- # # user supplies beginfile() and endfile() functions # ! # Arnold Robbins, arnold@@gnu.org, November 1992 # Public Domain FNR == 1 @{ *************** *** 12929,12935 **** @c file eg/lib/getopt.awk # getopt --- do C library getopt(3) function in awk # ! # arnold@@gnu.ai.mit.edu # Public domain # # Initial version: March, 1991 --- 13003,13009 ---- @c file eg/lib/getopt.awk # getopt --- do C library getopt(3) function in awk # ! # arnold@@gnu.org # Public domain # # Initial version: March, 1991 *************** *** 13206,13212 **** * Generate a printable version of the password database * * Arnold Robbins ! * arnold@@gnu.ai.mit.edu * May 1993 * Public Domain */ --- 13280,13286 ---- * Generate a printable version of the password database * * Arnold Robbins ! * arnold@@gnu.org * May 1993 * Public Domain */ *************** *** 13289,13295 **** @c file eg/lib/passwdawk.in @group # passwd.awk --- access password file information ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 BEGIN @{ --- 13363,13369 ---- @c file eg/lib/passwdawk.in @group # passwd.awk --- access password file information ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 BEGIN @{ *************** *** 13477,13483 **** * * Generate a printable version of the group database * ! * Arnold Robbins, arnold@@gnu.ai.mit.edu * May 1993 * Public Domain */ --- 13551,13557 ---- * * Generate a printable version of the group database * ! * Arnold Robbins, arnold@@gnu.org * May 1993 * Public Domain */ *************** *** 13558,13564 **** @group @c file eg/lib/groupawk.in # group.awk --- functions for dealing with the group file ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 BEGIN \ --- 13632,13638 ---- @group @c file eg/lib/groupawk.in # group.awk --- functions for dealing with the group file ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 BEGIN \ *************** *** 13725,13731 **** function getgrent() @{ _gr_init() ! if (++gr_count in _gr_bycount) return _gr_bycount[_gr_count] return "" @} --- 13799,13805 ---- function getgrent() @{ _gr_init() ! if (++_gr_count in _gr_bycount) return _gr_bycount[_gr_count] return "" @} *************** *** 13947,13953 **** @c @group @c file eg/prog/cut.awk # cut.awk --- implement cut in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # Options: --- 14021,14027 ---- @c @group @c file eg/prog/cut.awk # cut.awk --- implement cut in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # Options: *************** *** 14275,14281 **** @c @group @c file eg/prog/egrep.awk # egrep.awk --- simulate egrep in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # Options: --- 14349,14355 ---- @c @group @c file eg/prog/egrep.awk # egrep.awk --- simulate egrep in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # Options: *************** *** 14558,14564 **** @c @group @c file eg/prog/id.awk # id.awk --- implement id in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # output is: --- 14632,14638 ---- @c @group @c file eg/prog/id.awk # id.awk --- implement id in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # output is: *************** *** 14670,14676 **** @c @group @c file eg/prog/split.awk # split.awk --- do split in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # usage: split [-num] [file] [outname] --- 14744,14750 ---- @c @group @c file eg/prog/split.awk # split.awk --- do split in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # usage: split [-num] [file] [outname] *************** *** 14798,14804 **** @group @c file eg/prog/tee.awk # tee.awk --- tee in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # Revised December 1995 @end group --- 14872,14878 ---- @group @c file eg/prog/tee.awk # tee.awk --- tee in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # Revised December 1995 @end group *************** *** 14961,14967 **** @c @group @c file eg/prog/uniq.awk # uniq.awk --- do uniq in awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 @group --- 15035,15041 ---- @c @group @c file eg/prog/uniq.awk # uniq.awk --- do uniq in awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 @group *************** *** 15197,15203 **** @c @group @c file eg/prog/wc.awk # wc.awk --- count lines, words, characters ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # Options: --- 15271,15277 ---- @c @group @c file eg/prog/wc.awk # wc.awk --- count lines, words, characters ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # Options: *************** *** 15354,15360 **** @group @c file eg/prog/dupword.awk # dupword --- find duplicate words in text ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # December 1991 @{ --- 15428,15434 ---- @group @c file eg/prog/dupword.awk # dupword --- find duplicate words in text ! # Arnold Robbins, arnold@@gnu.org, Public Domain # December 1991 @{ *************** *** 15398,15404 **** @c @group @c file eg/prog/alarm.awk # alarm --- set an alarm ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # usage: alarm time [ "message" [ count [ delay ] ] ] --- 15472,15478 ---- @c @group @c file eg/prog/alarm.awk # alarm --- set an alarm ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # usage: alarm time [ "message" [ count [ delay ] ] ] *************** *** 15585,15591 **** @c @group @c file eg/prog/translate.awk # translate --- do tr like stuff ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # August 1989 # bugs: does not handle things like: tr A-Z a-z, it has --- 15659,15665 ---- @c @group @c file eg/prog/translate.awk # translate --- do tr like stuff ! # Arnold Robbins, arnold@@gnu.org, Public Domain # August 1989 # bugs: does not handle things like: tr A-Z a-z, it has *************** *** 15703,15709 **** @c @group @c file eg/prog/labels.awk # labels.awk ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # June 1992 # Program to print labels. Each label is 5 lines of data --- 15777,15783 ---- @c @group @c file eg/prog/labels.awk # labels.awk ! # Arnold Robbins, arnold@@gnu.org, Public Domain # June 1992 # Program to print labels. Each label is 5 lines of data *************** *** 15919,15925 **** @group @c file eg/prog/histsort.awk # histsort.awk --- compact a shell history file ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 # Thanks to Byron Rakitzis for the general idea --- 15993,15999 ---- @group @c file eg/prog/histsort.awk # histsort.awk --- compact a shell history file ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 # Thanks to Byron Rakitzis for the general idea *************** *** 16016,16021 **** --- 16090,16117 ---- @file{extract.awk} to extract the sample programs and install many of them in a standard directory, where @code{gawk} can find them. + The Texinfo file looks something like this: + + @example + @dots{} + This program has a @@code@{BEGIN@} block, + which prints a nice message: + + @@example + @@c file examples/messages.awk + BEGIN @@@{ print "Don't panic!" @@@} + @@c end file + @@end example + + It also prints some final advice: + + @@example + @@c file examples/messages.awk + END @@@{ print "Always avoid bored archeologists!" @@@} + @@c end file + @@end example + @dots{} + @end example @file{extract.awk} begins by setting @code{IGNORECASE} to one, so that mixed upper-case and lower-case letters in the directives won't matter. *************** *** 16030,16036 **** @c file eg/prog/extract.awk # extract.awk --- extract files and run programs # from texinfo files ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # May 1993 BEGIN @{ IGNORECASE = 1 @} --- 16126,16132 ---- @c file eg/prog/extract.awk # extract.awk --- extract files and run programs # from texinfo files ! # Arnold Robbins, arnold@@gnu.org, Public Domain # May 1993 BEGIN @{ IGNORECASE = 1 @} *************** *** 16080,16085 **** --- 16176,16184 ---- the loop. If the line is an @samp{@@group} or @samp{@@end group} line, then it ignores it, and goes on to the next line. + (These Texinfo control lines keep blocks of code together on one page; + unfortunately, @TeX{} isn't always smart enough to do things exactly right, + and we have to give it some advice.) Most of the work is in the following few lines. If the line has no @samp{@@} symbols, it can be printed directly. Otherwise, each leading @samp{@@} must be *************** *** 16213,16219 **** # awksed.awk --- do s/foo/bar/g using just print # Thanks to Michael Brennan for the idea ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # August 1995 @group --- 16312,16318 ---- # awksed.awk --- do s/foo/bar/g using just print # Thanks to Michael Brennan for the idea ! # Arnold Robbins, arnold@@gnu.org, Public Domain # August 1995 @group *************** *** 16447,16453 **** #! /bin/sh # igawk --- like gawk but do @@include processing ! # Arnold Robbins, arnold@@gnu.ai.mit.edu, Public Domain # July 1993 if [ "$1" = debug ] --- 16546,16552 ---- #! /bin/sh # igawk --- like gawk but do @@include processing ! # Arnold Robbins, arnold@@gnu.org, Public Domain # July 1993 if [ "$1" = debug ] *************** *** 18493,18499 **** Boston, MA 02111-1307 USA @* Phone: +1-617-542-5942 @* Fax (including Japan): +1-617-542-2652 @* ! E-mail: @code{gnu@@prep.ai.mit.edu} @* @end quotation @noindent --- 18592,18598 ---- Boston, MA 02111-1307 USA @* Phone: +1-617-542-5942 @* Fax (including Japan): +1-617-542-2652 @* ! E-mail: @code{gnu@@gnu.org} @* @end quotation @noindent *************** *** 18502,18508 **** @item You can get @code{gawk} by using anonymous @code{ftp} to the Internet host ! @code{ftp.gnu.ai.mit.edu}, in the directory @file{/pub/gnu}. Here is a list of alternate @code{ftp} sites from which you can obtain GNU software. When a site is listed as ``@var{site}@code{:}@var{directory}'' the --- 18601,18607 ---- @item You can get @code{gawk} by using anonymous @code{ftp} to the Internet host ! @code{gnudist.gnu.org}, in the directory @file{/gnu/gawk}. Here is a list of alternate @code{ftp} sites from which you can obtain GNU software. When a site is listed as ``@var{site}@code{:}@var{directory}'' the *************** *** 19318,19334 **** @table @asis @item Internet: ! @samp{bug-gnu-utils@@prep.ai.mit.edu} @item UUCP: ! @samp{uunet!prep.ai.mit.edu!bug-gnu-utils} @end table Please include the version number of @code{gawk} you are using. You can get this information with the command @samp{gawk --version}. You should send a carbon copy of your mail to Arnold Robbins, who can ! be reached at @samp{arnold@@gnu.ai.mit.edu}. @cindex @code{comp.lang.awk} @strong{Important!} Do @emph{not} try to report bugs in @code{gawk} by --- 19417,19433 ---- @table @asis @item Internet: ! @samp{bug-gnu-utils@@gnu.org} @item UUCP: ! @samp{uunet!gnu.org!bug-gnu-utils} @end table Please include the version number of @code{gawk} you are using. You can get this information with the command @samp{gawk --version}. You should send a carbon copy of your mail to Arnold Robbins, who can ! be reached at @samp{arnold@@gnu.org}. @cindex @code{comp.lang.awk} @strong{Important!} Do @emph{not} try to report bugs in @code{gawk} by *************** *** 19408,19420 **** @item Unix @code{awk} Brian Kernighan has been able to make his implementation of @code{awk} freely available. You can get it via anonymous @code{ftp} ! to the host @code{@w{netlib.att.com}}. Change directory to @file{/netlib/research}. Use ``binary'' or ``image'' mode, and ! retrieve @file{awk.bundle.Z}. ! This is a shell archive that has been compressed with the @code{compress} ! utility. It can be uncompressed with either @code{uncompress} or the ! GNU @code{gunzip} utility. This version requires an ANSI C compiler; GCC (the GNU C compiler) works quite nicely. --- 19507,19521 ---- @item Unix @code{awk} Brian Kernighan has been able to make his implementation of @code{awk} freely available. You can get it via anonymous @code{ftp} ! to the host @code{@w{netlib.bell-labs.com}}. Change directory to @file{/netlib/research}. Use ``binary'' or ``image'' mode, and ! retrieve @file{awk.bundle.gz}. ! ! This is a shell archive that has been compressed with the GNU @code{gzip} ! utility. It can be uncompressed with the @code{gunzip} utility. ! You can also retrieve this version via the World Wide Web from ! @uref{http://cm.bell-labs.com/who/bwk, Brian Kernighan's home page}. This version requires an ANSI C compiler; GCC (the GNU C compiler) works quite nicely. *************** *** 19496,19502 **** You are free to add any new features you like to @code{gawk}. However, if you want your changes to be incorporated into the @code{gawk} distribution, there are several steps that you need to take in order to ! make it possible for me to include to your changes. @enumerate 1 @item --- 19597,19603 ---- You are free to add any new features you like to @code{gawk}. However, if you want your changes to be incorporated into the @code{gawk} distribution, there are several steps that you need to take in order to ! make it possible for me to include your changes. @enumerate 1 @item *************** *** 19598,19604 **** Both of these actions are easy to do, and @emph{many} people have done so already. If you have questions, please contact me (@pxref{Bugs, , Reporting Problems and Bugs}), ! or @code{gnu@@prep.ai.mit.edu}. @item Update the documentation. --- 19699,19705 ---- Both of these actions are easy to do, and @emph{many} people have done so already. If you have questions, please contact me (@pxref{Bugs, , Reporting Problems and Bugs}), ! or @code{gnu@@gnu.org}. @item Update the documentation. *************** *** 19718,19724 **** @ifinfo Both of these actions are easy to do, and @emph{many} people have done so already. If you have questions, please contact me, or ! @code{gnu@@prep.ai.mit.edu}. @end ifinfo @end enumerate --- 19819,19825 ---- @ifinfo Both of these actions are easy to do, and @emph{many} people have done so already. If you have questions, please contact me, or ! @code{gnu@@gnu.org}. @end ifinfo @end enumerate *************** *** 19855,19865 **** The GNU version of @code{malloc} could potentially speed up @code{gawk}, since it relies heavily on the use of dynamic memory allocation. - @item Use of the @code{rx} regexp library - The @code{rx} regular expression library could potentially speed up - all regexp operations that require knowing the exact location of matches. - This includes record termination, field and array splitting, - and the @code{sub}, @code{gsub}, @code{gensub} and @code{match} functions. @end table @node Improvements, , Future Extensions, Notes --- 19956,19961 ---- *************** *** 20006,20012 **** A preprocessor for @code{pic} that reads descriptions of molecules and produces @code{pic} input for drawing them. It was written in @code{awk} by Brian Kernighan and Jon Bentley, and is available from ! @code{@w{netlib@@research.att.com}}. @item Compound Statement A series of @code{awk} statements, enclosed in curly braces. Compound --- 20102,20108 ---- A preprocessor for @code{pic} that reads descriptions of molecules and produces @code{pic} input for drawing them. It was written in @code{awk} by Brian Kernighan and Jon Bentley, and is available from ! @email{@w{netlib@@research.bell-labs.com}}. @item Compound Statement A series of @code{awk} statements, enclosed in curly braces. Compound diff -crN gawk-3.0.3/doc/igawk.1 gawk-3.0.4/doc/igawk.1 *** gawk-3.0.3/doc/igawk.1 Fri Oct 13 21:48:36 1995 --- gawk-3.0.4/doc/igawk.1 Tue Sep 8 21:09:07 1998 *************** *** 70,73 **** Edition 1.0, published by the Free Software Foundation, 1995. .SH AUTHOR Arnold Robbins ! .RB ( arnold@gnu.ai.mit.edu ). --- 70,73 ---- Edition 1.0, published by the Free Software Foundation, 1995. .SH AUTHOR Arnold Robbins ! .RB ( arnold@gnu.org ). diff -crN gawk-3.0.3/doc/no.colors gawk-3.0.4/doc/no.colors *** gawk-3.0.3/doc/no.colors Mon Dec 9 19:46:36 1996 --- gawk-3.0.4/doc/no.colors Tue Sep 8 21:09:20 1998 *************** *** 1,4 **** ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.ai.mit.edu .\" This file is for troff which does not know what to do .\" with a literal Poscript and cannot use macros from 'colors'. .\" --- 1,4 ---- ! .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" This file is for troff which does not know what to do .\" with a literal Poscript and cannot use macros from 'colors'. .\" diff -crN gawk-3.0.3/doc/texinfo.tex gawk-3.0.4/doc/texinfo.tex *** gawk-3.0.3/doc/texinfo.tex Sun Dec 1 21:54:17 1996 --- gawk-3.0.4/doc/texinfo.tex Wed May 27 10:53:14 1998 *************** *** 1,32 **** ! %% TeX macros to handle Texinfo files. ! %% $Id: texinfo.tex,v 2.193 1996/11/19 21:11:43 karl Exp $ ! ! % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, ! % 94, 95, 1996 Free Software Foundation, Inc. ! ! %This texinfo.tex file is free software; you can redistribute it and/or ! %modify it under the terms of the GNU General Public License as ! %published by the Free Software Foundation; either version 2, or (at ! %your option) any later version. ! ! %This texinfo.tex file is distributed in the hope that it will be ! %useful, but WITHOUT ANY WARRANTY; without even the implied warranty ! %of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! %General Public License for more details. ! ! %You should have received a copy of the GNU General Public License ! %along with this texinfo.tex file; see the file COPYING. If not, write ! %to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! %Boston, MA 02111-1307, USA. ! ! ! %In other words, you are welcome to use, share and improve this program. ! %You are forbidden to forbid anyone else to use, share and improve ! %what you give them. Help stamp out software-hoarding! ! ! ! % Send bug reports to bug-texinfo@prep.ai.mit.edu. ! % Please include a *precise* test case in each bug report. % Make it possible to create a .fmt file just by loading this file: --- 1,40 ---- ! % texinfo.tex -- TeX macros to handle Texinfo files. ! % $Id: texinfo.tex,v 2.227 1998/02/25 22:54:34 karl Exp $ ! % ! % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98 ! % Free Software Foundation, Inc. ! % ! % This texinfo.tex file is free software; you can redistribute it and/or ! % modify it under the terms of the GNU General Public License as ! % published by the Free Software Foundation; either version 2, or (at ! % your option) any later version. ! % ! % This texinfo.tex file is distributed in the hope that it will be ! % useful, but WITHOUT ANY WARRANTY; without even the implied warranty ! % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! % General Public License for more details. ! % ! % You should have received a copy of the GNU General Public License ! % along with this texinfo.tex file; see the file COPYING. If not, write ! % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! % Boston, MA 02111-1307, USA. ! % ! % In other words, you are welcome to use, share and improve this program. ! % You are forbidden to forbid anyone else to use, share and improve ! % what you give them. Help stamp out software-hoarding! ! % ! % Please try the latest version of texinfo.tex before submitting bug ! % reports; you can get the latest version from: ! % ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex ! % /home/gd/gnu/doc/texinfo.tex on the GNU machines. ! % ! % Send bug reports to bug-texinfo@gnu.org. ! % Please include a precise test case in each bug report, ! % including a complete document with which we can reproduce the problem. ! % ! % Texinfo macros (with @macro) are *not* supported by texinfo.tex. You ! % have to run makeinfo -E to expand macros first; the texi2dvi script ! % does this. % Make it possible to create a .fmt file just by loading this file: *************** *** 36,42 **** % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.193 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number --- 44,50 ---- % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} ! \deftexinfoversion$Revision: 2.227 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number *************** *** 54,66 **** \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end ! \let\ptexequiv = \equiv \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t - \let\ptextilde=\~ % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space --- 62,74 ---- \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end ! \let\ptexequiv=\equiv ! \let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space *************** *** 73,79 **** \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } - \let\~ = \tie % And make it available as @~. \message{Basics,} --- 81,86 ---- *************** *** 103,112 **** \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} % Margin to add to right of even pages, to left of odd pages. ! \newdimen \bindingoffset ! \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file --- 110,120 ---- \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} + \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. ! \newdimen \bindingoffset ! \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file *************** *** 120,152 **** \showboxbreadth\maxdimen\showboxdepth\maxdimen }% ! %---------------------Begin change----------------------- % ! %%%% For @cropmarks command. ! % Dimensions to add cropmarks at corners Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\cornerlong \newdimen\cornerthick ! \newdimen \topandbottommargin ! \newdimen \outerhsize \newdimen \outervsize \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in % Alternative @smallbook page size is 9.25in \outervsize=9.25in \topandbottommargin=.75in - % - %---------------------End change----------------------- % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} ! \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% ! \hoffset=\normaloffset \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % --- 128,164 ---- \showboxbreadth\maxdimen\showboxdepth\maxdimen }% ! % For @cropmarks command. ! % Do @cropmarks to get crop marks. ! % ! \newif\ifcropmarks ! \let\cropmarks = \cropmarkstrue % ! % Dimensions to add cropmarks at corners. ! % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\cornerlong \newdimen\cornerthick ! \newdimen\topandbottommargin ! \newdimen\outerhsize \newdimen\outervsize \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in % Alternative @smallbook page size is 9.25in \outervsize=9.25in \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} ! \newbox\headlinebox ! \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% ! \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi ! % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % *************** *** 165,217 **** \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% \unvbox\headlinebox \pagebody{#1}% ! \unvbox\footlinebox ! }% ! }% \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } - %%%% For @cropmarks command %%%% - - % Here is a modification of the main output routine for Near East Publications - % This provides right-angle cropmarks at all four corners. - % The contents of the page are centerlined into the cropmarks, - % and any desired binding offset is added as an \hskip on either - % site of the centerlined box. (P. A. MacKay, 12 November, 1986) - % - \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up - {\escapechar=`\\\relax % makes sure backslash is used in output files. - \shipout - \vbox to \outervsize{\hsize=\outerhsize - \vbox{\line{\ewtop\hfill\ewtop}} - \nointerlineskip - \line{\vbox{\moveleft\cornerthick\nstop} - \hfill - \vbox{\moveright\cornerthick\nstop}} - \vskip \topandbottommargin - \centerline{\ifodd\pageno\hskip\bindingoffset\fi - \vbox{ - {\let\hsize=\pagewidth \makeheadline} - \pagebody{#1} - {\let\hsize=\pagewidth \makefootline}} - \ifodd\pageno\else\hskip\bindingoffset\fi} - \vskip \topandbottommargin plus1fill minus1fill - \boxmaxdepth\cornerthick - \line{\vbox{\moveleft\cornerthick\nsbot} - \hfill - \vbox{\moveright\cornerthick\nsbot}} - \nointerlineskip - \vbox{\line{\ewbot\hfill\ewbot}} - }} - \advancepageno - \ifnum\outputpenalty>-20000 \else\dosupereject\fi} - % - % Do @cropmarks to get crop marks - \def\cropmarks{\let\onepageout=\croppageout } - \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} --- 177,228 ---- \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% + \ifcropmarks \vbox to \outervsize\bgroup + \hsize = \outerhsize + \line{\ewtop\hfil\ewtop}% + \nointerlineskip + \line{% + \vbox{\moveleft\cornerthick\nstop}% + \hfill + \vbox{\moveright\cornerthick\nstop}% + }% + \vskip\topandbottommargin + \line\bgroup + \hfil % center the page within the outer (page) hsize. + \ifodd\pageno\hskip\bindingoffset\fi + \vbox\bgroup + \fi + % \unvbox\headlinebox \pagebody{#1}% ! \ifdim\ht\footlinebox > 0pt ! % Only leave this space if the footline is nonempty. ! % (We lessened \vsize for it in \oddfootingxxx.) ! % The \baselineskip=24pt in plain's \makefootline has no effect. ! \vskip 2\baselineskip ! \unvbox\footlinebox ! \fi ! % ! \ifcropmarks ! \egroup % end of \vbox\bgroup ! \hfil\egroup % end of (centering) \line\bgroup ! \vskip\topandbottommargin plus1fill minus1fill ! \boxmaxdepth = \cornerthick ! \line{% ! \vbox{\moveleft\cornerthick\nsbot}% ! \hfill ! \vbox{\moveright\cornerthick\nsbot}% ! }% ! \nointerlineskip ! \line{\ewbot\hfil\ewbot}% ! \egroup % \vbox from first cropmarks clause ! \fi ! }% end of \shipout\vbox ! }% end of group with \turnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} *************** *** 225,231 **** \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } - % % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) --- 236,241 ---- *************** *** 440,453 **** % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } - % @enddots{} is an end-of-sentence ellipsis. - \gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000} - % @! is an end-of-sentence bang. ! \gdef\!{!\spacefactor=3000 } % @? is an end-of-sentence query. ! \gdef\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would --- 450,460 ---- % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @! is an end-of-sentence bang. ! \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. ! \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would *************** *** 572,580 **** \let\br = \par ! % @dots{} output some dots - \def\dots{$\ldots$} % @page forces the start of a new page --- 579,605 ---- \let\br = \par ! % @dots{} output an ellipsis using the current font. ! % We do .5em per period so that it has the same spacing in a typewriter ! % font as three actual period characters. ! % ! \def\dots{\hbox to 1.5em{% ! \hskip 0pt plus 0.25fil minus 0.25fil ! .\hss.\hss.% ! \hskip 0pt plus 0.5fil minus 0.5fil ! }} ! ! % @enddots{} is an end-of-sentence ellipsis. ! % ! \def\enddots{% ! \hbox to 2em{% ! \hskip 0pt plus 0.25fil minus 0.25fil ! .\hss.\hss.\hss.% ! \hskip 0pt plus 0.5fil minus 0.5fil ! }% ! \spacefactor=3000 ! } % @page forces the start of a new page *************** *** 735,744 **** % \def\ignore{\doignore{ignore}} ! % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} --- 760,770 ---- % \def\ignore{\doignore{ignore}} ! % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} + \def\ifnottex{\doignore{ifnottex}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} *************** *** 765,770 **** --- 791,800 ---- % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % + % Ignore braces, too, so mismatched braces don't cause trouble. + \catcode`\{ = 9 + \catcode`\} = 9 + % % And now expand that command. \doignoretext } *************** *** 856,862 **** \pretolerance = 10000 % % Do not execute instructions in @tex ! \def\tex{\doignore{tex}} } % @set VAR sets the variable VAR to an empty value. --- 886,892 ---- \pretolerance = 10000 % % Do not execute instructions in @tex ! \def\tex{\doignore{tex}}% } % @set VAR sets the variable VAR to an empty value. *************** *** 932,942 **** \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} ! % @iftex always succeeds; we read the text following, through @end ! % iftex). But `@end iftex' should be valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \defineunmatchedend{iftex} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no --- 962,977 ---- \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} ! % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text ! % following, through the first @end iftex (etc.). Make `@end iftex' ! % (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} + \def\ifnothtml{\conditionalsucceed{ifnothtml}} + \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} + \defineunmatchedend{ifnothtml} + \defineunmatchedend{ifnotinfo} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no *************** *** 1012,1017 **** --- 1047,1061 ---- \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. + % + % If texinfo.cnf is present on the system, read it. + % Useful for site-wide @afourpaper, etc. + % Just to be on the safe side, close the input stream before the \input. + \openin 1 texinfo.cnf + \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi + \closein1 + \temp + % \comment % Ignore the actual filename. } *************** *** 1047,1054 **** % We don't need math for this one. \def\ttsl{\tenttsl} ! %% Try out Computer Modern fonts at \magstephalf ! \let\mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). --- 1091,1099 ---- % We don't need math for this one. \def\ttsl{\tenttsl} ! % Use Computer Modern fonts at \magstephalf (11pt). ! \newcount\mainmagstep ! \mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). *************** *** 1120,1132 **** \font\indi=cmmi9 \font\indsy=cmsy9 % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} ! \setfont\chapsf\sfbshape{12}{\magstep2} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 --- 1165,1190 ---- \font\indi=cmmi9 \font\indsy=cmsy9 + % Fonts for title page: + \setfont\titlerm\rmbshape{12}{\magstep3} + \setfont\titleit\itbshape{10}{\magstep4} + \setfont\titlesl\slbshape{10}{\magstep4} + \setfont\titlett\ttbshape{12}{\magstep3} + \setfont\titlettsl\ttslshape{10}{\magstep4} + \setfont\titlesf\sfbshape{17}{\magstep1} + \let\titlebf=\titlerm + \setfont\titlesc\scbshape{10}{\magstep4} + \font\titlei=cmmi12 scaled \magstep3 + \font\titlesy=cmsy10 scaled \magstep4 + \def\authorrm{\secrm} + % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} ! \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 *************** *** 1163,1181 **** \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} ! \setfont\ssecttsl\ttslshape{10}{\magstep1} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf ! \font\ssecsy=cmsy10 scaled \magstep1 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. - % Fonts for title page: - \setfont\titlerm\rmbshape{12}{\magstep3} - \let\authorrm = \secrm - % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we --- 1221,1235 ---- \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} ! \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf ! \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we *************** *** 1200,1205 **** --- 1254,1266 ---- \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} + \def\titlefonts{% + \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl + \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc + \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy + \let\tenttsl=\titlettsl + \resetmathfonts \setleading{25pt}} + \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc *************** *** 1226,1231 **** --- 1287,1296 ---- % \textfonts + % Define these so they can be easily changed for other fonts. + \def\angleleft{$\langle$} + \def\angleright{$\rangle$} + % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 *************** *** 1263,1284 **** \null } \let\ttfont=\t ! \def\samp #1{`\tclose{#1}'\null} \setfont\smallrm\rmshape{8}{1000} \font\smallsy=cmsy9 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% ! \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt ! \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% \kern-0.4pt\hrule}% ! \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp - \let\url=\samp % perhaps include a hypertex \special eventually - \def\email#1{$\langle${\tt #1}$\rangle$} % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. --- 1328,1347 ---- \null } \let\ttfont=\t ! \def\samp#1{`\tclose{#1}'\null} \setfont\smallrm\rmshape{8}{1000} \font\smallsy=cmsy9 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% ! \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt ! \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% ! \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. *************** *** 1331,1355 **** \def\realdash{-} \def\codedash{-\discretionary{}{}{}} ! \def\codeunder{\normalunderscore\discretionary{}{}{}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. ! % \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% ! \else{\tclose{\ttsl\look}}\fi ! \else{\tclose{\ttsl\look}}\fi} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. ! % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the --- 1394,1462 ---- \def\realdash{-} \def\codedash{-\discretionary{}{}{}} ! \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. ! ! % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), ! % `example' (@kbd uses ttsl only inside of @example and friends), ! % or `code' (@kbd uses normal tty font always). ! \def\kbdinputstyle{\parsearg\kbdinputstylexxx} ! \def\kbdinputstylexxx#1{% ! \def\arg{#1}% ! \ifx\arg\worddistinct ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% ! \else\ifx\arg\wordexample ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% ! \else\ifx\arg\wordcode ! \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% ! \fi\fi\fi ! } ! \def\worddistinct{distinct} ! \def\wordexample{example} ! \def\wordcode{code} ! ! % Default is kbdinputdistinct. (Too much of a hassle to call the macro, ! % the catcodes are wrong for parsearg to work.) ! \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} ! \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% ! \else{\tclose{\kbdfont\look}}\fi ! \else{\tclose{\kbdfont\look}}\fi} ! ! % @url. Quotes do not seem necessary, so use \code. ! \let\url=\code ! ! % @uref (abbreviation for `urlref') takes an optional second argument ! % specifying the text to display. First (mandatory) arg is the url. ! % Perhaps eventually put in a hypertex \special here. ! % ! \def\uref#1{\urefxxx #1,,\finish} ! \def\urefxxx#1,#2,#3\finish{% ! \setbox0 = \hbox{\ignorespaces #2}% ! \ifdim\wd0 > 0pt ! \unhbox0\ (\code{#1})% ! \else ! \code{#1}% ! \fi ! } ! ! % rms does not like the angle brackets --karl, 17may97. ! % So now @email is just like @uref. ! %\def\email#1{\angleleft{\tt #1}\angleright} ! \let\email=\uref % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. ! % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the *************** *** 1380,1387 **** \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. - \def\titlefont#1{{\titlerm #1}} - \newif\ifseenauthor \newif\iffinishedtitlepage --- 1487,1492 ---- *************** *** 1403,1409 **** % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% ! \def\titlezzz##1{\leftline{\titlefont{##1}} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% --- 1508,1514 ---- % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% ! \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% *************** *** 1492,1501 **** \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} ! \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% ! \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} ! \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% --- 1597,1603 ---- \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% *************** *** 1503,1514 **** \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} ! \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} ! \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} ! \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} % }% unbind the catcode of @. --- 1605,1619 ---- \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% ! \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% ! % ! % Leave some space for the footline. Hopefully ok to assume ! % @evenfooting will not be used by itself. ! \global\advance\pageheight by -\baselineskip ! \global\advance\vsize by -\baselineskip ! } ! \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. *************** *** 1892,1898 **** \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% ! \ifhmode \errmessage{\in hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% --- 1997,2003 ---- \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% ! \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% *************** *** 1910,1916 **** % To make preamble: % ! % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % --- 2015,2021 ---- % To make preamble: % ! % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % *************** *** 1928,1940 **** % the preamble, break the line within one argument and it % will parse correctly, i.e., % ! % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: ! % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} ! % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. --- 2033,2045 ---- % the preamble, break the line within one argument and it % will parse correctly, i.e., % ! % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: ! % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} ! % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. *************** *** 1946,1960 **** % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col ! % @item ! % first col stuff ! % @tab ! % second col stuff ! % @tab ! % third col ! % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. ! % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable --- 2051,2065 ---- % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col ! % @item ! % first col stuff ! % @tab ! % second col stuff ! % @tab ! % third col ! % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. ! % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable *************** *** 1966,1975 **** % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. ! ! %%%% ! % Dimensions ! \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace --- 2071,2077 ---- % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. ! % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace *************** *** 1979,1993 **** \multitablecolspace=12pt \multitablelinespace=0pt - %%%% % Macros used to set up halign preamble: \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent ! %% 2/1/96, to allow fractions to be given with more than one digit. \def\pickupwholefraction#1 {\global\advance\colcount by1 % \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% \setuptable} --- 2081,2095 ---- \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: + % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent ! % 2/1/96, to allow fractions to be given with more than one digit. \def\pickupwholefraction#1 {\global\advance\colcount by1 % \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% \setuptable} *************** *** 2013,2092 **** \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% \fi\go} - %%%% % multitable syntax \def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used. - - %%%% % @multitable ... @end multitable definitions: \def\multitable{\parsearg\dotable} - \def\dotable#1{\bgroup ! \let\item\cr ! \tolerance=9500 ! \hbadness=9500 ! \setmultitablespacing ! \parskip=\multitableparskip ! \parindent=\multitableparindent ! \overfullrule=0pt ! \global\colcount=0\relax% ! \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% ! % To parse everything between @multitable and @item : ! \setuptable#1 \endsetuptable ! % Need to reset this to 0 after \setuptable. ! \global\colcount=0\relax% ! % ! % This preamble sets up a generic column definition, which will ! % be used as many times as user calls for columns. ! % \vtop will set a single line and will also let text wrap and ! % continue for many paragraphs if desired. ! \halign\bgroup&\global\advance\colcount by 1\relax% ! \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname ! % In order to keep entries from bumping into each other ! % we will add a \leftskip of \multitablecolspace to all columns after ! % the first one. ! % If a template has been used, we will add \multitablecolspace ! % to the width of each template entry. ! % If user has set preamble in terms of percent of \hsize ! % we will use that dimension as the width of the column, and ! % the \leftskip will keep entries from bumping into each other. ! % Table will start at left margin and final column will justify at ! % right margin. ! \ifnum\colcount=1 ! \else ! \ifsetpercent \else ! % If user has set preamble in terms of percent of \hsize ! % we will advance \hsize by \multitablecolspace ! \advance\hsize by \multitablecolspace \fi ! % In either case we will make \leftskip=\multitablecolspace: ! \leftskip=\multitablecolspace ! \fi ! % Ignoring space at the beginning and end avoids an occasional spurious ! % blank line, when TeX decides to break the line at the space before the ! % box from the multistrut, so the strut ends up on a line by itself. ! % For example: ! % @multitable @columnfractions .11 .89 ! % @item @code{#} ! % @tab Legal holiday which is valid in major parts of the whole country. ! % Is automatically provided with highlighing sequences respectively marking ! % characters. ! \noindent\ignorespaces##\unskip\multistrut}\cr ! % \everycr will reset column counter, \colcount, at the end of ! % each line. Every column entry will cause \colcount to advance by one. ! % The table preamble ! % looks at the current \colcount to find the correct column width. ! \global\everycr{\noalign{% ! % \filbreak%% keeps underfull box messages off when table breaks over pages. ! % Maybe so, but it also creates really weird page breaks when the table ! % breaks over pages Wouldn't \vfil be better? Wait until the problem ! % manifests itself, so it can be fixed for real --karl. ! \global\colcount=0\relax}} } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. --- 2115,2198 ---- \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% \fi\go} % multitable syntax \def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used. % @multitable ... @end multitable definitions: \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup ! \vskip\parskip ! \let\item\crcr ! \tolerance=9500 ! \hbadness=9500 ! \setmultitablespacing ! \parskip=\multitableparskip ! \parindent=\multitableparindent ! \overfullrule=0pt ! \global\colcount=0 ! \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% ! % ! % To parse everything between @multitable and @item: ! \setuptable#1 \endsetuptable ! % ! % \everycr will reset column counter, \colcount, at the end of ! % each line. Every column entry will cause \colcount to advance by one. ! % The table preamble ! % looks at the current \colcount to find the correct column width. ! \everycr{\noalign{% ! % ! % \filbreak%% keeps underfull box messages off when table breaks over pages. ! % Maybe so, but it also creates really weird page breaks when the table ! % breaks over pages. Wouldn't \vfil be better? Wait until the problem ! % manifests itself, so it can be fixed for real --karl. ! \global\colcount=0\relax}}% ! % ! % This preamble sets up a generic column definition, which will ! % be used as many times as user calls for columns. ! % \vtop will set a single line and will also let text wrap and ! % continue for many paragraphs if desired. ! \halign\bgroup&\global\advance\colcount by 1\relax ! \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname ! % ! % In order to keep entries from bumping into each other ! % we will add a \leftskip of \multitablecolspace to all columns after ! % the first one. ! % ! % If a template has been used, we will add \multitablecolspace ! % to the width of each template entry. ! % ! % If the user has set preamble in terms of percent of \hsize we will ! % use that dimension as the width of the column, and the \leftskip ! % will keep entries from bumping into each other. Table will start at ! % left margin and final column will justify at right margin. ! % ! % Make sure we don't inherit \rightskip from the outer environment. ! \rightskip=0pt ! \ifnum\colcount=1 ! % The first column will be indented with the surrounding text. ! \advance\hsize by\leftskip \else ! \ifsetpercent \else ! % If user has not set preamble in terms of percent of \hsize ! % we will advance \hsize by \multitablecolspace. ! \advance\hsize by \multitablecolspace ! \fi ! % In either case we will make \leftskip=\multitablecolspace: ! \leftskip=\multitablecolspace \fi ! % Ignoring space at the beginning and end avoids an occasional spurious ! % blank line, when TeX decides to break the line at the space before the ! % box from the multistrut, so the strut ends up on a line by itself. ! % For example: ! % @multitable @columnfractions .11 .89 ! % @item @code{#} ! % @tab Legal holiday which is valid in major parts of the whole country. ! % Is automatically provided with highlighting sequences respectively marking ! % characters. ! \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. *************** *** 2097,2103 **** %% to keep lines equally spaced \let\multistrut = \strut %% Test to see if parskip is larger than space between lines of ! %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \else \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 --- 2203,2209 ---- %% to keep lines equally spaced \let\multistrut = \strut %% Test to see if parskip is larger than space between lines of ! %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \else \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 *************** *** 2232,2238 **** %\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% ! \def\copyright{\realbackslash copyright }% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% --- 2338,2350 ---- %\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\error{\realbackslash error}% ! \def\point{\realbackslash point}% ! \def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% *************** *** 2242,2247 **** --- 2354,2360 ---- \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% + \def\sc##1{\realbackslash sc {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% *************** *** 2249,2254 **** --- 2362,2368 ---- \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% + \def\value##1{\realbackslash value {##1}}% \unsepspaces } *************** *** 2413,2441 **** % Define the macros used in formatting output of the sorted index material. ! % This is what you call to cause a particular index to get printed. ! % Write ! % @unnumbered Function Index ! % @printindex fn ! \def\printindex{\parsearg\doprintindex} - \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \indexfonts \rm \tolerance = 9500 \indexbreaks - \def\indexbackslash{\rawbackslashxx}% - % Index files are almost Texinfo source, but we use \ as the escape - % character. It would be better to use @, but that's too big a change - % to make right now. - \catcode`\\ = 0 - \catcode`\@ = 11 - \escapechar = `\\ - \begindoublecolumns % % See if the index file exists and is nonempty. \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, --- 2527,2549 ---- % Define the macros used in formatting output of the sorted index material. ! % @printindex causes a particular index (the ??s file) to get printed. ! % It does not print any chapter heading (usually an @unnumbered). ! % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \indexfonts \rm \tolerance = 9500 \indexbreaks % % See if the index file exists and is nonempty. + % Change catcode of @ here so that if the index file contains + % \initial {@} + % as its first line, TeX doesn't complain about mismatched braces + % (because it thinks @} is a control sequence). + \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, *************** *** 2452,2462 **** \ifeof 1 (Index is empty) \else \input \jobname.#1s \fi \fi \closein 1 - \enddoublecolumns \endgroup} % These macros are used by the sorted index file itself. --- 2560,2577 ---- \ifeof 1 (Index is empty) \else + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \def\indexbackslash{\rawbackslashxx}% + \catcode`\\ = 0 + \escapechar = `\\ + \begindoublecolumns \input \jobname.#1s + \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. *************** *** 2558,2581 **** \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. ! \output = {\global\setbox\partialpage ! =\vbox{\unvbox255\kern -\topskip \kern \baselineskip}}% \eject % ! % Now switch to the double-column output routine. ! \output={\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the ! % execution time, so we may as well do it once. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant ! % below is chosen so that the gutter has the same value (well, +- < ! % 1pt) as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) --- 2673,2711 ---- \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. ! \output = {\global\setbox\partialpage = \vbox{% ! % ! % Here is a possibility not foreseen in manmac: if we accumulate a ! % whole lot of material, we might end up calling this \output ! % routine twice in a row (see the doublecol-lose test, which is ! % essentially a couple of indexes with @setchapternewpage off). In ! % that case, we must prevent the second \partialpage from ! % simply overwriting the first, causing us to lose the page. ! % This will preserve it until a real output routine can ship it ! % out. Generally, \partialpage will be empty when this runs and ! % this will be a no-op. ! \unvbox\partialpage ! % ! % Unvbox the main output page. ! \unvbox255 ! \kern-\topskip \kern\baselineskip ! }}% \eject % ! % Use the double-column output routine for subsequent pages. ! \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the ! % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant ! % below is chosen so that the gutter has the same value (well, +-<1pt) ! % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) *************** *** 2596,2695 **** % (undoubled) page height minus any material left over from the % previous page. \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage ! % box0 will be the left-hand column, box1 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar ! \unvbox255 \penalty\outputpenalty } \def\pagesofar{% ! % The contents of the output page -- any previous material, % followed by the two boxes we just split. \unvbox\partialpage \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } \def\enddoublecolumns{% ! \output={\balancecolumns}\eject % split what we have ! \endgroup % Back to normal single-column typesetting, but take account of the % fact that we just accumulated some stuff on the output page. ! \pagegoal=\vsize } \def\balancecolumns{% ! % Called on the last page of the double column material. ! \setbox0=\vbox{\unvbox255}% \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 \splittopskip = \topskip % Loop until we get a decent breakpoint. ! {\vbadness=10000 \loop \global\setbox3=\copy0 \global\setbox1=\vsplit3 to\dimen@ ! \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% \pagesofar } ! \catcode `\@=\other \message{sectioning,} % Define chapters, sections, etc. ! \newcount \chapno ! \newcount \secno \secno=0 ! \newcount \subsecno \subsecno=0 ! \newcount \subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... ! \newcount \appendixno \appendixno = `\@ \def\appendixletter{\char\the\appendixno} ! \newwrite \contentsfile % This is called from \setfilename. ! \def\opencontents{\openout \contentsfile = \jobname.toc} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise \def\thischapter{} \def\thissection{} ! \def\seccheck#1{\if \pageno<0 % ! \errmessage{@#1 not allowed after generating table of contents}\fi ! % ! } \def\chapternofonts{% ! \let\rawbackslash=\relax% ! \let\frenchspacing=\relax% ! \def\result{\realbackslash result} ! \def\equiv{\realbackslash equiv} ! \def\expansion{\realbackslash expansion} ! \def\print{\realbackslash print} ! \def\TeX{\realbackslash TeX} ! \def\dots{\realbackslash dots} ! \def\copyright{\realbackslash copyright} ! \def\tt{\realbackslash tt} ! \def\bf{\realbackslash bf } ! \def\w{\realbackslash w} ! \def\less{\realbackslash less} ! \def\gtr{\realbackslash gtr} ! \def\hat{\realbackslash hat} ! \def\char{\realbackslash char} ! \def\tclose##1{\realbackslash tclose {##1}} ! \def\code##1{\realbackslash code {##1}} ! \def\samp##1{\realbackslash samp {##1}} ! \def\r##1{\realbackslash r {##1}} ! \def\b##1{\realbackslash b {##1}} ! \def\key##1{\realbackslash key {##1}} ! \def\file##1{\realbackslash file {##1}} ! \def\kbd##1{\realbackslash kbd {##1}} ! % These are redefined because @smartitalic wouldn't work inside xdef. ! \def\i##1{\realbackslash i {##1}} ! \def\cite##1{\realbackslash cite {##1}} ! \def\var##1{\realbackslash var {##1}} ! \def\emph##1{\realbackslash emph {##1}} ! \def\dfn##1{\realbackslash dfn {##1}} } \newcount\absseclevel % used to calculate proper heading level --- 2726,2834 ---- % (undoubled) page height minus any material left over from the % previous page. \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage ! % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar ! \unvbox255 ! \penalty\outputpenalty } \def\pagesofar{% ! % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split. \unvbox\partialpage \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } \def\enddoublecolumns{% ! \output = {\balancecolumns}\eject % split what we have ! \endgroup % started in \begindoublecolumns ! % % Back to normal single-column typesetting, but take account of the % fact that we just accumulated some stuff on the output page. ! \pagegoal = \vsize } \def\balancecolumns{% ! % Called at the end of the double column material. ! \setbox0 = \vbox{\unvbox255}% \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 \splittopskip = \topskip % Loop until we get a decent breakpoint. ! {\vbadness=10000 \loop ! \global\setbox3=\copy0 \global\setbox1=\vsplit3 to\dimen@ ! \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt ! \repeat}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% \pagesofar } ! \catcode`\@ = \other \message{sectioning,} % Define chapters, sections, etc. ! \newcount\chapno ! \newcount\secno \secno=0 ! \newcount\subsecno \subsecno=0 ! \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... ! \newcount\appendixno \appendixno = `\@ \def\appendixletter{\char\the\appendixno} ! \newwrite\contentsfile % This is called from \setfilename. ! \def\opencontents{\openout\contentsfile = \jobname.toc } % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise \def\thischapter{} \def\thissection{} ! \def\seccheck#1{\ifnum \pageno<0 ! \errmessage{@#1 not allowed after generating table of contents}% ! \fi} \def\chapternofonts{% ! \let\rawbackslash=\relax ! \let\frenchspacing=\relax ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\TeX{\realbackslash TeX}% ! \def\dots{\realbackslash dots}% ! \def\result{\realbackslash result}% ! \def\equiv{\realbackslash equiv}% ! \def\expansion{\realbackslash expansion}% ! \def\print{\realbackslash print}% ! \def\error{\realbackslash error}% ! \def\point{\realbackslash point}% ! \def\copyright{\realbackslash copyright}% ! \def\tt{\realbackslash tt}% ! \def\bf{\realbackslash bf}% ! \def\w{\realbackslash w}% ! \def\less{\realbackslash less}% ! \def\gtr{\realbackslash gtr}% ! \def\hat{\realbackslash hat}% ! \def\char{\realbackslash char}% ! \def\tclose##1{\realbackslash tclose{##1}}% ! \def\code##1{\realbackslash code{##1}}% ! \def\samp##1{\realbackslash samp{##1}}% ! \def\r##1{\realbackslash r{##1}}% ! \def\b##1{\realbackslash b{##1}}% ! \def\key##1{\realbackslash key{##1}}% ! \def\file##1{\realbackslash file{##1}}% ! \def\kbd##1{\realbackslash kbd{##1}}% ! % These are redefined because @smartitalic wouldn't work inside xdef. ! \def\i##1{\realbackslash i{##1}}% ! \def\cite##1{\realbackslash cite{##1}}% ! \def\var##1{\realbackslash var{##1}}% ! \def\emph##1{\realbackslash emph{##1}}% ! \def\dfn##1{\realbackslash dfn{##1}}% } \newcount\absseclevel % used to calculate proper heading level *************** *** 2776,2782 **** % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% ! \edef\temp{{\realbackslash chapentry {#1}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 2915,2922 ---- % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2795,2802 **** \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% ! \edef\temp{{\realbackslash chapentry ! {#1}{\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 2935,2943 ---- \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash chapentry{\the\toks0}% ! {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2830,2836 **** \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbchapentry {#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 2971,2978 ---- \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2845,2852 **** \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% {\chapternofonts% \edef\temp{{\realbackslash secentry % ! {#1}{\the\chapno}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 2987,2995 ---- \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash secentry % ! {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2860,2867 **** \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% {\chapternofonts% \edef\temp{{\realbackslash secentry % ! {#1}{\appendixletter}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 3003,3011 ---- \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash secentry % ! {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2873,2879 **** \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 3017,3024 ---- \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2886,2893 **** \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% {\chapternofonts% \edef\temp{{\realbackslash subsecentry % ! {#1}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % --- 3031,3039 ---- \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % ! {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % *************** *** 2900,2907 **** \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% {\chapternofonts% \edef\temp{{\realbackslash subsecentry % ! {#1}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % --- 3046,3054 ---- \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% {\chapternofonts% + \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % ! {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % *************** *** 2913,2919 **** \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% \plainsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 3060,3067 ---- \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% \plainsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 2927,2934 **** \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \edef\temp{{\realbackslash subsubsecentry % ! {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\noexpand\folio}}}% \escapechar=`\\% --- 3075,3082 ---- \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash subsubsecentry{\the\toks0} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\noexpand\folio}}}% \escapechar=`\\% *************** *** 2944,2950 **** \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \edef\temp{{\realbackslash subsubsecentry{#1}% {\appendixletter} {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% \escapechar=`\\% --- 3092,3099 ---- \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash subsubsecentry{\the\toks0}% {\appendixletter} {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% \escapechar=`\\% *************** *** 2958,2964 **** \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% \plainsubsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % --- 3107,3114 ---- \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% \plainsubsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% ! \toks0 = {#1}% ! \edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % *************** *** 3139,3145 **** % Print any size section title. ! % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% --- 3289,3295 ---- % Print any size section title. ! % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% *************** *** 3183,3189 **** \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 ! \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } --- 3333,3341 ---- \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 ! % We can't do this, because then an actual ^ in a section ! % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. ! %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } *************** *** 3308,3318 **** % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) - % - % \turnoffactive is for the sake of @" used for umlauts. \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks ! \entry{\turnoffactive #1}{\turnoffactive #2}% \endgroup} % Space between chapter (or whatever) number and the title. --- 3460,3471 ---- % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks ! % Do not use \turnoffactive in these arguments. Since the toc is ! % typeset in cmr, so characters such as _ would come out wrong; we ! % have to do the usual translation tricks. ! \entry{#1}{#2}% \endgroup} % Space between chapter (or whatever) number and the title. *************** *** 3378,3408 **** % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup ! \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 ! \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 ! \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie ! \catcode `\%=14 ! \catcode 43=12 % plus ! \catcode`\"=12 ! \catcode`\==12 ! \catcode`\|=12 ! \catcode`\<=12 ! \catcode`\>=12 ! \escapechar=`\\ ! % ! \let\,=\ptexcomma ! \let\~=\ptextilde ! \let\{=\ptexlbrace ! \let\}=\ptexrbrace ! \let\.=\ptexdot ! \let\*=\ptexstar ! \let\dots=\ptexdots ! \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}} ! \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi} ! \def\@{@}% ! \let\bullet=\ptexbullet ! \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext ! % \let\Etex=\endgroup} % Define @lisp ... @endlisp. --- 3531,3565 ---- % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup ! \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 ! \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 ! \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie ! \catcode `\%=14 ! \catcode 43=12 % plus ! \catcode`\"=12 ! \catcode`\==12 ! \catcode`\|=12 ! \catcode`\<=12 ! \catcode`\>=12 ! \escapechar=`\\ ! % ! \let\b=\ptexb ! \let\bullet=\ptexbullet ! \let\c=\ptexc ! \let\,=\ptexcomma ! \let\.=\ptexdot ! \let\dots=\ptexdots ! \let\equiv=\ptexequiv ! \let\!=\ptexexclam ! \let\i=\ptexi ! \let\{=\ptexlbrace ! \let\}=\ptexrbrace ! \let\*=\ptexstar ! \let\t=\ptext ! % ! \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% ! \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% ! \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @endlisp. *************** *** 3539,3549 **** % \def\nonfillfinish{\afterenvbreak\endgroup}% - % This macro is \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \rawbackslash % have \ input char produce \ char from current font \gobble } --- 3696,3707 ---- % \def\nonfillfinish{\afterenvbreak\endgroup}% \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt + % Make @kbd do something special, if requested. + \let\kbdfont\kbdexamplefont \rawbackslash % have \ input char produce \ char from current font \gobble } *************** *** 3661,3676 **** % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. ! \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested % ! \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. ! % also in that case restore the outer-level definition of (. ! \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi ! \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % --- 3819,3835 ---- % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. ! \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested ! \global\advance\parencount by 1 ! } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. ! % also in that case restore the outer-level definition of (. ! \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi ! \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % *************** *** 3678,3685 **** } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] ! \def\opnr{{\sf\char`\(}} \def\clnr{{\sf\char`\)}} \def\ampnr{\&} ! \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. --- 3837,3847 ---- } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] ! \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } ! \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } ! \def\ampnr{\&} ! \def\lbrb{{\bf\char`\[}} ! \def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. *************** *** 3772,3778 **** % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. ! % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % --- 3934,3940 ---- % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. ! % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % *************** *** 3807,3819 **** % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. ! % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. ! % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% --- 3969,3981 ---- % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. ! % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. ! % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% *************** *** 3856,3862 **** \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 ! \ifnum\parencount=0 \else \errmessage{unbalanced parens in @def arguments}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% --- 4018,4024 ---- \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 ! \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% *************** *** 3957,3962 **** --- 4119,4125 ---- \def\defmacx #1 {\errmessage{@defmacx in invalid context}} \def\defspecx #1 {\errmessage{@defspecx in invalid context}} \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} + \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} % @defmethod, and so on *************** *** 3972,3977 **** --- 4135,4150 ---- \defunargs {#3}\endgroup % } + % @deftypemethod foo-class return-type foo-method args + % + \def\deftypemethod{% + \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} + % + % #1 is the class name, #2 the data type, #3 the method name, #4 the args. + \def\deftypemethodheader#1#2#3#4{% + \deftypefnheaderx{Method on #1}{#2}#3 #4\relax + } + % @defmethod == @defop Method \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} *************** *** 4186,4192 **** % Use \turnoffactive so that punctuation chars such as underscore % work in node names. ! \def\dosetq #1#2{{\let\folio=0 \turnoffactive \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} --- 4359,4365 ---- % Use \turnoffactive so that punctuation chars such as underscore % work in node names. ! \def\dosetq #1#2{{\let\folio=0 \turnoffactive \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} *************** *** 4239,4245 **** \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. ! $\langle$un\-de\-fined$\rangle$% \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else --- 4412,4418 ---- \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. ! \angleleft un\-de\-fined\angleright \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else *************** *** 4256,4292 **** } % This is the macro invoked by entries in the aux file. ! \def\xrdef #1#2{{% ! \catcode`\'=\other ! \expandafter\gdef\csname X#1\endcsname{#2}% ! }} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other ! \catcode`\=\other ! \catcode`\=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other ! \catcode`\ =\other \catcode`\^^L=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode`\=\other ! \catcode26=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other --- 4429,4466 ---- } % This is the macro invoked by entries in the aux file. ! % ! \def\xrdef#1{\begingroup ! % Reenable \ as an escape while reading the second argument. ! \catcode`\\ = 0 ! \afterassignment\endgroup ! \expandafter\gdef\csname X#1\endcsname ! } % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other ! \catcode`\^^A=\other ! \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other ! \catcode`\^^K=\other \catcode`\^^L=\other ! \catcode`\^^N=\other ! \catcode`\^^P=\other ! \catcode`\^^Q=\other ! \catcode`\^^R=\other ! \catcode`\^^S=\other ! \catcode`\^^T=\other ! \catcode`\^^U=\other ! \catcode`\^^V=\other ! \catcode`\^^W=\other ! \catcode`\^^X=\other ! \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other *************** *** 4302,4312 **** % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. ! % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. ! % \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other --- 4476,4486 ---- % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. ! % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. ! % \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other *************** *** 4364,4370 **** % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } ! % @footnotestyle is meaningful for info output only.. \let\footnotestyle=\comment \let\ptexfootnote=\footnote --- 4538,4544 ---- % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } ! % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote *************** *** 4389,4395 **** % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. ! % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. --- 4563,4569 ---- % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. ! % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. *************** *** 4479,4486 **** --- 4653,4702 ---- % \def\finalout{\overfullrule=0pt} + % @image. We use the macros from epsf.tex to support this. + % If epsf.tex is not installed and @image is used, we complain. + % + % Check for and read epsf.tex up front. If we read it only at @image + % time, we might be inside a group, and then its definitions would get + % undone and the next image would fail. + \openin 1 = epsf.tex + \ifeof 1 \else + \closein 1 + \def\epsfannounce{\toks0 = }% do not bother showing banner + \input epsf.tex + \fi + % + \newif\ifwarnednoepsf + \newhelp\noepsfhelp{epsf.tex must be installed for images to + work. It is also included in the Texinfo distribution, or you can get + it from ftp://ftp.tug.org/tex/epsf.tex.} + % + % Only complain once about lack of epsf.tex. + \def\image#1{% + \ifx\epsfbox\undefined + \ifwarnednoepsf \else + \errhelp = \noepsfhelp + \errmessage{epsf.tex not found, images will be ignored}% + \global\warnednoepsftrue + \fi + \else + \imagexxx #1,,,\finish + \fi + } + % + % Arguments to @image: + % #1 is (mandatory) image filename; we tack on .eps extension. + % #2 is (optional) width, #3 is (optional) height. + % #4 is just the usual extra ignored arg for parsing this stuff. + \def\imagexxx#1,#2,#3,#4\finish{% + % \epsfbox itself resets \epsf?size at each figure. + \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi + \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi + \epsfbox{#1.eps}% + } % End of control word definitions. + \message{and turning on texinfo input format.} diff -crN gawk-3.0.3/eval.c gawk-3.0.4/eval.c *** gawk-3.0.3/eval.c Tue May 6 23:39:55 1997 --- gawk-3.0.4/eval.c Wed Jun 30 16:07:12 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,32 **** #include "awk.h" - #include - extern double pow P((double x, double y)); extern double modf P((double x, double *yp)); extern double fmod P((double x, double y)); --- 25,30 ---- *************** *** 566,579 **** --- 564,589 ---- 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,765 **** register size_t len; char *str; register char *dest; ! int count; /* * This is an efficiency hack for multiple adjacent string --- 769,776 ---- register size_t len; char *str; register char *dest; ! int alloc_count, str_count; ! int i; /* * This is an efficiency hack for multiple adjacent string *************** *** 773,788 **** /* * 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 * also leave room for an extra pointer at the end to ! * use as a sentinel. Thus, start count at 2. */ save_tree = tree; ! for (count = 2; tree && tree->type == Node_concat; tree = tree->lnode) ! count++; tree = save_tree; ! emalloc(treelist, NODE **, sizeof(NODE *) * count, "tree_eval"); ! emalloc(strlist, NODE **, sizeof(NODE *) * count, "tree_eval"); /* Now, here we go. */ treep = treelist; --- 784,799 ---- /* * But first, no arbitrary limits. Count the number of * nodes and malloc the treelist and strlist arrays. ! * 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 alloc_count at 2. */ save_tree = tree; ! for (alloc_count = 2; tree && tree->type == Node_concat; tree = tree->lnode) ! alloc_count++; tree = save_tree; ! 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,809 **** * Now, evaluate to strings in LIFO order, accumulating * the string length, so we can do a single malloc at the * end. */ strp = strlist; len = 0; while (treep >= treelist) { *strp = force_string(tree_eval(*treep--)); - len += (*strp)->stlen; strp++; } *strp = NULL; emalloc(str, char *, len+2, "tree_eval"); str[len] = str[len+1] = '\0'; /* for good measure */ dest = str; --- 806,831 ---- * 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--)); 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,1402 **** --- 1419,1429 ---- * 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,1416 **** if (assign) *assign = NULL; /* for safety */ ! if (ptr->type == Node_param_list) ptr = stack_ptr[ptr->param_cnt]; switch (ptr->type) { case Node_var_array: --- 1436,1446 ---- if (assign) *assign = NULL; /* for safety */ ! 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,1469 **** break; case Node_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); 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); aptr = &(NF_node->var_value); if (assign != NULL) *assign = set_NF; --- 1474,1505 ---- break; case Node_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: ! 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 || 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; diff -crN gawk-3.0.3/field.c gawk-3.0.4/field.c *** gawk-3.0.3/field.c Fri May 2 04:36:20 1997 --- gawk-3.0.4/field.c Wed Jun 30 16:07:32 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,30 **** */ #include "awk.h" - #include typedef void (* Setfunc) P((long, char *, long, NODE *)); --- 24,29 ---- *************** *** 63,68 **** --- 62,70 ---- 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,146 **** char *ops; register char *cops; long i; - char *f0start, *f0end; assert(NF != -1); --- 142,147 ---- *************** *** 184,198 **** * 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 ! && f0start <= field_data && field_data < f0end) ! fields_arr[i]->stptr = cops; cops += fields_arr[i]->stlen + ofslen; } --- 185,211 ---- * any fields that still point into it, and have them point * into the new field zero. */ for (cops = ops, i = 1; i <= NF; i++) { ! if (fields_arr[i]->stlen > 0) { ! NODE *n; ! getnode(n); ! ! 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,757 **** arr->type = Node_var_array; assoc_clear(arr); ! if (sep->re_flags & FS_DFLT) { parseit = parse_field; fs = force_string(FS_node->var_value); rp = FS_regexp; --- 764,770 ---- arr->type = Node_var_array; assoc_clear(arr); ! if ((sep->re_flags & FS_DFLT) != 0 && ! using_FIELDWIDTHS()) { parseit = parse_field; fs = force_string(FS_node->var_value); rp = FS_regexp; *************** *** 851,870 **** 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; } fs = force_string(FS_node->var_value); if (! do_traditional && fs->stlen == 0) parse_field = null_parse_field; --- 864,883 ---- 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)) { ! 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,893 **** if (fs->stptr[0] == ' ' && fs->stlen == 1) default_FS = TRUE; else if (fs->stptr[0] != ' ' && fs->stlen == 1) { ! if (! IGNORECASE) parse_field = sc_parse_field; else if (fs->stptr[0] == '\\') /* yet another special case */ --- 900,906 ---- if (fs->stptr[0] == ' ' && fs->stlen == 1) default_FS = TRUE; else if (fs->stptr[0] != ' ' && fs->stlen == 1) { ! if (! IGNORECASE || ! isalpha(fs->stptr[0])) parse_field = sc_parse_field; else if (fs->stptr[0] == '\\') /* yet another special case */ *************** *** 910,915 **** int using_fieldwidths() { ! return parse_field == fw_parse_field; } - --- 923,927 ---- int using_fieldwidths() { ! return using_FIELDWIDTHS(); } diff -crN gawk-3.0.3/gawkmisc.c gawk-3.0.4/gawkmisc.c *** gawk-3.0.3/gawkmisc.c Sun May 11 21:47:43 1997 --- gawk-3.0.4/gawkmisc.c Wed Apr 28 17:11:16 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991 - 97 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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. diff -crN gawk-3.0.3/io.c gawk-3.0.4/io.c *** gawk-3.0.3/io.c Wed May 14 15:10:02 1997 --- gawk-3.0.4/io.c Wed Jun 30 16:08:17 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,56 **** #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) #endif - #include - #if ! defined(S_ISREG) && defined(S_IFREG) #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif --- 49,54 ---- *************** *** 95,113 **** 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__) #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; --- 93,100 ---- 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 (HAVE_POPEN_H) #include "popen.h" #endif static struct redirect *red_head = NULL; *************** *** 125,130 **** --- 112,126 ---- 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,495 **** /* too many files open -- close one and try again */ if (errno == EMFILE || errno == ENFILE) close_one(); ! #ifdef HAVE_MMAP /* this works for solaris 2.5, not sunos */ ! else if (errno == 0) /* HACK! */ close_one(); #endif else { --- 483,492 ---- /* too many files open -- close one and try again */ if (errno == EMFILE || errno == ENFILE) close_one(); ! #if defined __MINGW32__ || defined HAVE_MMAP /* this works for solaris 2.5, not sunos */ ! /* it is also needed for MINGW32 */ ! else if (errno == 0) /* HACK! */ close_one(); #endif else { *************** *** 573,596 **** 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) warning("close: `%.*s' is not an open file or pipe", tmp->stlen, tmp->stptr); free_temp(tmp); return tmp_number((AWKNUM) 0.0); } --- 570,591 ---- tmp = force_string(tree_eval(tree->subnode)); 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 */ ! /* 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,898 **** int i; if (name[6] == 'g') ! sprintf(tbuf, "%d\n", getpgrp(getpgrp_arg())); else if (name[6] == 'i') ! sprintf(tbuf, "%d\n", getpid()); else ! sprintf(tbuf, "%d\n", getppid()); i = strlen(tbuf); spec_setup(iop, i, TRUE); strcpy(iop->buf, tbuf); --- 883,893 ---- int i; if (name[6] == 'g') ! sprintf(tbuf, "%d\n", (int) getpgrp(getpgrp_arg())); else if (name[6] == 'i') ! sprintf(tbuf, "%d\n", (int) getpid()); else ! sprintf(tbuf, "%d\n", (int) getppid()); i = strlen(tbuf); spec_setup(iop, i, TRUE); strcpy(iop->buf, tbuf); *************** *** 923,929 **** int ngroups; #endif ! sprintf(tbuf, "%d %d %d %d", getuid(), geteuid(), getgid(), getegid()); cp = tbuf + strlen(tbuf); #if defined(NGROUPS_MAX) && NGROUPS_MAX > 0 --- 918,924 ---- int ngroups; #endif ! 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,1014 **** 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) fatal("file `%s' is a directory", name); return iop_alloc(openfd, name, iop); } --- 1003,1009 ---- if (openfd == INVALID_HANDLE) openfd = open(name, flag, 0666); if (openfd != INVALID_HANDLE && fstat(openfd, &buf) > 0) ! if (S_ISDIR(buf.st_mode)) fatal("file `%s' is a directory", name); return iop_alloc(openfd, name, iop); } *************** *** 1120,1126 **** * except if popen() provides real pipes too */ ! #if defined(VMS) || defined(OS2) || defined (MSDOS) /* gawk_popen --- open an IOBUF on a child process */ --- 1115,1121 ---- * except if popen() provides real pipes too */ ! #if defined(VMS) || defined(OS2) || defined (MSDOS) || defined(WIN32) /* gawk_popen --- open an IOBUF on a child process */ *************** *** 1135,1141 **** return NULL; rp->iop = iop_alloc(fileno(current), cmd, NULL); if (rp->iop == NULL) { ! (void) fclose(current); current = NULL; } rp->ifp = current; --- 1130,1136 ---- return NULL; rp->iop = iop_alloc(fileno(current), cmd, NULL); if (rp->iop == NULL) { ! (void) pclose(current); current = NULL; } rp->ifp = current; *************** *** 1434,1440 **** iop->name = name; iop->getrec = get_a_record; #ifdef HAVE_MMAP ! if (S_ISREG(sbuf.st_mode) && sbuf.st_size > 0) { register char *cp; iop->buf = iop->off = mmap((caddr_t) 0, sbuf.st_size, --- 1429,1440 ---- iop->name = name; iop->getrec = get_a_record; #ifdef HAVE_MMAP ! /* 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,1541 **** return EOF; } ! if (grRS == FALSE) /* special case: RS == "" */ rs = '\n'; else rs = (char) grRS; --- 1535,1541 ---- return EOF; } ! if (RS_is_null) /* special case: RS == "" */ rs = '\n'; else rs = (char) grRS; *************** *** 1648,1654 **** */ if (! do_traditional && RSre != NULL) /* regexp */ rsre = RSre; ! else if (grRS == FALSE) /* RS = "" */ rsre = RS_null_re; else rsre = NULL; --- 1648,1654 ---- */ if (! do_traditional && RSre != NULL) /* regexp */ rsre = RSre; ! else if (RS_is_null) /* RS = "" */ rsre = RS_null_re; else rsre = NULL; *************** *** 1675,1680 **** --- 1675,1695 ---- /* 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,1697 **** /* * Leading newlines at the beginning of the file * should be ignored. Whew! */ ! if (grRS == FALSE && RESTART(rsre, start) == 0) { start += REEND(rsre, start); goto again; } --- 1705,1714 ---- /* * Leading newlines at the beginning of the file * should be ignored. Whew! + * + * Is this code ever executed? */ ! if (RS_is_null && RESTART(rsre, start) == 0) { start += REEND(rsre, start); goto again; } *************** *** 1737,1743 **** bstart = bp; } *bp = '\0'; ! } else if (grRS == FALSE && iop->cnt == EOF) { /* * special case, delete trailing newlines, * should never be more than one. --- 1754,1760 ---- bstart = bp; } *bp = '\0'; ! } else if (RS_is_null && iop->cnt == EOF) { /* * special case, delete trailing newlines, * should never be more than one. *************** *** 1811,1817 **** return EOF; } ! if (grRS == FALSE) /* special case: RS == "" */ rs = '\n'; else rs = (char) grRS; --- 1828,1834 ---- return EOF; } ! if (RS_is_null) /* special case: RS == "" */ rs = '\n'; else rs = (char) grRS; *************** *** 1821,1827 **** rs = casetable[rs]; /* if RS = "", skip leading newlines at the front of the file */ ! if (grRS == FALSE && iop->off == iop->buf) { for (bp = iop->off; *bp == '\n'; bp++) continue; --- 1838,1844 ---- rs = casetable[rs]; /* if RS = "", skip leading newlines at the front of the file */ ! if (RS_is_null && iop->off == iop->buf) { for (bp = iop->off; *bp == '\n'; bp++) continue; *************** *** 1835,1841 **** */ if (! do_traditional && RSre != NULL) /* regexp */ rsre = RSre; ! else if (grRS == FALSE) /* RS = "" */ rsre = RS_null_re; else rsre = NULL; --- 1852,1858 ---- */ if (! do_traditional && RSre != NULL) /* regexp */ rsre = RSre; ! else if (RS_is_null) /* RS = "" */ rsre = RS_null_re; else rsre = NULL; *************** *** 1862,1868 **** 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') return iop->end - start - 1; else return iop->end - start; --- 1879,1885 ---- iop->off = iop->end; /* all done with the record */ set_RT_to_null(); /* special case, don't allow trailing newlines */ ! if (RS_is_null && *(iop->end - 1) == '\n') return iop->end - start - 1; else return iop->end - start; diff -crN gawk-3.0.3/main.c gawk-3.0.4/main.c *** gawk-3.0.3/main.c Tue May 13 19:58:52 1997 --- gawk-3.0.4/main.c Mon May 3 13:24:45 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,446 **** 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); exit(exitval); } --- 439,446 ---- 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@gnu.org,\n", fp); ! fputs("with a Cc: to arnold@gnu.org\n", fp); exit(exitval); } *************** *** 450,456 **** copyleft() { static char blurb_part1[] = ! "Copyright (C) 1989, 1991-1997 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\ --- 450,456 ---- copyleft() { static char blurb_part1[] = ! "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\ diff -crN gawk-3.0.3/missing/strftime.3 gawk-3.0.4/missing/strftime.3 *** gawk-3.0.3/missing/strftime.3 Thu Mar 14 13:33:46 1996 --- gawk-3.0.4/missing/strftime.3 Sun Oct 25 22:55:30 1998 *************** *** 340,346 **** .nf Arnold Robbins .sp ! INTERNET: arnold@gnu.ai.mit.edu .fi .SH ACKNOWLEDGEMENTS Thanks to Geoff Clare for helping debug earlier --- 340,346 ---- .nf Arnold Robbins .sp ! INTERNET: arnold@gnu.org .fi .SH ACKNOWLEDGEMENTS Thanks to Geoff Clare for helping debug earlier diff -crN gawk-3.0.3/missing/strftime.c gawk-3.0.4/missing/strftime.c *** gawk-3.0.3/missing/strftime.c Tue May 6 19:23:31 1997 --- gawk-3.0.4/missing/strftime.c Sun Oct 25 23:00:45 1998 *************** *** 32,37 **** --- 32,38 ---- * Updated January, 1995 * Updated September, 1995 * Updated January, 1996 + * Updated July, 1997 * * Fixes from ado@elsie.nci.nih.gov * February 1991, May 1992 *************** *** 43,48 **** --- 44,51 ---- * Applied September 1995 * %V code fixed (again) and %G, %g added, * January 1996 + * %v code fixed, better configuration + * July 1997 */ #ifndef GAWK *************** *** 122,128 **** #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME) extern char *tzname[2]; extern int daylight; ! #ifdef SOLARIS extern long timezone, altzone; #else extern int timezone, altzone; --- 125,131 ---- #if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME) extern char *tzname[2]; extern int daylight; ! #if defined(SOLARIS) || defined(mips) extern long timezone, altzone; #else extern int timezone, altzone; diff -crN gawk-3.0.3/msg.c gawk-3.0.4/msg.c *** gawk-3.0.3/msg.c Fri May 2 04:36:24 1997 --- gawk-3.0.4/msg.c Wed Apr 28 17:11:35 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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. diff -crN gawk-3.0.3/node.c gawk-3.0.4/node.c *** gawk-3.0.3/node.c Fri May 2 04:36:25 1997 --- gawk-3.0.4/node.c Wed Apr 28 17:11:38 1999 *************** *** 3,9 **** */ /* ! * Copyright (C) 1986, 1988, 1989, 1991-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 3,9 ---- */ /* ! * 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,41 **** --- 36,42 ---- char save; char *ptr; unsigned int newflags; + extern double strtod(); #ifdef DEBUG if (n == NULL) *************** *** 140,146 **** /* 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 NODE *dummy, *r; unsigned short oflags; extern NODE *format_tree P((const char *, int, NODE *)); --- 141,156 ---- /* not an integral value, or out of range */ if ((val = double_to_int(s->numbr)) != s->numbr || val < LONG_MIN || val > LONG_MAX) { ! /* ! * 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,175 **** 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 */ --- 171,176 ---- *************** *** 183,193 **** } s->stfmt = -1; } ! emalloc(s->stptr, char *, s->stlen + 2, "force_string"); memcpy(s->stptr, sp, s->stlen+1); - #ifdef GFMT_WORKAROUND no_malloc: - #endif /* GFMT_WORKAROUND */ s->stref = 1; s->flags |= STR; return s; --- 184,192 ---- } s->stfmt = -1; } ! emalloc(s->stptr, char *, s->stlen + 2, "format_val"); memcpy(s->stptr, sp, s->stlen+1); no_malloc: s->stref = 1; s->flags |= STR; return s; *************** *** 495,501 **** } i = 0; for (;;) { ! if (ISXDIGIT((c = *(*string_ptr)++))) { i *= 16; if (ISDIGIT(c)) i += c - '0'; --- 494,502 ---- } i = 0; for (;;) { ! /* do outside test to avoid multiple side effects */ ! c = *(*string_ptr)++; ! if (ISXDIGIT(c)) { i *= 16; if (ISDIGIT(c)) i += c - '0'; diff -crN gawk-3.0.3/patchlevel.h gawk-3.0.4/patchlevel.h *** gawk-3.0.3/patchlevel.h Thu May 15 19:49:01 1997 --- gawk-3.0.4/patchlevel.h Sun Jun 27 12:28:04 1999 *************** *** 1 **** ! #define PATCHLEVEL 3 --- 1 ---- ! #define PATCHLEVEL 4 diff -crN gawk-3.0.3/pc/ChangeLog gawk-3.0.4/pc/ChangeLog *** gawk-3.0.3/pc/ChangeLog Thu May 15 19:50:40 1997 --- gawk-3.0.4/pc/ChangeLog Wed Jun 30 16:15:12 1999 *************** *** 1,3 **** --- 1,61 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + + Sun Jun 27 12:27:00 1999 Darrel Hankerson + + * Makefile, Makefile.tst, ../README_d/README.pc: finalized. + * include/process.h: new file + + Fri May 21 00:00:00 1999 Darrel Hankerson + + * popen.c: MSC (on DOS/Win32) and MINGW32 now honor SHELL. + * io.c: MINGW32 reports errno==0 after failure in redirect(); + assume close_one() in this case. + * io.c: Add HAVE_POPEN_H and let pc/config.h deal with the mess. + (Can't move everything to config.h because of popen define.) + + Sun May 9 09:12:33 1999 Darrel Hankerson + + * Add 1999-04-30 changes from Eli Zaretskii + 1. Makefile (TAGS, tags): New targets. + 2. Makefile.tst (regtes): Pass the value of $CMP to the + regtest script. + + Thu Nov 18 03:48:32 1998 Scott Deifik + + * Readme.pc: More LFN-based comments. + + Thu Nov 12 21:01:24 1998 Darrel Hankerson + + * mingw32 target added with corresponding minor changes to getid.c, + io.c, and config.h. + + * vcWin32 needed popen defines in config.h which were inadvertently + omitted from 3.0.3. + + * README.pc updated to clarify the procedure for building + non-LFN versions on LFN systems, and to note that Win32 gawk + may require Win32 utilities. + + * emxbnd target modified to accomodate older versions of emx. + + Thu Nov 08 09:11:44 1998 Scott Deifik + + * pc/Makefile: Stack reduced again for 16bit MSC versions. + + * pc/Makefile.tst: Updated to keep in sync with new + test/Makefile.in. In addition, made to work in Windows 9x + with non-LFN tools. + + Wed Nov 4 11:32:24 1998 Arnold D. Robbins + + * BETA Release 3.0.41: Release tar file made. + + Thu Oct 8 19:36:57 1998 Arnold D. Robbins + + * BETA Release 3.0.40: Release tar file made. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/pc/Makefile gawk-3.0.4/pc/Makefile *** gawk-3.0.3/pc/Makefile Mon May 5 02:27:33 1997 --- gawk-3.0.4/pc/Makefile Thu Jun 24 06:04:49 1999 *************** *** 1,8 **** ! # Makefile for gawk (GNU awk) 2 Jan 1997 # # - for GNU C (djgpp) [32bit executable for DOS] # - for GNU C (emx) [32bit executable for OS/2 or DOS or Win32] ! # - for MS-Visual C/C++ 4.x [Win32 executable for Windows 95 & NT] # - for Microsoft C 7 [16bit ececutable for DOS] # - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] --- 1,9 ---- ! # Makefile for gawk (GNU awk) 31 Oct 1998 # # - for GNU C (djgpp) [32bit executable for DOS] # - for GNU C (emx) [32bit executable for OS/2 or DOS or Win32] ! # - for GNU C (mingw32) [Win32 executable for Windows 9x/NT] ! # - for MS-Visual C/C++ 4.x [Win32 executable for Windows 9x/NT] # - for Microsoft C 7 [16bit ececutable for DOS] # - for Microsoft C 6.00A [16bit executable for OS/2 or DOS] *************** *** 19,24 **** --- 20,26 ---- @echo " emx ..... OS/2 32-bit exe [emx/gcc; uses emxlibc.dll] " @echo " emxnt ... NT exe [emx/gcc with RSXNT] " @echo " emxbnd .. OS/2 and DOS 32-bit exe [emx/gcc] " + @echo " mingw32 . Win32 exe [Mingw32 GNU C] " @echo " msc ..... DOS exe [Microsoft C 7 & 8 (AKA 1.52)] " @echo " msc6 .... DOS exe [Microsoft C 6.00a] " @echo " msc6os2 . OS/2 exe [Microsoft C 6.00a] " *************** *** 86,92 **** # End of general configuration. Some platform-specific configuration # notes appear below. - #======================================================================== #========================== DJGPP ======================================= #======================================================================== --- 88,93 ---- *************** *** 125,132 **** # Link and bind for DOS and OS/2 versions. # emx-09 needs '-p' emx option here or in EMXOPT environ var. ! LEMXBND = $(CC) $(LF) -o a.out $(LDRSP) gawk.def -lbsd $(LF2) ! BEMX = emxbind -bs -o $@ a.out -p #BEMX = emxbind -bs /emx/bin/emx.exe a.out $@ -p BEMXD = emxbind -b -o $@ a.out -p --- 126,137 ---- # Link and bind for DOS and OS/2 versions. # emx-09 needs '-p' emx option here or in EMXOPT environ var. ! # The following works with 0.9a or newer ! LEMXBND = $(CC) $(LF) -o gawk $(LDRSP) gawk.def -lbsd $(LF2) ! BEMX = emxbind -bs gawk -p ! # The following works with 0.9c or newer ! #LEMXBND = $(CC) $(LF) -o a.out $(LDRSP) gawk.def -lbsd $(LF2) ! #BEMX = emxbind -bs -o $@ a.out -p #BEMX = emxbind -bs /emx/bin/emx.exe a.out $@ -p BEMXD = emxbind -b -o $@ a.out -p *************** *** 153,158 **** --- 158,176 ---- BIND=BEMXD "P=|tr \" \" \"\n\"" #======================================================================== + #========================== MINGW32 ===================================== + #======================================================================== + + LMINGW32 = $(CC) $(LF) -o $@ $(GAWKOBJS) $(LF2) + # The following might work around command-line length limitations: + #LMINGW32 = $(CC) $(LF) -o $@ *.o $(LF2) + + mingw32: + $(MAK) all \ + CC=gcc O=.o CF=-O OBJ=popen.o \ + LNK=LMINGW32 LF=-s RSP= + + #======================================================================== #========================== MSC ========================================= #======================================================================== *************** *** 174,180 **** MSCCL = -FPi #MSCCL = -FPc ! LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x5420,nul # CLMSC-linking works when building under OS/2 CLMSC = $(CC) -o $@ $(LF) $(GAWKOBJS) $(STDARGV) $(LF2) -link /NOE/NOI/STACK:0x6f00 --- 192,198 ---- MSCCL = -FPi #MSCCL = -FPc ! LMSC = link $(LF) $(LNKRSP) $(STDARGV)/NOE,$@,,/NOD:llibce $(MSCLIB)$(LF2)/STACK:0x5270,nul # CLMSC-linking works when building under OS/2 CLMSC = $(CC) -o $@ $(LF) $(GAWKOBJS) $(STDARGV) $(LF2) -link /NOE/NOI/STACK:0x6f00 *************** *** 235,246 **** Bmsc6bnd = $(BMSC) ! # Windows '95 / NT LvcWin32 = link -nologo -subsystem:console -release -out:$@ $(LNKRSP) vcWin32: $(MAK) all \ "CC=cl -nologo" O=.obj "CF=-o2 -DWIN32 -D__STDC__=0" \ LNK=LvcWin32 --- 253,265 ---- Bmsc6bnd = $(BMSC) ! # Windows '9x / NT LvcWin32 = link -nologo -subsystem:console -release -out:$@ $(LNKRSP) vcWin32: $(MAK) all \ "CC=cl -nologo" O=.obj "CF=-o2 -DWIN32 -D__STDC__=0" \ + OBJ=popen.obj \ LNK=LvcWin32 *************** *** 338,344 **** gawk -v prefix=$(prefix) -f install.awk clean: ! rm -rf gawk gawk.exe *.o *.obj core a.out $(RSPFILE) # cd doc && $(MAKE) clean # cd test && $(MAKE) clean # cd awklib && $(MAKE) clean --- 357,363 ---- gawk -v prefix=$(prefix) -f install.awk clean: ! rm -rf gawk gawk.exe gawk.map *.o *.obj core a.out $(RSPFILE) # cd doc && $(MAKE) clean # cd test && $(MAKE) clean # cd awklib && $(MAKE) clean *************** *** 352,358 **** @echo "recommendation is to copy pc/Makefile.tst to test/Makefile. Under" @echo "DOS, it may be necessary to run make from the test directory." # The `-k' option to make should be unnecessary if using pc/Makefile.tst. ! # sh -c "cd test && $(MAK) -k AWK=../gawk.exe" ! sh -c "cd test && $(MAK) AWK=../gawk.exe bigtest extra" test: check --- 371,384 ---- @echo "recommendation is to copy pc/Makefile.tst to test/Makefile. Under" @echo "DOS, it may be necessary to run make from the test directory." # The `-k' option to make should be unnecessary if using pc/Makefile.tst. ! sh -c "cd test && $(MAK) -k AWK=../gawk.exe" ! # sh -c "cd test && $(MAK) AWK=../gawk.exe bigtest extra" test: check + + # for those who have the necessary tools: + TAGS: + etags awk.h *.y custom.h *.c *.h + + tags: + ctags awk.h *.y custom.h *.c *.h diff -crN gawk-3.0.3/pc/Makefile.tst gawk-3.0.4/pc/Makefile.tst *** gawk-3.0.3/pc/Makefile.tst Thu May 15 02:37:58 1997 --- gawk-3.0.4/pc/Makefile.tst Sat Jun 26 23:36:29 1999 *************** *** 1,6 **** # Makefile for GNU Awk test suite. # ! # Copyright (C) 1988-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. --- 1,6 ---- # Makefile for GNU Awk test suite. # ! # Copyright (C) 1988-1999 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. *************** *** 70,76 **** # Using EMXSHELL=/bin/sh with emx versions can exhaust lower mem. # Lower mem can also be exhausted on some of the tests even with MSC gawk. # The .SWAP setting forces (DOS-only) dmake to swap itself out. ! .SWAP: childin fflush getlnhd tweakfld pipeio1 # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have --- 70,76 ---- # Using EMXSHELL=/bin/sh with emx versions can exhaust lower mem. # Lower mem can also be exhausted on some of the tests even with MSC gawk. # The .SWAP setting forces (DOS-only) dmake to swap itself out. ! .SWAP: childin fflush getlnhd tweakfld pipeio1 pipeio2 # This won't work unless you have "sh" and set SHELL equal to it (Make 3.74 # or later which comes with DJGPP will work with SHELL=/bin/sh if you have *************** *** 83,97 **** # Set your cmp command here (you can use most versions of diff instead of cmp # if you don't want to convert the .ok files to the DOS CR/LF format). #CMP = cmp CMP = diff #CMP = diff -c #CMP = gcmp ! # Set your "cp" and "mkdir" commands here. Note: cp must take forward # slashes. Using "command -c" may work for MS-DOS with Stewartson's shell # (but not bash) if "command=noexpand switch export" is set in extend.lst. ! # `true &&' is needed to force DJGPP Make to call the shell, or else the # conversion of `command -c' won't work. CP = cp #CP = true && command -c copy --- 83,109 ---- # Set your cmp command here (you can use most versions of diff instead of cmp # if you don't want to convert the .ok files to the DOS CR/LF format). + # + # The following comment is for users of OSs which support long file names + # (such as Windows 95) for all versions of gawk (both 16 & 32-bit). + # If you use a shell which doesn't support long filenames, temporary files + # created by this makefile will be truncated by your shell. "_argarra" is an + # example of this. If $(CMP) is a DJGPP-compiled program, then it will fail + # because it looks for the long filename (eg. _argarray). To fix this, you + # need to set LFN=n in your shell's environment. + # NOTE: Setting LFN in the makefile most probably won't help you because LFN + # needs to be an environment variable. #CMP = cmp + # See the comment above for why you might want to set CMP to "env LFN=n diff" + CMP = env LFN=n diff CMP = diff #CMP = diff -c #CMP = gcmp ! # Set your "cp" and "mkdir" commands here. Note: cp must take forward # slashes. Using "command -c" may work for MS-DOS with Stewartson's shell # (but not bash) if "command=noexpand switch export" is set in extend.lst. ! # `true &&' is needed to force DJGPP Make to call the shell, or else the # conversion of `command -c' won't work. CP = cp #CP = true && command -c copy *************** *** 120,140 **** sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ ! noparms funstack clobber delarprm prdupval unix-tests: poundba fflush getlnhd pipeio1 pipeio2 strftlng pid gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ ! badargs strftime gensub gnureops reint nondec extra: regtes inftest poundba:: # The need for "basename" has been removed for MS-DOS & OS/2 systems which # lack it. ! # cp $(AWK) /tmp/gawk && $(srcdir)/poundbang $(srcdir)/poundbang >_`basename $@` $(CP) $(AWK) /tmp/gawk.exe && $(srcdir)/poundbang $(srcdir)/poundbang >_$@ ! # rm -f /tmp/gawk rm -f /tmp/gawk.exe # $(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` $(CMP) $(srcdir)/poundbang.ok _$@ && rm -f _$@ --- 132,157 ---- sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ ! noparms funstack delarprm prdupval nasty zeroflag \ ! getnr2tm getnr2tb ! ! # clobber removed unix-tests: poundba fflush getlnhd pipeio1 pipeio2 strftlng pid gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ ! badargs strftime gensub gnureops reint ! # add this back for 3.1 ! # nondec extra: regtes inftest poundba:: # The need for "basename" has been removed for MS-DOS & OS/2 systems which # lack it. ! # @cp $(AWK) /tmp/gawk && $(srcdir)/poundbang $(srcdir)/poundbang >_`basename $@` $(CP) $(AWK) /tmp/gawk.exe && $(srcdir)/poundbang $(srcdir)/poundbang >_$@ ! # @rm -f /tmp/gawk rm -f /tmp/gawk.exe # $(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` $(CMP) $(srcdir)/poundbang.ok _$@ && rm -f _$@ *************** *** 153,160 **** messages:: @echo 'If messages fails, set sh to swap to disk only (in sh.rc).' @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 ! # { $(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3; } || { test -d /dev/fd && echo IT IS OK THAT THIS TEST FAILED; } ! { $(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3; } || { test -d /dev/fd && echo OK TEST FAILED; } rm -f out1 out2 out3 argarray:: --- 170,181 ---- messages:: @echo 'If messages fails, set sh to swap to disk only (in sh.rc).' @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 ! # { $(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && \ ! # $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3; } || \ ! # { { test -d /dev/fd || test -d /proc/self/fd; } && \ ! # echo IT IS OK THAT THIS TEST FAILED; } ! { $(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && \ ! $(CMP) $(srcdir)/out3.ok out3; } || test -d /dev/fd rm -f out1 out2 out3 argarray:: *************** *** 163,168 **** --- 184,193 ---- *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ + @echo 'If argarray fails, set try setting LFN=n in your environment' + @echo "before running make. If that still doesn't work, read the" + @echo 'the comment in this makefile about setting CMP for information' + @echo 'about what may be happenning.' $(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ fstabplus:: *************** *** 193,199 **** @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' ! AWK=`pwd`/$(AWK) $(srcdir)/regtest posix:: @echo 'posix test may fail due to 1.500000e+000 not being equal to' --- 218,224 ---- @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' ! AWK=`pwd`/$(AWK) CMP="$(CMP)" $(srcdir)/regtest posix:: @echo 'posix test may fail due to 1.500000e+000 not being equal to' *************** *** 213,220 **** @echo 'without quoting the "junk/*" argument.' # @echo "This number better be 1 ->" | tr -d '\012' @echo "This number better be 1 ->" | tr -d '\012\015' ! # @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l ! @wc -l "junk/*" | $(AWK) '$$1 != 2' | wc -l # The quotes above are for people with a "wc" that doesn't support sh's "@" # argument passing. @rm -rf junk _$@ --- 238,245 ---- @echo 'without quoting the "junk/*" argument.' # @echo "This number better be 1 ->" | tr -d '\012' @echo "This number better be 1 ->" | tr -d '\012\015' ! @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l ! # @wc -l "junk/*" | $(AWK) '$$1 != 2' | wc -l # The quotes above are for people with a "wc" that doesn't support sh's "@" # argument passing. @rm -rf junk _$@ *************** *** 322,331 **** strftime:: : this test could fail on slow machines or on a second boundary, : so if it does, double check the actual results ! # @LC_ALL=C; export LC_ALL; LANC=C; export LANG; \ # date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ # This was changed for DOS to avoid the command-line length limit. ! @LC_ALL=C; export LC_ALL; LANC=C; export LANG; $(DATE) > strf @cat strf | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ print > "strftime.ok" ; \ print strftime() > "'_$@'" }' --- 347,356 ---- strftime:: : this test could fail on slow machines or on a second boundary, : so if it does, double check the actual results ! # @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ # date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ # This was changed for DOS to avoid the command-line length limit. ! @LC_ALL=C; export LC_ALL; LANG=C; export LANG; $(DATE) > strf @cat strf | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ print > "strftime.ok" ; \ print strftime() > "'_$@'" }' *************** *** 414,428 **** $(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@ getlnhd:: - # We need to set COMSPEC to a UNIX-like shell for the here doc in getlnhd.awk - # to work. - # @$(AWK) -f $(srcdir)/getlnhd.awk >_$@ @echo 'Getlnhd is set to ignore errors. However, there should not be any.' @echo 'If getlnhd fails, set sh to swap to disk only (in sh.rc).' @echo 'If it still hangs with EMX gawk type ^C, then try the test when' @echo 'not using DPMI and RSX (in particular, run outside MS-Windows).' @echo 'If it fails with MSC, run make from the test directory.' ! COMSPEC=$(SHELL) $(AWK) -f $(srcdir)/getlnhd.awk >_$@ -$(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@ backgsub:: --- 439,453 ---- $(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@ getlnhd:: @echo 'Getlnhd is set to ignore errors. However, there should not be any.' @echo 'If getlnhd fails, set sh to swap to disk only (in sh.rc).' @echo 'If it still hangs with EMX gawk type ^C, then try the test when' @echo 'not using DPMI and RSX (in particular, run outside MS-Windows).' @echo 'If it fails with MSC, run make from the test directory.' ! # In 3.0.3, COMSPEC=$(SHELL) was used for MSC and MINGW32 which do ! # not honor SHELL. ! # COMSPEC=$(SHELL) $(AWK) -f $(srcdir)/getlnhd.awk >_$@ ! @$(AWK) -f $(srcdir)/getlnhd.awk >_$@ -$(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@ backgsub:: *************** *** 509,516 **** strftlng:: @echo 'Edit test/Makefile if you use MSC6, since strftlng will fail.' @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ ! TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi $(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ --- 534,544 ---- strftlng:: @echo 'Edit test/Makefile if you use MSC6, since strftlng will fail.' @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ + # @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ + # TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ + # fi @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ ! env TZ=UTC0; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi $(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ *************** *** 547,552 **** --- 575,582 ---- pipeio2:: # This would fail were it not for the "cat" line due to DOS's ECHO command. @echo 'pipeio may fail due to the way that your tr & echo work in DOS' + @echo 'You may also need to set tr=noexpand switch if you use' + @echo "Stewartson's sh." @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @cat _$@ | $(AWK) '{ sub("ECHO is.*","",$$0); print $$0 } ' > _$@.2 # $(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ *************** *** 554,565 **** funstack:: @echo 'Expect funstack to fail with MSC DOS versions.' ! -@$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ && $(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ clobber:: ! @$(AWK) -f $(srcdir)/clobber.awk >_$@ ! $(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ ! @rm -f seq delarprm:: @$(AWK) -f $(srcdir)/delarprm.awk >_$@ --- 584,598 ---- funstack:: @echo 'Expect funstack to fail with MSC DOS versions.' ! # @$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ ! @-$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ ! # $(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ ! -$(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ clobber:: ! # @$(AWK) -f $(srcdir)/clobber.awk >_$@ ! # $(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ ! # @rm -f seq delarprm:: @$(AWK) -f $(srcdir)/delarprm.awk >_$@ *************** *** 570,585 **** $(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ nondec:: ! # This was changed for DOS to avoid the command-line length limit. ! # @if grep BITOP ../config.h | grep define > /dev/null; \ ! # then \ ! # $(AWK) -f $(srcdir)/nondec.awk >_$@; \ ! # else \ ! # cp $(srcdir)/nondec.ok _$@; \ ! # fi ! @echo "Don't worry if nondec fails" ! $(AWK) -f $(srcdir)/nondec.awk >_$@; ! -$(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ --- 603,631 ---- $(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ nondec:: ! @if grep BITOP ../config.h | grep define > /dev/null; \ ! then \ ! $(AWK) -f $(srcdir)/nondec.awk >_$@; \ ! else \ ! cp $(srcdir)/nondec.ok _$@; \ ! fi ! $(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ ! ! nasty:: ! @$(AWK) -f $(srcdir)/nasty.awk >_$@ ! $(CMP) $(srcdir)/nasty.ok _$@ && rm -f _$@ ! ! zeroflag:: ! @$(AWK) -f $(srcdir)/zeroflag.awk >_$@ ! $(CMP) $(srcdir)/zeroflag.ok _$@ && rm -f _$@ ! ! getnr2tm:: ! @$(AWK) -f $(srcdir)/getnr2tm.awk $(srcdir)/getnr2tm.in >_$@ ! $(CMP) $(srcdir)/getnr2tm.ok _$@ && rm -f _$@ ! ! getnr2tb:: ! @$(AWK) -f $(srcdir)/getnr2tb.awk $(srcdir)/getnr2tb.in >_$@ ! $(CMP) $(srcdir)/getnr2tb.ok _$@ && rm -f _$@ clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ diff -crN gawk-3.0.3/pc/config.h gawk-3.0.4/pc/config.h *** gawk-3.0.3/pc/config.h Thu May 15 04:36:34 1997 --- gawk-3.0.4/pc/config.h Tue Jun 1 01:20:45 1999 *************** *** 5,11 **** */ /* ! * Copyright (C) 1995-1997 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. --- 5,11 ---- */ /* ! * Copyright (C) 1995-1999 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. *************** *** 128,135 **** #define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ #define SPRINTF_RET int /* return type of sprintf */ ! /* #define BITOPS 1 */ /* bitwise ops (undocumented feature) */ ! /* #define NONDECDATA 1 */ /* non-decimal input data (undocumented feature) */ /* Define if you have the fmod function. */ #define HAVE_FMOD 1 --- 128,135 ---- #define REGEX_MALLOC 1 /* use malloc instead of alloca in regex.c */ #define SPRINTF_RET int /* return type of sprintf */ ! /* #undef BITOPS */ /* bitwise ops (undocumented feature) */ ! /* #undef NONDECDATA */ /* non-decimal input data (undocumented feature) */ /* Define if you have the fmod function. */ #define HAVE_FMOD 1 *************** *** 206,211 **** --- 206,217 ---- #endif #endif + # define HAVE_POPEN_H + + #if (defined(_MSC_VER) && defined(MSDOS)) || defined(__MINGW32__) + # define system(s) os_system(s) + #endif + #if defined (_MSC_VER) || defined(__EMX__) #define strcasecmp stricmp #define strncasecmp strnicmp *************** *** 213,220 **** --- 219,237 ---- #if defined(DJGPP) # define HAVE_LIMITS_H + # undef HAVE_POPEN_H #endif #if defined(__WIN32__) && defined(__CRTRSXNT__) #include + #endif + + /* For vcWin32 */ + #if defined(WIN32) && defined(_MSC_VER) + #define alloca _alloca + #define system(s) os_system(s) + #endif + + #if defined(__MINGW32__) + #undef HAVE_SYS_PARAM_H #endif diff -crN gawk-3.0.3/pc/getid.c gawk-3.0.4/pc/getid.c *** gawk-3.0.3/pc/getid.c Mon Sep 4 03:46:04 1995 --- gawk-3.0.4/pc/getid.c Sun Nov 15 21:04:36 1998 *************** *** 1,4 **** ! #ifdef _MSC_VER #ifdef OS2 # define INCL_DOSPROCESS --- 1,4 ---- ! #if defined(_MSC_VER) || defined(__MINGW32__) #ifdef OS2 # define INCL_DOSPROCESS *************** *** 47,53 **** return (0); } ! #if defined(_MSC_VER) || defined(__GO32__) int getppid(void) { #ifdef OS2 --- 47,53 ---- return (0); } ! #if defined(_MSC_VER) || defined(__GO32__) || defined(__MINGW32__) int getppid(void) { #ifdef OS2 diff -crN gawk-3.0.3/pc/include/process.h gawk-3.0.4/pc/include/process.h *** gawk-3.0.3/pc/include/process.h Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/pc/include/process.h Sun Jun 27 12:24:56 1999 *************** *** 0 **** --- 1,3 ---- + #undef __STDC__ + #include + #define __STDC__ 1 diff -crN gawk-3.0.3/pc/popen.c gawk-3.0.4/pc/popen.c *** gawk-3.0.3/pc/popen.c Fri Dec 15 18:45:36 1995 --- gawk-3.0.4/pc/popen.c Tue Jun 1 01:02:54 1999 *************** *** 1,4 **** ! #include "popen.h" #include #include #include --- 1,4 ---- ! #include #include #include #include *************** *** 11,16 **** --- 11,21 ---- #endif #endif + #if defined(WIN32) && defined(_MSC_VER) + #define popen _popen + #define pclose _pclose + #endif + #ifndef _NFILE #define _NFILE 40 #endif *************** *** 24,29 **** --- 29,149 ---- pipemode pmode; } pipes[_NFILE]; + + /* + * For systems where system() and popen() do not follow SHELL: + * 1. Write command to temp file. Temp filename must have slashes + * compatible with SHELL (if set) or COMSPEC. + * 2. Convert slashes in SHELL (if present) to be compatible with COMSPEC. + * Currently, only MSC (running under DOS) and MINGW versions are managed. + */ + + #if defined(_MSC_VER) || defined(__MINGW32__) + + static int + unixshell(p) + char *p; + { + static char *shell[] = {"sh", "bash", "csh", "tcsh", "sh32", "sh16", "ksh", NULL}; + char **shellp = shell, *s, *q; + + if (p == NULL) return (0); + s = p = strdup(p); + if ((q = strrchr(p, '\\')) != NULL) + p = q + 1; + if ((q = strrchr(p, '/')) != NULL) + p = q + 1; + if ((q = strchr(p, '.')) != NULL) + *q = '\0'; + strlwr(p); + do { + if (strcmp(*shellp, p) == 0) break; + } while (*++shellp); + free(s); + return(*shellp ? 1 : 0); + } + + static char * + slashify(p, s) + char *p, *s; + { + if (unixshell(s)) + while (s = strchr(p, '\\')) *s = '/'; + else + while (s = strchr(p, '/')) *s = '\\'; + return(p); + } + + static char * + scriptify(command) + char *command; + { + FILE *fp; + char *cmd, *name, *s, *p; + int i; + + if((name = tempnam(".", "pip")) == NULL) return(NULL); + p = getenv("COMSPEC"); s = getenv("SHELL"); + cmd = malloc(strlen(name) + (s ? strlen(s) : 0) + 9); *cmd = '\0'; + if (s) { + slashify(strcpy(cmd, s), p); + p = s; + } + slashify(name, p); + if (! unixshell(p)) { + realloc(name, strlen(name) + 5); + strcat(name, ".bat"); + } + if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/'); + strcpy(p = cmd + strlen(cmd), name); free(name); + + i = strlen(command); + if ( ((fp = fopen(p, "wb")) == NULL) || (fwrite(command, 1, i, fp) < i) + || (fputc('\n', fp) == EOF)) { + cmd = NULL; + } + if (fp) fclose(fp); + return(cmd); + } + + static void + unlink_and_free(cmd) + char *cmd; + { + char *s; + + if (s = strrchr(cmd, ' ')) + s++; + else + s = cmd; + unlink(s); free(cmd); + } + + int + os_system(cmd) + char *cmd; + { + char *s; + int i; + + #if defined(OS2) + if (_osmode == OS2_MODE) + return(system(cmd)); + #endif + + if ((cmd = scriptify(cmd)) == NULL) return(1); + if (s = getenv("SHELL")) + i = spawnlp(P_WAIT, s, s, cmd + strlen(s), NULL); + else + i = system(cmd); + unlink_and_free(cmd); + return(i); + } + #else + #define os_system(cmd) system(cmd) + #endif + + FILE * os_popen( char *command, char *mode ) { FILE *current; *************** *** 45,50 **** --- 165,179 ---- curmode = writing; else return NULL; + + #if defined(__MINGW32__) || (defined(_MSC_VER) && defined(WIN32)) + current = popen(command = scriptify(command), mode); + cur = fileno(current); + pipes[cur].pmode = curmode; + pipes[cur].command = command; + return(current); + #endif + /* ** get a name to use. */ *************** *** 55,65 **** ** output. */ if(curmode == reading) { if ((cur = dup(fileno(stdout))) == -1) return NULL; if ((current = freopen(name, "w", stdout)) == NULL) return NULL; ! system(command); if (dup2(cur, fileno(stdout)) == -1) return NULL; close(cur); --- 184,195 ---- ** output. */ if(curmode == reading) { + FILE *fp; if ((cur = dup(fileno(stdout))) == -1) return NULL; if ((current = freopen(name, "w", stdout)) == NULL) return NULL; ! os_system(command); if (dup2(cur, fileno(stdout)) == -1) return NULL; close(cur); *************** *** 85,90 **** --- 215,227 ---- return(pclose(current)); #endif + #if defined(__MINGW32__) || (defined(_MSC_VER) && defined(WIN32)) + rval = pclose(current); + pipes[cur].pmode = unopened; + unlink_and_free(pipes[cur].command); + return rval; + #endif + /* ** check for an open file. */ *************** *** 106,112 **** rval = -1; if ((fd = dup(fileno(stdin))) != -1) { if (current = freopen(pipes[cur].name, "r", stdin)) { ! rval = system(pipes[cur].command); fclose(current); if (dup2(fd, fileno(stdin)) == -1) rval = -1; close(fd); --- 243,249 ---- rval = -1; if ((fd = dup(fileno(stdin))) != -1) { if (current = freopen(pipes[cur].name, "r", stdin)) { ! rval = os_system(pipes[cur].command); fclose(current); if (dup2(fd, fileno(stdin)) == -1) rval = -1; close(fd); diff -crN gawk-3.0.3/pc/popen.h gawk-3.0.4/pc/popen.h *** gawk-3.0.3/pc/popen.h Fri Aug 20 20:53:26 1993 --- gawk-3.0.4/pc/popen.h Tue Jun 1 01:02:12 1999 *************** *** 1,9 **** ! /* ! ** popen.h -- prototypes for pipe functions ! */ ! #if !defined(FILE) ! #include ! #endif ! ! extern FILE *os_popen( char *, char * ); ! extern int os_pclose( FILE * ); --- 1,21 ---- ! /* ! ** popen.h -- prototypes for pipe functions ! */ ! ! #if defined (OS2) && !defined(MSDOS) /* OS/2, but not family mode */ ! # if defined (_MSC_VER) ! # define popen(c, m) _popen(c, m) ! # define pclose(f) _pclose(f) ! # endif ! #else ! # if !defined (__GO32__) ! # if defined (popen) ! # undef popen ! # undef pclose ! # endif ! # define popen(c, m) os_popen(c, m) ! # define pclose(f) os_pclose(f) ! extern FILE *os_popen( char *, char * ); ! extern int os_pclose( FILE * ); ! # endif ! #endif diff -crN gawk-3.0.3/posix/ChangeLog gawk-3.0.4/posix/ChangeLog *** gawk-3.0.3/posix/ChangeLog Thu May 15 19:50:47 1997 --- gawk-3.0.4/posix/ChangeLog Wed Jun 30 16:15:24 1999 *************** *** 1,3 **** --- 1,7 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/regex.c gawk-3.0.4/regex.c *** gawk-3.0.3/regex.c Tue May 13 19:41:04 1997 --- gawk-3.0.4/regex.c Wed Apr 28 17:15:05 1999 *************** *** 3,9 **** (Implements POSIX draft P1003.2/D11.2, except for some of the internationalization features.) ! Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by --- 3,9 ---- (Implements POSIX draft P1003.2/D11.2, except for some of the internationalization features.) ! Copyright (C) 1993,1994,1995,1996,1997,1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by *************** *** 124,138 **** #define SWITCH_ENUM_CAST(x) (x) #endif #ifdef SYNTAX_TABLE extern char *re_syntax_table; #else /* not SYNTAX_TABLE */ - /* How many characters in the character set. */ - #define CHAR_SET_SIZE 256 - static char re_syntax_table[CHAR_SET_SIZE]; static void --- 124,138 ---- #define SWITCH_ENUM_CAST(x) (x) #endif + /* How many characters in the character set. */ + #define CHAR_SET_SIZE 256 + #ifdef SYNTAX_TABLE extern char *re_syntax_table; #else /* not SYNTAX_TABLE */ static char re_syntax_table[CHAR_SET_SIZE]; static void *************** *** 3077,3084 **** #ifndef REGEX_MALLOC char *destination; #endif - /* We don't push any register information onto the failure stack. */ - unsigned num_regs = 0; register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; --- 3077,3082 ---- *************** *** 5511,5516 **** --- 5509,5517 ---- It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ + #ifdef __APPLE__ + __private_extern__ + #endif int regcomp (preg, pattern, cflags) regex_t *preg; *************** *** 5589,5594 **** --- 5590,5598 ---- We return 0 if we find a match and REG_NOMATCH if not. */ + #ifdef __APPLE__ + __private_extern__ + #endif int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *preg; *************** *** 5694,5699 **** --- 5698,5706 ---- /* Free dynamically allocated space used by PREG. */ + #ifdef __APPLE__ + __private_extern__ + #endif void regfree (preg) regex_t *preg; diff -crN gawk-3.0.3/stamp-h.in gawk-3.0.4/stamp-h.in *** gawk-3.0.3/stamp-h.in Wed May 14 03:58:45 1997 --- gawk-3.0.4/stamp-h.in Wed Jun 9 11:37:17 1999 *************** *** 1 **** ! Tue May 13 20:58:45 EDT 1997 --- 1 ---- ! Wed Jun 9 11:37:17 IDT 1999 diff -crN gawk-3.0.3/test/ChangeLog gawk-3.0.4/test/ChangeLog *** gawk-3.0.3/test/ChangeLog Thu May 15 19:50:54 1997 --- gawk-3.0.4/test/ChangeLog Wed Jun 30 16:16:02 1999 *************** *** 1,3 **** --- 1,47 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + + Tue May 25 16:37:50 1999 Arnold D. Robbins + + * Makefile.in (printf1): new test case. + * printf1.awk, printf1.ok: new files. + + Wed May 19 15:32:09 1999 Arnold D. Robbins + + * reg/*: moved exp and log tests to new `Obsolete' directory; they + would only succeed under SunOS 4.x. + + Mon May 3 11:53:33 1999 Arnold D. Robbins + + * Makefile.in (gawk.extensions): removed `nondec' until the + associated features get documented in 3.1. + + Tue Nov 3 16:46:39 1998 Arnold D. Robbins + + * Makefile.in (getnr2tm, getnr2tb): new test cases. + * getnr2tm.awk, getnr2tm.in, getnr2tm.ok: new files. + * getnr2tb.awk, getnr2tb.in, getnr2tb.ok: new files. + + Sun Nov 1 13:20:08 1998 Arnold D. Robbins + + * Makefile.in (zeroflag): new test case. + * zeroflag.awk, zeroflag.ok: new files + + Wed Oct 28 18:44:19 1998 Arnold D. Robbins + + * Makefile.in (nasty): new test case. + * nasty.awk, nasty.ok: new files + + Sun Nov 16 20:08:59 1997 Arnold D. Robbins + + * gsubtest.awk, gsubtest.ok: fix for count of matches in gsub + from Geert.Debyser@esat.kuleuven.ac.be. + + Sun Nov 16 19:54:50 1997 Arnold D. Robbins + + * Makefile.in (strftime): fix a typo (LANC -> LANG). + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/test/Makefile.in gawk-3.0.4/test/Makefile.in *** gawk-3.0.3/test/Makefile.in Tue May 13 19:53:25 1997 --- gawk-3.0.4/test/Makefile.in Tue May 25 16:37:41 1999 *************** *** 1,6 **** # Makefile for GNU Awk test suite. # ! # Copyright (C) 1988-1997 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. --- 1,6 ---- # Makefile for GNU Awk test suite. # ! # Copyright (C) 1988-1998 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. *************** *** 37,48 **** sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ ! noparms funstack clobber delarprm prdupval unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ ! badargs strftime gensub gnureops reint nondec extra: regtest inftest --- 37,51 ---- sprintfc backgsub tweakfld clsflnam mmap8k fnarray \ dynlj substr eofsplit prt1eval gsubasgn prtoeval gsubtest splitwht \ back89 tradanch nlfldsep splitvar intest nfldstr nors fnarydel \ ! noparms funstack clobber delarprm prdupval nasty zeroflag \ ! getnr2tm getnr2tb printf1 unix-tests: poundbang fflush getlnhd pipeio1 pipeio2 strftlng pid gawk.extensions: fieldwdth ignrcase posix manyfiles igncfs argtest \ ! badargs strftime gensub gnureops reint ! # add this back for 3.1 ! # nondec extra: regtest inftest *************** *** 211,217 **** strftime:: : this test could fail on slow machines or on a second boundary, : so if it does, double check the actual results ! @LC_ALL=C; export LC_ALL; LANC=C; export LANG; \ date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ print > "strftime.ok" ; \ print strftime() > "'_$@'" }' --- 214,220 ---- strftime:: : this test could fail on slow machines or on a second boundary, : so if it does, double check the actual results ! @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ date | $(AWK) '{ $$3 = sprintf("%02d", $$3 + 0) ; \ print > "strftime.ok" ; \ print strftime() > "'_$@'" }' *************** *** 441,446 **** --- 444,469 ---- cp $(srcdir)/nondec.ok _$@; \ fi $(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ + + nasty:: + @$(AWK) -f $(srcdir)/nasty.awk >_$@ + $(CMP) $(srcdir)/nasty.ok _$@ && rm -f _$@ + + zeroflag:: + @$(AWK) -f $(srcdir)/zeroflag.awk >_$@ + $(CMP) $(srcdir)/zeroflag.ok _$@ && rm -f _$@ + + getnr2tm:: + @$(AWK) -f $(srcdir)/getnr2tm.awk $(srcdir)/getnr2tm.in >_$@ + $(CMP) $(srcdir)/getnr2tm.ok _$@ && rm -f _$@ + + getnr2tb:: + @$(AWK) -f $(srcdir)/getnr2tb.awk $(srcdir)/getnr2tb.in >_$@ + $(CMP) $(srcdir)/getnr2tb.ok _$@ && rm -f _$@ + + printf1:: + @$(AWK) -f $(srcdir)/printf1.awk >_$@ + $(CMP) $(srcdir)/printf1.ok _$@ && rm -f _$@ clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ diff -crN gawk-3.0.3/test/badargs.ok gawk-3.0.4/test/badargs.ok *** gawk-3.0.3/test/badargs.ok Thu Nov 7 16:14:43 1996 --- gawk-3.0.4/test/badargs.ok Tue Sep 8 20:47:26 1998 *************** *** 19,23 **** -W usage --usage -W version --version ! Report bugs to bug-gnu-utils@prep.ai.mit.edu, ! with a Cc: to arnold@gnu.ai.mit.edu --- 19,23 ---- -W usage --usage -W version --version ! Report bugs to bug-gnu-utils@gnu.org, ! with a Cc: to arnold@gnu.org diff -crN gawk-3.0.3/test/getnr2tb.awk gawk-3.0.4/test/getnr2tb.awk *** gawk-3.0.3/test/getnr2tb.awk Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tb.awk Tue Nov 3 17:20:39 1998 *************** *** 0 **** --- 1,111 ---- + #From vp@dmat.uevora.pt Thu Jun 18 09:10 EDT 1998 + #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id JAA23649 for ; Thu, 18 Jun 1998 09:10:54 -0400 (EDT) + #Received: from khromeleque.dmat.uevora.pt by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id JAA21732 for ; Thu, 18 Jun 1998 09:11:19 -0400 + #Received: from khromeleque.dmat.uevora.pt (vp@localhost [127.0.0.1]) + # by khromeleque.dmat.uevora.pt (8.8.8/8.8.8/Debian/GNU) with ESMTP id OAA11817 + # for ; Thu, 18 Jun 1998 14:13:57 +0100 + #Message-Id: <199806181313.OAA11817@khromeleque.dmat.uevora.pt> + #To: arnold@gnu.org + #Subject: concatenation bug in gawk 3.0.3 + #Date: Thu, 18 Jun 1998 14:13:57 +0200 + #From: Vasco Pedro + #Content-Type: text + #Content-Length: 2285 + #Status: RO + # + #Hi, + # + #The gawk program '{print NR " " 10/NR}' will print: + # + #1 10 + #5 5 + #3 3.33333 + #2 2.5 + #2 2 + #1 1.66667 + # + #instead of the correct: + # + #1 10 + #2 5 + #3 3.33333 + #4 2.5 + #5 2 + #6 1.66667 + # + #You'll notice, on the incorrect output, that the first column is + #the first digit of the second. + # + #I think the problem comes from the way builtin variables are handled. + #Since the items to be concatenated are processed in reverse order and + #the return value of tree_eval(``NR'') is a pointer to the value part + #of `NR_node', the `unref()' of `NR_node' due to its second occurrence + #will leave a dangling pointer in `strlist'. The reason that it doesn't + #reuse the freed space with objects of the same type. (Using Electric + #Fence with EF_PROTECT_FREE set confirms that freed space is being + #accessed.) + # + #The enclosed patch (hack would be a better word to describe it) is + #all I could come up with. With it installed, things seem to work ok, + #but I doubt this is the correct way to do it. (If I treated the + #case for `Node_field_spec' as the I did others, `make check' would + #fail in several places.) + # + #Regards, + #vasco + # + #*** eval.c~ Tue May 6 21:39:55 1997 + #--- eval.c Thu Jun 18 13:39:25 1998 + #*************** + #*** 685,697 **** + # return func_call(tree->rnode, tree->lnode); + # + # /* unary operations */ + # case Node_NR: + # case Node_FNR: + # case Node_NF: + # case Node_FIELDWIDTHS: + # case Node_FS: + # case Node_RS: + #- case Node_field_spec: + # case Node_subscript: + # case Node_IGNORECASE: + # case Node_OFS: + #--- 685,700 ---- + # return func_call(tree->rnode, tree->lnode); + # + # /* unary operations */ + #+ case Node_field_spec: + #+ lhs = get_lhs(tree, (Func_ptr *) NULL); + #+ return *lhs; + #+ + # case Node_NR: + # case Node_FNR: + # case Node_NF: + # case Node_FIELDWIDTHS: + # case Node_FS: + # case Node_RS: + # case Node_subscript: + # case Node_IGNORECASE: + # case Node_OFS: + #*************** + #*** 699,705 **** + # case Node_OFMT: + # case Node_CONVFMT: + # lhs = get_lhs(tree, (Func_ptr *) NULL); + #! return *lhs; + # + # case Node_var_array: + # fatal("attempt to use array `%s' in a scalar context", + #--- 702,710 ---- + # case Node_OFMT: + # case Node_CONVFMT: + # lhs = get_lhs(tree, (Func_ptr *) NULL); + #! r = dupnode(*lhs); + #! r->flags |= TEMP; + #! return r; + # + # case Node_var_array: + # fatal("attempt to use array `%s' in a scalar context", + # + { print NR " " 10/NR } diff -crN gawk-3.0.3/test/getnr2tb.in gawk-3.0.4/test/getnr2tb.in *** gawk-3.0.3/test/getnr2tb.in Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tb.in Tue Nov 3 17:18:57 1998 *************** *** 0 **** --- 1,6 ---- + line 1 + line 2 + line 3 + line 4 + line 5 + line 6 diff -crN gawk-3.0.3/test/getnr2tb.ok gawk-3.0.4/test/getnr2tb.ok *** gawk-3.0.3/test/getnr2tb.ok Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tb.ok Tue Nov 3 17:20:56 1998 *************** *** 0 **** --- 1,6 ---- + 1 10 + 2 5 + 3 3.33333 + 4 2.5 + 5 2 + 6 1.66667 diff -crN gawk-3.0.3/test/getnr2tm.awk gawk-3.0.4/test/getnr2tm.awk *** gawk-3.0.3/test/getnr2tm.awk Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tm.awk Tue Nov 3 16:44:12 1998 *************** *** 0 **** --- 1,75 ---- + #From dhw@gamgee.acad.emich.edu Sat Oct 31 22:54:07 1998 + #Return-Path: + #Received: from cssun.mathcs.emory.edu (cssun.mathcs.emory.edu [170.140.150.1]) + # by amx.netvision.net.il (8.9.0.Beta5/8.8.6) with ESMTP id HAA08891 + # for ; Sat, 31 Oct 1998 07:14:07 +0200 (IST) + #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id AAA14947 for ; Sat, 31 Oct 1998 00:14:32 -0500 (EST) + #Received: from gamgee.acad.emich.edu (gamgee.acad.emich.edu [164.76.102.76]) + # by mescaline.gnu.org (8.9.1a/8.9.1) with SMTP id AAA20645 + # for ; Sat, 31 Oct 1998 00:17:54 -0500 + #Received: by gamgee.acad.emich.edu (Smail3.1.29.1 #57) + # id m0zZUKY-000IDSC; Sat, 31 Oct 98 00:16 CST + #Message-Id: + #Date: Sat, 31 Oct 98 00:16 CST + #From: dhw@gamgee.acad.emich.edu (David H. West) + #To: bug-gnu-utils@gnu.org + #Subject: gawk 3.0.3 bug report + #Cc: arnold@gnu.org + #X-UIDL: 7474b825cff989adf38f13883d84fdd7 + #Status: RO + # + #gawk version: 3.03 + #System used: Linux, kernel 2.0.28, libc 5.4.33, AMD K5PR133 (i586 clone) + #Remark: There seems to be at least one bug shown by the demo below. + # There may also be a Dark Corner involving the value of NR in an + # END block, a topic on which the info file is silent. In gawk + # 3.0.3, NR often seems to have the least-surprise value in an + # END block, but sometimes it doesn't - see example below. + #Problem descr: the log below shows a case where: + # a) (this may be a red herring) the output of the gawk script + # is different depending on whether its input file is named on + # the command line or catted to stdin, without any use of the + # legitimate means which could produce this effect. + # b) NR is clearly getting clobbered; I have tried to simplify + # the 19-line script "awkerr1" below, but seemingly unrelated + # changes, like shortening constant strings which appear only in + # print statements, or removing unexecuted or irrelevant code, + # cause the clobbering to go away. Some previous (larger) + # versions of this code would clobber NR also when reading from + # stdin, but I thought you'd prefer a shorter example :-). + #Reproduce-By: using the gawk script "awkerr1", the contents of + # which appear in the transcript below as the output of the + # command "cat awkerr1". Comments following # were added + # to the transcript later as explanation. + #---------------------------------------------- Script started on Fri + #Oct 30 20:04:16 1998 chipmunk:/ram0# ls -l a1 awkerr1 -rw-r--r-- 1 + #root root 2 Oct 30 18:42 a1 -rwxr-xr-x 1 root root + #389 Oct 30 19:54 awkerr1 chipmunk:/ram0# cat a1 #a1 contains + #one printable char and a newline a chipmunk:/ram0# od -c xc a1 + #0000000 0a61 + # a \n + #0000002 chipmunk:/ram0# cat a1 | awkerr1 #no surprises here + #1 lines in 1 sec: 1 lines/sec; nlines=1 chipmunk:/ram0# awkerr1 a1 È + #lines in 1 sec: 1 lines/sec; nlines=1 #?! first char is an uppercase + #E-grave chipmunk:/ram0# awkerr1 a1 | od -N1 -xc 0000000 00c8 + # 310 \0 + #0000001 chipmunk:/ram0# cat awkerr1 #the apparent ^M's are not + #actually in the file + #!/usr/bin/awk -f + function process(w) { + if(w in ws) { + printf " : found\n"; lc[p " " w]++; rc[w " " n]++; } + } + BEGIN {IGNORECASE=1; + } + /^/ {if(NR % 10 ==0)print "processing line " NR; + process($1); nlines++; + } + END {p=w; w=n; n=""; + if(w)process(w); t=1; print NR " lines in " t " sec: " NR+0 " lines/sec; nlines=" nlines; + } + #chipmunk:/ram0# exit Script done on Fri Oct 30 20:07:31 1998 + #--------------------------------------------- + # + #-David West dhw@gamgee.acad.emich.edu + # diff -crN gawk-3.0.3/test/getnr2tm.in gawk-3.0.4/test/getnr2tm.in *** gawk-3.0.3/test/getnr2tm.in Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tm.in Tue Nov 3 16:42:47 1998 *************** *** 0 **** --- 1 ---- + a diff -crN gawk-3.0.3/test/getnr2tm.ok gawk-3.0.4/test/getnr2tm.ok *** gawk-3.0.3/test/getnr2tm.ok Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/getnr2tm.ok Tue Nov 3 16:44:14 1998 *************** *** 0 **** --- 1 ---- + 1 lines in 1 sec: 1 lines/sec; nlines=1 diff -crN gawk-3.0.3/test/gsubtest.awk gawk-3.0.4/test/gsubtest.awk *** gawk-3.0.3/test/gsubtest.awk Mon Sep 30 05:08:59 1996 --- gawk-3.0.4/test/gsubtest.awk Wed Jan 7 11:40:53 1998 *************** *** 1,8 **** BEGIN { ! str = "abc"; gsub("b+", "FOO", str); print str ! str = "abc"; gsub("x*", "X", str); print str ! str = "abc"; gsub("b*", "X", str); print str ! str = "abc"; gsub("c", "X", str); print str ! str = "abc"; gsub("c+", "X", str); print str ! str = "abc"; gsub("x*$", "X", str); print str } --- 1,8 ---- BEGIN { ! str = "abc"; print gsub("b+", "FOO", str), str ! str = "abc"; print gsub("x*", "X", str), str ! str = "abc"; print gsub("b*", "X", str), str ! str = "abc"; print gsub("c", "X", str), str ! str = "abc"; print gsub("c+", "X", str), str ! str = "abc"; print gsub("x*$", "X", str), str } diff -crN gawk-3.0.3/test/gsubtest.ok gawk-3.0.4/test/gsubtest.ok *** gawk-3.0.3/test/gsubtest.ok Mon Sep 30 05:09:46 1996 --- gawk-3.0.4/test/gsubtest.ok Wed Jan 7 11:41:43 1998 *************** *** 1,6 **** ! aFOOc ! XaXbXcX ! XaXcX ! abX ! abX ! abcX --- 1,6 ---- ! 1 aFOOc ! 4 XaXbXcX ! 3 XaXcX ! 1 abX ! 1 abX ! 1 abcX diff -crN gawk-3.0.3/test/nasty.awk gawk-3.0.4/test/nasty.awk *** gawk-3.0.3/test/nasty.awk Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/nasty.awk Wed Oct 28 18:42:39 1998 *************** *** 0 **** --- 1,92 ---- + #From hankedr@manatee.dms.auburn.edu Tue Oct 13 22:15:59 1998 + #Return-Path: + #Received: from cssun.mathcs.emory.edu (cssun.mathcs.emory.edu [170.140.150.1]) + # by dmx.netvision.net.il (8.9.0.Beta5/8.8.6) with ESMTP id PAA03924 + # for ; Tue, 13 Oct 1998 15:32:13 +0200 (IST) + #Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@mescaline.gnu.org [158.121.106.21]) by cssun.mathcs.emory.edu (8.7.5/8.6.9-940818.01cssun) with ESMTP id KAA11644 for ; Tue, 13 Oct 1998 10:22:32 -0400 (EDT) + #Received: from manatee.dms.auburn.edu (manatee.dms.auburn.edu [131.204.53.104]) + # by mescaline.gnu.org (8.9.1a/8.9.1) with ESMTP id KAA03250 + # for ; Tue, 13 Oct 1998 10:25:32 -0400 + #Received: (from hankedr@localhost) + # by manatee.dms.auburn.edu (8.9.1a/8.9.1) id JAA13348; + # Tue, 13 Oct 1998 09:22:29 -0500 (CDT) + #Date: Tue, 13 Oct 1998 09:22:29 -0500 (CDT) + #Message-Id: <199810131422.JAA13348@manatee.dms.auburn.edu> + #From: Darrel Hankerson + #To: arnold@gnu.org + #In-reply-to: <199810131313.QAA31784@alpha.netvision.net.il> (message from + # Aharon Robbins on Tue, 13 Oct 1998 16:10:36 +0200) + #Subject: Re: full text of bug report? + #Mime-Version: 1.0 + #Content-Type: text/plain; charset=US-ASCII + #X-UIDL: bf3fce492dad4ab030c561e7b2f27d0a + #Status: RO + # + # Do you have the full text of the a = a "\n" f() bug report? + # I can't find it.... I'm not sure there really is a bug. + # + #Yes, see below. + # + #His example has unnecessary fragments (in particular, the use of + #gensub is irrelevant). As I wrote to you earlier, the interesting + #question for me is: + # + # Is the concatenation result undefined? If the result is defined or + # implementation-dependent, then gawk has a bug. + # + # + #=== Original report ===================================================== + #From: Attila Torcsvari + #To: "'bug-gnu-utils@prep.ai.mit.edu'" + #Subject: gawk 3.0.3 bug + #Date: Thu, 17 Sep 1998 18:12:13 +0200 + #MIME-Version: 1.0 + #Content-Transfer-Encoding: 7bit + #Resent-From: bug-gnu-utils@gnu.org + #X-Mailing-List: archive/latest/3396 + #X-Loop: bug-gnu-utils@gnu.org + #Precedence: list + #Resent-Sender: bug-gnu-utils-request@gnu.org + #Content-Transfer-Encoding: 7bit + #Content-Type: text/plain; charset="us-ascii" + #Content-Length: 618 + # + #Bug-gnuers, + #please pass it to the responsible. + # + #The following generates something interesting: + # + BEGIN{ + a="aaaaa" + a=a a #10 + a=a a #20 + a=a a #40 + a=a a #80 + a=a a #160 + a=a a # i.e. a is long enough + + a=a"\n"f() # this causes the trouble + print a # guess the result + } + + function f() + { + #print "a before: ", a + #a=gensub("a","123,","g",a) # 'a' will be just a bit longer (4 times, but still should fit: 4*160=640) + gsub(/a/, "123", a) + #print "a after: ", a + return "X" + } + # + #Possible reason: + #during f the a is modified, + #it can be even freed, because gensub modifies its size + #the printout contains trash. + # + #Used version: VC compiled WinNT 32 bit Intel. + # + #Regards, + # + #Attila Torcsvari + #Arcanum Development + # diff -crN gawk-3.0.3/test/nasty.ok gawk-3.0.4/test/nasty.ok *** gawk-3.0.3/test/nasty.ok Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/nasty.ok Wed Oct 28 18:43:21 1998 *************** *** 0 **** --- 1,2 ---- + 123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123123 + X diff -crN gawk-3.0.3/test/printf1.awk gawk-3.0.4/test/printf1.awk *** gawk-3.0.3/test/printf1.awk Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/printf1.awk Tue May 25 16:48:21 1999 *************** *** 0 **** --- 1,19 ---- + # Tue May 25 16:36:16 IDT 1999 + # + # Test cases based on email from Andreas Schwab, schwab@gnu.org + + BEGIN { + fmt[1] = "%8.5d"; data[1] = 100 + fmt[2] = "%#o"; data[2] = 0 + fmt[3] = "%#.1o"; data[3] = 0 + fmt[4] = "%#.0o"; data[4] = 0 + fmt[5] = "%#x"; data[5] = 0 + fmt[6] = "%.0d"; data[6] = 0 + fmt[7] = "%5.0d"; data[7] = 0 + + for (i = 1; i <= 7; i++) { + format = "%s, %d --- |" fmt[i] "|\n" + printf(format, fmt[i], data[i], data[i]) + } + + } diff -crN gawk-3.0.3/test/printf1.ok gawk-3.0.4/test/printf1.ok *** gawk-3.0.3/test/printf1.ok Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/printf1.ok Tue May 25 17:04:38 1999 *************** *** 0 **** --- 1,7 ---- + %8.5d, 100 --- | 00100| + %#o, 0 --- |0| + %#.1o, 0 --- |0| + %#.0o, 0 --- |0| + %#x, 0 --- |0| + %.0d, 0 --- || + %5.0d, 0 --- | | diff -crN gawk-3.0.3/test/zeroflag.awk gawk-3.0.4/test/zeroflag.awk *** gawk-3.0.3/test/zeroflag.awk Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/zeroflag.awk Sun Nov 1 13:18:41 1998 *************** *** 0 **** --- 1 ---- + BEGIN { printf("%2.1d---%02.1d\n", 2, 2) } diff -crN gawk-3.0.3/test/zeroflag.ok gawk-3.0.4/test/zeroflag.ok *** gawk-3.0.3/test/zeroflag.ok Thu Jan 1 02:00:00 1970 --- gawk-3.0.4/test/zeroflag.ok Sun Nov 1 13:18:53 1998 *************** *** 0 **** --- 1 ---- + 2--- 2 diff -crN gawk-3.0.3/vms/ChangeLog gawk-3.0.4/vms/ChangeLog *** gawk-3.0.3/vms/ChangeLog Thu May 15 19:51:00 1997 --- gawk-3.0.4/vms/ChangeLog Wed Jun 30 16:15:20 1999 *************** *** 1,3 **** --- 1,20 ---- + Wed Jun 30 16:14:36 1999 Arnold D. Robbins + + * Release 3.0.4: Release tar file made. This time for sure. + + Fri May 7 20:29:04 1999 Pat Rankin + + * vms-conf.h (__CRTL_VER): Add same override as __VMS_VER. + + Wed May 5 19:10:15 1999 Pat Rankin + + * vmstest.com (nasty, zeroflag, getnr2tm, getnr2tb): New tests. + + Wed Nov 25 17:24:26 1998 Pat Rankin + + * vmstest.com (vms_tests): New general target. + (vms_io1): New specific test. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -crN gawk-3.0.3/vms/descrip.mms gawk-3.0.4/vms/descrip.mms *** gawk-3.0.3/vms/descrip.mms Tue Apr 15 13:19:58 1997 --- gawk-3.0.4/vms/descrip.mms Sun May 9 14:22:47 1999 *************** *** 129,135 **** # Release of gawk REL=3.0 ! PATCHLVL=3 # generic target all : gawk --- 129,135 ---- # Release of gawk REL=3.0 ! PATCHLVL=4 # generic target all : gawk diff -crN gawk-3.0.3/vms/gawk.hlp gawk-3.0.4/vms/gawk.hlp *** gawk-3.0.3/vms/gawk.hlp Mon May 5 14:36:07 1997 --- gawk-3.0.4/vms/gawk.hlp Wed Apr 28 16:50:17 1999 *************** *** 1084,1092 **** published by SSC and the FSF (http://www.ssc.com). Source text for it is present in the file GAWK.TEXI. A postscript ! version is available via anonymous FTP from host prep.ai.mit.edu in ! directory pub/gnu/, file gawk-{version}-doc.tar.gz where {version} ! would be the current version number, such as 3.0.3. Another source of documentation is "The AWK Programming Language" by Aho, Weinberger, and Kernighan (1988), published by Addison-Wesley. --- 1084,1092 ---- published by SSC and the FSF (http://www.ssc.com). Source text for it is present in the file GAWK.TEXI. A postscript ! version is available via anonymous FTP from host gnudist.gnu.org in ! directory /gnu/gawk, file gawk-{version}-doc.tar.gz where {version} ! would be the current version number, such as 3.0.4. Another source of documentation is "The AWK Programming Language" by Aho, Weinberger, and Kernighan (1988), published by Addison-Wesley. *************** *** 1200,1206 **** failure. The final exit status will be 1 (VMS success) if 0 is used, or even (VMS non-success) if non-zero is used. 3 changes ! Changes between version 3.0.3 and 2.15.6 General RS can contain multiple characters or be a regexp --- 1200,1206 ---- failure. The final exit status will be 1 (VMS success) if 0 is used, or even (VMS non-success) if non-zero is used. 3 changes ! Changes between version 3.0.4 and 2.15.6 General RS can contain multiple characters or be a regexp diff -crN gawk-3.0.3/vms/vms-conf.h gawk-3.0.4/vms/vms-conf.h *** gawk-3.0.3/vms/vms-conf.h Sun Dec 8 14:39:53 1996 --- gawk-3.0.4/vms/vms-conf.h Sun May 9 15:13:59 1999 *************** *** 5,11 **** */ /* ! * Copyright (C) 1991, 1992, 1995, 1996 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. --- 5,11 ---- */ /* ! * Copyright (C) 1991, 1992, 1995, 1996, 1999 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. *************** *** 134,139 **** --- 134,143 ---- #if __VMS_VER >= 60200000 # undef __VMS_VER # define __VMS_VER 60100000 + #endif + #if __CRTL_VER >= 60200000 + # undef __CRTL_VER + # define __CRTL_VER 60100000 #endif #endif diff -crN gawk-3.0.3/vms/vmsbuild.com gawk-3.0.4/vms/vmsbuild.com *** gawk-3.0.3/vms/vmsbuild.com Tue Apr 15 13:19:59 1997 --- gawk-3.0.4/vms/vmsbuild.com Sun May 9 14:22:37 1999 *************** *** 7,13 **** $! gawk 3.0.1 revised, Nov'96 $! $ REL = "3.0" !release version number ! $ PATCHLVL = "3" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" --- 7,13 ---- $! gawk 3.0.1 revised, Nov'96 $! $ REL = "3.0" !release version number ! $ PATCHLVL = "4" $! $! $ CCFLAGS = "/noList" ! "/noOpt/Debug" diff -crN gawk-3.0.3/vms/vmstest.com gawk-3.0.4/vms/vmstest.com *** gawk-3.0.3/vms/vmstest.com Tue May 13 19:30:59 1997 --- gawk-3.0.4/vms/vmstest.com Sun May 9 14:28:32 1999 *************** *** 23,29 **** $ exit $ $all: ! $bigtest: bigtest_list = "basic unix_tests gawk_ext" $ echo "bigtest" $bigtest_loop: bigtest_test = f$element(0," ",bigtest_list) $ bigtest_list = bigtest_list - bigtest_test - " " --- 23,29 ---- $ exit $ $all: ! $bigtest: bigtest_list = "basic unix_tests gawk_ext vms_tests" $ echo "bigtest" $bigtest_loop: bigtest_test = f$element(0," ",bigtest_list) $ bigtest_list = bigtest_list - bigtest_test - " " *************** *** 41,47 **** + " backgsub tweakfld clsflnam mmap8k fnarray dynlj" - + " substr eofsplit prt1eval splitwht back89 tradanch" $ basic_lst2 = "nlfldsep splitvar intest nfldstr nors" - ! + " fnarydel noparms funstack clobber delarprm prdupval" $ echo "basic" $basic_loop1: basic_test = f$element(0," ",basic_lst1) $ basic_lst1 = basic_lst1 - basic_test - " " --- 41,48 ---- + " backgsub tweakfld clsflnam mmap8k fnarray dynlj" - + " substr eofsplit prt1eval splitwht back89 tradanch" $ basic_lst2 = "nlfldsep splitvar intest nfldstr nors" - ! + " fnarydel noparms funstack clobber delarprm prdupval" - ! + " nasty zeroflag getnr2tm getnr2tb" $ echo "basic" $basic_loop1: basic_test = f$element(0," ",basic_lst1) $ basic_lst1 = basic_lst1 - basic_test - " " *************** *** 72,77 **** --- 73,86 ---- $ if gawk_ext_list.nes."" then goto gawk_ext_loop $ return $ + $vms_tests: vms_tst_list = "vms_io1" + $ echo "vms_tests" + $vms_tst_loop: vms_tst_test = f$element(0," ",vms_tst_list) + $ vms_tst_list = vms_tst_list - vms_tst_test - " " + $ if vms_tst_test.nes." " then gosub 'vms_tst_test' + $ if vms_tst_list.nes."" then goto vms_tst_loop + $ return + $ $extra: extra_list = "regtest inftest" $ echo "extra" $ gosub "regtest" *************** *** 710,719 **** --- 719,767 ---- $ if $status then rm tmp.; $ return $ + $nasty: echo "nasty" + $ gawk -f nasty.awk >tmp. + $ if f$file_attrib("nasty.ok","LRL").eq.0 then convert nasty.ok *.* + $ if f$file_attrib("tmp.", "LRL").eq.0 then convert tmp. *.* + $ cmp nasty.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $zeroflag: echo "zeroflag" + $ gawk -f zeroflag.awk >tmp. + $ cmp zeroflag.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $getnr2tm: echo "getnr2tm" + $ gawk -f getnr2tm.awk getnr2tm.in >tmp. + $ cmp getnr2tm.ok tmp. + $ if $status then rm tmp.; + $ return + $ + $getnr2tb: echo "getnr2tb" + $ gawk -f getnr2tb.awk getnr2tb.in >tmp. + $ cmp getnr2tb.ok tmp. + $ if $status then rm tmp.; + $ return + $ $nondec: echo "nondec" $ ! gawk -f nondec.awk >tmp. $ ! cmp nondec.ok tmp. $ ! if $status then rm tmp.; + $ return + $ + $vms_io1: echo "vms_io1" + $ if f$search("vms_io1.ok").eqs."" + $ then create vms_io1.ok + Hello + $ endif + $ ! define/User dbg$input sys$command: + $ gawk /Input=sys$input _NL: /Output=tmp. + # prior to 3.0.4, gawk crashed doing any redirection after closing stdin + BEGIN { print "Hello" >"/dev/stdout" } + $ cmp vms_io1.ok tmp. + $ if $status then rm tmp.; $ return $ $clean: EOF # Final cleanup chmod a+x config.sub config.guess touch configure