diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 35 | ||||
-rw-r--r-- | doc/Makefile.am | 8 | ||||
-rw-r--r-- | doc/Makefile.in | 74 | ||||
-rw-r--r-- | doc/awkcard.in | 10 | ||||
-rw-r--r-- | doc/gawk.1 | 82 | ||||
-rw-r--r-- | doc/gawk.info | 1374 | ||||
-rw-r--r-- | doc/gawk.texi | 355 | ||||
-rw-r--r-- | doc/gawkinet.info | 5 | ||||
-rw-r--r-- | doc/texinfo.tex | 912 |
9 files changed, 1588 insertions, 1267 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index ca495c91..980c0f26 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,38 @@ +Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com> + + * Release 3.1.8: Release tar file made. + +Tue Apr 20 11:48:31 2010 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Update to latest from texinfo git repository. + * gawk.texi, gawk.1, awkcard.in: Update version and copyright dates. + +Thu Mar 25 21:51:58 2010 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Clarify the socket timeout environment variables. + +Wed Mar 10 21:28:12 2010 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi: Reworded 'index in array' so that there's no chance of + someone using 'index' as a real subscript. Thanks to Hermann + Peifer for the push. + +Thu Feb 4 20:54:48 2010 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi: Multiple cleanups and bringing of things up to date. + * gawk.1: Ditto, only not as much. + * Makefile.am: New `all-pdf' target to make PDF files of manpage + and reference card. + +Tue Aug 4 06:07:35 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi, gawk.1, awkcard.in: Document that 0 flag in + printf applies only to the numeric formats. + +Tue Aug 4 05:58:52 2009 Arnold D. Robbins <arnold@skeeve.com> + + * texinfo.tex: Updated to current version. + Tue Jul 21 22:28:56 2009 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.7: Release tar file made. diff --git a/doc/Makefile.am b/doc/Makefile.am index 3e872088..38971b2a 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,7 +1,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007 +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010 # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the @@ -36,7 +36,7 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ statist.jpg statist.eps statist.pdf # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf MAKEINFO = @MAKEINFO@ --no-split --force @@ -76,6 +76,10 @@ uninstall-hook: postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +all-pdf: postscript + ps2pdf awkcard.ps awkcard.pdf + ps2pdf gawk.1.ps gawk.1.pdf + gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi diff --git a/doc/Makefile.in b/doc/Makefile.in index 3b105300..b1533e79 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -18,7 +18,7 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007 +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007, 2010 # the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the @@ -67,9 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ - $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ @@ -122,7 +120,6 @@ MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ -AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -135,18 +132,16 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ +HAVE_LIBSIGSEGV = @HAVE_LIBSIGSEGV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -154,42 +149,33 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV = @LIBSIGSEGV@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ +LIBSIGSEGV_PREFIX = @LIBSIGSEGV_PREFIX@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ +LTLIBSIGSEGV = @LTLIBSIGSEGV@ MAKEINFO = @MAKEINFO@ --no-split --force MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ -SEGVINCLUDE = @SEGVINCLUDE@ -SEGVSUBDIR = @SEGVSUBDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -207,7 +193,6 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -238,7 +223,6 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -249,7 +233,6 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ -subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -266,7 +249,7 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ # Get rid of generated files when cleaning -CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" @@ -325,12 +308,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ @@ -612,7 +589,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am +clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -742,8 +719,7 @@ maintainer-clean-am: distclean-am maintainer-clean-aminfo \ mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ - mostlyclean-libtool +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic pdf: pdf-am @@ -762,19 +738,19 @@ uninstall-man: uninstall-man1 .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ - clean-libtool dist-info distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-hook install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ - mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ - uninstall-hook uninstall-html-am uninstall-info-am \ - uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am + dist-info distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-data-hook install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-aminfo \ + maintainer-clean-generic mostlyclean mostlyclean-aminfo \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-dvi-am uninstall-hook uninstall-html-am \ + uninstall-info-am uninstall-man uninstall-man1 \ + uninstall-pdf-am uninstall-ps-am # Link gawk.1 to pgawk.1 @@ -789,6 +765,10 @@ uninstall-hook: postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) +all-pdf: postscript + ps2pdf awkcard.ps awkcard.pdf + ps2pdf gawk.1.ps gawk.1.pdf + gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi diff --git a/doc/awkcard.in b/doc/awkcard.in index 4642918e..2bf5c3d4 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1,7 +1,7 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, -.\" 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +.\" 2003, 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -101,7 +101,7 @@ Brian Kernighan and Michael Brennan who reviewed it. .SL .nf \*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -2005, 2007, 2009 Free Software Foundation, Inc. +2005, 2007, 2009, 2010 Free Software Foundation, Inc. .nf .BT @@ -1417,7 +1417,7 @@ trailing zeros are not removed. T} \*(FC0\fP T{ pad output with zeros instead of spaces. -This applies even to non-numeric output formats. +This applies only to the numeric output formats. Only has an effect when the field width is wider than the value to be printed. T} @@ -1911,7 +1911,7 @@ is specified.\*(CB .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.7.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-3.1.8.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. @@ -1944,7 +1944,7 @@ maintaining it.\*(CX .ES .fi \*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2007, 2009 Free Software Foundation, Inc. +2007, 2009, 2010 Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice @@ -22,7 +22,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Jul 10 2009" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Apr 20 2010" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -940,7 +940,7 @@ Use the operator to test for these elements. The following elements are guaranteed to be available: .RS -.TP \w'\fBPROCINFO["pgrpid"]\fR'u+1n +.TP \w'\fBPROCINFO["version"]\fR'u+1n \fBPROCINFO["egid"]\fP the value of the .IR getegid (2) @@ -978,7 +978,7 @@ the value of the system call. .TP \fBPROCINFO["version"]\fP -The version of +the version of .IR gawk . This is available from version 3.1.4 and later. @@ -1684,14 +1684,7 @@ Piped I/O for and .BR printf . .TP -.PD 0 -.B "< >" -.TP -.PD 0 -.B "<= >=" -.TP -.PD -.B "!= ==" +.B "< > <= >= != ==" The regular relational operators. .TP .B "~ !~" @@ -1735,11 +1728,7 @@ and .I expr3 is evaluated. .TP -.PD 0 -.B "= += \-=" -.TP -.PD -.B "*= /= %= ^=" +.B "= += \-= *= /= %= ^=" Assignment. Both absolute assignment .BI ( var " = " value ) and operator-assignment (the other forms) are supported. @@ -1927,7 +1916,8 @@ Upon an error, contains a string describing the problem. .PP .BR NOTE : -If using a pipe, co-process, or socket to +Failure in opening a two-way socket will result in a non-fatal error being +returned to the calling function. If using a pipe, co-process, or socket to .BR getline , or from .B print @@ -2023,22 +2013,6 @@ A single .B % character; no argument is converted. .PP -.BR NOTE : -When using the integer format-control letters for values that are -outside the range of a C -.B long -integer, -.I gawk -switches to the -.B %0f -format specifier. If -.B \-\^\-lint -is provided on the command line -.I gawk -warns about this. Other versions of -.I awk -may print invalid values or do something else entirely. -.PP Optional, additional parameters may lie between the .B % and the control letter: @@ -2104,7 +2078,7 @@ A leading .B 0 (zero) acts as a flag, that indicates output should be padded with zeroes instead of spaces. -This applies even to non-numeric output formats. +This applies only to the numeric output formats. This flag only has an effect when the field width is wider than the value to be printed. .TP @@ -3412,6 +3386,14 @@ and .B \-\^\-file options. .PP +For socket communication, two special environment variables can be used to control the number of retries +.RB ( GAWK_SOCK_RETRIES ), +and the interval between retries +.RB ( GAWK_MSEC_SLEEP ). +The interval is in milliseconds. On systems that do not support +.IR usleep (3), +the value is rounded up to an integral number of seconds. +.PP If .B POSIXLY_CORRECT exists in the environment, then @@ -3424,6 +3406,33 @@ If has been specified, .I gawk issues a warning message to this effect. +.SH EXIT STATUS +If the +.B exit +statement is used with a value, +then +.I gawk +exits with +the numeric value given to it. +.PP +Otherwise, if there were no problems during execution, +.I gawk +exits with the value of the C constant +.BR EXIT_SUCCESS . +This is usually zero. +.PP +If an error occurs, +.I gawk +exits with the value of +the C constant +.BR EXIT_FAILURE . +This is usually one. +.PP +If +.I gawk +exits because of a fatal error, the exit +status is 2. On non-POSIX systems, this value may be mapped to +.BR EXIT_FAILURE . .SH SEE ALSO .IR egrep (1), .IR getpid (2), @@ -3495,7 +3504,7 @@ and which ports are currently supported. .SH VERSION INFORMATION This man page documents .IR gawk , -version 3.1.7. +version 3.1.8. .SH BUG REPORTS If you find a bug in .IR gawk , @@ -3545,7 +3554,8 @@ provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, -1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009 +1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009, +2010 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of diff --git a/doc/gawk.info b/doc/gawk.info index 78249fcb..447ecf7c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -1,7 +1,7 @@ +This is gawk.info, produced by makeinfo version 4.13 from gawk.texi. + INFO-DIR-SECTION Text creation and manipulation START-INFO-DIR-ENTRY -This is gawk.info, produced by makeinfo version 4.11 from gawk.texi. - * Gawk: (gawk). A text scanning and processing language. END-INFO-DIR-ENTRY INFO-DIR-SECTION Individual utilities @@ -10,11 +10,12 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010 Free Software +Foundation, Inc. This is Edition 3 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 3.1.7 (or later) version of the GNU +Guide for GNU Awk', for the 3.1.8 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document @@ -41,11 +42,12 @@ This file documents `awk', a program that you can use to select particular records in a file and perform operations upon them. Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010 Free Software +Foundation, Inc. This is Edition 3 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 3.1.7 (or later) version of the GNU +Guide for GNU Awk', for the 3.1.8 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document @@ -405,8 +407,6 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Additional Configuration Options:: Other compile-time options. * Configuration Philosophy:: How it's all supposed to work. * Non-Unix Installation:: Installation on Other Operating Systems. -* Amiga Installation:: Installing `gawk' on an Amiga. -* BeOS Installation:: Installing `gawk' on BeOS. * PC Installation:: Installing and Compiling `gawk' on MS-DOS and OS/2. * PC Binary Installation:: Installing a prepared distribution. @@ -429,6 +429,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Atari Installation:: Installing `gawk' on the Atari ST. * Atari Compiling:: Compiling `gawk' on Atari. * Atari Using:: Running `gawk' on Atari. +* BeOS Installation:: Installing `gawk' on BeOS. * Tandem Installation:: Installing `gawk' on a Tandem. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available `awk' @@ -608,7 +609,7 @@ of `awk' called `gawk' (which stands for "GNU awk"). `gawk' runs on a broad range of Unix systems, ranging from 80386 PC-based computers up through large-scale systems, such as Crays. `gawk' has also been ported to Mac OS X, MS-DOS, Microsoft Windows (all versions) and OS/2 PCs, -Atari and Amiga microcomputers, BeOS, Tandem D20, and VMS. +Atari microcomputers, BeOS, Tandem D20, and VMS. * Menu: @@ -957,7 +958,7 @@ contributed code: the archive did not grow and the domain went unused for several years. Fortunately, late in 2008, a volunteer took on the task of setting up -an `awk'-related web site `http://awk.info' and did a very nice job. +an `awk'-related web site--`http://awk.info'--and did a very nice job. If you have written an interesting `awk' program, or have written a `gawk' extension that you would like to share with the rest of the @@ -1017,9 +1018,10 @@ a significant pleasure. Ulrich Drepper, provided invaluable help and feedback for the design of the internationalization features. - Nelson Beebe, Martin Brown, Andreas Buening, Scott Deifik, Darrel -Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Pat Rankin, Kai Uwe Rommel, -and Eli Zaretskii (in alphabetical order) make up the `gawk' "crack + Nelson Beebe, Antonio Colombo Scott Deifik, John H. DuBois III, +Darrel Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Dave Pitts, Stepan +Kasal, Pat Rankin, Andrew Schorr, Corinna Vinschen, Anders Wallin, and +Eli Zaretskii (in alphabetical order) make up the current `gawk' "crack portability team." Without their hard work and help, `gawk' would not be nearly the fine program it is today. It has been and continues to be a pleasure working with this team of fine people. @@ -1046,7 +1048,7 @@ to take advantage of those opportunities. Arnold Robbins Nof Ayalon ISRAEL -March, 2001 +February, 2010 File: gawk.info, Node: Getting Started, Next: Regexp, Prev: Preface, Up: Top @@ -1966,11 +1968,12 @@ edit-compile-test-debug cycle of software development. Complex programs have been written in `awk', including a complete retargetable assembler for eight-bit microprocessors (*note Glossary::, for more information), and a microcode assembler for a special-purpose -Prolog computer. More recently, `gawk' was used for writing a Wiki -clone.(1) While the original `awk''s capabilities were strained by tasks -of such complexity, modern versions are more capable. Even the Bell -Labs version of `awk' has fewer predefined limits, and those that it -has are much larger than they used to be. +Prolog computer. More recently, `gawk' was used for writing a a Wiki +clone (http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/). While the +original `awk''s capabilities were strained by tasks of such +complexity, modern versions are more capable. Even the Bell Labs +version of `awk' has fewer predefined limits, and those that it has are +much larger than they used to be. If you find yourself writing `awk' scripts of more than, say, a few hundred lines, you might consider using a different programming @@ -1983,11 +1986,6 @@ of large programs. Programs in these languages may require more lines of source code than the equivalent `awk' programs, but they are easier to maintain and usually run more efficiently. - ---------- Footnotes ---------- - - (1) Yet Another Wiki Clone -(http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/). - File: gawk.info, Node: Regexp, Next: Reading Files, Prev: Getting Started, Up: Top @@ -4099,7 +4097,7 @@ specifies the file from which to read. In this version of `getline', none of the built-in variables are changed and the record is not split into fields. The only variable -changed is VAR. For example, the following program copies all the +changed is VAR.(1) For example, the following program copies all the input files to the output, except for records that say `@include FILENAME'. Such a record is replaced by the contents of the file FILENAME: @@ -4126,6 +4124,11 @@ included twice. *Note Close Files And Pipes::. the way a true macro preprocessor would. *Note Igawk Program::, for a program that does handle nested `@include' statements. + ---------- Footnotes ---------- + + (1) This is not quite true. `RT' could be changed if `RS' is a +regular expression. + File: gawk.info, Node: Getline/Pipe, Next: Getline/Variable/Pipe, Prev: Getline/Variable/File, Up: Getline @@ -4763,9 +4766,9 @@ which they may appear: `0' A leading `0' (zero) acts as a flag that indicates that output - should be padded with zeros instead of spaces. This applies even - to non-numeric output formats. (d.c.) This flag only has an - effect when the field width is wider than the value to print. + should be padded with zeros instead of spaces. This applies only + to the numeric output formats. This flag only has an effect when + the field width is wider than the value to print. `'' A single quote or apostrophe character is a POSIX extension to ISO @@ -6909,8 +6912,7 @@ precedence: No special symbol is used to indicate concatenation. The operands are simply written side by side (*note Concatenation::). -`< <= == !=' -`> >= >> | |&' +`< <= == != > >= >> | |&' Relational and redirection. The relational operators and the redirections have the same precedence level. Characters such as `>' serve both as relationals and as redirections; the context @@ -6940,8 +6942,7 @@ precedence: `?:' Conditional. This operator groups right-to-left. -`= += -= *=' -`/= %= ^= **=' +`= += -= *= /= %= ^= **=' Assignment. These operators group right to left. NOTE: The `|&', `**', and `**=' operators are not specified by @@ -8522,11 +8523,16 @@ File: gawk.info, Node: Array Intro, Next: Reference to Elements, Up: Arrays 7.1 Introduction to Arrays ========================== -The `awk' language provides one-dimensional arrays for storing groups -of related strings or numbers. Every `awk' array must have a name. -Array names have the same syntax as variable names; any valid variable -name would also be a valid array name. But one name cannot be used in -both ways (as an array and as a variable) in the same `awk' program. + Doing linear scans over an associateive array is like tryinng to + club someone to death with a loaded Uzi. + Larry Wall + + The `awk' language provides one-dimensional arrays for storing +groups of related strings or numbers. Every `awk' array must have a +name. Array names have the same syntax as variable names; any valid +variable name would also be a valid array name. But one name cannot be +used in both ways (as an array and as a variable) in the same `awk' +program. Arrays in `awk' superficially resemble arrays in other programming languages, but there are fundamental differences. In `awk', it isn't @@ -8621,10 +8627,10 @@ File: gawk.info, Node: Reference to Elements, Next: Assigning Elements, Prev: The principal way to use an array is to refer to one of its elements. An array reference is an expression as follows: - ARRAY[INDEX] + ARRAY[INDEX-EXPRESSION] -Here, ARRAY is the name of an array. The expression INDEX is the index -of the desired element of the array. +Here, ARRAY is the name of an array. The expression INDEX-EXPRESSION is +the index of the desired element of the array. The value of the array reference is the current value of that array element. For example, `foo[4.3]' is an expression for the element of @@ -8640,11 +8646,11 @@ unfortunate, because it might waste memory inside `awk'.) To determine whether an element exists in an array at a certain index, use the following expression: - INDEX in ARRAY + IND in ARRAY -This expression tests whether the particular index exists, without the -side effect of creating that element if it is not present. The -expression has the value one (true) if `ARRAY[INDEX]' exists and zero +This expression tests whether the particular index IND exists, without +the side effect of creating that element if it is not present. The +expression has the value one (true) if `ARRAY[IND]' exists and zero (false) if it does not exist. For example, this statement tests whether the array `frequencies' contains the index `2': @@ -8667,11 +8673,11 @@ File: gawk.info, Node: Assigning Elements, Next: Array Example, Prev: Referen Array elements can be assigned values just like `awk' variables: - ARRAY[SUBSCRIPT] = VALUE + ARRAY[INDEX-EXPRESSION] = VALUE -ARRAY is the name of an array. The expression SUBSCRIPT is the index -of the element of the array that is assigned a value. The expression -VALUE is the value to assign to that element of the array. +ARRAY is the name of an array. The expression INDEX-EXPRESSION is the +index of the element of the array that is assigned a value. The +expression VALUE is the value to assign to that element of the array. File: gawk.info, Node: Array Example, Next: Scanning an Array, Prev: Assigning Elements, Up: Arrays @@ -8766,11 +8772,12 @@ built-in function `length'. # Find number of distinct words more than 10 characters long END { - for (x in used) + for (x in used) { if (length(x) > 10) { ++num_long_words print x } + } print num_long_words, "words longer than 10 characters" } @@ -8792,7 +8799,7 @@ File: gawk.info, Node: Delete, Next: Numeric Array Subscripts, Prev: Scanning To remove an individual element of an array, use the `delete' statement: - delete ARRAY[INDEX] + delete ARRAY[INDEX-EXPRESSION] Once an array element has been deleted, any value the element once had is no longer available. It is as if the element had never been @@ -9602,7 +9609,7 @@ with a pound sign (`#'): Modern implementations of `awk', including `gawk', allow the third argument to be a regexp constant (`/abc/') as well as a string. - (d.c.) The POSIX standard allows this as well. *note Computed + (d.c.) The POSIX standard allows this as well. *Note Computed Regexps::, for a discussion of the difference between using a string constant or a regexp constant, and the implications for writing your program correctly. @@ -11661,8 +11668,8 @@ File: gawk.info, Node: Gawk I18N, Prev: I18N Example, Up: Internationalizatio As of version 3.1, `gawk' itself has been internationalized using the GNU `gettext' package. (GNU `gettext' is described in complete detail in *note Top::.) As of this writing, the latest version of GNU -`gettext' is version 0.11.5 -(ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz). +`gettext' is version 0.17 +(ftp://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz). If a translation of `gawk''s messages exists, then `gawk' produces usage messages, warnings, and fatal errors in the local language. @@ -11927,6 +11934,9 @@ REMOTE-PORT Again, use `0' if you don't care, or else a well-known service name. + NOTE: Failure in opening a two-way socket will result in a + non-fatal error being returned to the calling function. + Consider the following very simple example: BEGIN { @@ -12349,7 +12359,7 @@ The following list describes `gawk'-specific options: `-W exec FILE' `--exec FILE' Similar to `-f', reads `awk' program text from FILE. There are - two differences. The fist is that this option also terminates + two differences. The first is that this option also terminates option processing; anything else on the command line is passed on directly to the `awk' program. The second is that command line variable assignments of the form `VAR=VALUE' are disallowed. @@ -12668,7 +12678,7 @@ File: gawk.info, Node: Exit Status, Next: Undocumented, Prev: Obsolete, Up: ========================= If the `exit' statement is used with a value (*note Exit Statement::), -the `gawk' exits with the numeric value given to it. +then `gawk' exits with the numeric value given to it. Otherwise, if there were no problems during execution, `gawk' exits with the value of the C constant `EXIT_SUCCESS'. This is usually zero. @@ -13211,10 +13221,11 @@ File: gawk.info, Node: Cliff Random Function, Next: Ordinal Functions, Prev: 12.2.5 The Cliff Random Number Generator ---------------------------------------- -The Cliff random number generator(1) is a very simple random number -generator that "passes the noise sphere test for randomness by showing -no structure." It is easily programmed, in less than 10 lines of `awk' -code: +The Cliff random number generator +(http://mathworld.wolfram.com/CliffRandomNumberGenerator.html) is a +very simple random number generator that "passes the noise sphere test +for randomness by showing no structure." It is easily programmed, in +less than 10 lines of `awk' code: # cliff_rand.awk --- generate Cliff random numbers BEGIN { _cliff_seed = 0.1 } @@ -13232,10 +13243,6 @@ uses the current seed as input for the calculation. If the built-in `rand' function (*note Numeric Functions::) isn't random enough, you might try using this function instead. - ---------- Footnotes ---------- - - (1) `http://mathworld.wolfram.com/CliffRandomNumberGenerator.html' - File: gawk.info, Node: Ordinal Functions, Next: Join Function, Prev: Cliff Random Function, Up: General Functions @@ -16117,7 +16124,7 @@ File: gawk.info, Node: Word Sorting, Next: History Sorting, Prev: Labels Prog The following `awk' program prints the number of occurrences of each word in its input. It illustrates the associative nature of `awk' arrays by using strings as subscripts. It also demonstrates the `for -INDEX in ARRAY' mechanism. Finally, it shows how `awk' is used in +(i in array)' mechanism. Finally, it shows how `awk' is used in conjunction with other utility programs to do a useful task of some complexity with a minimum of effort. Some explanations follow the program listing: @@ -17013,8 +17020,8 @@ the changes, with cross-references to further details: * The conditional expression using the ternary operator `?:' (*note Conditional Exp::). - * The expression `INDEX in ARRAY' outside of `for' statements (*note - Reference to Elements::). + * The expression `INDEX-VARIABLE in ARRAY' outside of `for' + statements (*note Reference to Elements::). * The exponentiation operator `^' (*note Arithmetic Ops::) and its assignment operator form `^=' (*note Assignment Ops::). @@ -17170,7 +17177,10 @@ extensions, originally developed for `gawk': * The `nextfile' statement (*note Nextfile Statement::). * The ability to delete all of an array at once with `delete ARRAY' - (*note Delete::). + (*note String Functions::). + + * The ability for the `length' function to accept an array argument + and return the number of elements in the array. (*note Delete::). File: gawk.info, Node: POSIX/GNU, Next: Contributors, Prev: BTL, Up: Language History @@ -17275,8 +17285,6 @@ all be disabled with either the `--traditional' or `--posix' options * The use of GNU Autoconf to control the configuration process (*note Quick Installation::). - * Amiga support (*note Amiga Installation::). - Version 3.1 of `gawk' introduced the following features: @@ -17388,11 +17396,6 @@ all be disabled with either the `--traditional' or `--posix' options * The `strftime' function acquired a third argument to enable printing times as UTC (*note Time Functions::). - * The `--disable-libsigsegv' configuration option which disables - configuring, building, compiling and linking against the - `libsigsegv' library (*note Additional Configuration Options::). - - File: gawk.info, Node: Contributors, Prev: POSIX/GNU, Up: Language History @@ -17444,10 +17447,11 @@ Info file, in approximate chronological order: works on non-32-bit systems. * Fred Fish provided the port to Amiga systems and its documentation. + (With Fred's sad passing, this is no longer supported.) * Scott Deifik currently maintains the MS-DOS port. - * Juan Grigera maintains the port to Windows32 systems. + * Juan Grigera provided a port to Windows32 systems. * Dr. Darrel Hankerson acts as coordinator for the various ports to different PC platforms and creates binary distributions for @@ -17462,8 +17466,10 @@ Info file, in approximate chronological order: the `|&' operator. * Stephen Davies provided the initial port to Tandem systems and its - documentation. Matthew Woehlke provided improvements for Tandem's - POSIX-compliant systems. + documentation. + + * Matthew Woehlke provided improvements for Tandem's POSIX-compliant + systems. Ralf Wildenhues now maintains this port. * Martin Brown provided the port to BeOS and its documentation. @@ -17476,13 +17482,13 @@ Info file, in approximate chronological order: * Andreas Buening updated the `gawk' port for OS/2. - Isamu Hasegawa, of IBM in Japan, contributed support for multibyte + * Isamu Hasegawa, of IBM in Japan, contributed support for multibyte characters. - Michael Benzinger contributed the initial code for `switch' + * Michael Benzinger contributed the initial code for `switch' statements. - Patrick T.J. McPhee contributed the code for dynamic loading in + * Patrick T.J. McPhee contributed the code for dynamic loading in Windows32 environments. * Arnold Robbins has been working on `gawk' since 1988, at first @@ -17537,23 +17543,12 @@ There are three ways to get GNU software: * Copy it from someone else who already has it. - * Order `gawk' directly from the Free Software Foundation. Software - distributions are available for Gnu/Linux, Unix, and MS-Windows, - in several CD packages. Their address is: - - Free Software Foundation - 51 Franklin Street, Fifth Floor - Boston, MA 02110-1301 USA - Phone: +1-617-542-5942 - Fax (including Japan): +1-617-542-2652 - Email: <gnu@gnu.org> - URL: `http://www.gnu.org' + * Retrieve `gawk' from the Internet host `ftp.gnu.org', in the + directory `/gnu/gawk'. Both anonymous `ftp' and `http' access are + supported. If you have the `wget' program, you can use a command + like the following: - Ordering from the FSF directly contributes to the support of the - foundation and to the production of more free software. - - * Retrieve `gawk' by using anonymous `ftp' to the Internet host - `ftp.gnu.org', in the directory `/gnu/gawk'. + wget http://ftp.gnu.org/gnu/gawk/gawk-3.1.8.tar.gz The GNU software archive is mirrored around the world. The up-to-date list of mirror sites is available from the main FSF web site @@ -17570,20 +17565,20 @@ B.1.2 Extracting the Distribution `gawk' is distributed as a `tar' file compressed with the GNU Zip program, `gzip'. - Once you have the distribution (for example, `gawk-3.1.7.tar.gz'), + Once you have the distribution (for example, `gawk-3.1.8.tar.gz'), use `gzip' to expand the file and then use `tar' to extract it. You can use the following pipeline to produce the `gawk' distribution: # Under System V, add 'o' to the tar options - gzip -d -c gawk-3.1.7.tar.gz | tar -xvpf - + gzip -d -c gawk-3.1.8.tar.gz | tar -xvpf - -This creates a directory named `gawk-3.1.7' in the current directory. +This creates a directory named `gawk-3.1.8' in the current directory. The distribution file name is of the form `gawk-V.R.P.tar.gz'. The V represents the major version of `gawk', the R represents the current release of version V, and the P represents a "patch level", meaning that minor bugs have been fixed in the release. The current patch -level is 7, but when retrieving distributions, you should get the +level is 8, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, however, that patch levels greater than or equal to 80 denote "beta" or nonproduction software; you might not want to retrieve such a version @@ -17769,7 +17764,7 @@ B.2.1 Compiling `gawk' for Unix ------------------------------- After you have extracted the `gawk' distribution, `cd' to -`gawk-3.1.7'. Like most GNU software, `gawk' is configured +`gawk-3.1.8'. Like most GNU software, `gawk' is configured automatically for your Unix system by running the `configure' program. This program is a Bourne shell script that is generated automatically using GNU `autoconf'. (The `autoconf' software is described fully @@ -17851,15 +17846,14 @@ command line when compiling `gawk' from scratch, including: Causes `gawk' to silently skip directories named on the command line. -`--disable-libsigsegv' - The `--disable-libsigsegv' configuration option disables - configuring, building, compiling and linking against the - `libsigsegv' library. - As of version 3.1.5, the `--with-included-gettext' configuration option is no longer available, since `gawk' expects the GNU `gettext' library to be installed as an external library. + As of version 3.1.8, the `--disable-libsigsegv' configuration option +is no longer available, since `gawk' expects the GNU `libsigsegv' +library to be installed as an external library. + File: gawk.info, Node: Configuration Philosophy, Prev: Additional Configuration Options, Up: Unix Installation @@ -17916,81 +17910,14 @@ systems. * Menu: -* Amiga Installation:: Installing `gawk' on an Amiga. -* BeOS Installation:: Installing `gawk' on BeOS. * PC Installation:: Installing and Compiling `gawk' on MS-DOS and OS/2. * VMS Installation:: Installing `gawk' on VMS. -File: gawk.info, Node: Amiga Installation, Next: BeOS Installation, Up: Non-Unix Installation - -B.3.1 Installing `gawk' on an Amiga ------------------------------------ - -You can install `gawk' on an Amiga system using a Unix emulation -environment, available via anonymous `ftp' from `ftp.ninemoons.com' in -the directory `pub/ade/current'. This includes a shell based on -`pdksh'. The primary component of this environment is a Unix emulation -library, `ixemul.lib'. - - A more complete distribution for the Amiga is available on the Geek -Gadgets CD-ROM, available from: - - CRONUS - 1840 E. Warner Road #105-265 - Tempe, AZ 85284 USA - US Toll Free: (800) 804-0833 - Phone: +1-602-491-0442 - FAX: +1-602-491-0048 - Email: <info@ninemoons.com> - WWW: `http://www.ninemoons.com' - Anonymous `ftp' site: `ftp.ninemoons.com' - - Once you have the distribution, you can configure `gawk' simply by -running `configure': - - configure -v m68k-amigaos - - Then run `make' and you should be all set! If these steps do not -work, please send in a bug report (*note Bugs::). - - -File: gawk.info, Node: BeOS Installation, Next: PC Installation, Prev: Amiga Installation, Up: Non-Unix Installation - -B.3.2 Installing `gawk' on BeOS -------------------------------- - -Since BeOS DR9, all the tools that you should need to build `gawk' are -included with BeOS. The process is basically identical to the Unix -process of running `configure' and then `make'. Full instructions are -given below. +File: gawk.info, Node: PC Installation, Next: VMS Installation, Up: Non-Unix Installation - You can compile `gawk' under BeOS by extracting the standard sources -and running `configure'. You _must_ specify the location prefix for the -installation directory. For BeOS DR9 and beyond, the best directory to -use is `/boot/home/config', so the `configure' command is: - - configure --prefix=/boot/home/config - - This installs the compiled application into `/boot/home/config/bin', -which is already specified in the standard `PATH'. - - Once the configuration process is completed, you can run `make', and -then `make install': - - $ make - ... - $ make install - - BeOS uses `bash' as its shell; thus, you use `gawk' the same way you -would under Unix. If these steps do not work, please send in a bug -report (*note Bugs::). - - -File: gawk.info, Node: PC Installation, Next: VMS Installation, Prev: BeOS Installation, Up: Non-Unix Installation - -B.3.3 Installation on PC Operating Systems +B.3.1 Installation on PC Operating Systems ------------------------------------------ This minor node covers installation and usage of `gawk' on x86 machines @@ -18014,11 +17941,12 @@ distribution. OS/2. * Cygwin:: Building and running `gawk' for Cygwin. +* MSYS:: Using `gawk' In The MSYS Environment. File: gawk.info, Node: PC Binary Installation, Next: PC Compiling, Up: PC Installation -B.3.3.1 Installing a Prepared Distribution for PC Systems +B.3.1.1 Installing a Prepared Distribution for PC Systems ......................................................... If you have received a binary distribution prepared by the DOS @@ -18056,7 +17984,7 @@ additional or more detailed installation instructions. File: gawk.info, Node: PC Compiling, Next: PC Dynamic, Prev: PC Binary Installation, Up: PC Installation -B.3.3.2 Compiling `gawk' for PC Operating Systems +B.3.1.2 Compiling `gawk' for PC Operating Systems ................................................. `gawk' can be compiled for MS-DOS, Windows32, and OS/2 using the GNU @@ -18162,7 +18090,7 @@ child processes are not started by `fork()'. File: gawk.info, Node: PC Dynamic, Next: PC Using, Prev: PC Compiling, Up: PC Installation -B.3.3.3 Compiling `gawk' For Dynamic Libraries +B.3.1.3 Compiling `gawk' For Dynamic Libraries .............................................. To compile `gawk' with dynamic extension support, uncomment the @@ -18208,7 +18136,7 @@ then in the directory containing `gawk.exe', and finally through the File: gawk.info, Node: PC Using, Next: Cygwin, Prev: PC Dynamic, Up: PC Installation -B.3.3.4 Using `gawk' on PC Operating Systems +B.3.1.4 Using `gawk' on PC Operating Systems ............................................ With the exception of the Cygwin environment, the `|&' operator and @@ -18305,19 +18233,20 @@ With proper quoting, in the first example the setting of `RS' can be moved into the `BEGIN' rule. -File: gawk.info, Node: Cygwin, Prev: PC Using, Up: PC Installation +File: gawk.info, Node: Cygwin, Next: MSYS, Prev: PC Using, Up: PC Installation -B.3.3.5 Using `gawk' In The Cygwin Environment +B.3.1.5 Using `gawk' In The Cygwin Environment .............................................. `gawk' can be used "out of the box" under Windows if you are using the -Cygwin environment.(1) This environment provides an excellent -simulation of Unix, using the GNU tools, such as `bash', the GNU -Compiler Collection (GCC), GNU Make, and other GNU tools. Compilation -and installation for Cygwin is the same as for a Unix system: - - tar -xvpzf gawk-3.1.7.tar.gz - cd gawk-3.1.7 +Cygwin environment (http://www.cygwin.com). This environment provides +an excellent simulation of Unix, using the GNU tools, such as `bash', +the GNU Compiler Collection (GCC), GNU Make, and other GNU tools. +Compilation and installation for Cygwin is the same as for a Unix +system: + + tar -xvpzf gawk-3.1.8.tar.gz + cd gawk-3.1.8 ./configure make @@ -18329,14 +18258,24 @@ the `make' proceeds as usual. Networking::) are fully supported in the Cygwin environment. This is not true for any other environment for MS-DOS or MS-Windows. - ---------- Footnotes ---------- + +File: gawk.info, Node: MSYS, Prev: Cygwin, Up: PC Installation - (1) `http://www.cygwin.com' +B.3.1.6 Using `gawk' In The MSYS Environment +............................................ + +In the MSYS environment under Windows, `gawk' automatically uses binary +mode for reading and writing files. Thus there is no need to use the +`BINMODE' variable. + + This can cause problems with other Unix-like components that have +been ported to Windows that expect `gawk' to do automatic translation +of `"\r\n"', since it won't. Caveat Emptor! File: gawk.info, Node: VMS Installation, Prev: PC Installation, Up: Non-Unix Installation -B.3.4 How to Compile and Install `gawk' on VMS +B.3.2 How to Compile and Install `gawk' on VMS ---------------------------------------------- This node describes how to compile and install `gawk' under VMS. @@ -18352,7 +18291,7 @@ This node describes how to compile and install `gawk' under VMS. File: gawk.info, Node: VMS Compilation, Next: VMS Installation Details, Up: VMS Installation -B.3.4.1 Compiling `gawk' on VMS +B.3.2.1 Compiling `gawk' on VMS ............................... To compile `gawk' under VMS, there is a `DCL' command procedure that @@ -18397,7 +18336,7 @@ up. File: gawk.info, Node: VMS Installation Details, Next: VMS Running, Prev: VMS Compilation, Up: VMS Installation -B.3.4.2 Installing `gawk' on VMS +B.3.2.2 Installing `gawk' on VMS ................................ To install `gawk', all you need is a "foreign" command, which is a @@ -18437,7 +18376,7 @@ benignly. File: gawk.info, Node: VMS Running, Next: VMS POSIX, Prev: VMS Installation Details, Up: VMS Installation -B.3.4.3 Running `gawk' on VMS +B.3.2.3 Running `gawk' on VMS ............................. Command-line parsing and quoting conventions are significantly different @@ -18472,7 +18411,7 @@ translation and not a multitranslation `RMS' searchlist. File: gawk.info, Node: VMS POSIX, Next: VMS Old Gawk, Prev: VMS Running, Up: VMS Installation -B.3.4.4 Building and Using `gawk' on VMS POSIX +B.3.2.4 Building and Using `gawk' on VMS POSIX .............................................. Ignore the instructions above, although `vms/gawk.hlp' should still be @@ -18502,7 +18441,7 @@ needed in the VMS POSIX environment. File: gawk.info, Node: VMS Old Gawk, Prev: VMS POSIX, Up: VMS Installation -B.3.4.5 Some VMS Systems Have An Old Version of `gawk' +B.3.2.5 Some VMS Systems Have An Old Version of `gawk' ...................................................... Some versions of VMS have an old version of `gawk'. To access it, @@ -18525,10 +18464,11 @@ supported. * Menu: * Atari Installation:: Installing `gawk' on the Atari ST. +* BeOS Installation:: Installing `gawk' on BeOS. * Tandem Installation:: Installing `gawk' on a Tandem. -File: gawk.info, Node: Atari Installation, Next: Tandem Installation, Up: Unsupported +File: gawk.info, Node: Atari Installation, Next: BeOS Installation, Up: Unsupported B.4.1 Installing `gawk' on the Atari ST --------------------------------------- @@ -18649,9 +18589,41 @@ to be doubled in order to get literal backslashes (*note Escape Sequences::). -File: gawk.info, Node: Tandem Installation, Prev: Atari Installation, Up: Unsupported +File: gawk.info, Node: BeOS Installation, Next: Tandem Installation, Prev: Atari Installation, Up: Unsupported + +B.4.2 Installing `gawk' on BeOS +------------------------------- + +Since BeOS DR9, all the tools that you should need to build `gawk' are +included with BeOS. The process is basically identical to the Unix +process of running `configure' and then `make'. Full instructions are +given below. + + You can compile `gawk' under BeOS by extracting the standard sources +and running `configure'. You _must_ specify the location prefix for the +installation directory. For BeOS DR9 and beyond, the best directory to +use is `/boot/home/config', so the `configure' command is: + + configure --prefix=/boot/home/config + + This installs the compiled application into `/boot/home/config/bin', +which is already specified in the standard `PATH'. + + Once the configuration process is completed, you can run `make', and +then `make install': + + $ make + ... + $ make install + + BeOS uses `bash' as its shell; thus, you use `gawk' the same way you +would under Unix. If these steps do not work, please send in a bug +report (*note Bugs::). + + +File: gawk.info, Node: Tandem Installation, Prev: BeOS Installation, Up: Unsupported -B.4.2 Installing `gawk' on a Tandem +B.4.3 Installing `gawk' on a Tandem ----------------------------------- The Tandem port is only minimally supported. The port's contributor no @@ -18755,7 +18727,7 @@ considered authoritative if it conflicts with this Info file. The people maintaining the non-Unix ports of `gawk' are as follows: MS-DOS Scott Deifik, <scottd.mail@sbcglobal.net>. -OS/2 Andreas Buening, <andreas.buening@nexgo.de> +MS-Windows using MINGW Eli Zaretskii, <eliz@gnu.org>. Tandem Stephen Davies, <scldad@sdc.com.au>. Tandem (POSIX-compliant) Ralf Wildenhues <Ralf.Wildenhues@gmx.de> VMS Pat Rankin, <rankin@pactechdata.com>. @@ -18780,7 +18752,8 @@ This minor node briefly describes where to get them: Unix `awk' Brian Kernighan has made his implementation of `awk' freely available. You can retrieve this version via the World Wide Web - from his home page.(1) It is available in several archive formats: + from his home page (http://www.cs.princeton.edu/~bwk). It is + available in several archive formats: Shell archive `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar' @@ -18842,8 +18815,7 @@ Unix `awk' * The `BINMODE' special variable for non-Unix operating systems (*note PC Using::). - It is to be hoped that a future version of `mawk' will support - `nextfile' (*note Nextfile Statement::). + * The `nextfile' statement (*note Nextfile Statement::). `awka' Written by Andrew Sumner, `awka' translates `awk' programs into C, @@ -18869,32 +18841,30 @@ The OpenSolaris POSIX `awk' The version of `awk' in `/usr/xpg4/bin' on Solaris is POSIX compliant. It is based on the `awk' from Mortice Kern Systems for PCs. The source code can be downloaded from the OpenSolaris web - site.(2) This author was able to make it compile and work under - GNU/Linux with 1-2 hours of work. Making it more generally - portable (using GNU Autoconf and/or Automake) would take more - work, and this has not been done, at least to our knowledge. + site (http://www.opensolaris.org). This author was able to make + it compile and work under GNU/Linux with 1-2 hours of work. + Making it more generally portable (using GNU Autoconf and/or + Automake) would take more work, and this has not been done, at + least to our knowledge. `jawk' This is an interpreter for `awk' written in Java. It claims to be a full interpreter, although because it uses Java facilities for I/O and for regexp matching, the language it supports is different from POSIX `awk'. More information is available on the project's - home page.(3). + home page (http://jawk.sourceforge.net). +`QTawk' This is an independent implementation of `awk' distributed under the GPL. It has a large number of extensions over standard `awk' and may not be 100% syntactically compatible with it. See `http://www.quiktrim.org/QTawk.html' for more information, including the manual and a download link. +QSE Awk + This is an embeddable `awk' interpreter. For more information see + `http://code.google.com/p/qse/' and `http://awk.info/?tools/qse'. - ---------- Footnotes ---------- - - (1) `http://www.cs.princeton.edu/~bwk' - - (2) `http://www.opensolaris.org' - - (3) `http://jawk.sourceforge.net' File: gawk.info, Node: Notes, Next: Basic Concepts, Prev: Installation, Up: Top @@ -20149,11 +20119,12 @@ double-precision floating-point numbers to represent all numeric values. This minor node describes some of the issues involved in using floating-point numbers. - There is a very nice paper on floating-point arithmetic by David -Goldberg, "What Every Computer Scientist Should Know About -Floating-point Arithmetic," `ACM Computing Surveys' *23*, 1 (1991-03), -5-48.(1) This is worth reading if you are interested in the details, -but it does require a background in computer science. + There is a very nice paper on floating-point arithmetic +(http://www.validlab.com/goldberg/paper.pdf) by David Goldberg, "What +Every Computer Scientist Should Know About Floating-point Arithmetic," +`ACM Computing Surveys' *23*, 1 (1991-03), 5-48. This is worth reading +if you are interested in the details, but it does require a background +in computer science. * Menu: @@ -20162,10 +20133,6 @@ but it does require a background in computer science. Abstract Numbers. * POSIX Floating Point Problems:: Standards Versus Existing Practice. - ---------- Footnotes ---------- - - (1) `http://www.validlab.com/goldberg/paper.ps'. - File: gawk.info, Node: String Conversion Precision, Next: Unexpected Results, Up: Floating Point Issues @@ -20363,14 +20330,13 @@ Amazing `awk' Assembler of lines long, including machine descriptions for several eight-bit microcomputers. It is a good example of a program that would have been better written in another language. You can get it from - `ftp://ftp.freefriends.org/arnold/Awkstuff/aaa.tgz'. + `http://awk.info/?awk100/aaa'. Amazingly Workable Formatter (`awf') Henry Spencer at the University of Toronto wrote a formatter that accepts a large subset of the `nroff -ms' and `nroff -man' - formatting commands, using `awk' and `sh'. It is available over - the Internet from - `ftp://ftp.freefriends.org/arnold/Awkstuff/awf.tgz'. + formatting commands, using `awk' and `sh'. It is available from + `http://awk.info/?tools/awf'. Anchor The regexp metacharacters `^' and `$', which force the match to @@ -22172,7 +22138,7 @@ Index (line 11) * ! (exclamation point), !~ operator <1>: Expression Patterns. (line 24) -* ! (exclamation point), !~ operator <2>: Precedence. (line 81) +* ! (exclamation point), !~ operator <2>: Precedence. (line 80) * ! (exclamation point), !~ operator <3>: Comparison Operators. (line 11) * ! (exclamation point), !~ operator <4>: Regexp Constants. (line 6) @@ -22196,9 +22162,9 @@ Index (line 30) * $ field operator: Fields. (line 19) * % (percent sign), % operator: Precedence. (line 55) -* % (percent sign), %= operator <1>: Precedence. (line 96) +* % (percent sign), %= operator <1>: Precedence. (line 95) * % (percent sign), %= operator: Assignment Ops. (line 129) -* & (ampersand), && operator <1>: Precedence. (line 87) +* & (ampersand), && operator <1>: Precedence. (line 86) * & (ampersand), && operator: Boolean Ops. (line 57) * & (ampersand), gsub/gensub/sub functions and: Gory Details. (line 6) * ' (single quote) <1>: Quoting. (line 31) @@ -22218,15 +22184,15 @@ Index * * (asterisk), ** operator <2>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), **= operator <1>: Options. (line 199) -* * (asterisk), **= operator <2>: Precedence. (line 96) +* * (asterisk), **= operator <2>: Precedence. (line 95) * * (asterisk), **= operator: Assignment Ops. (line 129) -* * (asterisk), *= operator <1>: Precedence. (line 96) +* * (asterisk), *= operator <1>: Precedence. (line 95) * * (asterisk), *= operator: Assignment Ops. (line 129) * + (plus sign): Regexp Operators. (line 101) * + (plus sign), + operator: Precedence. (line 52) * + (plus sign), ++ operator <1>: Precedence. (line 46) * + (plus sign), ++ operator: Increment Ops. (line 40) -* + (plus sign), += operator <1>: Precedence. (line 96) +* + (plus sign), += operator <1>: Precedence. (line 95) * + (plus sign), += operator: Assignment Ops. (line 82) * + (plus sign), decrement/increment operators: Increment Ops. (line 11) @@ -22234,7 +22200,7 @@ Index * - (hyphen), - operator: Precedence. (line 52) * - (hyphen), -- (decrement/increment) operator: Precedence. (line 46) * - (hyphen), -- operator: Increment Ops. (line 48) -* - (hyphen), -= operator <1>: Precedence. (line 96) +* - (hyphen), -= operator <1>: Precedence. (line 95) * - (hyphen), -= operator: Assignment Ops. (line 129) * - (hyphen), filenames beginning with: Options. (line 67) * - (hyphen), in character lists: Character Lists. (line 17) @@ -22244,8 +22210,6 @@ Index * --copyright option: Options. (line 94) * --disable-directories-fatal configuration option: Additional Configuration Options. (line 41) -* --disable-libsigsegv configuration option: Additional Configuration Options. - (line 45) * --disable-lint configuration option: Additional Configuration Options. (line 21) * --disable-nls configuration option: Additional Configuration Options. @@ -22307,7 +22271,7 @@ Index * .po files, converting to .mo: I18N Example. (line 62) * / (forward slash): Regexp. (line 10) * / (forward slash), / operator: Precedence. (line 55) -* / (forward slash), /= operator <1>: Precedence. (line 96) +* / (forward slash), /= operator <1>: Precedence. (line 95) * / (forward slash), /= operator: Assignment Ops. (line 129) * / (forward slash), /= operator, vs. /=.../ regexp constant: Assignment Ops. (line 148) @@ -22345,7 +22309,7 @@ Index * ? (question mark) <1>: GNU Regexp Operators. (line 51) * ? (question mark): Regexp Operators. (line 110) -* ? (question mark), ?: operator: Precedence. (line 93) +* ? (question mark), ?: operator: Precedence. (line 92) * [] (square brackets): Regexp Operators. (line 55) * \ (backslash) <1>: Regexp Operators. (line 18) * \ (backslash) <2>: Quoting. (line 31) @@ -22399,7 +22363,7 @@ Index * ^ (caret), ^ operator <1>: Options. (line 199) * ^ (caret), ^ operator: Precedence. (line 49) * ^ (caret), ^= operator <1>: Options. (line 199) -* ^ (caret), ^= operator <2>: Precedence. (line 96) +* ^ (caret), ^= operator <2>: Precedence. (line 95) * ^ (caret), ^= operator: Assignment Ops. (line 129) * ^ (caret), in character lists: Character Lists. (line 17) * ^, in FS: Regexp Field Splitting. @@ -22452,14 +22416,13 @@ Index * amazingly workable formatter (awf): Glossary. (line 20) * ambiguity, syntactic: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) -* amiga: Amiga Installation. (line 6) * ampersand (&), && operator: Boolean Ops. (line 57) -* ampersand (&), &&operator: Precedence. (line 87) +* ampersand (&), &&operator: Precedence. (line 86) * ampersand (&), gsub/gensub/sub functions and: Gory Details. (line 6) * AND bitwise operation: Bitwise Functions. (line 6) * and Boolean-logic operator: Boolean Ops. (line 6) * and function (gawk): Bitwise Functions. (line 39) -* ANSI: Glossary. (line 31) +* ANSI: Glossary. (line 30) * archeologists: Bugs. (line 6) * ARGC/ARGV variables <1>: ARGC and ARGV. (line 6) * ARGC/ARGV variables: Auto-set. (line 11) @@ -22478,20 +22441,20 @@ Index * arithmetic operators: Arithmetic Ops. (line 6) * arrays: Arrays. (line 6) * arrays, as parameters to functions: Function Caveats. (line 55) -* arrays, associative: Array Intro. (line 45) +* arrays, associative: Array Intro. (line 50) * arrays, associative, clearing: Internals. (line 66) * arrays, associative, library functions and: Library Names. (line 57) * arrays, deleting entire contents: Delete. (line 39) * arrays, elements, assigning: Assigning Elements. (line 6) * arrays, elements, deleting: Delete. (line 6) * arrays, elements, installing: Internals. (line 70) -* arrays, elements, order of: Scanning an Array. (line 47) +* arrays, elements, order of: Scanning an Array. (line 48) * arrays, elements, referencing: Reference to Elements. (line 6) * arrays, elements, retrieving number of: String Functions. (line 18) * arrays, for statement and: Scanning an Array. (line 20) -* arrays, IGNORECASE variable and: Array Intro. (line 87) -* arrays, indexing: Array Intro. (line 45) +* arrays, IGNORECASE variable and: Array Intro. (line 92) +* arrays, indexing: Array Intro. (line 50) * arrays, merging into strings: Join Function. (line 6) * arrays, multidimensional: Multi-dimensional. (line 6) * arrays, multidimensional, scanning: Multi-scanning. (line 11) @@ -22499,7 +22462,7 @@ Index * arrays, scanning: Scanning an Array. (line 6) * arrays, sorting: Array Sorting. (line 6) * arrays, sorting, IGNORECASE variable and: Array Sorting. (line 86) -* arrays, sparse: Array Intro. (line 66) +* arrays, sparse: Array Intro. (line 71) * arrays, subscripts: Numeric Array Subscripts. (line 6) * arrays, subscripts, uninitialized variables as: Uninitialized Subscripts. @@ -22520,7 +22483,7 @@ Index * assignments as filenames: Ignoring Assigns. (line 6) * assoc_clear internal function: Internals. (line 66) * assoc_lookup internal function: Internals. (line 70) -* associative arrays: Array Intro. (line 45) +* associative arrays: Array Intro. (line 50) * asterisk (*), * operator, as multiplication operator: Precedence. (line 55) * asterisk (*), * operator, as regexp operator: Regexp Operators. @@ -22531,9 +22494,9 @@ Index * asterisk (*), ** operator <2>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), **= operator <1>: Options. (line 199) -* asterisk (*), **= operator <2>: Precedence. (line 96) +* asterisk (*), **= operator <2>: Precedence. (line 95) * asterisk (*), **= operator: Assignment Ops. (line 129) -* asterisk (*), *= operator <1>: Precedence. (line 96) +* asterisk (*), *= operator <1>: Precedence. (line 95) * asterisk (*), *= operator: Assignment Ops. (line 129) * atan2 function: Numeric Functions. (line 37) * atari: Atari Installation. (line 9) @@ -22542,7 +22505,7 @@ Index * awk programs <1>: Two Rules. (line 6) * awk programs <2>: Executable Scripts. (line 6) * awk programs: Getting Started. (line 12) -* awk programs, complex: When. (line 30) +* awk programs, complex: When. (line 31) * awk programs, documenting <1>: Library Names. (line 6) * awk programs, documenting: Comments. (line 6) * awk programs, examples of: Sample Programs. (line 6) @@ -22667,7 +22630,7 @@ Index * BEGIN pattern, TEXTDOMAIN variable and: Programmer i18n. (line 58) * beginfile user-defined function: Filetrans Function. (line 60) * Bell Laboratories awk extensions: BTL. (line 6) -* Benzinger, Michael: Contributors. (line 86) +* Benzinger, Michael: Contributors. (line 89) * BeOS: BeOS Installation. (line 6) * Berry, Karl: Acknowledgments. (line 30) * binary input/output: User-modified. (line 10) @@ -22697,14 +22660,11 @@ Index * Brennan, Michael <2>: Simple Sed. (line 25) * Brennan, Michael <3>: Two-way I/O. (line 6) * Brennan, Michael: Delete. (line 51) -* Broder, Alan J.: Contributors. (line 77) -* Brown, Martin <1>: Contributors. (line 72) -* Brown, Martin: Acknowledgments. (line 53) +* Broder, Alan J.: Contributors. (line 80) +* Brown, Martin: Contributors. (line 75) * BSD portals: Portal Files. (line 6) -* BSD-based operating systems: Glossary. (line 582) -* Buening, Andreas <1>: Bugs. (line 69) -* Buening, Andreas <2>: Contributors. (line 81) -* Buening, Andreas: Acknowledgments. (line 53) +* BSD-based operating systems: Glossary. (line 581) +* Buening, Andreas: Contributors. (line 84) * buffering, input/output <1>: Two-way I/O. (line 71) * buffering, input/output: I/O Functions. (line 128) * buffering, interactive vs. noninteractive: I/O Functions. (line 96) @@ -22727,11 +22687,11 @@ Index * caret (^), ^ operator <1>: Options. (line 199) * caret (^), ^ operator: Precedence. (line 49) * caret (^), ^= operator <1>: Options. (line 199) -* caret (^), ^= operator <2>: Precedence. (line 96) +* caret (^), ^= operator <2>: Precedence. (line 95) * caret (^), ^= operator: Assignment Ops. (line 129) * caret (^), in character lists: Character Lists. (line 17) * case keyword: Switch Statement. (line 6) -* case sensitivity, array indices and: Array Intro. (line 87) +* case sensitivity, array indices and: Array Intro. (line 92) * case sensitivity, converting case: String Functions. (line 467) * case sensitivity, example programs: Library Functions. (line 43) * case sensitivity, gawk: Case-sensitivity. (line 26) @@ -22750,19 +22710,19 @@ Index * character lists, non-ASCII: Character Lists. (line 71) * character lists, range expressions: Character Lists. (line 6) * character sets: Ordinal Functions. (line 44) -* character sets (machine character encodings): Glossary. (line 138) +* character sets (machine character encodings): Glossary. (line 137) * character sets, See Also character lists: Regexp Operators. (line 55) * characters, counting: Wc Program. (line 6) * characters, transliterating: Translate Program. (line 6) * characters, values of as numbers: Ordinal Functions. (line 6) * Chassell, Robert J.: Acknowledgments. (line 30) * chdir function, implementing in gawk: Sample Library. (line 6) -* chem utility: Glossary. (line 146) +* chem utility: Glossary. (line 145) * chr user-defined function: Ordinal Functions. (line 16) * Cliff random numbers: Cliff Random Function. (line 6) * cliff_rand user-defined function: Cliff Random Function. - (line 11) + (line 12) * close function <1>: I/O Functions. (line 10) * close function <2>: Close Files And Pipes. (line 18) @@ -22777,6 +22737,7 @@ Index * close_func input method: Internals. (line 178) * collating elements: Character Lists. (line 71) * collating symbols: Character Lists. (line 78) +* Colombo, Antonio: Acknowledgments. (line 53) * columns, aligning: Print Examples. (line 70) * columns, cutting: Cut Program. (line 6) * comma (,), in range patterns: Ranges. (line 6) @@ -22810,7 +22771,7 @@ Index * compatibility mode (gawk), octal numbers: Nondecimal-numbers. (line 60) * compatibility mode (gawk), specifying: Options. (line 86) -* compiled programs <1>: Glossary. (line 156) +* compiled programs <1>: Glossary. (line 155) * compiled programs: Basic High Level. (line 14) * compl function (gawk): Bitwise Functions. (line 43) * complement, bitwise: Bitwise Functions. (line 25) @@ -22819,8 +22780,6 @@ Index * conditional expressions: Conditional Exp. (line 6) * configuration option, --disable-directories-fatal: Additional Configuration Options. (line 41) -* configuration option, --disable-libsigsegv: Additional Configuration Options. - (line 45) * configuration option, --disable-lint: Additional Configuration Options. (line 21) * configuration option, --disable-nls: Additional Configuration Options. @@ -22866,10 +22825,9 @@ Index * cut utility: Cut Program. (line 6) * cut.awk program: Cut Program. (line 44) * d.c., See dark corner: Conventions. (line 37) -* dark corner <1>: Glossary. (line 188) +* dark corner <1>: Glossary. (line 187) * dark corner <2>: Truth Values. (line 24) * dark corner <3>: Assignment Ops. (line 148) -* dark corner <4>: Format Modifiers. (line 59) * dark corner: Conventions. (line 37) * dark corner, ^, in FS: Regexp Field Splitting. (line 59) @@ -22917,7 +22875,7 @@ Index * dates, information related to, localization: Explaining gettext. (line 111) * Davies, Stephen <1>: Bugs. (line 70) -* Davies, Stephen: Contributors. (line 68) +* Davies, Stephen: Contributors. (line 69) * dcgettext function (gawk) <1>: Programmer i18n. (line 19) * dcgettext function (gawk): I18N Functions. (line 12) * dcgettext function (gawk), portability and: I18N Portability. @@ -22933,7 +22891,7 @@ Index * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) * Deifik, Scott <1>: Bugs. (line 69) -* Deifik, Scott <2>: Contributors. (line 52) +* Deifik, Scott <2>: Contributors. (line 53) * Deifik, Scott: Acknowledgments. (line 53) * delete statement: Delete. (line 6) * deleting elements in arrays: Delete. (line 6) @@ -23019,6 +22977,7 @@ Index * double quote ("), regexp constants: Computed Regexps. (line 28) * double-precision floating-point: Basic Data Typing. (line 33) * Drepper, Ulrich: Acknowledgments. (line 49) +* DuBois, John: Acknowledgments. (line 53) * dupnode internal function: Internals. (line 97) * dupword.awk program: Dupword Program. (line 31) * EBCDIC: Ordinal Functions. (line 44) @@ -23029,7 +22988,7 @@ Index (line 6) * elements in arrays, assigning: Assigning Elements. (line 6) * elements in arrays, deleting: Delete. (line 6) -* elements in arrays, order of: Scanning an Array. (line 47) +* elements in arrays, order of: Scanning an Array. (line 48) * elements in arrays, scanning: Scanning an Array. (line 6) * email address for bug reports, bug-gawk@gnu.org: Bugs. (line 27) * EMISTERED: TCP/IP Networking. (line 6) @@ -23057,7 +23016,7 @@ Index * ENVIRON variable <1>: Internals. (line 165) * ENVIRON variable: Auto-set. (line 60) * environment variables: Auto-set. (line 60) -* epoch, definition of: Glossary. (line 230) +* epoch, definition of: Glossary. (line 229) * equals sign (=), = operator: Assignment Ops. (line 6) * equals sign (=), == operator <1>: Precedence. (line 65) * equals sign (=), == operator: Comparison Operators. @@ -23084,7 +23043,7 @@ Index (line 11) * exclamation point (!), !~ operator <1>: Expression Patterns. (line 24) -* exclamation point (!), !~ operator <2>: Precedence. (line 81) +* exclamation point (!), !~ operator <2>: Precedence. (line 80) * exclamation point (!), !~ operator <3>: Comparison Operators. (line 11) * exclamation point (!), !~ operator <4>: Regexp Constants. (line 6) @@ -23110,7 +23069,7 @@ Index (line 15) * extensions, Bell Laboratories awk: BTL. (line 6) * extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6) -* extensions, mawk: Other Versions. (line 50) +* extensions, mawk: Other Versions. (line 51) * extract.awk program: Extract Program. (line 77) * extraction, of marked strings (internationalization): String Extraction. (line 6) @@ -23241,18 +23200,17 @@ Index * formatting output: Printf. (line 6) * forward slash (/): Regexp. (line 10) * forward slash (/), / operator: Precedence. (line 55) -* forward slash (/), /= operator <1>: Precedence. (line 96) +* forward slash (/), /= operator <1>: Precedence. (line 95) * forward slash (/), /= operator: Assignment Ops. (line 129) * forward slash (/), /= operator, vs. /=.../ regexp constant: Assignment Ops. (line 148) * forward slash (/), patterns and: Expression Patterns. (line 24) * Free Documentation License (FDL): GNU Free Documentation License. (line 6) -* Free Software Foundation (FSF) <1>: Glossary. (line 284) -* Free Software Foundation (FSF) <2>: Getting. (line 10) +* Free Software Foundation (FSF) <1>: Glossary. (line 283) * Free Software Foundation (FSF): Manual History. (line 6) * free_temp internal macro: Internals. (line 102) -* FreeBSD: Glossary. (line 582) +* FreeBSD: Glossary. (line 581) * FS variable <1>: User-modified. (line 45) * FS variable: Field Separators. (line 13) * FS variable, --field-separator option and: Options. (line 21) @@ -23266,8 +23224,7 @@ Index (line 6) * FS, containing ^: Regexp Field Splitting. (line 59) -* FSF (Free Software Foundation) <1>: Glossary. (line 284) -* FSF (Free Software Foundation) <2>: Getting. (line 10) +* FSF (Free Software Foundation) <1>: Glossary. (line 283) * FSF (Free Software Foundation): Manual History. (line 6) * function calls: Function Calls. (line 6) * functions, arrays as parameters to: Function Caveats. (line 55) @@ -23313,7 +23270,7 @@ Index (line 39) * functions, user-defined, next/nextfile statements and: Next Statement. (line 39) -* G-d: Acknowledgments. (line 70) +* G-d: Acknowledgments. (line 71) * Garfinkle, Scott: Contributors. (line 37) * gawk, awk and <1>: This Manual. (line 13) * gawk, awk and: Preface. (line 22) @@ -23387,7 +23344,7 @@ Index * gawk, versions of, information about, printing: Options. (line 251) * gawk, word-boundary operator: GNU Regexp Operators. (line 55) -* General Public License (GPL): Glossary. (line 293) +* General Public License (GPL): Glossary. (line 292) * General Public License, See GPL: Manual History. (line 11) * gensub function (gawk) <1>: String Functions. (line 375) * gensub function (gawk): Using Constant Regexps. @@ -23438,22 +23395,22 @@ Index * GNU awk, See gawk: Preface. (line 48) * GNU Free Documentation License: GNU Free Documentation License. (line 6) -* GNU General Public License: Glossary. (line 293) -* GNU Lesser General Public License: Glossary. (line 373) +* GNU General Public License: Glossary. (line 292) +* GNU Lesser General Public License: Glossary. (line 372) * GNU long options <1>: Options. (line 6) * GNU long options: Command Line. (line 13) * GNU long options, printing list of: Options. (line 146) -* GNU Project <1>: Glossary. (line 302) +* GNU Project <1>: Glossary. (line 301) * GNU Project: Manual History. (line 11) -* GNU/Linux <1>: Glossary. (line 582) +* GNU/Linux <1>: Glossary. (line 581) * GNU/Linux <2>: Atari Compiling. (line 16) * GNU/Linux <3>: I18N Example. (line 55) * GNU/Linux: Manual History. (line 28) -* GPL (General Public License) <1>: Glossary. (line 293) +* GPL (General Public License) <1>: Glossary. (line 292) * GPL (General Public License): Manual History. (line 11) * GPL (General Public License), printing: Options. (line 94) * grcat program: Group Functions. (line 15) -* Grigera, Juan: Contributors. (line 54) +* Grigera, Juan: Contributors. (line 55) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) * groups, information about: Group Functions. (line 6) @@ -23462,11 +23419,11 @@ Index (line 44) * gsub function, arguments of: String Functions. (line 339) * gsub function, escape processing: Gory Details. (line 6) -* Hankerson, Darrel <1>: Contributors. (line 56) +* Hankerson, Darrel <1>: Contributors. (line 57) * Hankerson, Darrel: Acknowledgments. (line 53) * Hartholz, Elaine: Acknowledgments. (line 35) * Hartholz, Marshall: Acknowledgments. (line 35) -* Hasegawa, Isamu: Contributors. (line 83) +* Hasegawa, Isamu: Contributors. (line 86) * hexadecimal numbers: Nondecimal-numbers. (line 6) * hexadecimal values, enabling interpretation of: Options. (line 175) * histsort.awk program: History Sorting. (line 25) @@ -23475,7 +23432,7 @@ Index * hyphen (-), - operator: Precedence. (line 52) * hyphen (-), -- (decrement/increment) operators: Precedence. (line 46) * hyphen (-), -- operator: Increment Ops. (line 48) -* hyphen (-), -= operator <1>: Precedence. (line 96) +* hyphen (-), -= operator <1>: Precedence. (line 95) * hyphen (-), -= operator: Assignment Ops. (line 129) * hyphen (-), filenames beginning with: Options. (line 67) * hyphen (-), in character lists: Character Lists. (line 17) @@ -23488,7 +23445,7 @@ Index * IGNORECASE variable <1>: User-modified. (line 70) * IGNORECASE variable: Case-sensitivity. (line 26) * IGNORECASE variable, array sorting and: Array Sorting. (line 86) -* IGNORECASE variable, array subscripts and: Array Intro. (line 87) +* IGNORECASE variable, array subscripts and: Array Intro. (line 92) * IGNORECASE variable, in example programs: Library Functions. (line 43) * implementation issues, gawk: Notes. (line 6) @@ -23497,7 +23454,7 @@ Index * implementation issues, gawk, limits: Getline Notes. (line 14) * in operator <1>: Id Program. (line 93) * in operator <2>: For Statement. (line 74) -* in operator <3>: Precedence. (line 84) +* in operator <3>: Precedence. (line 83) * in operator: Comparison Operators. (line 11) * in operator, arrays and <1>: Scanning an Array. (line 17) @@ -23505,7 +23462,7 @@ Index (line 25) * increment operators: Increment Ops. (line 6) * index function: String Functions. (line 60) -* indexing arrays: Array Intro. (line 45) +* indexing arrays: Array Intro. (line 50) * initialization, automatic: More Complex. (line 38) * input files: Reading Files. (line 6) * input files, closing: Close Files And Pipes. @@ -23529,7 +23486,6 @@ Index * input/output, from BEGIN and END: I/O And BEGIN/END. (line 6) * input/output, two-way: Two-way I/O. (line 44) * insomnia, cure for: Alarm Program. (line 6) -* installation, amiga: Amiga Installation. (line 6) * installation, atari: Atari Installation. (line 9) * installation, beos: BeOS Installation. (line 6) * installation, tandem: Tandem Installation. (line 6) @@ -23556,31 +23512,32 @@ Index * internationalization, localization, portability and: I18N Portability. (line 6) * internationalizing a program: Explaining gettext. (line 6) -* interpreted programs <1>: Glossary. (line 342) +* interpreted programs <1>: Glossary. (line 341) * interpreted programs: Basic High Level. (line 14) * interval expressions: Regexp Operators. (line 115) * inventory-shipped file: Sample Data Files. (line 32) * IOBUF internal structure: Internals. (line 178) * iop_alloc internal function: Internals. (line 178) -* ISO: Glossary. (line 353) -* ISO 8859-1: Glossary. (line 138) -* ISO Latin-1: Glossary. (line 138) +* ISO: Glossary. (line 352) +* ISO 8859-1: Glossary. (line 137) +* ISO Latin-1: Glossary. (line 137) * Jacobs, Andrew: Passwd Functions. (line 76) * Jaegermann, Michal <1>: Contributors. (line 45) * Jaegermann, Michal: Acknowledgments. (line 53) -* Java implementation of awk: Other Versions. (line 110) -* jawk: Other Versions. (line 110) +* Java implementation of awk: Other Versions. (line 111) +* jawk: Other Versions. (line 111) * Jedi knights: Undocumented. (line 6) * join user-defined function: Join Function. (line 18) -* Kahrs, Ju"rgen <1>: Contributors. (line 64) +* Kahrs, Ju"rgen <1>: Contributors. (line 65) * Kahrs, Ju"rgen: Acknowledgments. (line 53) +* Kasal, Stepan: Acknowledgments. (line 53) * Kenobi, Obi-Wan: Undocumented. (line 6) * Kernighan, Brian <1>: Basic Data Typing. (line 71) * Kernighan, Brian <2>: Other Versions. (line 13) * Kernighan, Brian <3>: Contributors. (line 12) * Kernighan, Brian <4>: BTL. (line 6) * Kernighan, Brian <5>: Concatenation. (line 6) -* Kernighan, Brian <6>: Acknowledgments. (line 60) +* Kernighan, Brian <6>: Acknowledgments. (line 61) * Kernighan, Brian <7>: Conventions. (line 33) * Kernighan, Brian: History. (line 17) * kill command, dynamic profiling: Profiling. (line 185) @@ -23608,8 +23565,8 @@ Index * left shift, bitwise: Bitwise Functions. (line 32) * leftmost longest match: Multiple Line. (line 26) * length function: String Functions. (line 71) -* Lesser General Public License (LGPL): Glossary. (line 373) -* LGPL (Lesser General Public License): Glossary. (line 373) +* Lesser General Public License (LGPL): Glossary. (line 372) +* LGPL (Lesser General Public License): Glossary. (line 372) * libraries of awk functions: Library Functions. (line 6) * libraries of awk functions, assertions: Assert Function. (line 6) * libraries of awk functions, associative arrays and: Library Names. @@ -23654,7 +23611,7 @@ Index (line 289) * lint checking, undefined functions: Function Caveats. (line 96) * LINT variable: User-modified. (line 85) -* Linux <1>: Glossary. (line 582) +* Linux <1>: Glossary. (line 581) * Linux <2>: Atari Compiling. (line 16) * Linux <3>: I18N Example. (line 55) * Linux: Manual History. (line 28) @@ -23695,8 +23652,8 @@ Index (line 9) * matching, leftmost longest: Multiple Line. (line 26) * matching, null strings: Gory Details. (line 160) -* mawk program: Other Versions. (line 33) -* McPhee, Patrick: Contributors. (line 89) +* mawk program: Other Versions. (line 34) +* McPhee, Patrick: Contributors. (line 92) * memory, releasing: Internals. (line 102) * memory, setting limits: Options. (line 45) * message object files: Explaining gettext. (line 39) @@ -23720,7 +23677,7 @@ Index * namespace issues, functions: Definition Syntax. (line 20) * nawk utility: Names. (line 17) * negative zero: Unexpected Results. (line 28) -* NetBSD: Glossary. (line 582) +* NetBSD: Glossary. (line 581) * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) * newlines <1>: Options. (line 190) @@ -23734,7 +23691,7 @@ Index * newlines, separating statements in actions <1>: Statements. (line 10) * newlines, separating statements in actions: Action Overview. (line 19) -* next file statement: POSIX/GNU. (line 155) +* next file statement: POSIX/GNU. (line 153) * next file statement, deprecated: Obsolete. (line 11) * next file statement, in gawk: Nextfile Statement. (line 46) * next statement <1>: Next Statement. (line 6) @@ -23807,7 +23764,7 @@ Index * OFS variable <1>: User-modified. (line 111) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) -* OpenBSD: Glossary. (line 582) +* OpenBSD: Glossary. (line 581) * OpenSolaris: Other Versions. (line 101) * operating systems, BSD-based <1>: Portal Files. (line 6) * operating systems, BSD-based: Manual History. (line 28) @@ -23874,7 +23831,7 @@ Index * output, printing, See printing: Printing. (line 6) * output, records: Output Separators. (line 20) * output, standard: Special FD. (line 6) -* P1003.2 POSIX standard: Glossary. (line 426) +* P1003.2 POSIX standard: Glossary. (line 425) * param_cnt internal variable: Internals. (line 46) * parameters, number of: Internals. (line 46) * parentheses (): Regexp Operators. (line 78) @@ -23894,11 +23851,11 @@ Index * PC operating systems, gawk on: PC Using. (line 6) * PC operating systems, gawk on, installing: PC Installation. (line 6) * percent sign (%), % operator: Precedence. (line 55) -* percent sign (%), %= operator <1>: Precedence. (line 96) +* percent sign (%), %= operator <1>: Precedence. (line 95) * percent sign (%), %= operator: Assignment Ops. (line 129) * period (.): Regexp Operators. (line 43) * PERL: Future Extensions. (line 6) -* Peters, Arno: Contributors. (line 74) +* Peters, Arno: Contributors. (line 77) * Peterson, Hal: Contributors. (line 40) * pgawk program: Profiling. (line 6) * pgawk program, awkprof.out file: Profiling. (line 10) @@ -23908,11 +23865,12 @@ Index * pipes, input: Getline/Pipe. (line 6) * pipes, output: Redirection. (line 54) * Pitts, Dave: Bugs. (line 73) +* Pitts, Davi: Acknowledgments. (line 53) * plus sign (+): Regexp Operators. (line 101) * plus sign (+), + operator: Precedence. (line 52) * plus sign (+), ++ operator <1>: Precedence. (line 46) * plus sign (+), ++ operator: Increment Ops. (line 40) -* plus sign (+), += operator <1>: Precedence. (line 96) +* plus sign (+), += operator <1>: Precedence. (line 95) * plus sign (+), += operator: Assignment Ops. (line 82) * plus sign (+), decrement/increment operators: Increment Ops. (line 11) @@ -23940,7 +23898,7 @@ Index (line 99) * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 61) -* portability, operators, not in POSIX awk: Precedence. (line 100) +* portability, operators, not in POSIX awk: Precedence. (line 98) * portability, POSIXLY_CORRECT environment variable: Options. (line 307) * portability, substr function: String Functions. (line 457) * portable object files <1>: Translator i18n. (line 6) @@ -24001,7 +23959,7 @@ Index * print statement: Printing. (line 16) * print statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 16) * print statement, commas, omitting: Print Examples. (line 31) -* print statement, I/O operators in: Precedence. (line 72) +* print statement, I/O operators in: Precedence. (line 71) * print statement, line continuations and: Print Examples. (line 76) * print statement, OFMT variable and: User-modified. (line 111) * print statement, See Also redirection, of output: Redirection. @@ -24012,7 +23970,7 @@ Index * printf statement, columns, aligning: Print Examples. (line 70) * printf statement, format-control characters: Control Letters. (line 6) -* printf statement, I/O operators in: Precedence. (line 72) +* printf statement, I/O operators in: Precedence. (line 71) * printf statement, modifiers: Format Modifiers. (line 6) * printf statement, positional specifiers <1>: Printf Ordering. (line 6) @@ -24063,12 +24021,12 @@ Index * programming, basic steps: Basic High Level. (line 19) * programming, concepts: Basic Concepts. (line 6) * pwcat program: Passwd Functions. (line 23) -* QTawk: Other Versions. (line 117) +* QSE Awk: Other Versions. (line 126) * question mark (?) <1>: GNU Regexp Operators. (line 51) * question mark (?): Regexp Operators. (line 110) -* question mark (?), ?: operator: Precedence. (line 93) -* QuikTrim Awk: Other Versions. (line 117) +* question mark (?), ?: operator: Precedence. (line 92) +* QuikTrim Awk: Other Versions. (line 119) * QUIT signal (MS-DOS): Profiling. (line 210) * quoting <1>: Comments. (line 27) * quoting <2>: Long. (line 26) @@ -24174,22 +24132,21 @@ Index * RLENGTH variable, match function and: String Functions. (line 129) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 29) -* Robbins, Arnold <3>: Contributors. (line 92) +* Robbins, Arnold <3>: Contributors. (line 95) * Robbins, Arnold <4>: Alarm Program. (line 6) * Robbins, Arnold <5>: Passwd Functions. (line 76) * Robbins, Arnold <6>: Getline/Pipe. (line 36) * Robbins, Arnold: Command Line Field Separator. (line 80) * Robbins, Bill: Getline/Pipe. (line 36) -* Robbins, Harry: Acknowledgments. (line 70) -* Robbins, Jean: Acknowledgments. (line 70) +* Robbins, Harry: Acknowledgments. (line 71) +* Robbins, Jean: Acknowledgments. (line 71) * Robbins, Miriam <1>: Passwd Functions. (line 76) * Robbins, Miriam <2>: Getline/Pipe. (line 36) -* Robbins, Miriam: Acknowledgments. (line 70) +* Robbins, Miriam: Acknowledgments. (line 71) * Robinson, Will: Dynamic Extensions. (line 6) * robot, the: Dynamic Extensions. (line 6) -* Rommel, Kai Uwe <1>: Contributors. (line 42) -* Rommel, Kai Uwe: Acknowledgments. (line 53) +* Rommel, Kai Uwe: Contributors. (line 42) * round user-defined function: Round Function. (line 16) * rounding: Round Function. (line 6) * rounding numbers: Round Function. (line 6) @@ -24207,6 +24164,7 @@ Index * rule, definition of: Getting Started. (line 21) * rvalues/lvalues: Assignment Ops. (line 32) * scalar values: Basic Data Typing. (line 13) +* Schorr, Andrew: Acknowledgments. (line 53) * Schreiber, Bert: Acknowledgments. (line 35) * Schreiber, Rita: Acknowledgments. (line 35) * search paths <1>: VMS Running. (line 28) @@ -24282,10 +24240,10 @@ Index * source code, awka: Other Versions. (line 81) * source code, Bell Laboratories awk: Other Versions. (line 13) * source code, gawk: Gawk Distribution. (line 6) -* source code, mawk: Other Versions. (line 33) +* source code, mawk: Other Versions. (line 34) * source code, mixing: Options. (line 238) * source files, search path for: Igawk Program. (line 358) -* sparse arrays: Array Intro. (line 66) +* sparse arrays: Array Intro. (line 71) * Spencer, Henry: Glossary. (line 12) * split function: String Functions. (line 200) * split function, array elements, deleting: Delete. (line 56) @@ -24299,7 +24257,7 @@ Index * sqrt function: Numeric Functions. (line 18) * square brackets ([]): Regexp Operators. (line 55) * srand function: Numeric Functions. (line 80) -* Stallman, Richard <1>: Glossary. (line 284) +* Stallman, Richard <1>: Glossary. (line 283) * Stallman, Richard <2>: Contributors. (line 24) * Stallman, Richard <3>: Acknowledgments. (line 18) * Stallman, Richard: Manual History. (line 6) @@ -24389,7 +24347,7 @@ Index * TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n. (line 58) * TEXTDOMAIN variable, portability and: I18N Portability. (line 20) * tilde (~), ~ operator <1>: Expression Patterns. (line 24) -* tilde (~), ~ operator <2>: Precedence. (line 81) +* tilde (~), ~ operator <2>: Precedence. (line 80) * tilde (~), ~ operator <3>: Comparison Operators. (line 11) * tilde (~), ~ operator <4>: Regexp Constants. (line 6) @@ -24463,7 +24421,7 @@ Index (line 6) * uniq utility: Uniq Program. (line 6) * uniq.awk program: Uniq Program. (line 65) -* Unix: Glossary. (line 582) +* Unix: Glossary. (line 581) * Unix awk, backslashes in escape sequences: Escape Sequences. (line 125) * Unix awk, close function and: Close Files And Pipes. @@ -24522,11 +24480,14 @@ Index * vertical bar (|), |& operator (I/O): Getline/Coprocess. (line 6) * vertical bar (|), |& operator (I/O), two-way communications: Portal Files. (line 10) -* vertical bar (|), || operator <1>: Precedence. (line 90) +* vertical bar (|), || operator <1>: Precedence. (line 89) * vertical bar (|), || operator: Boolean Ops. (line 57) +* Vinschen, Corinna: Acknowledgments. (line 53) * vname internal variable: Internals. (line 62) * w utility: Constant Size. (line 22) -* Wall, Larry: Future Extensions. (line 6) +* Wall, Larry <1>: Future Extensions. (line 6) +* Wall, Larry: Array Intro. (line 6) +* Wallin, Anders: Acknowledgments. (line 53) * warnings, issuing: Options. (line 151) * wc utility: Wc Program. (line 6) * wc.awk program: Wc Program. (line 45) @@ -24537,8 +24498,10 @@ Index * whitespace, as field separators: Field Separators. (line 63) * whitespace, functions, calling: Calling Built-in. (line 10) * whitespace, newlines as: Options. (line 190) -* Wildenhues, Ralf: Bugs. (line 71) +* Wildenhues, Ralf <1>: Bugs. (line 71) +* Wildenhues, Ralf: Contributors. (line 72) * Williams, Kent: Contributors. (line 37) +* Woehlke, Matthew: Contributors. (line 72) * Woods, John: Contributors. (line 28) * word boundaries, matching: GNU Regexp Operators. (line 30) @@ -24554,10 +24517,11 @@ Index * XML: Internals. (line 178) * XOR bitwise operation: Bitwise Functions. (line 6) * xor function (gawk): Bitwise Functions. (line 41) +* Zaretskii, Eli <1>: Bugs. (line 69) * Zaretskii, Eli: Acknowledgments. (line 53) * zero, negative vs. positive: Unexpected Results. (line 28) * zerofile.awk program: Empty Files. (line 21) -* Zoulas, Christos: Contributors. (line 61) +* Zoulas, Christos: Contributors. (line 62) * {} (braces), actions and: Action Overview. (line 19) * {} (braces), pgawk program: Profiling. (line 140) * {} (braces), statements, grouping: Statements. (line 10) @@ -24573,10 +24537,10 @@ Index (line 117) * | (vertical bar), |& operator (I/O), two-way communications: Portal Files. (line 10) -* | (vertical bar), || operator <1>: Precedence. (line 90) +* | (vertical bar), || operator <1>: Precedence. (line 89) * | (vertical bar), || operator: Boolean Ops. (line 57) * ~ (tilde), ~ operator <1>: Expression Patterns. (line 24) -* ~ (tilde), ~ operator <2>: Precedence. (line 81) +* ~ (tilde), ~ operator <2>: Precedence. (line 80) * ~ (tilde), ~ operator <3>: Comparison Operators. (line 11) * ~ (tilde), ~ operator <4>: Regexp Constants. (line 6) @@ -24586,373 +24550,367 @@ Index Tag Table: -Node: Top1334 -Node: Foreword27620 -Node: Preface31941 -Ref: Preface-Footnote-134820 -Node: History35052 -Node: Names37268 -Ref: Names-Footnote-138740 -Node: This Manual38812 -Ref: This Manual-Footnote-143567 -Node: Conventions43667 -Node: Manual History45541 -Ref: Manual History-Footnote-148994 -Ref: Manual History-Footnote-249035 -Node: How To Contribute49109 -Node: Acknowledgments50251 -Node: Getting Started54037 -Node: Running gawk56409 -Node: One-shot57595 -Node: Read Terminal58820 -Ref: Read Terminal-Footnote-160478 -Node: Long60649 -Node: Executable Scripts62025 -Ref: Executable Scripts-Footnote-163921 -Ref: Executable Scripts-Footnote-264072 -Node: Comments64523 -Node: Quoting66891 -Node: DOS Quoting71471 -Node: Sample Data Files72143 -Node: Very Simple75175 -Node: Two Rules79780 -Node: More Complex81927 -Ref: More Complex-Footnote-184850 -Ref: More Complex-Footnote-285298 -Node: Statements/Lines85381 -Ref: Statements/Lines-Footnote-189763 -Node: Other Features90028 -Node: When90880 -Ref: When-Footnote-193119 -Node: Regexp93204 -Node: Regexp Usage94658 -Node: Escape Sequences96710 -Node: Regexp Operators102449 -Ref: Regexp Operators-Footnote-1109556 -Ref: Regexp Operators-Footnote-2109703 -Node: Character Lists109801 -Ref: table-char-classes111758 -Node: GNU Regexp Operators114383 -Node: Case-sensitivity118027 -Ref: Case-sensitivity-Footnote-1121200 -Node: Leftmost Longest121435 -Node: Computed Regexps122626 -Node: Locales126007 -Node: Reading Files128273 -Node: Records130030 -Ref: Records-Footnote-1138588 -Node: Fields138625 -Ref: Fields-Footnote-1141655 -Node: Nonconstant Fields141741 -Node: Changing Fields143943 -Node: Field Separators149224 -Node: Regexp Field Splitting152715 -Node: Single Character Fields156268 -Node: Command Line Field Separator157319 -Node: Field Splitting Summary160758 -Ref: Field Splitting Summary-Footnote-1163944 -Node: Constant Size164045 -Node: Multiple Line168522 -Ref: Multiple Line-Footnote-1174253 -Node: Getline174432 -Node: Plain Getline176500 -Node: Getline/Variable178587 -Node: Getline/File179728 -Node: Getline/Variable/File181052 -Node: Getline/Pipe182611 -Node: Getline/Variable/Pipe185208 -Node: Getline/Coprocess186315 -Node: Getline/Variable/Coprocess187558 -Node: Getline Notes188272 -Node: Getline Summary189915 -Ref: table-getline-variants190199 -Node: Printing190765 -Node: Print192394 -Node: Print Examples193720 -Node: Output Separators196515 -Node: OFMT198276 -Node: Printf199631 -Node: Basic Printf200550 -Node: Control Letters202085 -Node: Format Modifiers205968 -Node: Printf Examples211986 -Node: Redirection214703 -Node: Special Files221600 -Node: Special FD222234 -Node: Special Process225260 -Node: Special Network227495 -Node: Special Caveats228337 -Ref: Special Caveats-Footnote-1229535 -Node: Close Files And Pipes229918 -Ref: Close Files And Pipes-Footnote-1236839 -Ref: Close Files And Pipes-Footnote-2236987 -Node: Expressions237135 -Node: Constants239324 -Node: Scalar Constants240005 -Ref: Scalar Constants-Footnote-1240860 -Node: Nondecimal-numbers241042 -Node: Regexp Constants244100 -Node: Using Constant Regexps244573 -Node: Variables247656 -Node: Using Variables248312 -Node: Assignment Options249822 -Node: Conversion251699 -Ref: table-locale-affects257130 -Ref: Conversion-Footnote-1257754 -Node: Arithmetic Ops257863 -Node: Concatenation260375 -Ref: Concatenation-Footnote-1263157 -Node: Assignment Ops263248 -Ref: table-assign-ops268226 -Node: Increment Ops269627 -Node: Truth Values273120 -Node: Typing and Comparison274170 -Node: Variable Typing274873 -Ref: Variable Typing-Footnote-1278559 -Node: Comparison Operators278703 -Ref: table-relational-ops279079 -Node: Boolean Ops282628 -Ref: Boolean Ops-Footnote-1286688 -Node: Conditional Exp286779 -Node: Function Calls288516 -Node: Precedence291798 -Node: Patterns and Actions295454 -Node: Pattern Overview296508 -Node: Regexp Patterns297945 -Node: Expression Patterns298488 -Node: Ranges302038 -Node: BEGIN/END305127 -Node: Using BEGIN/END305877 -Ref: Using BEGIN/END-Footnote-1308609 -Node: I/O And BEGIN/END308723 -Node: Empty310990 -Node: Using Shell Variables311298 -Node: Action Overview313579 -Node: Statements315937 -Node: If Statement317793 -Node: While Statement319292 -Node: Do Statement321324 -Node: For Statement322473 -Node: Switch Statement325613 -Node: Break Statement327889 -Node: Continue Statement329946 -Node: Next Statement331850 -Node: Nextfile Statement334130 -Node: Exit Statement336727 -Node: Built-in Variables338998 -Node: User-modified340093 -Ref: User-modified-Footnote-1347458 -Node: Auto-set347520 -Ref: Auto-set-Footnote-1355860 -Node: ARGC and ARGV356065 -Node: Arrays359777 -Node: Array Intro361685 -Node: Reference to Elements365882 -Node: Assigning Elements367749 -Node: Array Example368216 -Node: Scanning an Array369938 -Node: Delete372205 -Ref: Delete-Footnote-1374587 -Node: Numeric Array Subscripts374644 -Node: Uninitialized Subscripts376831 -Node: Multi-dimensional378437 -Node: Multi-scanning381450 -Node: Array Sorting383065 -Node: Functions386728 -Node: Built-in387463 -Node: Calling Built-in388433 -Node: Numeric Functions390400 -Ref: Numeric Functions-Footnote-1394142 -Ref: Numeric Functions-Footnote-2394468 -Node: String Functions394737 -Ref: String Functions-Footnote-1415118 -Ref: String Functions-Footnote-2415247 -Ref: String Functions-Footnote-3415495 -Node: Gory Details415582 -Ref: table-sub-escapes417217 -Ref: table-sub-posix-92418552 -Ref: table-sub-proposed419891 -Ref: table-posix-2001-sub421243 -Ref: table-gensub-escapes422580 -Ref: Gory Details-Footnote-1423766 -Node: I/O Functions423817 -Ref: I/O Functions-Footnote-1430468 -Node: Time Functions430559 -Ref: Time Functions-Footnote-1441351 -Ref: Time Functions-Footnote-2441419 -Ref: Time Functions-Footnote-3441577 -Ref: Time Functions-Footnote-4441688 -Ref: Time Functions-Footnote-5441813 -Ref: Time Functions-Footnote-6442040 -Node: Bitwise Functions442302 -Ref: table-bitwise-ops442880 -Ref: Bitwise Functions-Footnote-1447114 -Node: I18N Functions447298 -Node: User-defined449019 -Node: Definition Syntax449800 -Node: Function Example454376 -Node: Function Caveats456956 -Node: Return Statement460881 -Node: Dynamic Typing463538 -Node: Internationalization464275 -Node: I18N and L10N465694 -Node: Explaining gettext466378 -Ref: Explaining gettext-Footnote-1471285 -Ref: Explaining gettext-Footnote-2471524 -Node: Programmer i18n471693 -Node: Translator i18n475916 -Node: String Extraction476706 -Ref: String Extraction-Footnote-1477656 -Node: Printf Ordering477782 -Ref: Printf Ordering-Footnote-1480560 -Node: I18N Portability480624 -Ref: I18N Portability-Footnote-1483052 -Node: I18N Example483115 -Ref: I18N Example-Footnote-1485727 -Node: Gawk I18N485799 -Node: Advanced Features486381 -Node: Nondecimal Data487780 -Node: Two-way I/O489339 -Ref: Two-way I/O-Footnote-1494820 -Node: TCP/IP Networking494897 -Node: Portal Files497326 -Node: Profiling497970 -Node: Invoking Gawk505426 -Node: Command Line506660 -Node: Options507445 -Ref: Options-Footnote-1520522 -Node: Other Arguments520547 -Node: AWKPATH Variable523228 -Ref: AWKPATH Variable-Footnote-1526000 -Node: Exit Status526260 -Node: Obsolete526922 -Node: Undocumented527921 -Node: Known Bugs528186 -Node: Library Functions528788 -Ref: Library Functions-Footnote-1531769 -Node: Library Names531940 -Ref: Library Names-Footnote-1535413 -Ref: Library Names-Footnote-2535632 -Node: General Functions535718 -Node: Nextfile Function536777 -Node: Strtonum Function541141 -Node: Assert Function544076 -Node: Round Function547380 -Node: Cliff Random Function548913 -Ref: Cliff Random Function-Footnote-1549902 -Node: Ordinal Functions549973 -Ref: Ordinal Functions-Footnote-1553033 -Node: Join Function553249 -Ref: Join Function-Footnote-1555009 -Node: Gettimeofday Function555209 -Node: Data File Management558912 -Node: Filetrans Function559544 -Node: Rewind Function562970 -Node: File Checking564416 -Node: Empty Files565446 -Node: Ignoring Assigns567671 -Node: Getopt Function569219 -Ref: Getopt Function-Footnote-1580497 -Node: Passwd Functions580698 -Ref: Passwd Functions-Footnote-1589359 -Node: Group Functions589447 -Node: Sample Programs597445 -Node: Running Examples598122 -Node: Clones598850 -Node: Cut Program599982 -Node: Egrep Program609739 -Ref: Egrep Program-Footnote-1617489 -Node: Id Program617599 -Node: Split Program621206 -Node: Tee Program624670 -Node: Uniq Program627347 -Node: Wc Program634715 -Ref: Wc Program-Footnote-1638959 -Node: Miscellaneous Programs639155 -Node: Dupword Program640275 -Node: Alarm Program642306 -Node: Translate Program646846 -Ref: Translate Program-Footnote-1651214 -Ref: Translate Program-Footnote-2651451 -Node: Labels Program651585 -Ref: Labels Program-Footnote-1654876 -Node: Word Sorting654960 -Node: History Sorting659243 -Node: Extract Program661081 -Node: Simple Sed668433 -Node: Igawk Program671488 -Ref: Igawk Program-Footnote-1686219 -Ref: Igawk Program-Footnote-2686420 -Node: Signature Program686558 -Node: Language History687638 -Node: V7/SVR3.1689022 -Node: SVR4691286 -Node: POSIX692725 -Node: BTL694333 -Node: POSIX/GNU695858 -Node: Contributors704025 -Node: Installation707561 -Node: Gawk Distribution708532 -Node: Getting709016 -Node: Extracting710250 -Node: Distribution contents711638 -Node: Unix Installation716719 -Node: Quick Installation717310 -Node: Additional Configuration Options719012 -Node: Configuration Philosophy721172 -Node: Non-Unix Installation723536 -Node: Amiga Installation724123 -Node: BeOS Installation725219 -Node: PC Installation726372 -Node: PC Binary Installation727602 -Node: PC Compiling729445 -Node: PC Dynamic733941 -Node: PC Using736302 -Node: Cygwin740852 -Ref: Cygwin-Footnote-1741850 -Node: VMS Installation741882 -Node: VMS Compilation742486 -Node: VMS Installation Details744063 -Node: VMS Running745693 -Node: VMS POSIX747290 -Node: VMS Old Gawk748588 -Node: Unsupported749057 -Node: Atari Installation749460 -Node: Atari Compiling750749 -Node: Atari Using752634 -Node: Tandem Installation755479 -Node: Bugs757159 -Node: Other Versions761065 -Ref: Other Versions-Footnote-1766114 -Ref: Other Versions-Footnote-2766157 -Ref: Other Versions-Footnote-3766194 -Node: Notes766232 -Node: Compatibility Mode766924 -Node: Additions767718 -Node: Adding Code768468 -Node: New Ports774518 -Node: Dynamic Extensions778650 -Node: Internals779907 -Node: Sample Library790910 -Node: Internal File Description791569 -Node: Internal File Ops795262 -Ref: Internal File Ops-Footnote-1800588 -Node: Using Internal File Ops800736 -Node: Future Extensions802759 -Node: Basic Concepts806712 -Node: Basic High Level807469 -Ref: Basic High Level-Footnote-1811501 -Node: Basic Data Typing811695 -Node: Floating Point Issues816132 -Ref: Floating Point Issues-Footnote-1817218 -Node: String Conversion Precision817271 -Ref: String Conversion Precision-Footnote-1818965 -Node: Unexpected Results819074 -Node: POSIX Floating Point Problems820900 -Ref: POSIX Floating Point Problems-Footnote-1824374 -Node: Glossary824412 -Node: Copying848180 -Node: GNU Free Documentation License885737 -Node: Index910874 +Node: Top1340 +Node: Foreword27566 +Node: Preface31887 +Ref: Preface-Footnote-134756 +Node: History34988 +Node: Names37204 +Ref: Names-Footnote-138676 +Node: This Manual38748 +Ref: This Manual-Footnote-143503 +Node: Conventions43603 +Node: Manual History45477 +Ref: Manual History-Footnote-148930 +Ref: Manual History-Footnote-248971 +Node: How To Contribute49045 +Node: Acknowledgments50189 +Node: Getting Started54049 +Node: Running gawk56421 +Node: One-shot57607 +Node: Read Terminal58832 +Ref: Read Terminal-Footnote-160490 +Node: Long60661 +Node: Executable Scripts62037 +Ref: Executable Scripts-Footnote-163933 +Ref: Executable Scripts-Footnote-264084 +Node: Comments64535 +Node: Quoting66903 +Node: DOS Quoting71483 +Node: Sample Data Files72155 +Node: Very Simple75187 +Node: Two Rules79792 +Node: More Complex81939 +Ref: More Complex-Footnote-184862 +Ref: More Complex-Footnote-285310 +Node: Statements/Lines85393 +Ref: Statements/Lines-Footnote-189775 +Node: Other Features90040 +Node: When90892 +Node: Regexp93148 +Node: Regexp Usage94602 +Node: Escape Sequences96654 +Node: Regexp Operators102393 +Ref: Regexp Operators-Footnote-1109500 +Ref: Regexp Operators-Footnote-2109647 +Node: Character Lists109745 +Ref: table-char-classes111702 +Node: GNU Regexp Operators114327 +Node: Case-sensitivity117971 +Ref: Case-sensitivity-Footnote-1121144 +Node: Leftmost Longest121379 +Node: Computed Regexps122570 +Node: Locales125951 +Node: Reading Files128217 +Node: Records129974 +Ref: Records-Footnote-1138532 +Node: Fields138569 +Ref: Fields-Footnote-1141599 +Node: Nonconstant Fields141685 +Node: Changing Fields143887 +Node: Field Separators149168 +Node: Regexp Field Splitting152659 +Node: Single Character Fields156212 +Node: Command Line Field Separator157263 +Node: Field Splitting Summary160702 +Ref: Field Splitting Summary-Footnote-1163888 +Node: Constant Size163989 +Node: Multiple Line168466 +Ref: Multiple Line-Footnote-1174197 +Node: Getline174376 +Node: Plain Getline176444 +Node: Getline/Variable178531 +Node: Getline/File179672 +Node: Getline/Variable/File180996 +Ref: Getline/Variable/File-Footnote-1182593 +Node: Getline/Pipe182680 +Node: Getline/Variable/Pipe185277 +Node: Getline/Coprocess186384 +Node: Getline/Variable/Coprocess187627 +Node: Getline Notes188341 +Node: Getline Summary189984 +Ref: table-getline-variants190268 +Node: Printing190834 +Node: Print192463 +Node: Print Examples193789 +Node: Output Separators196584 +Node: OFMT198345 +Node: Printf199700 +Node: Basic Printf200619 +Node: Control Letters202154 +Node: Format Modifiers206037 +Node: Printf Examples212047 +Node: Redirection214764 +Node: Special Files221661 +Node: Special FD222295 +Node: Special Process225321 +Node: Special Network227556 +Node: Special Caveats228398 +Ref: Special Caveats-Footnote-1229596 +Node: Close Files And Pipes229979 +Ref: Close Files And Pipes-Footnote-1236900 +Ref: Close Files And Pipes-Footnote-2237048 +Node: Expressions237196 +Node: Constants239385 +Node: Scalar Constants240066 +Ref: Scalar Constants-Footnote-1240921 +Node: Nondecimal-numbers241103 +Node: Regexp Constants244161 +Node: Using Constant Regexps244634 +Node: Variables247717 +Node: Using Variables248373 +Node: Assignment Options249883 +Node: Conversion251760 +Ref: table-locale-affects257191 +Ref: Conversion-Footnote-1257815 +Node: Arithmetic Ops257924 +Node: Concatenation260436 +Ref: Concatenation-Footnote-1263218 +Node: Assignment Ops263309 +Ref: table-assign-ops268287 +Node: Increment Ops269688 +Node: Truth Values273181 +Node: Typing and Comparison274231 +Node: Variable Typing274934 +Ref: Variable Typing-Footnote-1278620 +Node: Comparison Operators278764 +Ref: table-relational-ops279140 +Node: Boolean Ops282689 +Ref: Boolean Ops-Footnote-1286749 +Node: Conditional Exp286840 +Node: Function Calls288577 +Node: Precedence291859 +Node: Patterns and Actions295511 +Node: Pattern Overview296565 +Node: Regexp Patterns298002 +Node: Expression Patterns298545 +Node: Ranges302095 +Node: BEGIN/END305184 +Node: Using BEGIN/END305934 +Ref: Using BEGIN/END-Footnote-1308666 +Node: I/O And BEGIN/END308780 +Node: Empty311047 +Node: Using Shell Variables311355 +Node: Action Overview313636 +Node: Statements315994 +Node: If Statement317850 +Node: While Statement319349 +Node: Do Statement321381 +Node: For Statement322530 +Node: Switch Statement325670 +Node: Break Statement327946 +Node: Continue Statement330003 +Node: Next Statement331907 +Node: Nextfile Statement334187 +Node: Exit Statement336784 +Node: Built-in Variables339055 +Node: User-modified340150 +Ref: User-modified-Footnote-1347515 +Node: Auto-set347577 +Ref: Auto-set-Footnote-1355917 +Node: ARGC and ARGV356122 +Node: Arrays359834 +Node: Array Intro361742 +Node: Reference to Elements366076 +Node: Assigning Elements367965 +Node: Array Example368446 +Node: Scanning an Array370168 +Node: Delete372448 +Ref: Delete-Footnote-1374841 +Node: Numeric Array Subscripts374898 +Node: Uninitialized Subscripts377085 +Node: Multi-dimensional378691 +Node: Multi-scanning381704 +Node: Array Sorting383319 +Node: Functions386982 +Node: Built-in387717 +Node: Calling Built-in388687 +Node: Numeric Functions390654 +Ref: Numeric Functions-Footnote-1394396 +Ref: Numeric Functions-Footnote-2394722 +Node: String Functions394991 +Ref: String Functions-Footnote-1415372 +Ref: String Functions-Footnote-2415501 +Ref: String Functions-Footnote-3415749 +Node: Gory Details415836 +Ref: table-sub-escapes417471 +Ref: table-sub-posix-92418806 +Ref: table-sub-proposed420145 +Ref: table-posix-2001-sub421497 +Ref: table-gensub-escapes422834 +Ref: Gory Details-Footnote-1424020 +Node: I/O Functions424071 +Ref: I/O Functions-Footnote-1430722 +Node: Time Functions430813 +Ref: Time Functions-Footnote-1441605 +Ref: Time Functions-Footnote-2441673 +Ref: Time Functions-Footnote-3441831 +Ref: Time Functions-Footnote-4441942 +Ref: Time Functions-Footnote-5442067 +Ref: Time Functions-Footnote-6442294 +Node: Bitwise Functions442556 +Ref: table-bitwise-ops443134 +Ref: Bitwise Functions-Footnote-1447368 +Node: I18N Functions447552 +Node: User-defined449273 +Node: Definition Syntax450054 +Node: Function Example454630 +Node: Function Caveats457210 +Node: Return Statement461135 +Node: Dynamic Typing463792 +Node: Internationalization464529 +Node: I18N and L10N465948 +Node: Explaining gettext466632 +Ref: Explaining gettext-Footnote-1471539 +Ref: Explaining gettext-Footnote-2471778 +Node: Programmer i18n471947 +Node: Translator i18n476170 +Node: String Extraction476960 +Ref: String Extraction-Footnote-1477910 +Node: Printf Ordering478036 +Ref: Printf Ordering-Footnote-1480814 +Node: I18N Portability480878 +Ref: I18N Portability-Footnote-1483306 +Node: I18N Example483369 +Ref: I18N Example-Footnote-1485981 +Node: Gawk I18N486053 +Node: Advanced Features486631 +Node: Nondecimal Data488030 +Node: Two-way I/O489589 +Ref: Two-way I/O-Footnote-1495070 +Node: TCP/IP Networking495147 +Node: Portal Files497702 +Node: Profiling498346 +Node: Invoking Gawk505802 +Node: Command Line507036 +Node: Options507821 +Ref: Options-Footnote-1520899 +Node: Other Arguments520924 +Node: AWKPATH Variable523605 +Ref: AWKPATH Variable-Footnote-1526377 +Node: Exit Status526637 +Node: Obsolete527300 +Node: Undocumented528299 +Node: Known Bugs528564 +Node: Library Functions529166 +Ref: Library Functions-Footnote-1532147 +Node: Library Names532318 +Ref: Library Names-Footnote-1535791 +Ref: Library Names-Footnote-2536010 +Node: General Functions536096 +Node: Nextfile Function537155 +Node: Strtonum Function541519 +Node: Assert Function544454 +Node: Round Function547758 +Node: Cliff Random Function549291 +Node: Ordinal Functions550304 +Ref: Ordinal Functions-Footnote-1553364 +Node: Join Function553580 +Ref: Join Function-Footnote-1555340 +Node: Gettimeofday Function555540 +Node: Data File Management559243 +Node: Filetrans Function559875 +Node: Rewind Function563301 +Node: File Checking564747 +Node: Empty Files565777 +Node: Ignoring Assigns568002 +Node: Getopt Function569550 +Ref: Getopt Function-Footnote-1580828 +Node: Passwd Functions581029 +Ref: Passwd Functions-Footnote-1589690 +Node: Group Functions589778 +Node: Sample Programs597776 +Node: Running Examples598453 +Node: Clones599181 +Node: Cut Program600313 +Node: Egrep Program610070 +Ref: Egrep Program-Footnote-1617820 +Node: Id Program617930 +Node: Split Program621537 +Node: Tee Program625001 +Node: Uniq Program627678 +Node: Wc Program635046 +Ref: Wc Program-Footnote-1639290 +Node: Miscellaneous Programs639486 +Node: Dupword Program640606 +Node: Alarm Program642637 +Node: Translate Program647177 +Ref: Translate Program-Footnote-1651545 +Ref: Translate Program-Footnote-2651782 +Node: Labels Program651916 +Ref: Labels Program-Footnote-1655207 +Node: Word Sorting655291 +Node: History Sorting659572 +Node: Extract Program661410 +Node: Simple Sed668762 +Node: Igawk Program671817 +Ref: Igawk Program-Footnote-1686548 +Ref: Igawk Program-Footnote-2686749 +Node: Signature Program686887 +Node: Language History687967 +Node: V7/SVR3.1689351 +Node: SVR4691624 +Node: POSIX693063 +Node: BTL694671 +Node: POSIX/GNU696350 +Node: Contributors704265 +Node: Installation707906 +Node: Gawk Distribution708877 +Node: Getting709361 +Node: Extracting710187 +Node: Distribution contents711575 +Node: Unix Installation716656 +Node: Quick Installation717247 +Node: Additional Configuration Options718949 +Node: Configuration Philosophy721121 +Node: Non-Unix Installation723485 +Node: PC Installation723950 +Node: PC Binary Installation725224 +Node: PC Compiling727067 +Node: PC Dynamic731563 +Node: PC Using733924 +Node: Cygwin738474 +Node: MSYS739470 +Node: VMS Installation739976 +Node: VMS Compilation740580 +Node: VMS Installation Details742157 +Node: VMS Running743787 +Node: VMS POSIX745384 +Node: VMS Old Gawk746682 +Node: Unsupported747151 +Node: Atari Installation747613 +Node: Atari Compiling748900 +Node: Atari Using750785 +Node: BeOS Installation753630 +Node: Tandem Installation754777 +Node: Bugs756456 +Node: Other Versions760349 +Node: Notes765567 +Node: Compatibility Mode766259 +Node: Additions767053 +Node: Adding Code767803 +Node: New Ports773853 +Node: Dynamic Extensions777985 +Node: Internals779242 +Node: Sample Library790245 +Node: Internal File Description790904 +Node: Internal File Ops794597 +Ref: Internal File Ops-Footnote-1799923 +Node: Using Internal File Ops800071 +Node: Future Extensions802094 +Node: Basic Concepts806047 +Node: Basic High Level806804 +Ref: Basic High Level-Footnote-1810836 +Node: Basic Data Typing811030 +Node: Floating Point Issues815467 +Node: String Conversion Precision816560 +Ref: String Conversion Precision-Footnote-1818254 +Node: Unexpected Results818363 +Node: POSIX Floating Point Problems820189 +Ref: POSIX Floating Point Problems-Footnote-1823663 +Node: Glossary823701 +Node: Copying847401 +Node: GNU Free Documentation License884958 +Node: Index910095 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 83513b9d..5da5fe08 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -20,9 +20,9 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH July, 2009 +@set UPDATE-MONTH April, 2010 @set VERSION 3.1 -@set PATCHLEVEL 7 +@set PATCHLEVEL 8 @set FSF @@ -111,7 +111,8 @@ Some comments on the layout for TeX. @copying Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. +2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010 +Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -592,8 +593,6 @@ particular records in a file and perform operations upon them. * Additional Configuration Options:: Other compile-time options. * Configuration Philosophy:: How it's all supposed to work. * Non-Unix Installation:: Installation on Other Operating Systems. -* Amiga Installation:: Installing @command{gawk} on an Amiga. -* BeOS Installation:: Installing @command{gawk} on BeOS. * PC Installation:: Installing and Compiling @command{gawk} on MS-DOS and OS/2. * PC Binary Installation:: Installing a prepared distribution. @@ -616,6 +615,7 @@ particular records in a file and perform operations upon them. * Atari Installation:: Installing @command{gawk} on the Atari ST. * Atari Compiling:: Compiling @command{gawk} on Atari. * Atari Using:: Running @command{gawk} on Atari. +* BeOS Installation:: Installing @command{gawk} on BeOS. * Tandem Installation:: Installing @command{gawk} on a Tandem. * Bugs:: Reporting Problems and Bugs. * Other Versions:: Other freely available @command{awk} @@ -863,7 +863,8 @@ implementation of @command{awk} called @command{gawk} (which stands for ``GNU awk''). @command{gawk} runs on a broad range of Unix systems, ranging from 80386 PC-based computers up through large-scale systems, such as Crays. @command{gawk} has also been ported to Mac OS X, -MS-DOS, Microsoft Windows (all versions) and OS/2 PCs, Atari and Amiga +MS-DOS, Microsoft Windows (all versions) and OS/2 PCs, Atari +@c and Amiga microcomputers, BeOS, Tandem D20, and VMS. @menu @@ -1162,7 +1163,7 @@ emphasized @emph{like this}, and if a point needs to be made strongly, it is done @strong{like this}. The first occurrence of a new term is usually its @dfn{definition} and appears in the same font as the previous occurrence of ``definition'' in this sentence. -@value{FN}s are indicated like this: @file{/path/to/ourfile}. +Finally, @value{FN}s are indicated like this: @file{/path/to/ourfile}. @end ifnotinfo Characters that you type at the keyboard look @kbd{like this}. In particular, @@ -1370,7 +1371,7 @@ contributed code: the archive did not grow and the domain went unused for several years. Fortunately, late in 2008, a volunteer took on the task of setting up -an @command{awk}-related web site @uref{http://awk.info} and did a very +an @command{awk}-related web site---@uref{http://awk.info}---and did a very nice job. If you have written an interesting @command{awk} program, or have written @@ -1459,30 +1460,45 @@ The intrepid members of the GNITS mailing list, and most notably Ulrich Drepper, provided invaluable help and feedback for the design of the internationalization features. +@c @cindex Brown, Martin +@c @cindex Buening, Andreas +@c @cindex Hasegawa, Isamu +@c @cindex Rommel, Kai Uwe +@c Martin Brown, +@c Andreas Buening, +@c Isamu Hasegawa, +@c Kai Uwe Rommel, + @cindex Beebe, Nelson -@cindex Brown, Martin -@cindex Buening, Andreas +@cindex Colombo, Antonio @cindex Deifik, Scott +@cindex DuBois, John @cindex Hankerson, Darrel -@c @cindex Hasegawa, Isamu @cindex Jaegermann, Michal @cindex Kahrs, J@"urgen +@cindex Kasal, Stepan +@cindex Pitts, Davi @cindex Rankin, Pat -@cindex Rommel, Kai Uwe +@cindex Schorr, Andrew +@cindex Vinschen, Corinna +@cindex Wallin, Anders @cindex Zaretskii, Eli Nelson Beebe, -Martin Brown, -Andreas Buening, +Antonio Colombo Scott Deifik, +John H. DuBois III, Darrel Hankerson, -@c Isamu Hasegawa, Michal Jaegermann, J@"urgen Kahrs, +Dave Pitts, +Stepan Kasal, Pat Rankin, -Kai Uwe Rommel, +Andrew Schorr, +Corinna Vinschen, +Anders Wallin, and Eli Zaretskii (in alphabetical order) -make up the +make up the current @command{gawk} ``crack portability team.'' Without their hard work and help, @command{gawk} would not be nearly the fine program it is today. It has been and continues to be a pleasure working with this team of fine @@ -1516,7 +1532,7 @@ take advantage of those opportunities. Arnold Robbins @* Nof Ayalon @* ISRAEL @* -March, 2001 +February, 2010 @ignore @c Try this @@ -2766,8 +2782,8 @@ edit-compile-test-debug cycle of software development. Complex programs have been written in @command{awk}, including a complete retargetable assembler for eight-bit microprocessors (@pxref{Glossary}, for more information), and a microcode assembler for a special-purpose Prolog -computer. More recently, @command{gawk} was used for writing a Wiki -clone.@footnote{@uref{http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/, Yet Another Wiki Clone}.} +computer. More recently, @command{gawk} was used for writing a +@uref{http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/, a Wiki clone}. While the original @command{awk}'s capabilities were strained by tasks of such complexity, modern versions are more capable. Even the Bell Labs version of @command{awk} has fewer predefined limits, and those @@ -5605,7 +5621,8 @@ is a string-valued expression that specifies the file from which to read. In this version of @code{getline}, none of the built-in variables are changed and the record is not split into fields. The only variable -changed is @var{var}. +changed is @var{var}.@footnote{This is not quite true. @code{RT} could +be changed if @code{RS} is a regular expression.} For example, the following program copies all the input files to the output, except for records that say @w{@samp{@@include @var{filename}}}. Such a record is replaced by the contents of the file @@ -6452,12 +6469,10 @@ For @samp{%e}, @samp{%E}, and @samp{%f}, the result always contains a decimal point. For @samp{%g} and @samp{%G}, trailing zeros are not removed from the result. -@cindex dark corner @item 0 A leading @samp{0} (zero) acts as a flag that indicates that output should be padded with zeros instead of spaces. -This applies even to non-numeric output formats. -@value{DARKCORNER} +This applies only to the numeric output formats. This flag only has an effect when the field width is wider than the value to print. @@ -7995,7 +8010,7 @@ features have not been described yet. @item @samp{%'g} @tab Use locale @tab Use locale @item @samp{%g} @tab Use period @tab Use locale @item Input @tab Use period @tab Use locale -@item @samp{strtonum} @tab Use period @tab Use locale +@item @code{strtonum} @tab Use period @tab Use locale @end multitable @end float @@ -9444,8 +9459,7 @@ The operands are simply written side by side @cindex @code{|} (vertical bar), @code{|&} operator (I/O) @cindex vertical bar (@code{|}), @code{|&} operator (I/O) @cindex operators, input/output -@item < <= == != -@itemx > >= >> | |& +@item < <= == != > >= >> | |& Relational and redirection. The relational operators and the redirections have the same precedence level. Characters such as @samp{>} serve both as relationals and as @@ -9502,8 +9516,7 @@ Conditional. This operator groups right-to-left. @cindex percent sign (@code{%}), @code{%=} operator @cindex @code{^} (caret), @code{^=} operator @cindex caret (@code{^}), @code{^=} operator -@item = += -= *= -@itemx /= %= ^= **= +@item = += -= *= /= %= ^= **= Assignment. These operators group right to left. @end table @@ -11526,6 +11539,13 @@ same @command{awk} program. @node Array Intro @section Introduction to Arrays +@cindex Wall, Larry +@quotation +@i{Doing linear scans over an associateive array is like tryinng to club someone +to death with a loaded Uzi.}@* +Larry Wall +@end quotation + The @command{awk} language provides one-dimensional arrays for storing groups of related strings or numbers. Every @command{awk} array must have a name. Array names have the same @@ -11684,11 +11704,11 @@ The principal way to use an array is to refer to one of its elements. An array reference is an expression as follows: @example -@var{array}[@var{index}] +@var{array}[@var{index-expression}] @end example @noindent -Here, @var{array} is the name of an array. The expression @var{index} is +Here, @var{array} is the name of an array. The expression @var{index-expression} is the index of the desired element of the array. The value of the array reference is the current value of that array @@ -11709,14 +11729,14 @@ To determine whether an element exists in an array at a certain index, use the following expression: @example -@var{index} in @var{array} +@var{ind} in @var{array} @end example @cindex side effects, array indexing @noindent -This expression tests whether the particular index exists, +This expression tests whether the particular index @var{ind} exists, without the side effect of creating that element if it is not present. -The expression has the value one (true) if @code{@var{array}[@var{index}]} +The expression has the value one (true) if @code{@var{array}[@var{ind}]} exists and zero (false) if it does not exist. For example, this statement tests whether the array @code{frequencies} contains the index @samp{2}: @@ -11746,12 +11766,12 @@ Array elements can be assigned values just like @command{awk} variables: @example -@var{array}[@var{subscript}] = @var{value} +@var{array}[@var{index-expression}] = @var{value} @end example @noindent @var{array} is the name of an array. The expression -@var{subscript} is the index of the element of the array that is +@var{index-expression} is the index of the element of the array that is assigned a value. The expression @var{value} is the value to assign to that element of the array. @@ -11868,11 +11888,12 @@ for more information on the built-in function @code{length}. # Find number of distinct words more than 10 characters long END @{ - for (x in used) + for (x in used) @{ if (length(x) > 10) @{ ++num_long_words print x @} + @} print num_long_words, "words longer than 10 characters" @} @end example @@ -11902,7 +11923,7 @@ To remove an individual element of an array, use the @code{delete} statement: @example -delete @var{array}[@var{index}] +delete @var{array}[@var{index-expression}] @end example Once an array element has been deleted, any value the element once @@ -12913,7 +12934,7 @@ the third argument to be a regexp constant (@code{/abc/}) as well as a string. @value{DARKCORNER} The POSIX standard allows this as well. -@ref{Computed Regexps}, for a +@xref{Computed Regexps}, for a discussion of the difference between using a string constant or a regexp constant, and the implications for writing your program correctly. @@ -15847,7 +15868,7 @@ complete detail in @cite{GNU gettext tools}.) @end ifnotinfo As of this writing, the latest version of GNU @code{gettext} is -@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz, @value{PVERSION} 0.11.5}. +@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz, @value{PVERSION} 0.17}. If a translation of @command{gawk}'s messages exists, then @command{gawk} produces usage messages, warnings, @@ -16194,6 +16215,10 @@ Again, use @samp{0} if you don't care, or else a well-known service name. @end table +@quotation NOTE +Failure in opening a two-way socket will result in a non-fatal error being returned to the calling function. +@end quotation + Consider the following very simple example: @example @@ -16791,7 +16816,7 @@ names like @code{i}, @code{j}, etc.) @cindex @command{awk} programs, location of @cindex CGI, @command{awk} scripts for Similar to @option{-f}, reads @command{awk} program text from @var{file}. -There are two differences. The fist is that this option also terminates option processing; anything +There are two differences. The first is that this option also terminates option processing; anything else on the command line is passed on directly to the @command{awk} program. The second is that command line variable assignments of the form @samp{@var{var}=@var{value}} are disallowed. @@ -17217,7 +17242,7 @@ found, and @command{gawk} no longer needs to use @env{AWKPATH}. @cindex exit status, of @command{gawk} If the @code{exit} statement is used with a value -(@pxref{Exit Statement}), the @command{gawk} exits with +(@pxref{Exit Statement}), then @command{gawk} exits with the numeric value given to it. Otherwise, if there were no problems during execution, @@ -18035,8 +18060,8 @@ function round(x, ival, aval, fraction) @cindex numbers, Cliff random @cindex functions, library, Cliff random numbers -The Cliff random number -generator@footnote{@uref{http://mathworld.wolfram.com/CliffRandomNumberGenerator.html}} +The +@uref{http://mathworld.wolfram.com/CliffRandomNumberGenerator.html, Cliff random number generator} is a very simple random number generator that ``passes the noise sphere test for randomness by showing no structure.'' It is easily programmed, in less than 10 lines of @command{awk} code: @@ -22003,7 +22028,7 @@ END \ The following @command{awk} program prints the number of occurrences of each word in its input. It illustrates the associative nature of @command{awk} arrays by using strings as subscripts. It -also demonstrates the @samp{for @var{index} in @var{array}} mechanism. +also demonstrates the @samp{for (i in array)} mechanism. Finally, it shows how @command{awk} is used in conjunction with other utility programs to do a useful task of some complexity with a minimum of effort. Some explanations follow the program listing: @@ -23215,7 +23240,7 @@ The conditional expression using the ternary operator @samp{?:} (@pxref{Conditional Exp}). @item -The expression @samp{@var{index} in @var{array}} outside of @samp{for} +The expression @samp{@var{index-variable} in @var{array}} outside of @samp{for} statements (@pxref{Reference to Elements}). @item @@ -23456,6 +23481,11 @@ The @code{nextfile} statement @item The ability to delete all of an array at once with @samp{delete @var{array}} +(@pxref{String Functions}). + +@item +The ability for the @code{length} function to accept an array argument and +return the number of elements in the array. (@pxref{Delete}). @end itemize @@ -23633,9 +23663,11 @@ The @option{--traditional} option was added as a better name for The use of GNU Autoconf to control the configuration process (@pxref{Quick Installation}). +@ignore @item Amiga support (@pxref{Amiga Installation}). +@end ignore @end itemize @@ -23814,13 +23846,6 @@ and return the number of elements in the array The @code{strftime} function acquired a third argument to enable printing times as UTC (@pxref{Time Functions}). - -@item -The @option{--disable-libsigsegv} configuration option which -disables configuring, building, compiling and linking against -the @code{libsigsegv} library -(@pxref{Additional Configuration Options}). - @end itemize @c XXX ADD MORE STUFF HERE @@ -23926,6 +23951,7 @@ works on non-32-bit systems. @cindex Fish, Fred Fred Fish provided the port to Amiga systems and its documentation. +(With Fred's sad passing, this is no longer supported.) @item @cindex Deifik, Scott @@ -23935,7 +23961,7 @@ currently maintains the MS-DOS port. @item @cindex Grigera, Juan Juan Grigera -maintains the port to Windows32 systems. +provided a port to Windows32 systems. @item @cindex Hankerson, Darrel @@ -23961,8 +23987,14 @@ code and documentation, and motivated the inclusion of the @samp{|&} operator. @cindex Davies, Stephen Stephen Davies provided the initial port to Tandem systems and its documentation. -Matthew Woehlke provided improvements for Tandem's POSIX-compliant + +@item +@cindex Woehlke, Matthew +@cindex Wildenhues, Ralf +Matthew Woehlke +provided improvements for Tandem's POSIX-compliant systems. +Ralf Wildenhues now maintains this port. @item @cindex Brown, Martin @@ -23987,13 +24019,16 @@ as well as the code for the new optional third argument to the Andreas Buening updated the @command{gawk} port for OS/2. +@item @cindex Hasegawa, Isamu Isamu Hasegawa, of IBM in Japan, contributed support for multibyte characters. +@item @cindex Benzinger, Michael Michael Benzinger contributed the initial code for @code{switch} statements. +@item @cindex McPhee, Patrick Patrick T.J.@: McPhee contributed the code for dynamic loading in Windows32 environments. @@ -24056,31 +24091,17 @@ There are three ways to get GNU software: @item Copy it from someone else who already has it. -@cindex FSF (Free Software Foundation) -@cindex Free Software Foundation (FSF) -@item -Order @command{gawk} directly from the Free Software Foundation. -Software distributions are available for -Gnu/Linux, Unix, and MS-Windows, in several CD packages. -Their address is: - -@display -Free Software Foundation -51 Franklin Street, Fifth Floor -Boston, MA 02110-1301 USA -Phone: +1-617-542-5942 -Fax (including Japan): +1-617-542-2652 -Email: @email{gnu@@gnu.org} -URL: @uref{http://www.gnu.org} -@end display - -@noindent -Ordering from the FSF directly contributes to the support of the foundation -and to the production of more free software. - @item -Retrieve @command{gawk} by using anonymous @command{ftp} to the Internet host +Retrieve @command{gawk} +from the Internet host @code{ftp.gnu.org}, in the directory @file{/gnu/gawk}. +Both anonymous @command{ftp} and @code{http} access are supported. +If you have the @command{wget} program, you can use a command like +the following: + +@example +wget http://ftp.gnu.org/gnu/gawk/gawk-@value{VERSION}.@value{PATCHLEVEL}.tar.gz +@end example @end itemize The GNU software archive is mirrored around the world. @@ -24435,19 +24456,16 @@ improvement. @cindex configuration option, @code{--disable-directories-fatal} @item --disable-directories-fatal Causes @command{gawk} to silently skip directories named on the command line. - -@cindex @code{--disable-libsigsegv} configuration option -@cindex configuration option, @code{--disable-libsigsegv} -@item --disable-libsigsegv -The @option{--disable-libsigsegv} configuration option -disables configuring, building, compiling and linking against -the @code{libsigsegv} library. @end table As of version 3.1.5, the @option{--with-included-gettext} configuration option is no longer available, since @command{gawk} expects the GNU @code{gettext} library to be installed as an external library. +As of version 3.1.8, the @option{--disable-libsigsegv} configuration +option is no longer available, since @command{gawk} expects the +GNU @code{libsigsegv} library to be installed as an external library. + @node Configuration Philosophy @appendixsubsec The Configuration Process @@ -24503,87 +24521,11 @@ This @value{SECTION} describes how to install @command{gawk} on various non-Unix systems. @menu -* Amiga Installation:: Installing @command{gawk} on an Amiga. -* BeOS Installation:: Installing @command{gawk} on BeOS. * PC Installation:: Installing and Compiling @command{gawk} on MS-DOS and OS/2. * VMS Installation:: Installing @command{gawk} on VMS. @end menu -@node Amiga Installation -@appendixsubsec Installing @command{gawk} on an Amiga - -@cindex amiga -@cindex installation, amiga -You can install @command{gawk} on an Amiga system using a Unix emulation -environment, available via anonymous @command{ftp} from -@code{ftp.ninemoons.com} in the directory @file{pub/ade/current}. -This includes a shell based on @command{pdksh}. The primary component of -this environment is a Unix emulation library, @file{ixemul.lib}. -@c could really use more background here, who wrote this, etc. - -A more complete distribution for the Amiga is available on -the Geek Gadgets CD-ROM, available from: - -@display -CRONUS -1840 E. Warner Road #105-265 -Tempe, AZ 85284 USA -US Toll Free: (800) 804-0833 -Phone: +1-602-491-0442 -FAX: +1-602-491-0048 -Email: @email{info@@ninemoons.com} -WWW: @uref{http://www.ninemoons.com} -Anonymous @command{ftp} site: @code{ftp.ninemoons.com} -@end display - -Once you have the distribution, you can configure @command{gawk} simply by -running @command{configure}: - -@example -configure -v m68k-amigaos -@end example - -Then run @command{make} and you should be all set! -If these steps do not work, please send in a bug report -(@pxref{Bugs}). - -@node BeOS Installation -@appendixsubsec Installing @command{gawk} on BeOS -@cindex BeOS -@cindex installation, beos - -@c From email contributed by Martin Brown, mc@whoever.com -Since BeOS DR9, all the tools that you should need to build @code{gawk} are -included with BeOS. The process is basically identical to the Unix process -of running @command{configure} and then @command{make}. Full instructions are given below. - -You can compile @command{gawk} under BeOS by extracting the standard sources -and running @command{configure}. You @emph{must} specify the location -prefix for the installation directory. For BeOS DR9 and beyond, the best directory to -use is @file{/boot/home/config}, so the @command{configure} command is: - -@example -configure --prefix=/boot/home/config -@end example - -This installs the compiled application into @file{/boot/home/config/bin}, -which is already specified in the standard @env{PATH}. - -Once the configuration process is completed, you can run @command{make}, -and then @samp{make install}: - -@example -$ make -@dots{} -$ make install -@end example - -BeOS uses @command{bash} as its shell; thus, you use @command{gawk} the same way you would -under Unix. -If these steps do not work, please send in a bug report -(@pxref{Bugs}). - @c Rewritten by Scott Deifik <scottd.mail@sbcglobal.net> @c and Darrel Hankerson <hankedr@mail.auburn.edu> @@ -24613,6 +24555,7 @@ distribution. OS/2. * Cygwin:: Building and running @command{gawk} for Cygwin. +* MSYS:: Using @command{gawk} In The MSYS Environment. @end menu @node PC Binary Installation @@ -24970,7 +24913,7 @@ moved into the @code{BEGIN} rule. @appendixsubsubsec Using @command{gawk} In The Cygwin Environment @command{gawk} can be used ``out of the box'' under Windows if you are -using the Cygwin environment.@footnote{@uref{http://www.cygwin.com}} +using the @uref{http://www.cygwin.com, Cygwin environment}. This environment provides an excellent simulation of Unix, using the GNU tools, such as @command{bash}, the GNU Compiler Collection (GCC), GNU Make, and other GNU tools. Compilation and installation for Cygwin @@ -24994,6 +24937,17 @@ are fully supported in the Cygwin environment. This is not true for any other environment for MS-DOS or MS-Windows. @end quotation +@node MSYS +@appendixsubsubsec Using @command{gawk} In The MSYS Environment + +In the MSYS environment under Windows, @command{gawk} automatically +uses binary mode for reading and writing files. Thus there is no +need to use the @code{BINMODE} variable. + +This can cause problems with other Unix-like components that have +been ported to Windows that expect @command{gawk} to do automatic +translation of @code{"\r\n"}, since it won't. Caveat Emptor! + @node VMS Installation @appendixsubsec How to Compile and Install @command{gawk} on VMS @@ -25198,6 +25152,7 @@ the @command{gawk} port is no longer supported. @menu * Atari Installation:: Installing @command{gawk} on the Atari ST. +* BeOS Installation:: Installing @command{gawk} on BeOS. * Tandem Installation:: Installing @command{gawk} on a Tandem. @end menu @@ -25323,6 +25278,42 @@ use only backslashes. Also remember that in @command{awk}, backslashes in strings have to be doubled in order to get literal backslashes (@pxref{Escape Sequences}). +@node BeOS Installation +@appendixsubsec Installing @command{gawk} on BeOS +@cindex BeOS +@cindex installation, beos + +@c From email contributed by Martin Brown, mc@whoever.com +Since BeOS DR9, all the tools that you should need to build @code{gawk} are +included with BeOS. The process is basically identical to the Unix process +of running @command{configure} and then @command{make}. Full instructions are given below. + +You can compile @command{gawk} under BeOS by extracting the standard sources +and running @command{configure}. You @emph{must} specify the location +prefix for the installation directory. For BeOS DR9 and beyond, the best directory to +use is @file{/boot/home/config}, so the @command{configure} command is: + +@example +configure --prefix=/boot/home/config +@end example + +This installs the compiled application into @file{/boot/home/config/bin}, +which is already specified in the standard @env{PATH}. + +Once the configuration process is completed, you can run @command{make}, +and then @samp{make install}: + +@example +$ make +@dots{} +$ make install +@end example + +BeOS uses @command{bash} as its shell; thus, you use @command{gawk} the same way you would +under Unix. +If these steps do not work, please send in a bug report +(@pxref{Bugs}). + @node Tandem Installation @appendixsubsec Installing @command{gawk} on a Tandem @cindex tandem @@ -25461,17 +25452,21 @@ as follows: @item MS-DOS @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net}. @c and Darrel Hankerson, @email{hankedr@@auburn.edu}. +@cindex Zaretskii, Eli +@item MS-Windows using MINGW @tab Eli Zaretskii, @email{eliz@@gnu.org}. + @c not supported @ignore @cindex Grigera, Juan @item MS-Windows @tab Juan Grigera, @email{juan@@grigera.com.ar}. -@end ignore @cindex Buening, Andreas @item OS/2 @tab Andreas Buening, @email{andreas.buening@@nexgo.de} +@end ignore @cindex Davies, Stephen @item Tandem @tab Stephen Davies, @email{scldad@@sdc.com.au}. + @cindex Wildenhues, Ralf @item Tandem (POSIX-compliant) @tab Ralf Wildenhues @email{Ralf.Wildenhues@@gmx.de} @@ -25515,7 +25510,7 @@ This @value{SECTION} briefly describes where to get them: Brian Kernighan has made his implementation of @command{awk} freely available. You can retrieve this version via the World Wide Web from -his home page.@footnote{@uref{http://www.cs.princeton.edu/~bwk}} +@uref{http://www.cs.princeton.edu/~bwk, his home page}. It is available in several archive formats: @table @asis @@ -25611,10 +25606,11 @@ The ability for @code{RS} to be a regexp @item The @code{BINMODE} special variable for non-Unix operating systems (@pxref{PC Using}). -@end itemize -It is to be hoped that a future version of @command{mawk} will support @code{nextfile} +@item +The @code{nextfile} statement (@pxref{Nextfile Statement}). +@end itemize @cindex Sumner, Andrew @cindex @command{awka} compiler for @command{awk} @@ -25651,7 +25647,7 @@ or The version of @command{awk} in @file{/usr/xpg4/bin} on Solaris is POSIX compliant. It is based on the @command{awk} from Mortice Kern Systems for PCs. The source code can be downloaded from -the OpenSolaris web site.@footnote{@uref{http://www.opensolaris.org}} +the @uref{http://www.opensolaris.org, OpenSolaris web site}. This author was able to make it compile and work under GNU/Linux with 1--2 hours of work. Making it more generally portable (using GNU Autoconf and/or Automake) would take more work, and this @@ -25664,9 +25660,9 @@ This is an interpreter for @command{awk} written in Java. It claims to be a full interpreter, although because it uses Java facilities for I/O and for regexp matching, the language it supports is different from POSIX @command{awk}. More information is available on the -project's home page.@footnote{@uref{http://jawk.sourceforge.net}}. +@uref{http://jawk.sourceforge.net, project's home page}. -@cindex @command{QTawk} +@item @command{QTawk} @cindex QuikTrim Awk This is an independent implementation of @command{awk} distributed under the GPL. It has a large number of extensions over standard @@ -25674,6 +25670,11 @@ under the GPL. It has a large number of extensions over standard See @uref{http://www.quiktrim.org/QTawk.html} for more information, including the manual and a download link. +@item QSE Awk +@cindex QSE Awk +This is an embeddable @command{awk} interpreter. For more information +see @uref{http://code.google.com/p/qse/} and @uref{http://awk.info/?tools/qse}. + @end table @c ENDOFRANGE gligawk @c ENDOFRANGE ingawk @@ -27365,11 +27366,11 @@ uses double-precision floating-point numbers to represent all numeric values. This @value{SECTION} describes some of the issues involved in using floating-point numbers. -There is a very nice paper on floating-point arithmetic by -David Goldberg, ``What Every -Computer Scientist Should Know About Floating-point Arithmetic,'' -@cite{ACM Computing Surveys} @strong{23}, 1 (1991-03), -5-48.@footnote{@uref{http://www.validlab.com/goldberg/paper.ps}.} +There is a very nice +@uref{http://www.validlab.com/goldberg/paper.pdf, paper on floating-point arithmetic} +by David Goldberg, +``What Every Computer Scientist Should Know About Floating-point Arithmetic,'' +@cite{ACM Computing Surveys} @strong{23}, 1 (1991-03), 5-48. This is worth reading if you are interested in the details, but it does require a background in computer science. @@ -27607,7 +27608,7 @@ completely as @command{sed} and @command{awk} scripts. It is thousands of lines long, including machine descriptions for several eight-bit microcomputers. It is a good example of a program that would have been better written in another language. -You can get it from @uref{ftp://ftp.freefriends.org/arnold/Awkstuff/aaa.tgz}. +You can get it from @uref{http://awk.info/?awk100/aaa}. @cindex amazingly workable formatter (@command{awf}) @cindex @command{awf} (amazingly workable formatter) program @@ -27615,8 +27616,8 @@ You can get it from @uref{ftp://ftp.freefriends.org/arnold/Awkstuff/aaa.tgz}. Henry Spencer at the University of Toronto wrote a formatter that accepts a large subset of the @samp{nroff -ms} and @samp{nroff -man} formatting commands, using @command{awk} and @command{sh}. -It is available over the Internet -from @uref{ftp://ftp.freefriends.org/arnold/Awkstuff/awf.tgz}. +It is available +from @uref{http://awk.info/?tools/awf}. @item Anchor The regexp metacharacters @samp{^} and @samp{$}, which force the match diff --git a/doc/gawkinet.info b/doc/gawkinet.info index ff8eb9b9..9124faa4 100644 --- a/doc/gawkinet.info +++ b/doc/gawkinet.info @@ -1,7 +1,8 @@ +This is gawkinet.info, produced by makeinfo version 4.13 from +gawkinet.texi. + INFO-DIR-SECTION Network applications START-INFO-DIR-ENTRY -This is gawkinet.info, produced by makeinfo version 4.11 from gawkinet.texi. - * Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'. END-INFO-DIR-ENTRY diff --git a/doc/texinfo.tex b/doc/texinfo.tex index c49e670b..23a30bcf 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2007-09-03.05} +\def\texinfoversion{2009-03-28.05} % -% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 2007, +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007 Free Software Foundation, Inc. +% 2007, 2008, 2009 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 @@ -97,6 +97,10 @@ \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t +\let\ptextop=\top +{\catcode`\'=\active +\global\let\ptexquoteright'}% Math-mode def from plain.tex. +\let\ptexraggedright=\raggedright % If this character appears in an error message or help string, it % starts a new line in the output. @@ -354,7 +358,7 @@ % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; - % it needs to be + % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. @@ -460,7 +464,7 @@ \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} -% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space. +% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo @@ -485,7 +489,7 @@ % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. -% (Similarily, we have to think about #3 of \argcheckspacesY above: it is +% (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % @@ -542,12 +546,12 @@ % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they -% are not treated as enviroments; they don't open a group. (The +% are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) -% At runtime, environments start with this: +% At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty @@ -565,7 +569,7 @@ \fi } -% Evironment mismatch, #1 expected: +% Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, @@ -649,8 +653,8 @@ \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% - \ifx\temp\imacro \ptexi - \else\ifx\temp\jmacro \j + \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi + \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } @@ -705,7 +709,7 @@ \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. -% +% \def\onword{on} \def\offword{off} % @@ -916,15 +920,20 @@ where each line of input produces a line of output.} \temp } -% @include file insert text of that file as input. +% @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% - \makevalueexpandable - \def\temp{\input #1 }% + \makevalueexpandable % we want to expand any @value in FILE. + \turnoffactive % and allow special characters in the expansion + \indexnofonts % Allow `@@' and other weird things in file names. + \edef\temp{\noexpand\input #1 }% + % + % This trickery is to read FILE outside of a group, in case it makes + % definitions, etc. \expandafter }\temp \popthisfilestack @@ -939,6 +948,8 @@ where each line of input produces a line of output.} \catcode`>=\other \catcode`+=\other \catcode`-=\other + \catcode`\`=\other + \catcode`\'=\other } \def\pushthisfilestack{% @@ -1114,6 +1125,16 @@ where each line of input produces a line of output.} \mathunderscore \let\\ = \mathbackslash \mathactive + % make the texinfo accent commands work in math mode + \let\"=\ddot + \let\'=\acute + \let\==\bar + \let\^=\hat + \let\`=\grave + \let\u=\breve + \let\v=\check + \let\~=\tilde + \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. @@ -1127,17 +1148,21 @@ where each line of input produces a line of output.} \catcode`< = \active \catcode`> = \active \catcode`+ = \active + \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus + \let' = \ptexquoteright } } -% @bullet and @minus need the same treatment as @math, just above. +% Some math mode symbols. \def\bullet{$\ptexbullet$} -\def\minus{$-$} +\def\geq{\ifmmode \ge\else $\ge$\fi} +\def\leq{\ifmmode \le\else $\le$\fi} +\def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm @@ -1260,7 +1285,7 @@ where each line of input produces a line of output.} % that's what we do). % double active backslashes. -% +% {\catcode`\@=0 \catcode`\\=\active @gdef@activebackslashdouble{% @catcode`@\=@active @@ -1272,11 +1297,11 @@ where each line of input produces a line of output.} % us) handles it with this amazing macro to replace tokens, with minor % changes for Texinfo. It is included here under the GPL by permission % from the author, Heiko Oberdiek. -% +% % #1 is the tokens to replace. % #2 is the replacement. % #3 is the control sequence with the string. -% +% \def\HyPsdSubst#1#2#3{% \def\HyPsdReplace##1#1##2\END{% ##1% @@ -1311,7 +1336,10 @@ output) for that.)} \def\cmykDarkRed{0.28 1 1 0.35} \def\cmykBlack{0 0 0 1} % - \def\pdfsetcolor#1{\pdfliteral{#1 k}} + % k sets the color for filling (usual text, etc.); + % K sets the color for stroking (thin rules, e.g., normal _'s). + \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}} + % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% @@ -1362,8 +1390,11 @@ output) for that.)} \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \openin 1 #1.pdf \ifeof 1 - \errhelp = \nopdfimagehelp - \errmessage{Could not find image file #1 for pdf}% + \openin 1 #1.PDF \ifeof 1 + \errhelp = \nopdfimagehelp + \errmessage{Could not find image file #1 for pdf}% + \else \gdef\pdfimgext{PDF}% + \fi \else \gdef\pdfimgext{pdf}% \fi \else \gdef\pdfimgext{JPG}% @@ -1377,7 +1408,7 @@ output) for that.)} \closein 1 \endgroup % - % without \immediate, pdftex seg faults when the same image is + % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage @@ -1542,11 +1573,15 @@ output) for that.)} % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. - % + % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable + % do we want to go so far as to use \indexnofonts instead of just + % special-casing \var here? + \def\var##1{##1}% + % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% @@ -1577,6 +1612,7 @@ output) for that.)} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else + % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax @@ -1607,6 +1643,10 @@ output) for that.)} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} +% Unfortunately, we have to override this for titles and the like, since +% in those cases "rm" is bold. Sigh. +\def\rmisbold{\rm\def\curfontstyle{bf}} + % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam @@ -1642,11 +1682,17 @@ output) for that.)} }% } -% % PDF CMaps. See also LaTeX's t1.cmap. % -% \cmapOT1 -\ifpdf +% do nothing with this by default. +\expandafter\let\csname cmapOT1\endcsname\gobble +\expandafter\let\csname cmapOT1IT\endcsname\gobble +\expandafter\let\csname cmapOT1TT\endcsname\gobble + +% if we are producing pdf, and we have \pdffontattr, then define cmaps. +% (\pdffontattr was introduced many years ago, but people still run +% older pdftex's; it's easy to conditionalize, so we do.) +\ifpdf \ifx\pdffontattr\undefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap @@ -1894,11 +1940,7 @@ end \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% -\else - \expandafter\let\csname cmapOT1\endcsname\gobble - \expandafter\let\csname cmapOT1IT\endcsname\gobble - \expandafter\let\csname cmapOT1TT\endcsname\gobble -\fi +\fi\fi % Set the font macro #1 to the font named #2, adding on the @@ -1912,7 +1954,7 @@ end } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble - +% emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix @@ -1939,7 +1981,7 @@ end % Definitions for a main text size of 11pt. This is the default in % Texinfo. -% +% \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} @@ -2002,8 +2044,6 @@ end \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). @@ -2072,7 +2112,7 @@ end % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. -% +% \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} @@ -2135,8 +2175,6 @@ end \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} \def\titleecsize{2074} % Chapter fonts (14.4pt). @@ -2163,7 +2201,7 @@ end \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} -\font\seci=cmmi12 +\font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} @@ -2207,7 +2245,7 @@ end % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. -% +% \def\xword{10} \def\xiword{11} % @@ -2217,7 +2255,7 @@ end % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. - % + % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi @@ -2268,7 +2306,7 @@ end \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{25pt}} -\def\titlefont#1{{\titlefonts\rm #1}} +\def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc @@ -2319,6 +2357,16 @@ end \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} +% Fonts for short table of contents. +\setfont\shortcontrm\rmshape{12}{1000}{OT1} +\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 +\setfont\shortcontsl\slshape{12}{1000}{OT1} +\setfont\shortconttt\ttshape{12}{1000}{OT1TT} + +% Define these just so they can be easily changed for other fonts. +\def\angleleft{$\langle$} +\def\angleright{$\rangle$} + % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts @@ -2332,28 +2380,128 @@ end % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 -% -% I wish the USA used A4 paper. % --karl, 24jan03. - % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi -% Define these so they can be easily changed for other fonts. -\def\angleleft{$\langle$} -\def\angleright{$\rangle$} + +\message{markup,} + +% 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 } + +% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will +% define and register \INITMACRO to be called on markup style changes. +% \INITMACRO can check \currentmarkupstyle for the innermost +% style and the set of \ifmarkupSTYLE switches for all styles +% currently in effect. +\newif\ifmarkupvar +\newif\ifmarkupsamp +\newif\ifmarkupkey +%\newif\ifmarkupfile % @file == @samp. +%\newif\ifmarkupoption % @option == @samp. +\newif\ifmarkupcode +\newif\ifmarkupkbd +%\newif\ifmarkupenv % @env == @code. +%\newif\ifmarkupcommand % @command == @code. +\newif\ifmarkuptex % @tex (and part of @math, for now). +\newif\ifmarkupexample +\newif\ifmarkupverb +\newif\ifmarkupverbatim + +\let\currentmarkupstyle\empty + +\def\setupmarkupstyle#1{% + \csname markup#1true\endcsname + \def\currentmarkupstyle{#1}% + \markupstylesetup +} + +\let\markupstylesetup\empty + +\def\defmarkupstylesetup#1{% + \expandafter\def\expandafter\markupstylesetup + \expandafter{\markupstylesetup #1}% + \def#1% +} + +% Markup style setup for left and right quotes. +\defmarkupstylesetup\markupsetuplq{% + \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuplqdefault \else \temp \fi +} + +\defmarkupstylesetup\markupsetuprq{% + \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname + \ifx\temp\relax \markupsetuprqdefault \else \temp \fi +} + +{ +\catcode`\'=\active +\catcode`\`=\active + +\gdef\markupsetuplqdefault{\let`\lq} +\gdef\markupsetuprqdefault{\let'\rq} + +\gdef\markupsetcodequoteleft{\let`\codequoteleft} +\gdef\markupsetcodequoteright{\let'\codequoteright} + +\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} +} + +\let\markupsetuplqcode \markupsetcodequoteleft +\let\markupsetuprqcode \markupsetcodequoteright +\let\markupsetuplqexample \markupsetcodequoteleft +\let\markupsetuprqexample \markupsetcodequoteright +\let\markupsetuplqverb \markupsetcodequoteleft +\let\markupsetuprqverb \markupsetcodequoteright +\let\markupsetuplqverbatim \markupsetcodequoteleft +\let\markupsetuprqverbatim \markupsetcodequoteright + +\let\markupsetuplqsamp \markupsetnoligaturesquoteleft +\let\markupsetuplqkbd \markupsetnoligaturesquoteleft + +% Allow an option to not replace quotes with a regular directed right +% quote/apostrophe (char 0x27), but instead use the undirected quote +% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it +% the default, but it works for pasting with more pdf viewers (at least +% evince), the lilypond developers report. xpdf does work with the +% regular 0x27. +% +\def\codequoteright{% + \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax + \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax + '% + \else \char'15 \fi + \else \char'15 \fi +} +% +% and a similar option for the left quote char vs. a grave accent. +% Modern fonts display ASCII 0x60 as a grave accent, so some people like +% the code environments to do likewise. +% +\def\codequoteleft{% + \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax + \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax + % [Knuth] pp. 380,381,391 + % \relax disables Spanish ligatures ?` and !` of \tt font. + \relax`% + \else \char'22 \fi + \else \char'22 \fi +} + +% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. +\def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 -% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000}{OT1} -\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000}{OT1} -\setfont\shortconttt\ttshape{12}{1000}{OT1TT} - %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -2368,17 +2516,22 @@ end % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} -% like \smartslanted except unconditionally use \sl. We never want +% @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\slanted=\smartslanted -\let\var=\smartslanted +\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}} \let\dfn=\smartslanted \let\emph=\smartitalic -% @b, explicit bold. +% Explicit font changes: @r, @sc, undocumented @ii. +\def\r#1{{\rm #1}} % roman font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b @@ -2410,22 +2563,35 @@ end \catcode`@=\other \def\endofsentencespacefactor{3000}% default +% @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } -\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000}{OT1} -\font\keysy=cmsy9 -\def\key#1{{\keyrm\textfont2=\keysy \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}}}} -\def\key #1{{\nohyphenation \uppercase{#1}}\null} -% The old definition, with no lozenge: -%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} + +% @samp. +\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} + +% definition of @key that produces a lozenge. Doesn't adjust to text size. +%\setfont\keyrm\rmshape{8}{1000}{OT1} +%\font\keysy=cmsy9 +%\def\key#1{{\keyrm\textfont2=\keysy \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}}}} + +% definition of @key with no lozenge. If the current font is already +% monospace, don't change it; that way, we respect @kbdinputstyle. But +% if it isn't monospace, then use \tt. +% +\def\key#1{{\setupmarkupstyle{key}% + \nohyphenation + \ifmonospace\else\tt\fi + #1}\null} + +% ctrl is no longer a Texinfo command. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. @@ -2467,11 +2633,11 @@ end { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active + \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup - \catcode\rquoteChar=\active \catcode\lquoteChar=\active - \let'\codequoteright \let`\codequoteleft - % + \setupmarkupstyle{code}% + % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash @@ -2503,7 +2669,7 @@ end % each of the four underscores in __typeof__. This is undesirable in % some manuals, especially if they don't have long identifiers in % general. @allowcodebreaks provides a way to control this. -% +% \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} @@ -2523,6 +2689,7 @@ end % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. +\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), @@ -2544,20 +2711,27 @@ end \def\wordexample{example} \def\wordcode{code} -% Default is `distinct.' +% Default is `distinct'. \kbdinputstyle distinct \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} +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi +\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code +% @clicksequence{File @click{} Open ...} +\def\clicksequence#1{\begingroup #1\endgroup} + +% @clickstyle @arrow (by default) +\parseargdef\clickstyle{\def\click{#1}} +\def\click{\arrow} + % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url @@ -2607,34 +2781,20 @@ end \let\email=\uref \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 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} -\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} - % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} -% Explicit font changes: @r, @sc, undocumented @ii. -\def\r#1{{\rm #1}} % roman font -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. -% +% \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% @@ -2646,7 +2806,7 @@ end % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. -% +% \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% @@ -2656,6 +2816,44 @@ end \fi } + +\message{glyphs,} + +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. +% +% Since these characters are used in examples, they should be an even number of +% \tt widths. Each \tt character is 1en, so two makes it 1em. +% +\def\point{$\star$} +\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} +\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} +\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} +\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} +\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} + +% The @error{} command. +% Adapted from the TeXbook's \boxit. +% +\newbox\errorbox +% +{\tentt \global\dimen0 = 3em}% Width of the box. +\dimen2 = .55pt % Thickness of rules +% The text. (`r' is open on the right, `e' somewhat less so on the left.) +\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} +% +\setbox\errorbox=\hbox to \dimen0{\hfil + \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. + \advance\hsize by -2\dimen2 % Rules. + \vbox{% + \hrule height\dimen2 + \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. + \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. + \kern3pt\vrule width\dimen2}% Space to right. + \hrule height\dimen2} + \hfil} +% +\def\error{\leavevmode\lower.7ex\copy\errorbox} + % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} @@ -2665,52 +2863,59 @@ end % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% +% % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. -% +% % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted -% +% % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. -% +% % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. -% -% +% +% \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. - % + % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. - % + % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. - % + % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % - \ifx\curfontstyle\bfstylename + \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else + \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } -% Hacks for glyphs from the EC fonts similar to \euro. We don't -% use \let for the aliases, because sometimes we redefine the original -% macro, and the alias should reflect the redefinition. +% Glyphs from the EC fonts. We don't use \let for the aliases, because +% sometimes we redefine the original macro, and the alias should reflect +% the redefinition. +% +% Use LaTeX names for the Icelandic letters. +\def\DH{{\ecfont \char"D0}} % Eth +\def\dh{{\ecfont \char"F0}} % eth +\def\TH{{\ecfont \char"DE}} % Thorn +\def\th{{\ecfont \char"FE}} % thorn +% \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} @@ -2720,8 +2925,36 @@ end \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % +% This positioning is not perfect (see the ogonek LaTeX package), but +% we have the precomposed glyphs for the most common cases. We put the +% tests to use those glyphs in the single \ogonek macro so we have fewer +% dummy definitions to worry about for index entries, etc. +% +% ogonek is also used with other letters in Lithuanian (IOU), but using +% the precomposed glyphs for those is not so easy since they aren't in +% the same EC font. +\def\ogonek#1{{% + \def\temp{#1}% + \ifx\temp\macrocharA\Aogonek + \else\ifx\temp\macrochara\aogonek + \else\ifx\temp\macrocharE\Eogonek + \else\ifx\temp\macrochare\eogonek + \else + \ecfont \setbox0=\hbox{#1}% + \ifdim\ht0=1ex\accent"0C #1% + \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% + \fi + \fi\fi\fi\fi + }% +} +\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} +\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} +\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} +\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} +% +% Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% - % We can't distinguish serif/sanserif and italic/slanted, but this + % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. @@ -2754,7 +2987,7 @@ end % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. -% +% \ifx\Orb\undefined \def\Orb{\mathhexbox20D} \fi @@ -2765,6 +2998,7 @@ end \chardef\quoteleft=`\` \chardef\quoteright=`\' + \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in @@ -2848,12 +3082,9 @@ end \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} -\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines - \let\tt=\authortt} - \parseargdef\title{% \checkenv\titlepage - \leftline{\titlefonts\rm #1} + \leftline{\titlefonts\rmisbold #1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt @@ -2874,7 +3105,7 @@ end \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi - {\authorfont \leftline{#1}}% + {\secfonts\rmisbold \leftline{#1}}% \fi } @@ -3102,7 +3333,7 @@ end % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. - % + % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse @@ -3196,9 +3427,18 @@ end \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi + % + % Try typesetting the item mark that if the document erroneously says + % something like @itemize @samp (intending @table), there's an error + % right away at the @itemize. It's not the best error message in the + % world, but it's better than leaving it to the @item. This means if + % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% + \setbox0 = \hbox{\itemcontents}% + % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi + % \let\item=\itemizeitem } @@ -3219,6 +3459,7 @@ end \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% + % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } @@ -3440,12 +3681,19 @@ end % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group -% of an alignment entry. Note that \everycr resets \everytab. -\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% +% of an alignment entry. \everycr resets \everytab so we don't have to +% undo it ourselves. +\def\headitemfont{\b}% for people to use in the template row; not changeable +\def\headitem{% + \checkenv\multitable + \crcr + \global\everytab={\bf}% can't use \headitemfont since the parsing differs + \the\everytab % for the first item +}% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until -% we encounter the problem it was intended to solve again. +% we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% @@ -3844,11 +4092,11 @@ end \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. - \expandafter \ifx\csname donesynindex#2\endcsname \undefined + \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname - \expandafter\let\csname\donesynindex#2\endcsname = 1 + \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname @@ -3898,7 +4146,7 @@ end % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. - % + % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} @@ -3906,12 +4154,12 @@ end % @end macro % ... % @funindex commtest - % + % % The above is not enough to reproduce the bug, but it gives the flavor. - % + % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} - % + % % So: \let\endinput = \empty % @@ -3963,19 +4211,23 @@ end % Non-English letters. \definedummyword\AA \definedummyword\AE + \definedummyword\DH \definedummyword\L - \definedummyword\OE \definedummyword\O + \definedummyword\OE + \definedummyword\TH \definedummyword\aa \definedummyword\ae + \definedummyword\dh + \definedummyword\exclamdown \definedummyword\l - \definedummyword\oe \definedummyword\o - \definedummyword\ss - \definedummyword\exclamdown - \definedummyword\questiondown + \definedummyword\oe \definedummyword\ordf \definedummyword\ordm + \definedummyword\questiondown + \definedummyword\ss + \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf @@ -4006,6 +4258,7 @@ end \definedummyword\guilsinglright \definedummyword\expansion \definedummyword\minus + \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print @@ -4049,6 +4302,7 @@ end \definedummyword\v \definedummyword\H \definedummyword\dotaccent + \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent @@ -4116,19 +4370,23 @@ end % Non-English letters. \def\AA{AA}% \def\AE{AE}% + \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% + \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% - \def\o{o}% - \def\ss{ss}% - \def\exclamdown{!}% - \def\questiondown{?}% \def\ordf{a}% \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% @@ -4167,11 +4425,11 @@ end % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. - % + % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. - % + % \macrolist } @@ -4299,7 +4557,7 @@ end % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: - % + % % @deffn deffn-whatever % @vindex index-whatever % Description. @@ -4429,7 +4687,7 @@ end % % A straightforward implementation would start like this: % \def\entry#1#2{... -% But this frozes the catcodes in the argument, and can cause problems to +% But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % @@ -4880,7 +5138,9 @@ end \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % - \message{\putwordChapter\space \the\chapno}% + % \putwordChapter can contain complex things in translations. + \toks0=\expandafter{\putwordChapter}% + \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% @@ -4891,15 +5151,17 @@ end \global\let\subsubsection = \numberedsubsubsec } -\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz +\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz +% \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % - \def\appendixnum{\putwordAppendix\space \appendixletter}% - \message{\appendixnum}% + % \putwordAppendix can contain complex things in translations. + \toks0=\expandafter{\putwordAppendix}% + \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % @@ -5031,7 +5293,6 @@ end % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. - \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz @@ -5040,8 +5301,8 @@ end \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } @@ -5133,7 +5394,10 @@ end \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% - \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum: + % \noexpand\putwordAppendix avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \else @@ -5141,7 +5405,10 @@ end \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% - \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum: + % \noexpand\putwordChapter avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thischapter{\noexpand\putwordChapter{} + \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi @@ -5160,7 +5427,7 @@ end \domark % {% - \chapfonts \rm + \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called @@ -5197,7 +5464,7 @@ end % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% @@ -5221,8 +5488,8 @@ end % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak + \parindent=0pt\ptexraggedright + \rmisbold #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% @@ -5231,7 +5498,7 @@ end \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak + \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen @@ -5264,7 +5531,7 @@ end \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. - \csname #2fonts\endcsname \rm + \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% @@ -5284,7 +5551,10 @@ end \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi @@ -5294,12 +5564,20 @@ end \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% - \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum: + % \noexpand\putwordSection avoids expanding indigestible + % commands in some of the translations. + \gdef\noexpand\thissection{\noexpand\putwordSection{} + \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % + % Go into vertical mode. Usually we'll already be there, but we + % don't want the following whatsit to end up in a preceding paragraph + % if the document didn't happen to have a blank line. + \par + % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark @@ -5349,7 +5627,7 @@ end \nobreak % % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% @@ -5365,11 +5643,11 @@ end % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip - % + % % This is purely so the last item on the list is a known \penalty > % 10000. This is so \startdefun can avoid allowing breakpoints after % section headings. Otherwise, it would insert a valid breakpoint between: - % + % % @section sec-whatever % @deffn def-whatever \penalty 10001 @@ -5427,7 +5705,7 @@ end % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. -% +% \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active @@ -5477,7 +5755,7 @@ end % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. -% +% \def\tocreadfilename{\jobname.toc} % Normal (long) toc. @@ -5647,45 +5925,12 @@ end \message{environments,} % @foo ... @end foo. -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% -% Since these characters are used in examples, it should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% -\def\point{$\star$} -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% The @error{} command. -% Adapted from the TeXbook's \boxit. -% -\newbox\errorbox -% -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt} -% -\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} -% -\def\error{\leavevmode\lower.7ex\copy\errorbox} - % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \envdef\tex{% + \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie @@ -5695,6 +5940,8 @@ end \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other + \catcode`\`=\other + \catcode`\'=\other \escapechar=`\\ % \let\b=\ptexb @@ -5714,6 +5961,7 @@ end \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext + \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% @@ -5829,6 +6077,7 @@ end % This macro is called at the beginning of all the @example variants, % inside a group. +\newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy @@ -5836,7 +6085,12 @@ end \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt + % Turn off paragraph indentation but redefine \indent to emulate + % the normal \indent. + \nonfillparindent=\parindent \parindent = 0pt + \let\indent\nonfillindent + % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing @@ -5847,6 +6101,24 @@ end \let\exdent=\nofillexdent } +\begingroup +\obeyspaces +% We want to swallow spaces (but not other tokens) after the fake +% @indent in our nonfill-environments, where spaces are normally +% active and set to @tie, resulting in them not being ignored after +% @indent. +\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% +\gdef\nonfillindentcheck{% +\ifx\temp % +\expandafter\nonfillindentgobble% +\else% +\leavevmode\nonfillindentbox% +\fi% +}% +\endgroup +\def\nonfillindentgobble#1{\nonfillindent} +\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} + % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: @@ -5895,7 +6167,7 @@ end % \maketwodispenvs {lisp}{example}{% \nonfillstart - \tt\quoteexpand + \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } @@ -5933,12 +6205,36 @@ end \let\Eflushright = \afterenvbreak +% @raggedright does more-or-less normal line breaking but no right +% justification. From plain.tex. +\envdef\raggedright{% + \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax +} +\let\Eraggedright\par + +\envdef\raggedleft{% + \parindent=0pt \leftskip0pt plus2em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedleft\par + +\envdef\raggedcenter{% + \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em + \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt + \hbadness=10000 % Last line will usually be underfull, so turn off + % badness reporting. +} +\let\Eraggedcenter\par + + % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % -\envdef\quotation{% +\def\quotationstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % @@ -5953,6 +6249,17 @@ end \parsearg\quotationlabel } +\envdef\quotation{% + \setnormaldispenv + \quotationstart +} + +\envdef\smallquotation{% + \setsmalldispenv + \quotationstart +} +\let\Esmallquotation = \Equotation + % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % @@ -5988,18 +6295,16 @@ end \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% + % Don't do the quotes -- if we do, @set txicodequoteundirected and + % @set txicodequotebacktick will not have effect on @verb and + % @verbatim, and ?` and !` ligatures won't get disabled. + %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % -% [Knuth] pp. 380,381,391 -% Disable Spanish ligatures ?` and !` of \tt font -\begingroup - \catcode`\`=\active\gdef`{\relax\lq} -\endgroup -% % Setup for the @verb command. % % Eight spaces for a tab @@ -6011,7 +6316,7 @@ end \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% - \catcode`\`=\active + \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and @@ -6026,33 +6331,6 @@ end \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} - -% Allow an option to not replace quotes with a regular directed right -% quote/apostrophe (char 0x27), but instead use the undirected quote -% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it -% the default, but it works for pasting with more pdf viewers (at least -% evince), the lilypond developers report. xpdf does work with the -% regular 0x27. -% -\def\codequoteright{% - \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax - \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax - '% - \else \char'15 \fi - \else \char'15 \fi -} -% -% and a similar option for the left quote char vs. a grave accent. -% Modern fonts display ASCII 0x60 as a grave accent, so some people like -% the code environments to do likewise. -% -\def\codequoteleft{% - \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax - \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax - `% - \else \char'22 \fi - \else \char'22 \fi -} % \begingroup \catcode`\^^I=\active @@ -6066,13 +6344,6 @@ end \wd0=\dimen0 \box0 \starttabbox }% } - \catcode`\'=\active - \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}% - % - \catcode`\`=\active - \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}% - % - \gdef\quoteexpand{\rquoteexpand \lquoteexpand}% \endgroup % start the verbatim environment. @@ -6082,9 +6353,8 @@ end % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% - \catcode`\`=\active \tabexpand - \quoteexpand + \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count @@ -6144,6 +6414,7 @@ end {% \makevalueexpandable \setupverbatim + \indexnofonts % Allow `@@' and other weird things in file names. \input #1 \afterenvbreak }% @@ -6243,7 +6514,7 @@ end \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -% the only thing remainnig is to define \deffnheader. +% the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun @@ -6422,7 +6693,7 @@ end % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. Let's try @var for that. - \let\var=\ttslanted + \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } @@ -6576,7 +6847,7 @@ end % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). -% +% \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname @@ -6950,20 +7221,22 @@ end % % Make link in pdf output. \ifpdf - \leavevmode - \getfilename{#4}% {\indexnofonts \turnoffactive + % This expands tokens, so do it after making catcode changes, so _ + % etc. don't get their TeX definitions. + \getfilename{#4}% + % % See comments at \activebackslashdouble. {\activebackslashdouble \xdef\pdfxrefdest{#1}% \backslashparens\pdfxrefdest}% % + \leavevmode + \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 - \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{\pdfxrefdest}% + goto file{\the\filename.pdf} name{\pdfxrefdest}% \else - \startlink attr{/Border [0 0 0]}% - goto name{\pdfmkpgn{\pdfxrefdest}}% + goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% @@ -7314,7 +7587,7 @@ end % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. -% Similarily, if a @footnote appears inside an alignment, save the footnote +% Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. @@ -7418,15 +7691,19 @@ end % If the image is by itself, center it. \ifvmode \imagevmodetrue - \nobreak\bigskip + \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak - \line\bgroup \fi % + % Leave vertical mode so that indentation from an enclosing + % environment such as @quotation is respected. On the other hand, if + % it's at the top level, we don't want the normal paragraph indentation. + \noindent + % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% @@ -7437,7 +7714,7 @@ end \epsfbox{#1.eps}% \fi % - \ifimagevmode \egroup \bigbreak \fi % space after the image + \ifimagevmode \medskip \fi % space after the standalone image \endgroup} @@ -7709,10 +7986,9 @@ end \message{localization,} -% @documentlanguage is usually given very early, just after -% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language (de) or locale (de_DE) -% abbreviation. It would be nice if we could set up a hyphenation file. +% For single-language documents, @documentlanguage is usually given very +% early, just after @documentencoding. Single argument is the language +% (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active @@ -7725,31 +8001,60 @@ end \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 - \endgroup + \endgroup % end raw TeX \endgroup} -} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. -% -\def\documentlanguagetrywithoutunderscore#1_#2\finish{% +% +\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else + \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } +}% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or -is empty. Maybe you need to install it? In the current directory -should work if nowhere else does.} +is empty. Maybe you need to install it? Putting it in the current +directory should work if nowhere else does.} +% This macro is called from txi-??.tex files; the first argument is the +% \language name to set (without the "\lang@" prefix), the second and +% third args are \{left,right}hyphenmin. +% +% The language names to pass are determined when the format is built. +% See the etex.log file created at that time, e.g., +% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. +% +% With TeX Live 2008, etex now includes hyphenation patterns for all +% available languages. This means we can support hyphenation in +% Texinfo, at least to some extent. (This still doesn't solve the +% accented characters problem.) +% +\catcode`@=11 +\def\txisetlanguage#1#2#3{% + % do not set the language if the name is undefined in the current TeX. + \expandafter\ifx\csname lang@#1\endcsname \relax + \message{no patterns for #1}% + \else + \global\language = \csname lang@#1\endcsname + \fi + % but there is no harm in adjusting the hyphenmin values regardless. + \global\lefthyphenmin = #2\relax + \global\righthyphenmin = #3\relax +} + +% Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% @@ -7790,7 +8095,7 @@ should work if nowhere else does.} \setnonasciicharscatcode\active \lattwochardefs % - \else \ifx \declaredencoding \latone + \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % @@ -7802,7 +8107,7 @@ should work if nowhere else does.} \setnonasciicharscatcode\active \utfeightchardefs % - \else + \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight @@ -7814,7 +8119,7 @@ should work if nowhere else does.} % A message to be logged when using a character that isn't available % the default font encoding (OT1). -% +% \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. @@ -7827,21 +8132,21 @@ should work if nowhere else does.} % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% - \gdef^^a0{~} + \gdef^^a0{~} \gdef^^a1{\exclamdown} - \gdef^^a2{\missingcharmsg{CENT SIGN}} + \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} - \gdef^^a6{\missingcharmsg{BROKEN BAR}} + \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} - \gdef^^a8{\"{}} - \gdef^^a9{\copyright} + \gdef^^a8{\"{}} + \gdef^^a9{\copyright} \gdef^^aa{\ordf} - \gdef^^ab{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} - \gdef^^ad{\-} - \gdef^^ae{\registeredsymbol} + \gdef^^ad{\-} + \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} @@ -7857,7 +8162,7 @@ should work if nowhere else does.} \gdef^^b9{$^1$} \gdef^^ba{\ordm} % - \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}} + \gdef^^bb{\guilletright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} @@ -7868,7 +8173,7 @@ should work if nowhere else does.} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} - \gdef^^c5{\ringaccent A} + \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} @@ -7880,7 +8185,7 @@ should work if nowhere else does.} \gdef^^ce{\^I} \gdef^^cf{\"I} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}} + \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} @@ -7894,7 +8199,7 @@ should work if nowhere else does.} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} - \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}} + \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} @@ -7914,7 +8219,7 @@ should work if nowhere else does.} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}} + \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} @@ -7928,7 +8233,7 @@ should work if nowhere else does.} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} - \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}} + \gdef^^fe{\th} \gdef^^ff{\"y} } @@ -7950,7 +8255,7 @@ should work if nowhere else does.} % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{~} - \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}} + \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} @@ -7967,8 +8272,8 @@ should work if nowhere else does.} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} - \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}} - \gdef^^b2{\missingcharmsg{OGONEK}} + \gdef^^b1{\ogonek{a}} + \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} @@ -7993,14 +8298,14 @@ should work if nowhere else does.} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} - \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}} + \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % - \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}} + \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} @@ -8009,7 +8314,7 @@ should work if nowhere else does.} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} - \gdef^^d9{\ringaccent U} + \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} @@ -8027,14 +8332,14 @@ should work if nowhere else does.} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} - \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}} + \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'\i} \gdef^^ee{\^\i} \gdef^^ef{\v d} % - \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}} + \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} @@ -8053,11 +8358,11 @@ should work if nowhere else does.} } % UTF-8 character definitions. -% +% % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. -% +% \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz @@ -8207,6 +8512,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} + \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} @@ -8219,6 +8525,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} + \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} @@ -8238,6 +8545,7 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} + \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} @@ -8250,16 +8558,21 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} + \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} + \DeclareUnicodeCharacter{0104}{\ogonek{A}} + \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} + \DeclareUnicodeCharacter{0118}{\ogonek{E}} + \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} @@ -8407,6 +8720,8 @@ should work if nowhere else does.} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} + \DeclareUnicodeCharacter{02DB}{\ogonek{ }} + \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} @@ -8788,6 +9103,9 @@ should work if nowhere else does.} \message{and turning on texinfo input format.} +% DEL is a comment character, in case @c does not suffice. +\catcode`\^^? = 14 + % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other @@ -8897,7 +9215,7 @@ should work if nowhere else does.} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. -% +% @def@normalturnoffactive{% @let\=@normalbackslash @let"=@normaldoublequote @@ -8909,6 +9227,8 @@ should work if nowhere else does.} @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix + @markupsetuplqdefault + @markupsetuprqdefault @unsepspaces } @@ -8943,9 +9263,21 @@ should work if nowhere else does.} @catcode`@# = @other @catcode`@% = @other +@c Finally, make ` and ' active, so that txicodequoteundirected and +@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we +@c don't make ` and ' active, @code will not get them as active chars. +@c Do this last of all since we use ` in the previous @catcode assignments. +@catcode`@'=@active +@catcode`@`=@active +@markupsetuplqdefault +@markupsetuprqdefault + +@c Gnulib now utterly and painfully insists on no trailing whitespace. +@c So we have to nuke it. @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) +@c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" |