aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ChangeLog9
-rw-r--r--doc/Makefile.in10
-rw-r--r--doc/awkcard.in7
-rw-r--r--doc/gawk.info962
-rw-r--r--doc/gawk.texi21
-rw-r--r--doc/texinfo.tex1161
6 files changed, 1370 insertions, 800 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index a54832db..6e4c0103 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -38,6 +38,15 @@
* gawk.1: Same.
* awkcard.in: Same.
+2012-03-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ * 4.0.1: Release tar ball made.
+
+2012-02-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawk.texi, awkcard.in: Bump patch level.
+ * texinfo.tex: Updated from Texinfo CVS.
+
2011-12-06 Arnold D. Robbins <arnold@skeeve.com>
* gawk.texi: Various typo fixes from mailing list.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index f0571c49..e475208b 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -69,11 +69,11 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
$(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mpfr.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
- $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/noreturn.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/readline.m4 $(top_srcdir)/m4/socket.m4 \
+ $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
+ $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
diff --git a/doc/awkcard.in b/doc/awkcard.in
index ab42e9fd..b7d87691 100644
--- a/doc/awkcard.in
+++ b/doc/awkcard.in
@@ -1,7 +1,8 @@
.\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com
.\"
.\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-.\" 2003, 2004, 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+.\" 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012
+.\" Free Software Foundation, Inc.
.\"
.\" Permission is granted to make and distribute verbatim copies of
.\" this reference card provided the copyright notice and this permission
@@ -100,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, 2010, 2011 Free Software Foundation, Inc.
+2005, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
.nf
.BT
@@ -1925,7 +1926,7 @@ to use the current domain.\*(CB
.ES
.nf
\*(CDHost: \*(FCftp.gnu.org\*(FR
-File: \*(FC/gnu/gawk/gawk-4.0.0.tar.gz\fP
+File: \*(FC/gnu/gawk/gawk-4.0.1.tar.gz\fP
.in +.2i
.fi
GNU \*(AK (\*(GK). There may be a later version.
diff --git a/doc/gawk.info b/doc/gawk.info
index c5702eee..bf279828 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -10,8 +10,8 @@ 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, 2010, 2011 Free Software
-Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012 Free
+Software Foundation, Inc.
This is Edition 4 of `GAWK: Effective AWK Programming: A User's
@@ -42,8 +42,8 @@ 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, 2010, 2011 Free Software
-Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012 Free
+Software Foundation, Inc.
This is Edition 4 of `GAWK: Effective AWK Programming: A User's
@@ -1414,7 +1414,8 @@ pass to that interpreter. The operating system then runs the
interpreter with the given argument and the full argument list of the
executed program. The first argument in the list is the full file name
of the `awk' program. The rest of the argument list contains either
-options to `awk', or data files, or both.
+options to `awk', or data files, or both. Note that on many systems
+`awk' may be found in `/usr/bin' instead of in `/bin'. Caveat Emptor.

File: gawk.info, Node: Comments, Next: Quoting, Prev: Executable Scripts, Up: Running gawk
@@ -3221,6 +3222,10 @@ sequences and that are not listed in the table stand for themselves:
constants are valid and work the way you want them to, using any
version of `awk'.(2)
+ Finally, when `{' and `}' appear in regexp constants in a way that
+ cannot be interpreted as an interval expression (such as
+ `/q{a}/'), then they stand for themselves.
+
In regular expressions, the `*', `+', and `?' operators, as well as
the braces `{' and `}', have the highest precedence, followed by
concatenation, and finally by `|'. As in arithmetic, parentheses can
@@ -9327,7 +9332,7 @@ specific to `gawk' are marked with a pound sign (`#').
The working precision of arbitrary precision floating-point
numbers, 53 by default (*note Setting Precision::).
-`RNDMODE #'
+`ROUNDMODE #'
The rounding mode to use for arbitrary precision arithmetic on
numbers, by default `"N"' (`roundTiesToEven' in the IEEE-754
standard) (*note Setting Rounding Mode::).
@@ -10723,7 +10728,8 @@ with numbers. Optional parameters are enclosed in square
brackets ([ ]):
`atan2(Y, X)'
- Return the arctangent of `Y / X' in radians.
+ Return the arctangent of `Y / X' in radians. You can use `pi =
+ atan2(0, -1)' to retrieve the value of pi.
`cos(X)'
Return the cosine of X, with X in radians.
@@ -13922,11 +13928,11 @@ File: gawk.info, Node: Rounding Mode, Next: Arbitrary Precision Floats, Prev:
The "rounding mode" specifies the behavior for the results of numerical
operations when discarding extra precision. Each rounding mode indicates
how the least significant returned digit of a rounded result is to be
-calculated. The `RNDMODE' variable (*note Setting Rounding Mode::)
+calculated. The `ROUNDMODE' variable (*note Setting Rounding Mode::)
provides program level control over the rounding mode. *note
table-rounding-modes:: lists the IEEE-754 defined rounding modes:
-Rounding Mode IEEE Name `RNDMODE'
+Rounding Mode IEEE Name `ROUNDMODE'
---------------------------------------------------------------------------
Round to nearest, ties to even `roundTiesToEven' `"N"' or `"n"'
Round toward plus Infinity `roundTowardPositive' `"U"' or `"u"'
@@ -14013,18 +14019,18 @@ and rounding modes, and gives correctly rounded reproducible
platform-independent results. With the command-line option `--bignum'
or `-M', all floating-point arithmetic operators and numeric functions
can yield results to any desired precision level supported by MPFR.
-Two built-in variables `PREC' (*note Setting Precision::) and `RNDMODE'
-(*note Setting Rounding Mode::) provide control over the working
-precision and the rounding mode. The precision and the rounding mode
-are set globally for every operation to follow.
+Two built-in variables `PREC' (*note Setting Precision::) and
+`ROUNDMODE' (*note Setting Rounding Mode::) provide control over the
+working precision and the rounding mode. The precision and the
+rounding mode are set globally for every operation to follow.
The default working precision for arbitrary precision floats is 53,
-and the default value for `RNDMODE' is `"N"', which selects the IEEE-754
-`roundTiesToEven' (*note Rounding Mode::) rounding mode.(1) `gawk' uses
-the default exponent range in MPFR (EMAX = 2^30 - 1, EMIN = -EMAX) for
-all floating-point contexts. There is no explicit mechanism to adjust
-the exponent range. MPFR does not implement subnormal numbers by
-default, and this behavior cannot be changed in `gawk'.
+and the default value for `ROUNDMODE' is `"N"', which selects the
+IEEE-754 `roundTiesToEven' (*note Rounding Mode::) rounding mode.(1)
+`gawk' uses the default exponent range in MPFR (EMAX = 2^30 - 1, EMIN =
+-EMAX) for all floating-point contexts. There is no explicit mechanism
+to adjust the exponent range. MPFR does not implement subnormal
+numbers by default, and this behavior cannot be changed in `gawk'.
NOTE: When emulating an IEEE-754 format (*note Setting
Precision::), `gawk' internally adjusts the exponent range to the
@@ -14113,19 +14119,19 @@ File: gawk.info, Node: Setting Rounding Mode, Next: Floating-point Constants,
11.7 Setting the Rounding Mode
==============================
-The built-in variable `RNDMODE' has the default value `"N"', which
+The built-in variable `ROUNDMODE' has the default value `"N"', which
selects the IEEE-754 rounding mode `roundTiesToEven'. The other
-possible values for `RNDMODE' are `"U"' for rounding mode
+possible values for `ROUNDMODE' are `"U"' for rounding mode
`roundTowardPositive', `"D"' for `roundTowardNegative', and `"Z"' for
`roundTowardZero'. `gawk' also accepts `"A"' to select the IEEE-754
mode `roundTiesToAway' if your version of the MPFR library supports it;
-otherwise setting `RNDMODE' to this value has no effect. *Note Rounding
-Mode::, for the meanings of the various rounding modes.
+otherwise setting `ROUNDMODE' to this value has no effect. *Note
+Rounding Mode::, for the meanings of the various rounding modes.
Here is an example of how to change the default rounding behavior of
`printf''s output:
- $ gawk -M -vRNDMODE="Z" 'BEGIN { printf("%.2f\n", 1.378) }'
+ $ gawk -M -vROUNDMODE="Z" 'BEGIN { printf("%.2f\n", 1.378) }'
-| 1.37

@@ -26353,7 +26359,7 @@ Index
* coprocesses, closing: Close Files And Pipes.
(line 6)
* coprocesses, getline from: Getline/Coprocess. (line 6)
-* cos() function: Numeric Functions. (line 14)
+* cos() function: Numeric Functions. (line 15)
* counting: Wc Program. (line 6)
* csh utility: Statements/Lines. (line 44)
* csh utility, POSIXLY_CORRECT environment variable: Options. (line 329)
@@ -26714,7 +26720,7 @@ Index
* exclamation point (!), !~ operator: Regexp Usage. (line 19)
* exit statement: Exit Statement. (line 6)
* exit status, of gawk: Exit Status. (line 6)
-* exp() function: Numeric Functions. (line 17)
+* exp() function: Numeric Functions. (line 18)
* expand utility: Very Simple. (line 69)
* expressions: Expressions. (line 6)
* expressions, as patterns: Expression Patterns. (line 6)
@@ -27044,7 +27050,7 @@ Index
(line 26)
* gawk, regular expressions, operators: GNU Regexp Operators.
(line 6)
-* gawk, regular expressions, precedence: Regexp Operators. (line 157)
+* gawk, regular expressions, precedence: Regexp Operators. (line 161)
* gawk, RT variable in <1>: Auto-set. (line 213)
* gawk, RT variable in <2>: Getline/Variable/File.
(line 10)
@@ -27226,7 +27232,7 @@ Index
* installation, VMS: VMS Installation. (line 6)
* installing gawk: Installation. (line 6)
* INT signal (MS-Windows): Profiling. (line 206)
-* int() function: Numeric Functions. (line 22)
+* int() function: Numeric Functions. (line 23)
* integer, arbitrary precision: Arbitrary Precision Integers.
(line 6)
* integers: Basic Data Typing. (line 21)
@@ -27400,7 +27406,7 @@ Index
* localization, See internationalization, localization: I18N and L10N.
(line 6)
* log files, timestamps in: Time Functions. (line 6)
-* log() function: Numeric Functions. (line 29)
+* log() function: Numeric Functions. (line 30)
* logical false/true: Truth Values. (line 6)
* logical operators, See Boolean expressions: Boolean Ops. (line 6)
* login information: Passwd Functions. (line 16)
@@ -27536,7 +27542,7 @@ Index
* numbers, hexadecimal: Nondecimal-numbers. (line 6)
* numbers, NODE internal type: Internals. (line 23)
* numbers, octal: Nondecimal-numbers. (line 6)
-* numbers, random: Numeric Functions. (line 63)
+* numbers, random: Numeric Functions. (line 64)
* numbers, rounding: Round Function. (line 6)
* numeric, constants: Scalar Constants. (line 6)
* numeric, output format: OFMT. (line 6)
@@ -27738,7 +27744,7 @@ Index
* POSIX awk, OFMT variable and: OFMT. (line 27)
* POSIX awk, period (.), using: Regexp Operators. (line 50)
* POSIX awk, printf format strings and: Format Modifiers. (line 159)
-* POSIX awk, regular expressions and: Regexp Operators. (line 157)
+* POSIX awk, regular expressions and: Regexp Operators. (line 161)
* POSIX awk, timestamps and: Time Functions. (line 6)
* POSIX awk, | I/O operator and: Getline/Pipe. (line 52)
* POSIX mode: Options. (line 228)
@@ -27750,7 +27756,7 @@ Index
* PREC variable: User-modified. (line 134)
* precedence <1>: Precedence. (line 6)
* precedence: Increment Ops. (line 61)
-* precedence, regexp operators: Regexp Operators. (line 152)
+* precedence, regexp operators: Regexp Operators. (line 156)
* print debugger command: Viewing And Changing Data.
(line 36)
* print statement: Printing. (line 16)
@@ -27841,12 +27847,12 @@ Index
* r debugger command (alias for run): Debugger Execution Control.
(line 62)
* Rakitzis, Byron: History Sorting. (line 25)
-* rand() function: Numeric Functions. (line 33)
+* rand() function: Numeric Functions. (line 34)
* random numbers, Cliff: Cliff Random Function.
(line 6)
* random numbers, rand()/srand() functions: Numeric Functions.
- (line 33)
-* random numbers, seed of: Numeric Functions. (line 63)
+ (line 34)
+* random numbers, seed of: Numeric Functions. (line 64)
* range expressions (regexps): Bracket Expressions. (line 6)
* range patterns: Ranges. (line 6)
* Rankin, Pat <1>: Bugs. (line 72)
@@ -27916,7 +27922,7 @@ Index
* regular expressions, operators, gawk: GNU Regexp Operators.
(line 6)
* regular expressions, operators, precedence of: Regexp Operators.
- (line 152)
+ (line 156)
* regular expressions, searching for: Egrep Program. (line 6)
* relational operators, See comparison operators: Typing and Comparison.
(line 9)
@@ -27940,9 +27946,6 @@ Index
* Ritchie, Dennis: Basic Data Typing. (line 74)
* RLENGTH variable: Auto-set. (line 200)
* RLENGTH variable, match() function and: String Functions. (line 223)
-* RNDMODE variable <1>: Setting Rounding Mode.
- (line 6)
-* RNDMODE variable: User-modified. (line 138)
* Robbins, Arnold <1>: Future Extensions. (line 6)
* Robbins, Arnold <2>: Bugs. (line 32)
* Robbins, Arnold <3>: Contributors. (line 108)
@@ -27963,6 +27966,9 @@ Index
* round() user-defined function: Round Function. (line 16)
* rounding mode, floating-point: Rounding Mode. (line 6)
* rounding numbers: Round Function. (line 6)
+* ROUNDMODE variable <1>: Setting Rounding Mode.
+ (line 6)
+* ROUNDMODE variable: User-modified. (line 138)
* RS variable <1>: User-modified. (line 143)
* RS variable: Records. (line 20)
* RS variable, multiline records and: Multiple Line. (line 17)
@@ -28053,7 +28059,7 @@ Index
* SIGUSR1 signal: Profiling. (line 180)
* silent debugger command: Debugger Execution Control.
(line 10)
-* sin() function: Numeric Functions. (line 74)
+* sin() function: Numeric Functions. (line 75)
* single precision floating-point: Basic Data Typing. (line 36)
* single quote (') <1>: Quoting. (line 31)
* single quote (') <2>: Long. (line 33)
@@ -28096,9 +28102,9 @@ Index
* sprintf() function, OFMT variable and: User-modified. (line 124)
* sprintf() function, print/printf statements and: Round Function.
(line 6)
-* sqrt() function: Numeric Functions. (line 77)
+* sqrt() function: Numeric Functions. (line 78)
* square brackets ([]): Regexp Operators. (line 55)
-* srand() function: Numeric Functions. (line 81)
+* srand() function: Numeric Functions. (line 82)
* Stallman, Richard <1>: Glossary. (line 301)
* Stallman, Richard <2>: Contributors. (line 24)
* Stallman, Richard <3>: Acknowledgments. (line 18)
@@ -28418,441 +28424,441 @@ Index

Tag Table:
-Node: Top1346
-Node: Foreword31547
-Node: Preface35892
-Ref: Preface-Footnote-138945
-Ref: Preface-Footnote-239051
-Node: History39283
-Node: Names41674
-Ref: Names-Footnote-143151
-Node: This Manual43223
-Ref: This Manual-Footnote-148161
-Node: Conventions48261
-Node: Manual History50395
-Ref: Manual History-Footnote-153665
-Ref: Manual History-Footnote-253706
-Node: How To Contribute53780
-Node: Acknowledgments54924
-Node: Getting Started59420
-Node: Running gawk61799
-Node: One-shot62985
-Node: Read Terminal64210
-Ref: Read Terminal-Footnote-165860
-Ref: Read Terminal-Footnote-266136
-Node: Long66307
-Node: Executable Scripts67683
-Ref: Executable Scripts-Footnote-169552
-Ref: Executable Scripts-Footnote-269654
-Node: Comments70105
-Node: Quoting72572
-Node: DOS Quoting77195
-Node: Sample Data Files77870
-Node: Very Simple80902
-Node: Two Rules85501
-Node: More Complex87648
-Ref: More Complex-Footnote-190578
-Node: Statements/Lines90663
-Ref: Statements/Lines-Footnote-195125
-Node: Other Features95390
-Node: When96318
-Node: Invoking Gawk98465
-Node: Command Line99850
-Node: Options100633
-Ref: Options-Footnote-1114990
-Node: Other Arguments115015
-Node: Naming Standard Input117673
-Node: Environment Variables118767
-Node: AWKPATH Variable119211
-Ref: AWKPATH Variable-Footnote-1121808
-Node: Other Environment Variables122068
-Node: Exit Status124560
-Node: Include Files125235
-Node: Obsolete128720
-Node: Undocumented129406
-Node: Regexp129647
-Node: Regexp Usage131036
-Node: Escape Sequences133062
-Node: Regexp Operators138825
-Ref: Regexp Operators-Footnote-1146022
-Ref: Regexp Operators-Footnote-2146169
-Node: Bracket Expressions146267
-Ref: table-char-classes148157
-Node: GNU Regexp Operators150680
-Node: Case-sensitivity154403
-Ref: Case-sensitivity-Footnote-1157371
-Ref: Case-sensitivity-Footnote-2157606
-Node: Leftmost Longest157714
-Node: Computed Regexps158915
-Node: Reading Files162325
-Node: Records164329
-Ref: Records-Footnote-1173003
-Node: Fields173040
-Ref: Fields-Footnote-1176073
-Node: Nonconstant Fields176159
-Node: Changing Fields178361
-Node: Field Separators184342
-Node: Default Field Splitting186971
-Node: Regexp Field Splitting188088
-Node: Single Character Fields191430
-Node: Command Line Field Separator192489
-Node: Field Splitting Summary195930
-Ref: Field Splitting Summary-Footnote-1199122
-Node: Constant Size199223
-Node: Splitting By Content203807
-Ref: Splitting By Content-Footnote-1207533
-Node: Multiple Line207573
-Ref: Multiple Line-Footnote-1213420
-Node: Getline213599
-Node: Plain Getline215815
-Node: Getline/Variable217904
-Node: Getline/File219045
-Node: Getline/Variable/File220367
-Ref: Getline/Variable/File-Footnote-1221966
-Node: Getline/Pipe222053
-Node: Getline/Variable/Pipe224613
-Node: Getline/Coprocess225720
-Node: Getline/Variable/Coprocess226963
-Node: Getline Notes227677
-Node: Getline Summary229619
-Ref: table-getline-variants229962
-Node: Read Timeout230818
-Ref: Read Timeout-Footnote-1234563
-Node: Command line directories234620
-Node: Printing235250
-Node: Print236881
-Node: Print Examples238218
-Node: Output Separators241002
-Node: OFMT242762
-Node: Printf244120
-Node: Basic Printf245026
-Node: Control Letters246565
-Node: Format Modifiers250377
-Node: Printf Examples256386
-Node: Redirection259101
-Node: Special Files266085
-Node: Special FD266618
-Ref: Special FD-Footnote-1270243
-Node: Special Network270317
-Node: Special Caveats271167
-Node: Close Files And Pipes271963
-Ref: Close Files And Pipes-Footnote-1278986
-Ref: Close Files And Pipes-Footnote-2279134
-Node: Expressions279284
-Node: Values280416
-Node: Constants281092
-Node: Scalar Constants281772
-Ref: Scalar Constants-Footnote-1282631
-Node: Nondecimal-numbers282813
-Node: Regexp Constants285872
-Node: Using Constant Regexps286347
-Node: Variables289402
-Node: Using Variables290057
-Node: Assignment Options291781
-Node: Conversion293653
-Ref: table-locale-affects299029
-Ref: Conversion-Footnote-1299653
-Node: All Operators299762
-Node: Arithmetic Ops300392
-Node: Concatenation302897
-Ref: Concatenation-Footnote-1305690
-Node: Assignment Ops305810
-Ref: table-assign-ops310798
-Node: Increment Ops312206
-Node: Truth Values and Conditions315676
-Node: Truth Values316759
-Node: Typing and Comparison317808
-Node: Variable Typing318597
-Ref: Variable Typing-Footnote-1322494
-Node: Comparison Operators322616
-Ref: table-relational-ops323026
-Node: POSIX String Comparison326575
-Ref: POSIX String Comparison-Footnote-1327531
-Node: Boolean Ops327669
-Ref: Boolean Ops-Footnote-1331747
-Node: Conditional Exp331838
-Node: Function Calls333570
-Node: Precedence337164
-Node: Locales340833
-Node: Patterns and Actions341922
-Node: Pattern Overview342976
-Node: Regexp Patterns344645
-Node: Expression Patterns345188
-Node: Ranges348873
-Node: BEGIN/END351839
-Node: Using BEGIN/END352601
-Ref: Using BEGIN/END-Footnote-1355332
-Node: I/O And BEGIN/END355438
-Node: BEGINFILE/ENDFILE357720
-Node: Empty360613
-Node: Using Shell Variables360929
-Node: Action Overview363214
-Node: Statements365571
-Node: If Statement367425
-Node: While Statement368924
-Node: Do Statement370968
-Node: For Statement372124
-Node: Switch Statement375276
-Node: Break Statement377373
-Node: Continue Statement379363
-Node: Next Statement381156
-Node: Nextfile Statement383546
-Node: Exit Statement386091
-Node: Built-in Variables388507
-Node: User-modified389602
-Ref: User-modified-Footnote-1397955
-Node: Auto-set398017
-Ref: Auto-set-Footnote-1407863
-Node: ARGC and ARGV408068
-Node: Arrays411919
-Node: Array Basics413424
-Node: Array Intro414250
-Node: Reference to Elements418568
-Node: Assigning Elements420838
-Node: Array Example421329
-Node: Scanning an Array423061
-Node: Controlling Scanning425375
-Ref: Controlling Scanning-Footnote-1430308
-Node: Delete430624
-Ref: Delete-Footnote-1433059
-Node: Numeric Array Subscripts433116
-Node: Uninitialized Subscripts435299
-Node: Multi-dimensional436927
-Node: Multi-scanning440021
-Node: Arrays of Arrays441612
-Node: Functions446257
-Node: Built-in447079
-Node: Calling Built-in448157
-Node: Numeric Functions450145
-Ref: Numeric Functions-Footnote-1453910
-Ref: Numeric Functions-Footnote-2454267
-Ref: Numeric Functions-Footnote-3454315
-Node: String Functions454584
-Ref: String Functions-Footnote-1478081
-Ref: String Functions-Footnote-2478210
-Ref: String Functions-Footnote-3478458
-Node: Gory Details478545
-Ref: table-sub-escapes480224
-Ref: table-sub-posix-92481578
-Ref: table-sub-proposed482921
-Ref: table-posix-sub484271
-Ref: table-gensub-escapes485817
-Ref: Gory Details-Footnote-1487024
-Ref: Gory Details-Footnote-2487075
-Node: I/O Functions487226
-Ref: I/O Functions-Footnote-1493881
-Node: Time Functions494028
-Ref: Time Functions-Footnote-1504920
-Ref: Time Functions-Footnote-2504988
-Ref: Time Functions-Footnote-3505146
-Ref: Time Functions-Footnote-4505257
-Ref: Time Functions-Footnote-5505369
-Ref: Time Functions-Footnote-6505596
-Node: Bitwise Functions505862
-Ref: table-bitwise-ops506420
-Ref: Bitwise Functions-Footnote-1510580
-Node: Type Functions510764
-Node: I18N Functions511234
-Node: User-defined512861
-Node: Definition Syntax513665
-Ref: Definition Syntax-Footnote-1518575
-Node: Function Example518644
-Node: Function Caveats521238
-Node: Calling A Function521659
-Node: Variable Scope522774
-Node: Pass By Value/Reference524749
-Node: Return Statement528189
-Node: Dynamic Typing531170
-Node: Indirect Calls531905
-Node: Internationalization541590
-Node: I18N and L10N543029
-Node: Explaining gettext543715
-Ref: Explaining gettext-Footnote-1548781
-Ref: Explaining gettext-Footnote-2548965
-Node: Programmer i18n549130
-Node: Translator i18n553330
-Node: String Extraction554123
-Ref: String Extraction-Footnote-1555084
-Node: Printf Ordering555170
-Ref: Printf Ordering-Footnote-1557954
-Node: I18N Portability558018
-Ref: I18N Portability-Footnote-1560467
-Node: I18N Example560530
-Ref: I18N Example-Footnote-1563165
-Node: Gawk I18N563237
-Node: Arbitrary Precision Arithmetic563854
-Ref: Arbitrary Precision Arithmetic-Footnote-1566729
-Node: Floating-point Programming566877
-Node: Floating-point Representation572147
-Node: Floating-point Context573251
-Ref: table-ieee-formats574086
-Node: Rounding Mode575456
-Ref: table-rounding-modes576081
-Ref: Rounding Mode-Footnote-1579202
-Node: Arbitrary Precision Floats579383
-Ref: Arbitrary Precision Floats-Footnote-1581420
-Node: Setting Precision581731
-Node: Setting Rounding Mode584489
-Node: Floating-point Constants585398
-Node: Changing Precision586817
-Ref: Changing Precision-Footnote-1588217
-Node: Exact Arithmetic588390
-Node: Integer Programming591403
-Node: Arbitrary Precision Integers593183
-Ref: Arbitrary Precision Integers-Footnote-1596207
-Node: MPFR and GMP Libraries596353
-Node: Advanced Features596738
-Node: Nondecimal Data598261
-Node: Array Sorting599844
-Node: Controlling Array Traversal600541
-Node: Array Sorting Functions608778
-Ref: Array Sorting Functions-Footnote-1612452
-Ref: Array Sorting Functions-Footnote-2612545
-Node: Two-way I/O612739
-Ref: Two-way I/O-Footnote-1618171
-Node: TCP/IP Networking618241
-Node: Profiling621085
-Node: Library Functions628539
-Ref: Library Functions-Footnote-1631546
-Node: Library Names631717
-Ref: Library Names-Footnote-1635188
-Ref: Library Names-Footnote-2635408
-Node: General Functions635494
-Node: Strtonum Function636447
-Node: Assert Function639377
-Node: Round Function642703
-Node: Cliff Random Function644246
-Node: Ordinal Functions645262
-Ref: Ordinal Functions-Footnote-1648332
-Ref: Ordinal Functions-Footnote-2648584
-Node: Join Function648793
-Ref: Join Function-Footnote-1650564
-Node: Gettimeofday Function650764
-Node: Data File Management654479
-Node: Filetrans Function655111
-Node: Rewind Function659250
-Node: File Checking660637
-Node: Empty Files661731
-Node: Ignoring Assigns663961
-Node: Getopt Function665514
-Ref: Getopt Function-Footnote-1676818
-Node: Passwd Functions677021
-Ref: Passwd Functions-Footnote-1685996
-Node: Group Functions686084
-Node: Walking Arrays694168
-Node: Sample Programs695737
-Node: Running Examples696402
-Node: Clones697130
-Node: Cut Program698354
-Node: Egrep Program708199
-Ref: Egrep Program-Footnote-1715972
-Node: Id Program716082
-Node: Split Program719698
-Ref: Split Program-Footnote-1723217
-Node: Tee Program723345
-Node: Uniq Program726148
-Node: Wc Program733577
-Ref: Wc Program-Footnote-1737843
-Ref: Wc Program-Footnote-2738043
-Node: Miscellaneous Programs738135
-Node: Dupword Program739323
-Node: Alarm Program741354
-Node: Translate Program746103
-Ref: Translate Program-Footnote-1750490
-Ref: Translate Program-Footnote-2750718
-Node: Labels Program750852
-Ref: Labels Program-Footnote-1754223
-Node: Word Sorting754307
-Node: History Sorting758191
-Node: Extract Program760030
-Ref: Extract Program-Footnote-1767513
-Node: Simple Sed767641
-Node: Igawk Program770703
-Ref: Igawk Program-Footnote-1785860
-Ref: Igawk Program-Footnote-2786061
-Node: Anagram Program786199
-Node: Signature Program789267
-Node: Debugger790367
-Node: Debugging791319
-Node: Debugging Concepts791752
-Node: Debugging Terms793608
-Node: Awk Debugging796205
-Node: Sample Debugging Session797097
-Node: Debugger Invocation797617
-Node: Finding The Bug798946
-Node: List of Debugger Commands805434
-Node: Breakpoint Control806768
-Node: Debugger Execution Control810432
-Node: Viewing And Changing Data813792
-Node: Execution Stack817148
-Node: Debugger Info818615
-Node: Miscellaneous Debugger Commands822596
-Node: Readline Support828041
-Node: Limitations828872
-Node: Language History831124
-Node: V7/SVR3.1832636
-Node: SVR4834957
-Node: POSIX836399
-Node: BTL837407
-Node: POSIX/GNU838141
-Node: Common Extensions843292
-Node: Ranges and Locales844399
-Ref: Ranges and Locales-Footnote-1849003
-Node: Contributors849224
-Node: Installation853485
-Node: Gawk Distribution854379
-Node: Getting854863
-Node: Extracting855689
-Node: Distribution contents857381
-Node: Unix Installation862603
-Node: Quick Installation863220
-Node: Additional Configuration Options865182
-Node: Configuration Philosophy866659
-Node: Non-Unix Installation869001
-Node: PC Installation869459
-Node: PC Binary Installation870758
-Node: PC Compiling872606
-Node: PC Testing875550
-Node: PC Using876726
-Node: Cygwin880911
-Node: MSYS881911
-Node: VMS Installation882425
-Node: VMS Compilation883028
-Ref: VMS Compilation-Footnote-1884035
-Node: VMS Installation Details884093
-Node: VMS Running885728
-Node: VMS Old Gawk887335
-Node: Bugs887809
-Node: Other Versions891661
-Node: Notes896976
-Node: Compatibility Mode897668
-Node: Additions898451
-Node: Accessing The Source899263
-Node: Adding Code900688
-Node: New Ports906655
-Node: Dynamic Extensions910768
-Node: Internals912208
-Node: Plugin License920727
-Node: Loading Extensions921365
-Node: Sample Library923175
-Node: Internal File Description923865
-Node: Internal File Ops927580
-Ref: Internal File Ops-Footnote-1932304
-Node: Using Internal File Ops932444
-Node: Future Extensions934821
-Node: Basic Concepts937325
-Node: Basic High Level938082
-Ref: Basic High Level-Footnote-1942117
-Node: Basic Data Typing942302
-Node: Floating Point Issues946827
-Node: String Conversion Precision947910
-Ref: String Conversion Precision-Footnote-1949610
-Node: Unexpected Results949719
-Node: POSIX Floating Point Problems951545
-Ref: POSIX Floating Point Problems-Footnote-1955250
-Node: Glossary955288
-Node: Copying980264
-Node: GNU Free Documentation License1017821
-Node: Index1042958
+Node: Top1352
+Node: Foreword31559
+Node: Preface35904
+Ref: Preface-Footnote-138957
+Ref: Preface-Footnote-239063
+Node: History39295
+Node: Names41686
+Ref: Names-Footnote-143163
+Node: This Manual43235
+Ref: This Manual-Footnote-148173
+Node: Conventions48273
+Node: Manual History50407
+Ref: Manual History-Footnote-153677
+Ref: Manual History-Footnote-253718
+Node: How To Contribute53792
+Node: Acknowledgments54936
+Node: Getting Started59432
+Node: Running gawk61811
+Node: One-shot62997
+Node: Read Terminal64222
+Ref: Read Terminal-Footnote-165872
+Ref: Read Terminal-Footnote-266148
+Node: Long66319
+Node: Executable Scripts67695
+Ref: Executable Scripts-Footnote-169564
+Ref: Executable Scripts-Footnote-269666
+Node: Comments70213
+Node: Quoting72680
+Node: DOS Quoting77303
+Node: Sample Data Files77978
+Node: Very Simple81010
+Node: Two Rules85609
+Node: More Complex87756
+Ref: More Complex-Footnote-190686
+Node: Statements/Lines90771
+Ref: Statements/Lines-Footnote-195233
+Node: Other Features95498
+Node: When96426
+Node: Invoking Gawk98573
+Node: Command Line99958
+Node: Options100741
+Ref: Options-Footnote-1115098
+Node: Other Arguments115123
+Node: Naming Standard Input117781
+Node: Environment Variables118875
+Node: AWKPATH Variable119319
+Ref: AWKPATH Variable-Footnote-1121916
+Node: Other Environment Variables122176
+Node: Exit Status124668
+Node: Include Files125343
+Node: Obsolete128828
+Node: Undocumented129514
+Node: Regexp129755
+Node: Regexp Usage131144
+Node: Escape Sequences133170
+Node: Regexp Operators138933
+Ref: Regexp Operators-Footnote-1146313
+Ref: Regexp Operators-Footnote-2146460
+Node: Bracket Expressions146558
+Ref: table-char-classes148448
+Node: GNU Regexp Operators150971
+Node: Case-sensitivity154694
+Ref: Case-sensitivity-Footnote-1157662
+Ref: Case-sensitivity-Footnote-2157897
+Node: Leftmost Longest158005
+Node: Computed Regexps159206
+Node: Reading Files162616
+Node: Records164620
+Ref: Records-Footnote-1173294
+Node: Fields173331
+Ref: Fields-Footnote-1176364
+Node: Nonconstant Fields176450
+Node: Changing Fields178652
+Node: Field Separators184633
+Node: Default Field Splitting187262
+Node: Regexp Field Splitting188379
+Node: Single Character Fields191721
+Node: Command Line Field Separator192780
+Node: Field Splitting Summary196221
+Ref: Field Splitting Summary-Footnote-1199413
+Node: Constant Size199514
+Node: Splitting By Content204098
+Ref: Splitting By Content-Footnote-1207824
+Node: Multiple Line207864
+Ref: Multiple Line-Footnote-1213711
+Node: Getline213890
+Node: Plain Getline216106
+Node: Getline/Variable218195
+Node: Getline/File219336
+Node: Getline/Variable/File220658
+Ref: Getline/Variable/File-Footnote-1222257
+Node: Getline/Pipe222344
+Node: Getline/Variable/Pipe224904
+Node: Getline/Coprocess226011
+Node: Getline/Variable/Coprocess227254
+Node: Getline Notes227968
+Node: Getline Summary229910
+Ref: table-getline-variants230253
+Node: Read Timeout231109
+Ref: Read Timeout-Footnote-1234854
+Node: Command line directories234911
+Node: Printing235541
+Node: Print237172
+Node: Print Examples238509
+Node: Output Separators241293
+Node: OFMT243053
+Node: Printf244411
+Node: Basic Printf245317
+Node: Control Letters246856
+Node: Format Modifiers250668
+Node: Printf Examples256677
+Node: Redirection259392
+Node: Special Files266376
+Node: Special FD266909
+Ref: Special FD-Footnote-1270534
+Node: Special Network270608
+Node: Special Caveats271458
+Node: Close Files And Pipes272254
+Ref: Close Files And Pipes-Footnote-1279277
+Ref: Close Files And Pipes-Footnote-2279425
+Node: Expressions279575
+Node: Values280707
+Node: Constants281383
+Node: Scalar Constants282063
+Ref: Scalar Constants-Footnote-1282922
+Node: Nondecimal-numbers283104
+Node: Regexp Constants286163
+Node: Using Constant Regexps286638
+Node: Variables289693
+Node: Using Variables290348
+Node: Assignment Options292072
+Node: Conversion293944
+Ref: table-locale-affects299320
+Ref: Conversion-Footnote-1299944
+Node: All Operators300053
+Node: Arithmetic Ops300683
+Node: Concatenation303188
+Ref: Concatenation-Footnote-1305981
+Node: Assignment Ops306101
+Ref: table-assign-ops311089
+Node: Increment Ops312497
+Node: Truth Values and Conditions315967
+Node: Truth Values317050
+Node: Typing and Comparison318099
+Node: Variable Typing318888
+Ref: Variable Typing-Footnote-1322785
+Node: Comparison Operators322907
+Ref: table-relational-ops323317
+Node: POSIX String Comparison326866
+Ref: POSIX String Comparison-Footnote-1327822
+Node: Boolean Ops327960
+Ref: Boolean Ops-Footnote-1332038
+Node: Conditional Exp332129
+Node: Function Calls333861
+Node: Precedence337455
+Node: Locales341124
+Node: Patterns and Actions342213
+Node: Pattern Overview343267
+Node: Regexp Patterns344936
+Node: Expression Patterns345479
+Node: Ranges349164
+Node: BEGIN/END352130
+Node: Using BEGIN/END352892
+Ref: Using BEGIN/END-Footnote-1355623
+Node: I/O And BEGIN/END355729
+Node: BEGINFILE/ENDFILE358011
+Node: Empty360904
+Node: Using Shell Variables361220
+Node: Action Overview363505
+Node: Statements365862
+Node: If Statement367716
+Node: While Statement369215
+Node: Do Statement371259
+Node: For Statement372415
+Node: Switch Statement375567
+Node: Break Statement377664
+Node: Continue Statement379654
+Node: Next Statement381447
+Node: Nextfile Statement383837
+Node: Exit Statement386382
+Node: Built-in Variables388798
+Node: User-modified389893
+Ref: User-modified-Footnote-1398248
+Node: Auto-set398310
+Ref: Auto-set-Footnote-1408156
+Node: ARGC and ARGV408361
+Node: Arrays412212
+Node: Array Basics413717
+Node: Array Intro414543
+Node: Reference to Elements418861
+Node: Assigning Elements421131
+Node: Array Example421622
+Node: Scanning an Array423354
+Node: Controlling Scanning425668
+Ref: Controlling Scanning-Footnote-1430601
+Node: Delete430917
+Ref: Delete-Footnote-1433352
+Node: Numeric Array Subscripts433409
+Node: Uninitialized Subscripts435592
+Node: Multi-dimensional437220
+Node: Multi-scanning440314
+Node: Arrays of Arrays441905
+Node: Functions446550
+Node: Built-in447372
+Node: Calling Built-in448450
+Node: Numeric Functions450438
+Ref: Numeric Functions-Footnote-1454270
+Ref: Numeric Functions-Footnote-2454627
+Ref: Numeric Functions-Footnote-3454675
+Node: String Functions454944
+Ref: String Functions-Footnote-1478441
+Ref: String Functions-Footnote-2478570
+Ref: String Functions-Footnote-3478818
+Node: Gory Details478905
+Ref: table-sub-escapes480584
+Ref: table-sub-posix-92481938
+Ref: table-sub-proposed483281
+Ref: table-posix-sub484631
+Ref: table-gensub-escapes486177
+Ref: Gory Details-Footnote-1487384
+Ref: Gory Details-Footnote-2487435
+Node: I/O Functions487586
+Ref: I/O Functions-Footnote-1494241
+Node: Time Functions494388
+Ref: Time Functions-Footnote-1505280
+Ref: Time Functions-Footnote-2505348
+Ref: Time Functions-Footnote-3505506
+Ref: Time Functions-Footnote-4505617
+Ref: Time Functions-Footnote-5505729
+Ref: Time Functions-Footnote-6505956
+Node: Bitwise Functions506222
+Ref: table-bitwise-ops506780
+Ref: Bitwise Functions-Footnote-1510940
+Node: Type Functions511124
+Node: I18N Functions511594
+Node: User-defined513221
+Node: Definition Syntax514025
+Ref: Definition Syntax-Footnote-1518935
+Node: Function Example519004
+Node: Function Caveats521598
+Node: Calling A Function522019
+Node: Variable Scope523134
+Node: Pass By Value/Reference525109
+Node: Return Statement528549
+Node: Dynamic Typing531530
+Node: Indirect Calls532265
+Node: Internationalization541950
+Node: I18N and L10N543389
+Node: Explaining gettext544075
+Ref: Explaining gettext-Footnote-1549141
+Ref: Explaining gettext-Footnote-2549325
+Node: Programmer i18n549490
+Node: Translator i18n553690
+Node: String Extraction554483
+Ref: String Extraction-Footnote-1555444
+Node: Printf Ordering555530
+Ref: Printf Ordering-Footnote-1558314
+Node: I18N Portability558378
+Ref: I18N Portability-Footnote-1560827
+Node: I18N Example560890
+Ref: I18N Example-Footnote-1563525
+Node: Gawk I18N563597
+Node: Arbitrary Precision Arithmetic564214
+Ref: Arbitrary Precision Arithmetic-Footnote-1567089
+Node: Floating-point Programming567237
+Node: Floating-point Representation572507
+Node: Floating-point Context573611
+Ref: table-ieee-formats574446
+Node: Rounding Mode575816
+Ref: table-rounding-modes576443
+Ref: Rounding Mode-Footnote-1579566
+Node: Arbitrary Precision Floats579747
+Ref: Arbitrary Precision Floats-Footnote-1581788
+Node: Setting Precision582099
+Node: Setting Rounding Mode584857
+Node: Floating-point Constants585774
+Node: Changing Precision587193
+Ref: Changing Precision-Footnote-1588593
+Node: Exact Arithmetic588766
+Node: Integer Programming591779
+Node: Arbitrary Precision Integers593559
+Ref: Arbitrary Precision Integers-Footnote-1596583
+Node: MPFR and GMP Libraries596729
+Node: Advanced Features597114
+Node: Nondecimal Data598637
+Node: Array Sorting600220
+Node: Controlling Array Traversal600917
+Node: Array Sorting Functions609154
+Ref: Array Sorting Functions-Footnote-1612828
+Ref: Array Sorting Functions-Footnote-2612921
+Node: Two-way I/O613115
+Ref: Two-way I/O-Footnote-1618547
+Node: TCP/IP Networking618617
+Node: Profiling621461
+Node: Library Functions628915
+Ref: Library Functions-Footnote-1631922
+Node: Library Names632093
+Ref: Library Names-Footnote-1635564
+Ref: Library Names-Footnote-2635784
+Node: General Functions635870
+Node: Strtonum Function636823
+Node: Assert Function639753
+Node: Round Function643079
+Node: Cliff Random Function644622
+Node: Ordinal Functions645638
+Ref: Ordinal Functions-Footnote-1648708
+Ref: Ordinal Functions-Footnote-2648960
+Node: Join Function649169
+Ref: Join Function-Footnote-1650940
+Node: Gettimeofday Function651140
+Node: Data File Management654855
+Node: Filetrans Function655487
+Node: Rewind Function659626
+Node: File Checking661013
+Node: Empty Files662107
+Node: Ignoring Assigns664337
+Node: Getopt Function665890
+Ref: Getopt Function-Footnote-1677194
+Node: Passwd Functions677397
+Ref: Passwd Functions-Footnote-1686372
+Node: Group Functions686460
+Node: Walking Arrays694544
+Node: Sample Programs696113
+Node: Running Examples696778
+Node: Clones697506
+Node: Cut Program698730
+Node: Egrep Program708575
+Ref: Egrep Program-Footnote-1716348
+Node: Id Program716458
+Node: Split Program720074
+Ref: Split Program-Footnote-1723593
+Node: Tee Program723721
+Node: Uniq Program726524
+Node: Wc Program733953
+Ref: Wc Program-Footnote-1738219
+Ref: Wc Program-Footnote-2738419
+Node: Miscellaneous Programs738511
+Node: Dupword Program739699
+Node: Alarm Program741730
+Node: Translate Program746479
+Ref: Translate Program-Footnote-1750866
+Ref: Translate Program-Footnote-2751094
+Node: Labels Program751228
+Ref: Labels Program-Footnote-1754599
+Node: Word Sorting754683
+Node: History Sorting758567
+Node: Extract Program760406
+Ref: Extract Program-Footnote-1767889
+Node: Simple Sed768017
+Node: Igawk Program771079
+Ref: Igawk Program-Footnote-1786236
+Ref: Igawk Program-Footnote-2786437
+Node: Anagram Program786575
+Node: Signature Program789643
+Node: Debugger790743
+Node: Debugging791695
+Node: Debugging Concepts792128
+Node: Debugging Terms793984
+Node: Awk Debugging796581
+Node: Sample Debugging Session797473
+Node: Debugger Invocation797993
+Node: Finding The Bug799322
+Node: List of Debugger Commands805810
+Node: Breakpoint Control807144
+Node: Debugger Execution Control810808
+Node: Viewing And Changing Data814168
+Node: Execution Stack817524
+Node: Debugger Info818991
+Node: Miscellaneous Debugger Commands822972
+Node: Readline Support828417
+Node: Limitations829248
+Node: Language History831500
+Node: V7/SVR3.1833012
+Node: SVR4835333
+Node: POSIX836775
+Node: BTL837783
+Node: POSIX/GNU838517
+Node: Common Extensions843668
+Node: Ranges and Locales844775
+Ref: Ranges and Locales-Footnote-1849379
+Node: Contributors849600
+Node: Installation853861
+Node: Gawk Distribution854755
+Node: Getting855239
+Node: Extracting856065
+Node: Distribution contents857757
+Node: Unix Installation862979
+Node: Quick Installation863596
+Node: Additional Configuration Options865558
+Node: Configuration Philosophy867035
+Node: Non-Unix Installation869377
+Node: PC Installation869835
+Node: PC Binary Installation871134
+Node: PC Compiling872982
+Node: PC Testing875926
+Node: PC Using877102
+Node: Cygwin881287
+Node: MSYS882287
+Node: VMS Installation882801
+Node: VMS Compilation883404
+Ref: VMS Compilation-Footnote-1884411
+Node: VMS Installation Details884469
+Node: VMS Running886104
+Node: VMS Old Gawk887711
+Node: Bugs888185
+Node: Other Versions892037
+Node: Notes897352
+Node: Compatibility Mode898044
+Node: Additions898827
+Node: Accessing The Source899639
+Node: Adding Code901064
+Node: New Ports907031
+Node: Dynamic Extensions911144
+Node: Internals912584
+Node: Plugin License921103
+Node: Loading Extensions921741
+Node: Sample Library923551
+Node: Internal File Description924241
+Node: Internal File Ops927956
+Ref: Internal File Ops-Footnote-1932680
+Node: Using Internal File Ops932820
+Node: Future Extensions935197
+Node: Basic Concepts937701
+Node: Basic High Level938458
+Ref: Basic High Level-Footnote-1942493
+Node: Basic Data Typing942678
+Node: Floating Point Issues947203
+Node: String Conversion Precision948286
+Ref: String Conversion Precision-Footnote-1949986
+Node: Unexpected Results950095
+Node: POSIX Floating Point Problems951921
+Ref: POSIX Floating Point Problems-Footnote-1955626
+Node: Glossary955664
+Node: Copying980640
+Node: GNU Free Documentation License1018197
+Node: Index1043334

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 44243b36..8cd7e38e 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -20,7 +20,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH November, 2011
+@set UPDATE-MONTH February, 2012
@set VERSION 4.0
@set PATCHLEVEL 1
@@ -145,7 +145,7 @@ 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, 2010, 2011
+2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
@sp 2
@@ -1992,9 +1992,11 @@ line beginning with @samp{#!} lists the full @value{FN} of an interpreter
to run and an optional initial command-line argument to pass to that
interpreter. The operating system then runs the interpreter with the given
argument and the full argument list of the executed program. The first argument
-in the list is the full @value{FN} of the @command{awk} program. The rest of the
+in the list is the full @value{FN} of the @command{awk} program.
+The rest of the
argument list contains either options to @command{awk}, or @value{DF}s,
-or both.} as if you had
+or both. Note that on many systems @command{awk} may be found in
+@file{/usr/bin} instead of in @file{/bin}. Caveat Emptor.} as if you had
typed @samp{awk -f advice}:
@example
@@ -4544,6 +4546,10 @@ it is good practice to always escape them with a backslash. Then the
regexp constants are valid and work the way you want them to, using
any version of @command{awk}.@footnote{Use two backslashes if you're
using a string constant with a regexp operator or function.}
+
+Finally, when @samp{@{} and @samp{@}} appear in regexp constants
+in a way that cannot be interpreted as an interval expression
+(such as @code{/q@{a@}/}), then they stand for themselves.
@end table
@cindex precedence, regexp operators
@@ -14400,6 +14406,13 @@ Optional parameters are enclosed in square brackets@w{ ([ ]):}
@item atan2(@var{y}, @var{x})
@cindex @code{atan2()} function
Return the arctangent of @code{@var{y} / @var{x}} in radians.
+You can use @samp{pi = atan2(0, -1)} to retrieve the value of
+@tex
+$\pi$.
+@end tex
+@ifnottex
+pi.
+@end ifnottex
@item cos(@var{x})
@cindex @code{cos()} function
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 1130b8fc..dcdeb9b4 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{2010-12-23.17}
+\def\texinfoversion{2012-01-19.16}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011 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
@@ -116,10 +116,11 @@
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putworderror\undefined \gdef\putworderror{error}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
@@ -158,15 +159,18 @@
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
+\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
+\chardef\hashChar = `\#
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
+\chardef\slashChar = `\/
\chardef\underChar = `\_
% Ignore a token.
@@ -215,7 +219,7 @@
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
- \ifx\eTeXversion\undefined\else % etex gives us more logging
+ \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
@@ -226,6 +230,13 @@
\errorcontextlines16
}%
+% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+%
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
@@ -545,7 +556,7 @@
}
\def\inenvironment#1{%
\ifx#1\empty
- out of any environment%
+ outside of any environment%
\else
in environment \expandafter\string#1%
\fi
@@ -557,7 +568,7 @@
\parseargdef\end{%
\if 1\csname iscond.#1\endcsname
\else
- % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+ % The general wording of \badenverr may not be ideal.
\expandafter\checkenv\csname#1\endcsname
\csname E#1\endcsname
\endgroup
@@ -608,7 +619,7 @@
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
- \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
\fi\fi
}
@@ -690,15 +701,6 @@ where each line of input produces a line of output.}
\newdimen\mil \mil=0.001in
-% Old definition--didn't work.
-%\parseargdef\need{\par %
-%% This method tries to make TeX break the page naturally
-%% if the depth of the box does not fit.
-%{\baselineskip=0pt%
-%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
-%\prevdepth=-1000pt
-%}}
-
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
@@ -849,6 +851,7 @@ where each line of input produces a line of output.}
\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.
+ \wlog{texinfo.tex: doing @include of #1^^J}%
\edef\temp{\noexpand\input #1 }%
%
% This trickery is to read FILE outside of a group, in case it makes
@@ -1078,9 +1081,8 @@ where each line of input produces a line of output.}
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as \undefined,
-% borrowed from ifpdf.sty.
-\ifx\pdfoutput\undefined
+% can be set). So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
\else
\ifx\pdfoutput\relax
\else
@@ -1095,50 +1097,24 @@ where each line of input produces a line of output.}
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
-% (and related messages, the final outcome is that it is up to the TeX
-% user to double the backslashes and otherwise make the string valid, so
-% that's what we do).
-
-% double active backslashes.
-%
-{\catcode`\@=0 \catcode`\\=\active
- @gdef@activebackslashdouble{%
- @catcode`@\=@active
- @let\=@doublebackslash}
-}
-
-% To handle parens, we must adopt a different approach, since parens are
-% not active characters. hyperref.dtx (which has the same problem as
-% 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%
- \ifx\\##2\\%
- \else
- #2%
- \HyReturnAfterFi{%
- \HyPsdReplace##2\END
- }%
- \fi
- }%
- \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
-}
-\long\def\HyReturnAfterFi#1\fi{\fi#1}
-
-% #1 is a control sequence in which to do the replacements.
-\def\backslashparens#1{%
- \xdef#1{#1}% redefine it as its expansion; the definition is simply
- % \lastnode when called from \setref -> \pdfmkdest.
- \HyPsdSubst{(}{\realbackslash(}{#1}%
- \HyPsdSubst{)}{\realbackslash)}{#1}%
+%
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages. The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+ \ifx\pdfescapestring\relax
+ % No primitive available; should we give a warning or log?
+ % Many times it won't matter.
+ \else
+ % The expandable \pdfescapestring primitive escapes parentheses,
+ % backslashes, and other special chars.
+ \xdef#1{\pdfescapestring{#1}}%
+ \fi
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
@@ -1200,29 +1176,31 @@ output) for that.)}
\def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
\def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
- % pdftex (and the PDF format) support .png, .jpg, .pdf (among
- % others). Let's try in that order.
+ % pdftex (and the PDF format) support .pdf, .png, .jpg (among
+ % others). Let's try in that order, PDF first since if
+ % someone has a scalable image, presumably better to use that than a
+ % bitmap.
\let\pdfimgext=\empty
\begingroup
- \openin 1 #1.png \ifeof 1
- \openin 1 #1.jpg \ifeof 1
- \openin 1 #1.jpeg \ifeof 1
- \openin 1 #1.JPG \ifeof 1
- \openin 1 #1.pdf \ifeof 1
- \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
- \else \gdef\pdfimgext{PDF}%
+ \else \gdef\pdfimgext{JPG}%
\fi
- \else \gdef\pdfimgext{pdf}%
+ \else \gdef\pdfimgext{jpeg}%
\fi
- \else \gdef\pdfimgext{JPG}%
+ \else \gdef\pdfimgext{jpg}%
\fi
- \else \gdef\pdfimgext{jpeg}%
+ \else \gdef\pdfimgext{png}%
\fi
- \else \gdef\pdfimgext{jpg}%
+ \else \gdef\pdfimgext{PDF}%
\fi
- \else \gdef\pdfimgext{png}%
+ \else \gdef\pdfimgext{pdf}%
\fi
\closein 1
\endgroup
@@ -1250,10 +1228,9 @@ output) for that.)}
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
- \activebackslashdouble
\makevalueexpandable
\def\pdfdestname{#1}%
- \backslashparens\pdfdestname
+ \txiescapepdf\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
@@ -1285,28 +1262,22 @@ output) for that.)}
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \def\pdfoutlinedest{#3}%
+ \edef\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
- % Doubled backslashes in the name.
- {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
- \backslashparens\pdfoutlinedest}%
+ \txiescapepdf\pdfoutlinedest
\fi
%
- % Also double the backslashes in the display string.
- {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
- \backslashparens\pdfoutlinetext}%
+ % Also escape PDF chars in the display string.
+ \edef\pdfoutlinetext{#1}%
+ \txiescapepdf\pdfoutlinetext
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
- % Thanh's hack / proper braces in bookmarks
- \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
- \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
- %
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
@@ -1362,15 +1333,26 @@ output) for that.)}
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
- % xx to do this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Right
- % now, I guess we'll just let the pdf reader have its way.
+ % TODO this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Too
+ % much work for too little return. Just use the ASCII equivalents
+ % we use for the index sort strings.
+ %
\indexnofonts
\setupdatafile
+ % We can have normal brace characters in the PDF outlines, unlike
+ % Texinfo index files. So set that up.
+ \def\{{\lbracecharliteral}%
+ \def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
+ {\catcode`[=1 \catcode`]=2
+ \catcode`{=\other \catcode`}=\other
+ \gdef\lbracecharliteral[{]%
+ \gdef\rbracecharliteral[}]%
+ ]
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
@@ -1512,7 +1494,7 @@ output) for that.)}
% 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
+\ifpdf \ifx\pdffontattr\thisisundefined \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
@@ -1779,7 +1761,7 @@ end
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
-\ifx\fontprefix\undefined
+\ifx\fontprefix\thisisundefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
@@ -2070,7 +2052,7 @@ end
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
- \wlog{doing @fonttextsize \textsizearg}%
+ %\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
@@ -2252,12 +2234,14 @@ end
% Markup style setup for left and right quotes.
\defmarkupstylesetup\markupsetuplq{%
- \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
+ \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
+ \expandafter\let\expandafter \temp
+ \csname markupsetuprq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuprqdefault \else \temp \fi
}
@@ -2291,12 +2275,11 @@ end
\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.
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead 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
@@ -2320,6 +2303,36 @@ end
\else \char'22 \fi
}
+% Commands to set the quote options.
+%
+\parseargdef\codequoteundirected{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+ \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+ \fi\fi
+}
+
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
@@ -2347,7 +2360,9 @@ end
\else\ifx\next-%
\else\ifx\next.%
\else\ptexslash
- \fi\fi\fi}
+ \fi\fi\fi
+ \aftersmartic
+}
% like \smartslanted except unconditionally uses \ttsl, and no ic.
% @var is set to this for defun arguments.
@@ -2357,9 +2372,15 @@ end
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+\def\aftersmartic{}
+\def\var#1{%
+ \let\saveaftersmartic = \aftersmartic
+ \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+ \smartslanted{#1}%
+}
+
\let\i=\smartitalic
\let\slanted=\smartslanted
-\def\var#1{\smartslanted{#1}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
@@ -2455,7 +2476,7 @@ end
\plainfrenchspacing
#1%
}%
- \null
+ \null % reset spacefactor to 1000
}
% We *must* turn on hyphenation at `-' and `_' in @code.
@@ -2487,6 +2508,8 @@ end
}
}
+\def\codex #1{\tclose{#1}\endgroup}
+
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
@@ -2500,7 +2523,6 @@ end
\discretionary{}{}{}}%
{\_}%
}
-\def\codex #1{\tclose{#1}\endgroup}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is undesirable in
@@ -2520,63 +2542,18 @@ end
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
- \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
\fi\fi
}
-% @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),
-% or `code' (@kbd uses normal tty font always).
-\parseargdef\kbdinputstyle{%
- \def\txiarg{#1}%
- \ifx\txiarg\worddistinct
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\txiarg\wordexample
- \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\txiarg\wordcode
- \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
- \fi\fi\fi
-}
-\def\worddistinct{distinct}
-\def\wordexample{example}
-\def\wordcode{code}
-
-% 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\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
-% itself. First (mandatory) arg is the url. Perhaps eventually put in
-% a hypertex \special here.
-%
-\def\uref#1{\douref #1,,,\finish}
-\def\douref#1,#2,#3,#4\finish{\begingroup
+% itself. First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
@@ -2597,6 +2574,103 @@ end
\endlink
\endgroup}
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \urefcode{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+ \catcode\ampChar=\active \catcode\dotChar=\active
+ \catcode\hashChar=\active \catcode\questChar=\active
+ \catcode\slashChar=\active
+}
+{
+ \urefcatcodes
+ %
+ \global\def\urefcode{\begingroup
+ \setupmarkupstyle{code}%
+ \urefcatcodes
+ \let&\urefcodeamp
+ \let.\urefcodedot
+ \let#\urefcodehash
+ \let?\urefcodequest
+ \let/\urefcodeslash
+ \codex
+ }
+ %
+ % By default, they are just regular characters.
+ \global\def&{\normalamp}
+ \global\def.{\normaldot}
+ \global\def#{\normalhash}
+ \global\def?{\normalquest}
+ \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's. The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+ \catcode`\/=\active
+ \global\def\urefcodeslashfinish{%
+ \urefprestretch \slashChar
+ % Allow line break only after the final / in a sequence of
+ % slashes, to avoid line break between the slashes in http://.
+ \ifx\next/\else \urefpoststretch \fi
+ }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that. Also allow no breaking at all, for manual control.
+%
+\parseargdef\urefbreakstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\wordnone
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordbefore
+ \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordafter
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
% @url synonym for @uref, since that's how everyone uses it.
%
\let\url=\uref
@@ -2618,6 +2692,51 @@ end
\let\email=\uref
\fi
+% @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),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% 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\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}
+
% 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.
%
@@ -2639,6 +2758,7 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
}
% @abbr for "Comput. J." and the like.
@@ -2651,6 +2771,7 @@ end
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
+ \null % reset \spacefactor=1000
}
% @asis just yields its argument. Used with @table, for example.
@@ -2715,20 +2836,48 @@ end
}
}
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+%
+\def\outfmtnametex{tex}
+%
+\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\long\def\doinlinefmt#1,#2,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely. Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored. But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too. We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+%
+\long\def\inlineraw{\tex \doinlineraw}
+\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+ \def\inlinerawname{#1}%
+ \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+ \endgroup % close group opened by \tex.
+}
+
\message{glyphs,}
% and logos.
-% @@ prints an @.
+% @@ prints an @, as does @atchar{}.
\def\@{\char64 }
+\let\atchar=\@
-% Used to generate quoted braces. Unless we're in typewriter, use
-% \ecfont because the CM text fonts do not have braces, and we don't
-% want to switch into math.
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
\begingroup
% Definitions to produce \{ and \} commands for indices,
% and @{ and @} for the aux/toc files.
@@ -2856,7 +3005,7 @@ end
{\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}
+\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
@@ -3005,7 +3154,7 @@ end
% 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
+\ifx\Orb\thisisundefined
\def\Orb{\mathhexbox20D}
\fi
@@ -3033,8 +3182,9 @@ end
\newif\ifsetshortcontentsaftertitlepage
\let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
-\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{%
+ \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
@@ -3094,7 +3244,7 @@ end
\finishedtitlepagetrue
}
-%%% Macros to be used within @titlepage:
+% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
@@ -3127,7 +3277,7 @@ end
}
-%%% Set up page headings and footings.
+% Set up page headings and footings.
\let\thispage=\folio
@@ -3279,7 +3429,7 @@ end
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
-\ifx\today\undefined
+\ifx\today\thisisundefined
\def\today{%
\number\day\space
\ifcase\month
@@ -3826,18 +3976,18 @@ end
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
-%% Test to see if parskip is larger than space between lines of
-%% table. If not, do nothing.
-%% If so, set to same dimension as multitablelinespace.
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
- %% than skip between lines in the table.
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
\fi}
@@ -4349,6 +4499,7 @@ end
%
% Commands that take arguments.
\definedummyword\acronym
+ \definedummyword\anchor
\definedummyword\cite
\definedummyword\code
\definedummyword\command
@@ -5242,7 +5393,8 @@ end
\global\let\subsubsection = \appendixsubsubsec
}
-\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
\def\unnumberedzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\unnumberedno by 1
@@ -5286,40 +5438,47 @@ end
\let\top\unnumbered
% Sections.
+%
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
}
-\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
\def\appendixsectionzzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
}
\let\appendixsec\appendixsection
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
\def\unnumberedseczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
}
% Subsections.
-\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+%
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
\def\numberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
}
-\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
\def\appendixsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno}%
}
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
\def\unnumberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynothing}%
@@ -5327,21 +5486,25 @@ end
}
% Subsubsections.
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+%
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
\def\numberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynumbered}%
{\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
\def\appendixsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
\def\unnumberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynothing}%
@@ -5391,14 +5554,13 @@ end
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
-%%% Args are the skip and penalty (usually negative)
+% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
-%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
-
\newskip\chapheadingskip
+% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
@@ -5601,6 +5763,8 @@ end
%
\def\sectionheading#1#2#3#4{%
{%
+ \checkenv{}% should not be in an environment.
+ %
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
@@ -5718,7 +5882,6 @@ end
% 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
@@ -6136,6 +6299,12 @@ end
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
+ %
+ % If this cartouche directly follows a sectioning command, we need the
+ % \parskip glue (backspaced over by default) or the cartouche can
+ % collide with the section heading.
+ \ifnum\lastpenalty>10000 \vskip\parskip \fi
+ %
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
@@ -6149,7 +6318,7 @@ end
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
- \comment % For explanation, see the end of \def\group.
+ \comment % For explanation, see the end of def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
@@ -6346,7 +6515,7 @@ end
%
\def\Equotation{%
\par
- \ifx\quotationauthor\undefined\else
+ \ifx\quotationauthor\thisisundefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
@@ -6505,6 +6674,7 @@ end
\makevalueexpandable
\setupverbatim
\indexnofonts % Allow `@@' and other weird things in file names.
+ \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
\input #1
\afterenvbreak
}%
@@ -6554,7 +6724,7 @@ end
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
- % As a minor refinement, we avoid "club" headers by signalling
+ % As a further refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
@@ -6621,13 +6791,36 @@ end
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
+ \doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
-%%% Untyped functions:
+\newif\ifdoingtypefn % doing typed function?
+\newif\ifrettypeownline % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line. This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+%
+\parseargdef\deftypefnnewline{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @txideftypefnnl value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
@@ -6646,7 +6839,7 @@ end
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
-%%% Typed functions:
+% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
@@ -6661,10 +6854,11 @@ end
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
+ \doingtypefntrue
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Typed variables:
+% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
@@ -6682,7 +6876,7 @@ end
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-%%% Untyped variables:
+% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
@@ -6693,7 +6887,8 @@ end
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
-%%% Type:
+% Types:
+
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
@@ -6721,25 +6916,49 @@ end
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
+ \par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
- % How we'll format the type name. Putting it in brackets helps
+ % Determine if we are typesetting the return type of a typed function
+ % on a line by itself.
+ \rettypeownlinefalse
+ \ifdoingtypefn % doing a typed function specifically?
+ % then check user option for putting return type on its own line:
+ \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+ \rettypeownlinetrue
+ \fi
+ \fi
+ %
+ % How we'll format the category name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
- % Figure out line sizes for the paragraph shape.
+ % Figure out line sizes for the paragraph shape. We'll always have at
+ % least two.
+ \tempnum = 2
+ %
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ %
+ % If doing a return type on its own line, we'll have another line.
+ \ifrettypeownline
+ \advance\tempnum by 1
+ \def\maybeshapeline{0in \hsize}%
+ \else
+ \def\maybeshapeline{}%
+ \fi
+ %
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
- % (plain.tex says that \dimen1 should be used only as global.)
- \parshape 2 0in \dimen0 \defargsindent \dimen2
%
- % Put the type name to the right margin.
+ % The final paragraph shape:
+ \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
+ %
+ % Put the category name at the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
@@ -6761,8 +6980,16 @@ end
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
- \def\temp{#2}% return value type
- \ifx\temp\empty\else \tclose{\temp} \fi
+ \def\temp{#2}% text of the return type
+ \ifx\temp\empty\else
+ \tclose{\temp}% typeset the return type
+ \ifrettypeownline
+ % put return type on its own line; prohibit line break following:
+ \hfil\vadjust{\nobreak}\break
+ \else
+ \space % type on same line, so just followed by a space
+ \fi
+ \fi % no return type
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
@@ -6880,7 +7107,7 @@ end
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\undefined
+\ifx\eTeXversion\thisisundefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
@@ -6905,12 +7132,14 @@ end
% ... and for \example:
\spaceisspace
%
- % The \empty here causes a following catcode 5 newline to be eaten
- % as part of reading whitespace after a control sequence. It does
- % not eat a catcode 13 newline. There's no good way to handle the
- % two cases. See the Macro Details node in the manual for the
- % workaround we currently have to recommend for macros and
+ % The \empty here causes a following catcode 5 newline to be eaten as
+ % part of reading whitespace after a control sequence. It does not
+ % eat a catcode 13 newline. There's no good way to handle the two
+ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+ % would then have different behavior). See the Macro Details node in
+ % the manual for the workaround we recommend for macros and
% line-oriented commands.
+ %
\scantokens{#1\empty}%
\endgroup}
@@ -7045,9 +7274,15 @@ end
\def\macroxxx#1{%
\getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
- \paramno=0
+ \paramno=0\relax
\else
\expandafter\parsemargdef \argl;%
+ \if\paramno>256\relax
+ \ifx\eTeXversion\thisisundefined
+ \errhelp = \EMsimple
+ \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
+ \fi
+ \fi
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
@@ -7097,9 +7332,17 @@ end
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.blah for each blah
-% in the params list to be ##N where N is the position in that list.
+% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument si to be expanded. If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
+% is the position in that list, that is to say the macro arguments are to be
+% defined `a la TeX in the macro body.
+%
% That gets used by \mbodybackslash (above).
%
% We need to get `macro parameter char #' into several definitions.
@@ -7109,12 +7352,33 @@ end
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
-
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
\let\xeatspaces\relax
\parsemargdefxxx#1,;,%
+ % In case that there are 10 or more arguments we parse again the arguments
+ % list to set new definitions for the \macarg.BLAH macros corresponding to
+ % each BLAH argument. It was anyhow needed to parse already once this list
+ % in order to count the arguments, and as macros with at most 9 arguments
+ % are by far more frequent than macro with 10 or more arguments, defining
+ % twice the \macarg.BLAH macros does not cost too much processing power.
+ \ifnum\paramno<10\relax\else
+ \paramno0\relax
+ \parsemmanyargdef@@#1,;,% 10 or more arguments
+ \fi
}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
@@ -7125,16 +7389,205 @@ end
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
+\def\parsemmanyargdef@@#1,{%
+ \if#1;\let\next=\relax
+ \else
+ \let\next=\parsemmanyargdef@@
+ \edef\tempb{\eatspaces{#1}}%
+ \expandafter\def\expandafter\tempa
+ \expandafter{\csname macarg.\tempb\endcsname}%
+ % Note that we need some extra \noexpand\noexpand, this is because we
+ % don't want \the to be expanded in the \parsermacbody as it uses an
+ % \xdef .
+ \expandafter\edef\tempa
+ {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
+ \advance\paramno by 1\relax
+ \fi\next}
+
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
%
+
+\catcode `\@\texiatcatcode
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
+
+\let\endargs@\relax
+\let\nil@\relax
+\def\nilm@{\nil@}%
+\long\def\nillm@{\nil@}%
+
+% This macro is expanded during the Texinfo macro expansion, not during its
+% definition. It gets all the arguments values and assigns them to macros
+% macarg.ARGNAME
+%
+% #1 is the macro name
+% #2 is the list of argument names
+% #3 is the list of argument values
+\def\getargvals@#1#2#3{%
+ \def\macargdeflist@{}%
+ \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
+ \def\paramlist{#2,\nil@}%
+ \def\macroname{#1}%
+ \begingroup
+ \macroargctxt
+ \def\argvaluelist{#3,\nil@}%
+ \def\@tempa{#3}%
+ \ifx\@tempa\empty
+ \setemptyargvalues@
+ \else
+ \getargvals@@
+ \fi
+}
+
+%
+\def\getargvals@@{%
+ \ifx\paramlist\nilm@
+ % Some sanity check needed here that \argvaluelist is also empty.
+ \ifx\argvaluelist\nillm@
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Too many arguments in macro `\macroname'!}%
+ \fi
+ \let\next\macargexpandinbody@
+ \else
+ \ifx\argvaluelist\nillm@
+ % No more arguments values passed to macro. Set remaining named-arg
+ % macros to empty.
+ \let\next\setemptyargvalues@
+ \else
+ % pop current arg name into \@tempb
+ \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\paramlist}%
+ % pop current argument value into \@tempc
+ \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\argvaluelist}%
+ % Here \@tempb is the current arg name and \@tempc is the current arg value.
+ % First place the new argument macro definition into \@tempd
+ \expandafter\macname\expandafter{\@tempc}%
+ \expandafter\let\csname macarg.\@tempb\endcsname\relax
+ \expandafter\def\expandafter\@tempe\expandafter{%
+ \csname macarg.\@tempb\endcsname}%
+ \edef\@tempd{\long\def\@tempe{\the\macname}}%
+ \push@\@tempd\macargdeflist@
+ \let\next\getargvals@@
+ \fi
+ \fi
+ \next
+}
+
+\def\push@#1#2{%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter#1#2}%
+}
+
+% Replace arguments by their values in the macro body, and place the result
+% in macro \@tempa
+\def\macvalstoargs@{%
+ % To do this we use the property that token registers that are \the'ed
+ % within an \edef expand only once. So we are going to place all argument
+ % values into respective token registers.
+ %
+ % First we save the token context, and initialize argument numbering.
+ \begingroup
+ \paramno0\relax
+ % Then, for each argument number #N, we place the corresponding argument
+ % value into a new token list register \toks#N
+ \expandafter\putargsintokens@\saveparamlist@,;,%
+ % Then, we expand the body so that argument are replaced by their
+ % values. The trick for values not to be expanded themselves is that they
+ % are within tokens and that tokens expand only once in an \edef .
+ \edef\@tempc{\csname mac.\macroname .body\endcsname}%
+ % Now we restore the token stack pointer to free the token list registers
+ % which we have used, but we make sure that expanded body is saved after
+ % group.
+ \expandafter
+ \endgroup
+ \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
+ }
+
+\def\macargexpandinbody@{%
+ %% Define the named-macro outside of this group and then close this group.
+ \expandafter
+ \endgroup
+ \macargdeflist@
+ % First the replace in body the macro arguments by their values, the result
+ % is in \@tempa .
+ \macvalstoargs@
+ % Then we point at the \norecurse or \gobble (for recursive) macro value
+ % with \@tempb .
+ \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
+ % Depending on whether it is recursive or not, we need some tailing
+ % \egroup .
+ \ifx\@tempb\gobble
+ \let\@tempc\relax
+ \else
+ \let\@tempc\egroup
+ \fi
+ % And now we do the real job:
+ \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
+ \@tempd
+}
+
+\def\putargsintokens@#1,{%
+ \if#1;\let\next\relax
+ \else
+ \let\next\putargsintokens@
+ % First we allocate the new token list register, and give it a temporary
+ % alias \@tempb .
+ \toksdef\@tempb\the\paramno
+ % Then we place the argument value into that token list register.
+ \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
+ \expandafter\@tempb\expandafter{\@tempa}%
+ \advance\paramno by 1\relax
+ \fi
+ \next
+}
+
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
+\def\setemptyargvalues@{%
+ \ifx\paramlist\nilm@
+ \let\next\macargexpandinbody@
+ \else
+ \expandafter\setemptyargvaluesparser@\paramlist\endargs@
+ \let\next\setemptyargvalues@
+ \fi
+ \next
+}
+
+\def\setemptyargvaluesparser@#1,#2\endargs@{%
+ \expandafter\def\expandafter\@tempa\expandafter{%
+ \expandafter\def\csname macarg.#1\endcsname{}}%
+ \push@\@tempa\macargdeflist@
+ \def\paramlist{#2}%
+}
-% This defines the macro itself. There are six cases: recursive and
-% nonrecursive macros of zero, one, and many arguments.
+% #1 is the element target macro
+% #2 is the list macro
+% #3,#4\endargs@ is the list value
+\def\pop@#1#2#3,#4\endargs@{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+\long\def\longpop@#1#2#3,#4\endargs@{%
+ \long\def#1{#3}%
+ \long\def#2{#4}%
+}
+
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
@@ -7153,17 +7606,25 @@ end
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else
+ \ifnum\paramno<10\relax % at most 9
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else % 10 or more
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
+ \fi
\fi
\else
\ifcase\paramno
@@ -7180,23 +7641,33 @@ end
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
- \else % many
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % 10 or more:
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
+ \fi
\fi
\fi}
+\catcode `\@\texiatcatcode\relax
+
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
@@ -7235,7 +7706,8 @@ end
% @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{%
+ \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
@@ -7296,11 +7768,32 @@ end
\toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
- \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
}%
\fi
}
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+%
+\parseargdef\xrefautomaticsectiontitle{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -7309,26 +7802,36 @@ end
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\topbox
+\newbox\printedrefnamebox
+\newbox\printedmanualbox
+%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
- \def\printedmanual{\ignorespaces #5}%
+ %
\def\printedrefname{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual\unskip}%
- \setbox0=\hbox{\printedrefname\unskip}%
- \ifdim \wd0 = 0pt
+ \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\printedmanual{\ignorespaces #5}%
+ \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
+ %
+ % If the printed reference name (arg #3) was not explicitly given in
+ % the @xref, figure out what we want to use.
+ \ifdim \wd\printedrefnamebox = 0pt
% No printed node name was explicitly given.
- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
- % Use the node name inside the square brackets.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+ % Not auto section-title: use node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1 > 0pt
- % It is in another manual, so we don't have it.
+ % Auto section-title: use chapter/section title inside
+ % the square brackets if we have it.
+ \ifdim \wd\printedmanualbox > 0pt
+ % It is in another manual, so we don't have it; use node name.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
- % We know the real title if we have the xref values.
+ % We (should) know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
@@ -7346,9 +7849,8 @@ end
% etc. don't get their TeX definitions.
\getfilename{#4}%
%
- % See comments at \activebackslashdouble.
- {\activebackslashdouble \xdef\pdfxrefdest{#1}%
- \backslashparens\pdfxrefdest}%
+ \edef\pdfxrefdest{#1}%
+ \txiescapepdf\pdfxrefdest
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
@@ -7375,7 +7877,7 @@ end
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
- \ifdim\wd0 = 0pt
+ \ifdim\wd\printedrefnamebox = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
@@ -7383,21 +7885,46 @@ end
%
% if the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
- \ifdim \wd1 > 0pt
+ \ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
- %
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ %
+ % If we use \unhbox to print the node names, TeX does not insert
+ % empty discretionaries after hyphens, which means that it will not
+ % find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens,
+ % this is a loss. Therefore, we give the text of the node name
+ % again, so it is as if TeX is seeing it for the first time.
+ %
+ % Cross-manual reference. Only include the "Section ``foo'' in" if
+ % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual}
+ % outputs simply "see The Foo Manual".
+ \ifdim \wd\printedmanualbox > 0pt
+ % What is the 7sp about? The idea is that we also want to omit
+ % the Section part if we would be printing "Top", since they are
+ % clearly trying to refer to the whole manual. But, this being
+ % TeX, we can't easily compare strings while ignoring the possible
+ % spaces before and after in the input. By adding the arbitrary
+ % 7sp, we make it much less likely that a real node name would
+ % happen to have the same width as "Top" (e.g., in a monospaced font).
+ % I hope it will never happen in practice.
+ %
+ % For the same basic reason, we retypeset the "Top" at every
+ % reference, since the current font is indeterminate.
+ %
+ \setbox\topbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp
+ \ifdim \wd2 = \wd\topbox \else
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ \cite{\printedmanual}%
\else
+ % Reference in this manual.
+ %
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
@@ -7409,7 +7936,7 @@ end
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
- % output the `[mynode]' via a macro so it can be overridden.
+ % output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
@@ -7637,7 +8164,7 @@ end
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
-% @footnotestyle is meaningful for info output only.
+% @footnotestyle is meaningful for Info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
@@ -7700,6 +8227,8 @@ end
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
+ %
+ % Invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
@@ -7787,7 +8316,7 @@ end
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\undefined
+ \ifx\epsfbox\thisiundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
@@ -8252,7 +8781,7 @@ directory should work if nowhere else does.}
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{\tie}
\gdef^^a1{\exclamdown}
\gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
@@ -8282,7 +8811,7 @@ directory should work if nowhere else does.}
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
- \gdef^^bb{\guilletright}
+ \gdef^^bb{\guillemetright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
@@ -8374,7 +8903,7 @@ directory should work if nowhere else does.}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{~}
+ \gdef^^a0{\tie}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
@@ -8547,7 +9076,7 @@ directory should work if nowhere else does.}
\gdef\DeclareUnicodeCharacter#1#2{%
\countUTFz = "#1\relax
- \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
\def\UTFviiiTwoOctets##1##2{%
@@ -9223,28 +9752,21 @@ directory should work if nowhere else does.}
\message{and turning on texinfo input format.}
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
% 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
-\catcode`\^=\other
-\catcode`\_=\other
-\catcode`\|=\other
-\catcode`\<=\other
-\catcode`\>=\other
-\catcode`\+=\other
-\catcode`\$=\other
-\def\normaldoublequote{"}
-\def\normaltilde{~}
-\def\normalcaret{^}
-\def\normalunderscore{_}
-\def\normalverticalbar{|}
-\def\normalless{<}
-\def\normalgreater{>}
-\def\normalplus{+}
-\def\normaldollar{$}%$ font-lock fix
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
@@ -9322,14 +9844,24 @@ directory should work if nowhere else does.}
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
-\catcode`\\=\active
-@def@normalbackslash{{@tt@backslashcurfont}}
+\catcode`\\=\active % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E). It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C). We can't use " for the
+% usual hex value because it has already been made active.
+@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
+
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
-
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other.
+% catcode other. We switch back and forth between these.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
@@ -9337,16 +9869,16 @@ directory should work if nowhere else does.}
% the literal character `\'.
%
@def@normalturnoffactive{%
- @let\=@normalbackslash
@let"=@normaldoublequote
- @let~=@normaltilde
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
- @let<=@normalless
- @let>=@normalgreater
- @let+=@normalplus
- @let$=@normaldollar %$ font-lock fix
+ @let~=@normaltilde
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
@@ -9378,10 +9910,19 @@ directory should work if nowhere else does.}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+@def@normaldot{.}
+@def@normalquest{?}
+@def@normalslash{/}
+
% These look ok in all fonts, so just make them not special.
-@catcode`@& = @other
-@catcode`@# = @other
-@catcode`@% = @other
+% @hashchar{} gets its own user-level command, because of #line.
+@catcode`@& = @other @def@normalamp{&}
+@catcode`@# = @other @def@normalhash{#}
+@catcode`@% = @other @def@normalpercent{%}
+
+@let @hashchar = @normalhash
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we