aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in2
-rw-r--r--doc/gawk.info866
-rw-r--r--doc/gawk.texi89
-rw-r--r--doc/texinfo.tex860
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/filefuncs.c11
8 files changed, 987 insertions, 852 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index cbc0d560..f90a7920 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jan 2 20:30:37 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * texinfo.tex: Update to latest from texinfo CVS repository.
+
Tue Dec 28 21:46:21 2010 Arnold D. Robbins <arnold@skeeve.com>
* README.DGAWK: Removed, since there is now a chapter on the
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cd618e39..359bf056 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -37,7 +37,7 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \
bc_notes
# Get rid of generated files when cleaning
-CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
MAKEINFO = @MAKEINFO@ --no-split --force
diff --git a/doc/Makefile.in b/doc/Makefile.in
index b094ee79..f99a4a13 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -252,7 +252,7 @@ EXTRA_DIST = ChangeLog README.card ad.block setter.outline \
# Get rid of generated files when cleaning
-CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf igawk.1.pdf
TROFF = groff -t -Tps -U
SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \
-e "s/^\/level0 save def/\/level0 save def 30 -48 translate/"
diff --git a/doc/gawk.info b/doc/gawk.info
index 27c578b5..a1a20461 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -918,8 +918,9 @@ index under the heading "dark corner."
As noted by the opening quote, though, any coverage of dark corners
is, by definition, incomplete.
- Extensions to the standard `awk' language are marked "(c.e.)," and
-listed in the index under "common extensions" and "extensions, common."
+ Extensions to the standard `awk' language that are supported by more
+than one `awk' implementation are marked "(c.e.)," and listed in the
+index under "common extensions" and "extensions, common."

File: gawk.info, Node: Manual History, Next: How To Contribute, Prev: Conventions, Up: Preface
@@ -6901,7 +6902,7 @@ order from the highest precedence to the lowest:
`X ^ Y'
`X ** Y'
Exponentiation; X raised to the Y power. `2 ^ 3' has the value
- eight; the character sequence `**' is equivalent to `^'.
+ eight; the character sequence `**' is equivalent to `^'. (c.e.)
`X * Y'
Multiplication.
@@ -7173,7 +7174,7 @@ COEFFICIENT
LVALUE `/=' DIVISOR Divides the value of LVALUE by DIVISOR.
LVALUE `%=' MODULUS Sets LVALUE to its remainder by MODULUS.
LVALUE `^=' POWER
-LVALUE `**=' POWER Raises LVALUE to the power POWER.
+LVALUE `**=' POWER Raises LVALUE to the power POWER. (c.e.)
Table 6.2: Arithmetic Assignment Operators
@@ -11232,7 +11233,7 @@ parameters are enclosed in square brackets ([ ]):
`fflush([FILENAME])'
Flush any buffered output associated with FILENAME, which is
either a file opened for writing or a shell command for
- redirecting output to a pipe or coprocess.
+ redirecting output to a pipe or coprocess. (c.e.).
Many utility programs "buffer" their output; i.e., they save
information to write to a disk file or the screen in memory until
@@ -19399,6 +19400,8 @@ the current version of `gawk'.
* Changes and/or additions to the language:
+ - The `\x' escape sequence (*note Escape Sequences::).
+
- Full support for both POSIX and GNU regexps, with interval
expressions being matched by default. (*note Regexp::).
@@ -21447,8 +21450,7 @@ other POSIX-compliant systems:(1)
int plugin_is_GPL_compatible;
- /* do_chdir --- provide dynamically loaded
- chdir() builtin for gawk */
+ /* do_chdir --- provide dynamically loaded chdir() builtin for gawk */
static NODE *
do_chdir(int nargs)
@@ -21483,7 +21485,6 @@ system call. If the `chdir' fails, `ERRNO' is updated.
Finally, the function returns the return value to the `awk' level:
- /* Set the return value */
return make_number((AWKNUM) ret);
}
@@ -21491,12 +21492,10 @@ system call. If the `chdir' fails, `ERRNO' is updated.
turns a numeric mode into a printable representation (e.g., 644 becomes
`-rw-r--r--'). This is omitted here for brevity:
- /* format_mode --- turn a stat mode field
- into something readable */
+ /* format_mode --- turn a stat mode field into something readable */
static char *
- format_mode(fmode)
- unsigned long fmode;
+ format_mode(unsigned long fmode)
{
...
}
@@ -21516,7 +21515,6 @@ variable declarations and argument checking:
char *pmode; /* printable mode */
char *type = "unknown";
-
if (do_lint && get_curfunc_arg_count() > 2)
lintwarn("stat: called with too many arguments");
@@ -21560,7 +21558,6 @@ calls are shown here, since they all follow the same pattern:
When done, return the `lstat' return value:
- /* Set the return value */
return make_number((AWKNUM) ret);
}
@@ -21571,9 +21568,7 @@ named `dlload' that does the job:
/* dlload --- load new builtins in this library */
NODE *
- dlload(tree, dl)
- NODE *tree;
- void *dl;
+ dlload(NODE *tree, void *dl)
{
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);
@@ -21601,7 +21596,7 @@ Assuming that the functions are in a file named `filefuncs.c', and IDIR
is the location of the `gawk' include files, the following steps create
a GNU/Linux shared library:
- $ gcc -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c
+ $ gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -IIDIR filefuncs.c
$ ld -o filefuncs.so -shared filefuncs.o
Once the library exists, it is loaded by calling the `extension()'
@@ -21625,6 +21620,13 @@ shared library:
printf "data[\"%s\"] = %s\n", i, data[i]
print "testff.awk modified:",
strftime("%m %d %y %H:%M:%S", data["mtime"])
+
+ print "\nInfo for JUNK"
+ ret = stat("JUNK", data)
+ print "ret =", ret
+ for (i in data)
+ printf "data[\"%s\"] = %s\n", i, data[i]
+ print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"])
}
Here are the results of running the program:
@@ -21632,22 +21634,26 @@ shared library:
$ gawk -f testff.awk
-| Info for testff.awk
-| ret = 0
+ -| data["size"] = 607
+ -| data["ino"] = 14945891
+ -| data["name"] = testff.awk
+ -| data["pmode"] = -rw-rw-r--
+ -| data["nlink"] = 1
+ -| data["atime"] = 1293993369
+ -| data["mtime"] = 1288520752
+ -| data["mode"] = 33204
-| data["blksize"] = 4096
- -| data["mtime"] = 932361936
- -| data["mode"] = 33188
+ -| data["dev"] = 2054
-| data["type"] = file
- -| data["dev"] = 2065
- -| data["gid"] = 10
- -| data["ino"] = 878597
- -| data["ctime"] = 971431797
- -| data["blocks"] = 2
- -| data["nlink"] = 1
- -| data["name"] = testff.awk
- -| data["atime"] = 971608519
- -| data["pmode"] = -rw-r--r--
- -| data["size"] = 607
- -| data["uid"] = 2076
- -| testff.awk modified: 07 19 99 08:25:36
+ -| data["gid"] = 500
+ -| data["uid"] = 500
+ -| data["blocks"] = 8
+ -| data["ctime"] = 1290113572
+ -| testff.awk modified: 10 31 10 12:25:52
+ -|
+ -| Info for JUNK
+ -| ret = -1
+ -| JUNK modified: 01 01 70 02:00:00

File: gawk.info, Node: Future Extensions, Prev: Dynamic Extensions, Up: Notes
@@ -21682,11 +21688,6 @@ Loadable module interface
`"RECLEN"', depending upon which kind of record processing is in
effect.
-Additional `printf' specifiers
- The 1999 ISO C standard added a number of additional `printf'
- format specifiers. These should be evaluated for possible
- inclusion in `gawk'.
-
Databases
It may be possible to map a GDBM/NDBM/SDBM file into an `awk'
array.
@@ -21716,9 +21717,6 @@ Better array subscript management
so that using the same value to index multiple arrays only stores
one copy of the index value.
-Integrating the DBUG library
- Integrating Fred Fish's DBUG library would be helpful during
- development, but it's a lot of work to do.
Finally, the programs in the test suite could use documenting in
this Info file.
@@ -24786,7 +24784,10 @@ Index
(line 10)
* commenting: Comments. (line 6)
* commenting, backslash continuation and: Statements/Lines. (line 76)
+* common extensions, ** operator: Arithmetic Ops. (line 36)
+* common extensions, **= operator: Assignment Ops. (line 136)
* common extensions, \x escape sequence: Escape Sequences. (line 61)
+* common extensions, fflush() function: I/O Functions. (line 25)
* comp.lang.awk newsgroup: Bugs. (line 38)
* comparison expressions: Typing and Comparison.
(line 9)
@@ -25214,7 +25215,10 @@ Index
* extension() function (gawk): Using Internal File Ops.
(line 15)
* extensions, Brian Kernighan's awk: BTL. (line 6)
+* extensions, common, ** operator: Arithmetic Ops. (line 36)
+* extensions, common, **= operator: Assignment Ops. (line 136)
* extensions, common, \x escape sequence: Escape Sequences. (line 61)
+* extensions, common, fflush() function: I/O Functions. (line 25)
* extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6)
* extensions, mawk: Other Versions. (line 51)
* extract.awk program: Extract Program. (line 78)
@@ -26189,7 +26193,7 @@ Index
(line 10)
* programming conventions, functions, writing: Definition Syntax.
(line 55)
-* programming conventions, gawk internals: Internal File Ops. (line 34)
+* programming conventions, gawk internals: Internal File Ops. (line 33)
* programming conventions, nextfile statement: Nextfile Function.
(line 20)
* programming conventions, private variable names: Library Names.
@@ -26778,395 +26782,395 @@ Ref: Names-Footnote-141292
Node: This Manual41364
Ref: This Manual-Footnote-146262
Node: Conventions46362
-Node: Manual History48421
-Ref: Manual History-Footnote-151599
-Ref: Manual History-Footnote-251640
-Node: How To Contribute51714
-Node: Acknowledgments52858
-Node: Getting Started57106
-Node: Running gawk59485
-Node: One-shot60671
-Node: Read Terminal61896
-Ref: Read Terminal-Footnote-163546
-Ref: Read Terminal-Footnote-263820
-Node: Long63991
-Node: Executable Scripts65367
-Ref: Executable Scripts-Footnote-167228
-Ref: Executable Scripts-Footnote-267330
-Node: Comments67781
-Node: Quoting70248
-Node: DOS Quoting74865
-Node: Sample Data Files75540
-Node: Very Simple78572
-Node: Two Rules83169
-Node: More Complex85316
-Ref: More Complex-Footnote-188246
-Node: Statements/Lines88326
-Ref: Statements/Lines-Footnote-192788
-Node: Other Features93053
-Node: When93922
-Node: Invoking Gawk96065
-Node: Command Line97450
-Node: Options98233
-Ref: Options-Footnote-1111578
-Node: Other Arguments111603
-Node: Naming Standard Input114266
-Node: Environment Variables115230
-Node: AWKPATH Variable115674
-Ref: AWKPATH Variable-Footnote-1118411
-Node: Other Environment Variables118671
-Node: Exit Status121019
-Node: Include Files121694
-Node: Obsolete125085
-Node: Undocumented125771
-Node: Regexp126012
-Node: Regexp Usage127464
-Node: Escape Sequences129490
-Node: Regexp Operators135233
-Ref: Regexp Operators-Footnote-1142405
-Ref: Regexp Operators-Footnote-2142552
-Node: Character Lists142650
-Ref: table-char-classes144425
-Node: GNU Regexp Operators147065
-Node: Case-sensitivity150784
-Ref: Case-sensitivity-Footnote-1153739
-Ref: Case-sensitivity-Footnote-2153974
-Node: Leftmost Longest154082
-Node: Computed Regexps155283
-Node: Locales158700
-Node: Reading Files162242
-Node: Records164183
-Ref: Records-Footnote-1172855
-Node: Fields172892
-Ref: Fields-Footnote-1175924
-Node: Nonconstant Fields176010
-Node: Changing Fields178212
-Node: Field Separators183502
-Node: Default Field Splitting186131
-Node: Regexp Field Splitting187248
-Node: Single Character Fields190606
-Node: Command Line Field Separator191657
-Node: Field Splitting Summary195096
-Ref: Field Splitting Summary-Footnote-1198282
-Node: Constant Size198383
-Node: Splitting By Content202945
-Ref: Splitting By Content-Footnote-1206671
-Node: Multiple Line206711
-Ref: Multiple Line-Footnote-1212558
-Node: Getline212737
-Node: Plain Getline214965
-Node: Getline/Variable217054
-Node: Getline/File218195
-Node: Getline/Variable/File219517
-Ref: Getline/Variable/File-Footnote-1221116
-Node: Getline/Pipe221203
-Node: Getline/Variable/Pipe223751
-Node: Getline/Coprocess224858
-Node: Getline/Variable/Coprocess226101
-Node: Getline Notes226815
-Node: Getline Summary228757
-Ref: table-getline-variants229041
-Node: Command line directories229946
-Node: Printing230571
-Node: Print232202
-Node: Print Examples233539
-Node: Output Separators236323
-Node: OFMT238082
-Node: Printf239440
-Node: Basic Printf240346
-Node: Control Letters241883
-Node: Format Modifiers245695
-Node: Printf Examples251706
-Node: Redirection254421
-Node: Special Files261399
-Node: Special FD261932
-Ref: Special FD-Footnote-1265507
-Node: Special Network265581
-Node: Special Caveats266436
-Node: Close Files And Pipes267230
-Ref: Close Files And Pipes-Footnote-1274174
-Ref: Close Files And Pipes-Footnote-2274322
-Node: Expressions274472
-Node: Values275541
-Node: Constants276217
-Node: Scalar Constants276897
-Ref: Scalar Constants-Footnote-1277756
-Node: Nondecimal-numbers277938
-Node: Regexp Constants280997
-Node: Using Constant Regexps281472
-Node: Variables284477
-Node: Using Variables285132
-Node: Assignment Options286859
-Node: Conversion288740
-Ref: table-locale-affects294114
-Ref: Conversion-Footnote-1294738
-Node: All Operators294847
-Node: Arithmetic Ops295477
-Node: Concatenation297976
-Ref: Concatenation-Footnote-1300769
-Node: Assignment Ops300888
-Ref: table-assign-ops305876
-Node: Increment Ops307277
-Node: Truth Values and Conditions310755
-Node: Truth Values311838
-Node: Typing and Comparison312886
-Node: Variable Typing313675
-Ref: Variable Typing-Footnote-1317572
-Node: Comparison Operators317694
-Ref: table-relational-ops318104
-Node: POSIX String Comparison321653
-Ref: POSIX String Comparison-Footnote-1322610
-Node: Boolean Ops322748
-Ref: Boolean Ops-Footnote-1326826
-Node: Conditional Exp326917
-Node: Function Calls328649
-Node: Precedence332239
-Node: Patterns and Actions335892
-Node: Pattern Overview336946
-Node: Regexp Patterns338612
-Node: Expression Patterns339155
-Node: Ranges342729
-Node: BEGIN/END345695
-Node: Using BEGIN/END346445
-Ref: Using BEGIN/END-Footnote-1349176
-Node: I/O And BEGIN/END349290
-Node: Empty351559
-Node: BEGINFILE/ENDFILE351893
-Node: Using Shell Variables354718
-Node: Action Overview356997
-Node: Statements359354
-Node: If Statement361213
-Node: While Statement362712
-Node: Do Statement364756
-Node: For Statement365912
-Node: Switch Statement369064
-Node: Break Statement371161
-Node: Continue Statement373137
-Node: Next Statement374838
-Node: Nextfile Statement377220
-Node: Exit Statement379738
-Node: Built-in Variables382069
-Node: User-modified383164
-Ref: User-modified-Footnote-1391165
-Node: Auto-set391227
-Ref: Auto-set-Footnote-1400210
-Node: ARGC and ARGV400415
-Node: Arrays404174
-Node: Array Basics405745
-Node: Array Intro406456
-Node: Reference to Elements410774
-Node: Assigning Elements413044
-Node: Array Example413535
-Node: Scanning an Array415267
-Node: Delete417544
-Ref: Delete-Footnote-1419967
-Node: Numeric Array Subscripts420024
-Node: Uninitialized Subscripts422207
-Node: Multi-dimensional423835
-Node: Multi-scanning426926
-Node: Array Sorting428510
-Ref: Array Sorting-Footnote-1431708
-Node: Arrays of Arrays431902
-Node: Functions436064
-Node: Built-in436886
-Node: Calling Built-in437900
-Node: Numeric Functions439876
-Ref: Numeric Functions-Footnote-1443633
-Ref: Numeric Functions-Footnote-2443969
-Ref: Numeric Functions-Footnote-3444017
-Node: String Functions444286
-Ref: String Functions-Footnote-1466085
-Ref: String Functions-Footnote-2466214
-Ref: String Functions-Footnote-3466462
-Node: Gory Details466549
-Ref: table-sub-escapes468206
-Ref: table-posix-sub469520
-Ref: table-gensub-escapes470420
-Node: I/O Functions471591
-Ref: I/O Functions-Footnote-1478278
-Node: Time Functions478425
-Ref: Time Functions-Footnote-1489292
-Ref: Time Functions-Footnote-2489360
-Ref: Time Functions-Footnote-3489518
-Ref: Time Functions-Footnote-4489629
-Ref: Time Functions-Footnote-5489741
-Ref: Time Functions-Footnote-6489968
-Node: Bitwise Functions490234
-Ref: table-bitwise-ops490792
-Ref: Bitwise Functions-Footnote-1494952
-Node: I18N Functions495136
-Node: User-defined496766
-Node: Definition Syntax497570
-Ref: Definition Syntax-Footnote-1502200
-Node: Function Example502269
-Node: Function Caveats504863
-Node: Calling A Function505284
-Node: Variable Scope506399
-Node: Pass By Value/Reference508327
-Node: Return Statement511767
-Node: Dynamic Typing514709
-Node: Indirect Calls515446
-Node: Internationalization525131
-Node: I18N and L10N526559
-Node: Explaining gettext527245
-Ref: Explaining gettext-Footnote-1532307
-Ref: Explaining gettext-Footnote-2532490
-Node: Programmer i18n532655
-Node: Translator i18n536946
-Node: String Extraction537739
-Ref: String Extraction-Footnote-1538700
-Node: Printf Ordering538786
-Ref: Printf Ordering-Footnote-1541570
-Node: I18N Portability541634
-Ref: I18N Portability-Footnote-1544083
-Node: I18N Example544146
-Ref: I18N Example-Footnote-1546781
-Node: Gawk I18N546853
-Node: Advanced Features547470
-Node: Nondecimal Data548789
-Node: Two-way I/O550370
-Ref: Two-way I/O-Footnote-1555784
-Node: TCP/IP Networking555861
-Node: Profiling558704
-Node: Library Functions566104
-Ref: Library Functions-Footnote-1569074
-Node: Library Names569245
-Ref: Library Names-Footnote-1572716
-Ref: Library Names-Footnote-2572936
-Node: General Functions573022
-Node: Nextfile Function574085
-Node: Strtonum Function578466
-Node: Assert Function581417
-Node: Round Function584743
-Node: Cliff Random Function586284
-Node: Ordinal Functions587300
-Ref: Ordinal Functions-Footnote-1590370
-Ref: Ordinal Functions-Footnote-2590622
-Node: Join Function590838
-Ref: Join Function-Footnote-1592609
-Node: Gettimeofday Function592809
-Node: Data File Management596524
-Node: Filetrans Function597156
-Node: Rewind Function601393
-Node: File Checking602846
-Node: Empty Files603940
-Node: Ignoring Assigns606170
-Node: Getopt Function607723
-Ref: Getopt Function-Footnote-1619048
-Node: Passwd Functions619251
-Ref: Passwd Functions-Footnote-1628239
-Node: Group Functions628327
-Node: Sample Programs636407
-Node: Running Examples637072
-Node: Clones637800
-Node: Cut Program638923
-Node: Egrep Program648764
-Ref: Egrep Program-Footnote-1656535
-Node: Id Program656645
-Node: Split Program660261
-Ref: Split Program-Footnote-1663780
-Node: Tee Program663908
-Node: Uniq Program666711
-Node: Wc Program674134
-Ref: Wc Program-Footnote-1678398
-Node: Miscellaneous Programs678598
-Node: Dupword Program679718
-Node: Alarm Program681749
-Node: Translate Program686471
-Ref: Translate Program-Footnote-1690850
-Ref: Translate Program-Footnote-2691078
-Node: Labels Program691212
-Ref: Labels Program-Footnote-1694583
-Node: Word Sorting694667
-Node: History Sorting699012
-Node: Extract Program700850
-Ref: Extract Program-Footnote-1708331
-Node: Simple Sed708459
-Node: Igawk Program711521
-Ref: Igawk Program-Footnote-1726555
-Ref: Igawk Program-Footnote-2726756
-Node: Signature Program726894
-Node: Debugger727974
-Node: Debugging728885
-Node: Debugging Concepts729199
-Node: Debugging Terms731055
-Node: Awk Debugging733600
-Node: Sample dgawk session734492
-Node: dgawk invocation734984
-Node: Finding The Bug736166
-Node: List of Debugger Commands742650
-Node: Breakpoint Control743961
-Node: Dgawk Execution Control747437
-Node: Viewing And Changing Data750788
-Node: Dgawk Stack754097
-Node: Dgawk Info755557
-Node: Miscellaneous Dgawk Commands759505
-Node: Readline Support764933
-Node: Dgawk Limitations765760
-Node: Language History767899
-Node: V7/SVR3.1769272
-Node: SVR4771567
-Node: POSIX773012
-Node: BTL775267
-Node: POSIX/GNU776659
-Node: Contributors781776
-Node: Installation785721
-Node: Gawk Distribution786615
-Node: Getting787099
-Node: Extracting787925
-Node: Distribution contents789603
-Node: Unix Installation794621
-Node: Quick Installation795238
-Node: Additional Configuration Options797200
-Node: Configuration Philosophy798677
-Node: Non-Unix Installation801019
-Node: PC Installation801477
-Node: PC Binary Installation802776
-Node: PC Compiling804624
-Node: PC Testing808030
-Node: PC Using808854
-Node: Cygwin813031
-Node: MSYS814028
-Node: VMS Installation814542
-Node: VMS Compilation815146
-Node: VMS Installation Details816723
-Node: VMS Running818353
-Node: VMS POSIX819950
-Node: VMS Old Gawk821248
-Node: Bugs821720
-Node: Other Versions825585
-Node: Notes831033
-Node: Compatibility Mode831725
-Node: Additions832508
-Node: Accessing The Source833320
-Node: Adding Code834743
-Node: New Ports840291
-Node: Dynamic Extensions844404
-Node: Internals845780
-Node: Plugin License854899
-Node: Sample Library855533
-Node: Internal File Description856219
-Node: Internal File Ops859926
-Ref: Internal File Ops-Footnote-1864810
-Node: Using Internal File Ops864958
-Node: Future Extensions866983
-Node: Basic Concepts869820
-Node: Basic High Level870577
-Ref: Basic High Level-Footnote-1874696
-Node: Basic Data Typing874890
-Node: Floating Point Issues879327
-Node: String Conversion Precision880410
-Ref: String Conversion Precision-Footnote-1882104
-Node: Unexpected Results882213
-Node: POSIX Floating Point Problems884039
-Ref: POSIX Floating Point Problems-Footnote-1887738
-Node: Glossary887776
-Node: Copying911411
-Node: GNU Free Documentation License948968
-Node: next-edition974112
-Node: unresolved974464
-Node: revision974964
-Node: consistency975387
-Node: Index978740
+Node: Manual History48478
+Ref: Manual History-Footnote-151656
+Ref: Manual History-Footnote-251697
+Node: How To Contribute51771
+Node: Acknowledgments52915
+Node: Getting Started57163
+Node: Running gawk59542
+Node: One-shot60728
+Node: Read Terminal61953
+Ref: Read Terminal-Footnote-163603
+Ref: Read Terminal-Footnote-263877
+Node: Long64048
+Node: Executable Scripts65424
+Ref: Executable Scripts-Footnote-167285
+Ref: Executable Scripts-Footnote-267387
+Node: Comments67838
+Node: Quoting70305
+Node: DOS Quoting74922
+Node: Sample Data Files75597
+Node: Very Simple78629
+Node: Two Rules83226
+Node: More Complex85373
+Ref: More Complex-Footnote-188303
+Node: Statements/Lines88383
+Ref: Statements/Lines-Footnote-192845
+Node: Other Features93110
+Node: When93979
+Node: Invoking Gawk96122
+Node: Command Line97507
+Node: Options98290
+Ref: Options-Footnote-1111635
+Node: Other Arguments111660
+Node: Naming Standard Input114323
+Node: Environment Variables115287
+Node: AWKPATH Variable115731
+Ref: AWKPATH Variable-Footnote-1118468
+Node: Other Environment Variables118728
+Node: Exit Status121076
+Node: Include Files121751
+Node: Obsolete125142
+Node: Undocumented125828
+Node: Regexp126069
+Node: Regexp Usage127521
+Node: Escape Sequences129547
+Node: Regexp Operators135290
+Ref: Regexp Operators-Footnote-1142462
+Ref: Regexp Operators-Footnote-2142609
+Node: Character Lists142707
+Ref: table-char-classes144482
+Node: GNU Regexp Operators147122
+Node: Case-sensitivity150841
+Ref: Case-sensitivity-Footnote-1153796
+Ref: Case-sensitivity-Footnote-2154031
+Node: Leftmost Longest154139
+Node: Computed Regexps155340
+Node: Locales158757
+Node: Reading Files162299
+Node: Records164240
+Ref: Records-Footnote-1172912
+Node: Fields172949
+Ref: Fields-Footnote-1175981
+Node: Nonconstant Fields176067
+Node: Changing Fields178269
+Node: Field Separators183559
+Node: Default Field Splitting186188
+Node: Regexp Field Splitting187305
+Node: Single Character Fields190663
+Node: Command Line Field Separator191714
+Node: Field Splitting Summary195153
+Ref: Field Splitting Summary-Footnote-1198339
+Node: Constant Size198440
+Node: Splitting By Content203002
+Ref: Splitting By Content-Footnote-1206728
+Node: Multiple Line206768
+Ref: Multiple Line-Footnote-1212615
+Node: Getline212794
+Node: Plain Getline215022
+Node: Getline/Variable217111
+Node: Getline/File218252
+Node: Getline/Variable/File219574
+Ref: Getline/Variable/File-Footnote-1221173
+Node: Getline/Pipe221260
+Node: Getline/Variable/Pipe223808
+Node: Getline/Coprocess224915
+Node: Getline/Variable/Coprocess226158
+Node: Getline Notes226872
+Node: Getline Summary228814
+Ref: table-getline-variants229098
+Node: Command line directories230003
+Node: Printing230628
+Node: Print232259
+Node: Print Examples233596
+Node: Output Separators236380
+Node: OFMT238139
+Node: Printf239497
+Node: Basic Printf240403
+Node: Control Letters241940
+Node: Format Modifiers245752
+Node: Printf Examples251763
+Node: Redirection254478
+Node: Special Files261456
+Node: Special FD261989
+Ref: Special FD-Footnote-1265564
+Node: Special Network265638
+Node: Special Caveats266493
+Node: Close Files And Pipes267287
+Ref: Close Files And Pipes-Footnote-1274231
+Ref: Close Files And Pipes-Footnote-2274379
+Node: Expressions274529
+Node: Values275598
+Node: Constants276274
+Node: Scalar Constants276954
+Ref: Scalar Constants-Footnote-1277813
+Node: Nondecimal-numbers277995
+Node: Regexp Constants281054
+Node: Using Constant Regexps281529
+Node: Variables284534
+Node: Using Variables285189
+Node: Assignment Options286916
+Node: Conversion288797
+Ref: table-locale-affects294171
+Ref: Conversion-Footnote-1294795
+Node: All Operators294904
+Node: Arithmetic Ops295534
+Node: Concatenation298040
+Ref: Concatenation-Footnote-1300833
+Node: Assignment Ops300952
+Ref: table-assign-ops305940
+Node: Increment Ops307348
+Node: Truth Values and Conditions310826
+Node: Truth Values311909
+Node: Typing and Comparison312957
+Node: Variable Typing313746
+Ref: Variable Typing-Footnote-1317643
+Node: Comparison Operators317765
+Ref: table-relational-ops318175
+Node: POSIX String Comparison321724
+Ref: POSIX String Comparison-Footnote-1322681
+Node: Boolean Ops322819
+Ref: Boolean Ops-Footnote-1326897
+Node: Conditional Exp326988
+Node: Function Calls328720
+Node: Precedence332310
+Node: Patterns and Actions335963
+Node: Pattern Overview337017
+Node: Regexp Patterns338683
+Node: Expression Patterns339226
+Node: Ranges342800
+Node: BEGIN/END345766
+Node: Using BEGIN/END346516
+Ref: Using BEGIN/END-Footnote-1349247
+Node: I/O And BEGIN/END349361
+Node: Empty351630
+Node: BEGINFILE/ENDFILE351964
+Node: Using Shell Variables354789
+Node: Action Overview357068
+Node: Statements359425
+Node: If Statement361284
+Node: While Statement362783
+Node: Do Statement364827
+Node: For Statement365983
+Node: Switch Statement369135
+Node: Break Statement371232
+Node: Continue Statement373208
+Node: Next Statement374909
+Node: Nextfile Statement377291
+Node: Exit Statement379809
+Node: Built-in Variables382140
+Node: User-modified383235
+Ref: User-modified-Footnote-1391236
+Node: Auto-set391298
+Ref: Auto-set-Footnote-1400281
+Node: ARGC and ARGV400486
+Node: Arrays404245
+Node: Array Basics405816
+Node: Array Intro406527
+Node: Reference to Elements410845
+Node: Assigning Elements413115
+Node: Array Example413606
+Node: Scanning an Array415338
+Node: Delete417615
+Ref: Delete-Footnote-1420038
+Node: Numeric Array Subscripts420095
+Node: Uninitialized Subscripts422278
+Node: Multi-dimensional423906
+Node: Multi-scanning426997
+Node: Array Sorting428581
+Ref: Array Sorting-Footnote-1431779
+Node: Arrays of Arrays431973
+Node: Functions436135
+Node: Built-in436957
+Node: Calling Built-in437971
+Node: Numeric Functions439947
+Ref: Numeric Functions-Footnote-1443704
+Ref: Numeric Functions-Footnote-2444040
+Ref: Numeric Functions-Footnote-3444088
+Node: String Functions444357
+Ref: String Functions-Footnote-1466156
+Ref: String Functions-Footnote-2466285
+Ref: String Functions-Footnote-3466533
+Node: Gory Details466620
+Ref: table-sub-escapes468277
+Ref: table-posix-sub469591
+Ref: table-gensub-escapes470491
+Node: I/O Functions471662
+Ref: I/O Functions-Footnote-1478357
+Node: Time Functions478504
+Ref: Time Functions-Footnote-1489371
+Ref: Time Functions-Footnote-2489439
+Ref: Time Functions-Footnote-3489597
+Ref: Time Functions-Footnote-4489708
+Ref: Time Functions-Footnote-5489820
+Ref: Time Functions-Footnote-6490047
+Node: Bitwise Functions490313
+Ref: table-bitwise-ops490871
+Ref: Bitwise Functions-Footnote-1495031
+Node: I18N Functions495215
+Node: User-defined496845
+Node: Definition Syntax497649
+Ref: Definition Syntax-Footnote-1502279
+Node: Function Example502348
+Node: Function Caveats504942
+Node: Calling A Function505363
+Node: Variable Scope506478
+Node: Pass By Value/Reference508406
+Node: Return Statement511846
+Node: Dynamic Typing514788
+Node: Indirect Calls515525
+Node: Internationalization525210
+Node: I18N and L10N526638
+Node: Explaining gettext527324
+Ref: Explaining gettext-Footnote-1532386
+Ref: Explaining gettext-Footnote-2532569
+Node: Programmer i18n532734
+Node: Translator i18n537025
+Node: String Extraction537818
+Ref: String Extraction-Footnote-1538779
+Node: Printf Ordering538865
+Ref: Printf Ordering-Footnote-1541649
+Node: I18N Portability541713
+Ref: I18N Portability-Footnote-1544162
+Node: I18N Example544225
+Ref: I18N Example-Footnote-1546860
+Node: Gawk I18N546932
+Node: Advanced Features547549
+Node: Nondecimal Data548868
+Node: Two-way I/O550449
+Ref: Two-way I/O-Footnote-1555863
+Node: TCP/IP Networking555940
+Node: Profiling558783
+Node: Library Functions566183
+Ref: Library Functions-Footnote-1569153
+Node: Library Names569324
+Ref: Library Names-Footnote-1572795
+Ref: Library Names-Footnote-2573015
+Node: General Functions573101
+Node: Nextfile Function574164
+Node: Strtonum Function578545
+Node: Assert Function581496
+Node: Round Function584822
+Node: Cliff Random Function586363
+Node: Ordinal Functions587379
+Ref: Ordinal Functions-Footnote-1590449
+Ref: Ordinal Functions-Footnote-2590701
+Node: Join Function590917
+Ref: Join Function-Footnote-1592688
+Node: Gettimeofday Function592888
+Node: Data File Management596603
+Node: Filetrans Function597235
+Node: Rewind Function601472
+Node: File Checking602925
+Node: Empty Files604019
+Node: Ignoring Assigns606249
+Node: Getopt Function607802
+Ref: Getopt Function-Footnote-1619127
+Node: Passwd Functions619330
+Ref: Passwd Functions-Footnote-1628318
+Node: Group Functions628406
+Node: Sample Programs636486
+Node: Running Examples637151
+Node: Clones637879
+Node: Cut Program639002
+Node: Egrep Program648843
+Ref: Egrep Program-Footnote-1656614
+Node: Id Program656724
+Node: Split Program660340
+Ref: Split Program-Footnote-1663859
+Node: Tee Program663987
+Node: Uniq Program666790
+Node: Wc Program674213
+Ref: Wc Program-Footnote-1678477
+Node: Miscellaneous Programs678677
+Node: Dupword Program679797
+Node: Alarm Program681828
+Node: Translate Program686550
+Ref: Translate Program-Footnote-1690929
+Ref: Translate Program-Footnote-2691157
+Node: Labels Program691291
+Ref: Labels Program-Footnote-1694662
+Node: Word Sorting694746
+Node: History Sorting699091
+Node: Extract Program700929
+Ref: Extract Program-Footnote-1708410
+Node: Simple Sed708538
+Node: Igawk Program711600
+Ref: Igawk Program-Footnote-1726634
+Ref: Igawk Program-Footnote-2726835
+Node: Signature Program726973
+Node: Debugger728053
+Node: Debugging728964
+Node: Debugging Concepts729278
+Node: Debugging Terms731134
+Node: Awk Debugging733679
+Node: Sample dgawk session734571
+Node: dgawk invocation735063
+Node: Finding The Bug736245
+Node: List of Debugger Commands742729
+Node: Breakpoint Control744040
+Node: Dgawk Execution Control747516
+Node: Viewing And Changing Data750867
+Node: Dgawk Stack754176
+Node: Dgawk Info755636
+Node: Miscellaneous Dgawk Commands759584
+Node: Readline Support765012
+Node: Dgawk Limitations765839
+Node: Language History767978
+Node: V7/SVR3.1769351
+Node: SVR4771646
+Node: POSIX773091
+Node: BTL775346
+Node: POSIX/GNU776738
+Node: Contributors781919
+Node: Installation785864
+Node: Gawk Distribution786758
+Node: Getting787242
+Node: Extracting788068
+Node: Distribution contents789746
+Node: Unix Installation794764
+Node: Quick Installation795381
+Node: Additional Configuration Options797343
+Node: Configuration Philosophy798820
+Node: Non-Unix Installation801162
+Node: PC Installation801620
+Node: PC Binary Installation802919
+Node: PC Compiling804767
+Node: PC Testing808173
+Node: PC Using808997
+Node: Cygwin813174
+Node: MSYS814171
+Node: VMS Installation814685
+Node: VMS Compilation815289
+Node: VMS Installation Details816866
+Node: VMS Running818496
+Node: VMS POSIX820093
+Node: VMS Old Gawk821391
+Node: Bugs821863
+Node: Other Versions825728
+Node: Notes831176
+Node: Compatibility Mode831868
+Node: Additions832651
+Node: Accessing The Source833463
+Node: Adding Code834886
+Node: New Ports840434
+Node: Dynamic Extensions844547
+Node: Internals845923
+Node: Plugin License855042
+Node: Sample Library855676
+Node: Internal File Description856362
+Node: Internal File Ops860069
+Ref: Internal File Ops-Footnote-1864802
+Node: Using Internal File Ops864950
+Node: Future Extensions867327
+Node: Basic Concepts869832
+Node: Basic High Level870589
+Ref: Basic High Level-Footnote-1874708
+Node: Basic Data Typing874902
+Node: Floating Point Issues879339
+Node: String Conversion Precision880422
+Ref: String Conversion Precision-Footnote-1882116
+Node: Unexpected Results882225
+Node: POSIX Floating Point Problems884051
+Ref: POSIX Floating Point Problems-Footnote-1887750
+Node: Glossary887788
+Node: Copying911423
+Node: GNU Free Documentation License948980
+Node: next-edition974124
+Node: unresolved974476
+Node: revision974976
+Node: consistency975399
+Node: Index978752

End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 86a422fb..afa6a7ed 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -1284,7 +1284,8 @@ As noted by the opening quote, though, any
coverage of dark corners
is, by definition, incomplete.
-Extensions to the standard @command{awk} language are marked
+Extensions to the standard @command{awk} language that are supported by
+more than one @command{awk} implementation are marked
``@value{COMMONEXT},'' and listed in the index under ``common extensions''
and ``extensions, common.''
@@ -9330,12 +9331,14 @@ Negation.
@item + @var{x}
Unary plus; the expression is converted to a number.
+@cindex common extensions, @code{**} operator
+@cindex extensions, common@comma{} @code{**} operator
@cindex POSIX @command{awk}, arithmetic operators and
@item @var{x} ^ @var{y}
@itemx @var{x} ** @var{y}
Exponentiation; @var{x} raised to the @var{y} power. @samp{2 ^ 3} has
the value eight; the character sequence @samp{**} is equivalent to
-@samp{^}.
+@samp{^}. @value{COMMONEXT}
@item @var{x} * @var{y}
Multiplication.
@@ -9731,10 +9734,12 @@ to a number.
@item @var{lvalue} @code{*=} @var{coefficient} @tab Multiplies the value of @var{lvalue} by @var{coefficient}.
@item @var{lvalue} @code{/=} @var{divisor} @tab Divides the value of @var{lvalue} by @var{divisor}.
@item @var{lvalue} @code{%=} @var{modulus} @tab Sets @var{lvalue} to its remainder by @var{modulus}.
+@cindex common extensions, @code{**=} operator
+@cindex extensions, common@comma{} @code{**=} operator
@cindex @command{awk} language, POSIX version
@cindex POSIX @command{awk}
@item @var{lvalue} @code{^=} @var{power} @tab
-@item @var{lvalue} @code{**=} @var{power} @tab Raises @var{lvalue} to the power @var{power}.
+@item @var{lvalue} @code{**=} @var{power} @tab Raises @var{lvalue} to the power @var{power}. @value{COMMONEXT}
@end multitable
@end float
@@ -15286,9 +15291,11 @@ which discusses this feature in more detail and gives an example.
@item fflush(@r{[}@var{filename}@r{]})
@cindex @code{fflush()} function
+@cindex common extensions, @code{fflush()} function
+@cindex extensions, common@comma{} @code{fflush()} function
Flush any buffered output associated with @var{filename}, which is either a
file opened for writing or a shell command for redirecting output to
-a pipe or coprocess.
+a pipe or coprocess. @value{COMMONEXT}.
@cindex portability, @code{fflush()} function and
@cindex buffers, flushing
@@ -26076,6 +26083,10 @@ Changes and/or additions to the language:
@itemize @minus{}
@item
+The @samp{\x} escape sequence
+(@pxref{Escape Sequences}).
+
+@item
Full support for both POSIX and GNU regexps, with interval
expressions being matched by default.
(@pxref{Regexp}).
@@ -28719,8 +28730,7 @@ slightly for presentation. The complete version can be found in
int plugin_is_GPL_compatible;
-/* do_chdir --- provide dynamically loaded
- chdir() builtin for gawk */
+/* do_chdir --- provide dynamically loaded chdir() builtin for gawk */
static NODE *
do_chdir(int nargs)
@@ -28762,7 +28772,6 @@ is updated.
Finally, the function returns the return value to the @command{awk} level:
@example
- /* Set the return value */
return make_number((AWKNUM) ret);
@}
@end example
@@ -28773,12 +28782,10 @@ that turns a numeric mode into a printable representation
@c break line for page breaking
@example
-/* format_mode --- turn a stat mode field
- into something readable */
+/* format_mode --- turn a stat mode field into something readable */
static char *
-format_mode(fmode)
-unsigned long fmode;
+format_mode(unsigned long fmode)
@{
@dots{}
@}
@@ -28804,7 +28811,6 @@ do_stat(int nargs)
char *pmode; /* printable mode */
char *type = "unknown";
-
if (do_lint && get_curfunc_arg_count() > 2)
lintwarn("stat: called with too many arguments");
@end example
@@ -28855,7 +28861,6 @@ When done, return the @code{lstat} return value:
@example
- /* Set the return value */
return make_number((AWKNUM) ret);
@}
@end example
@@ -28869,9 +28874,7 @@ a routine named @code{dlload} that does the job:
/* dlload --- load new builtins in this library */
NODE *
-dlload(tree, dl)
-NODE *tree;
-void *dl;
+dlload(NODE *tree, void *dl)
@{
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);
@@ -28895,7 +28898,7 @@ the following steps create
a GNU/Linux shared library:
@example
-$ gcc -shared -DHAVE_CONFIG_H -c -O -g -I@var{idir} filefuncs.c
+$ gcc -fPIC -shared -DHAVE_CONFIG_H -c -O -g -I@var{idir} filefuncs.c
$ ld -o filefuncs.so -shared filefuncs.o
@end example
@@ -28923,31 +28926,42 @@ BEGIN @{
printf "data[\"%s\"] = %s\n", i, data[i]
print "testff.awk modified:",
strftime("%m %d %y %H:%M:%S", data["mtime"])
+
+ print "\nInfo for JUNK"
+ ret = stat("JUNK", data)
+ print "ret =", ret
+ for (i in data)
+ printf "data[\"%s\"] = %s\n", i, data[i]
+ print "JUNK modified:", strftime("%m %d %y %H:%M:%S", data["mtime"])
@}
@end example
Here are the results of running the program:
@example
-$ gawk -f testff.awk
+$ @kbd{gawk -f testff.awk}
@print{} Info for testff.awk
@print{} ret = 0
+@print{} data["size"] = 607
+@print{} data["ino"] = 14945891
+@print{} data["name"] = testff.awk
+@print{} data["pmode"] = -rw-rw-r--
+@print{} data["nlink"] = 1
+@print{} data["atime"] = 1293993369
+@print{} data["mtime"] = 1288520752
+@print{} data["mode"] = 33204
@print{} data["blksize"] = 4096
-@print{} data["mtime"] = 932361936
-@print{} data["mode"] = 33188
+@print{} data["dev"] = 2054
@print{} data["type"] = file
-@print{} data["dev"] = 2065
-@print{} data["gid"] = 10
-@print{} data["ino"] = 878597
-@print{} data["ctime"] = 971431797
-@print{} data["blocks"] = 2
-@print{} data["nlink"] = 1
-@print{} data["name"] = testff.awk
-@print{} data["atime"] = 971608519
-@print{} data["pmode"] = -rw-r--r--
-@print{} data["size"] = 607
-@print{} data["uid"] = 2076
-@print{} testff.awk modified: 07 19 99 08:25:36
+@print{} data["gid"] = 500
+@print{} data["uid"] = 500
+@print{} data["blocks"] = 8
+@print{} data["ctime"] = 1290113572
+@print{} testff.awk modified: 10 31 10 12:25:52
+@print{}
+@print{} Info for JUNK
+@print{} ret = -1
+@print{} JUNK modified: 01 01 70 02:00:00
@end example
@c ENDOFRANGE filre
@c ENDOFRANGE dirch
@@ -29027,11 +29041,6 @@ fixed-length records.
@code{PROCINFO["RS"]} would be @code{"RS"} or @code{"RECLEN"},
depending upon which kind of record processing is in effect.
-@item Additional @code{printf} specifiers
-The 1999 ISO C standard added a number of additional @code{printf}
-format specifiers. These should be evaluated for possible inclusion
-in @command{gawk}.
-
@item Databases
It may be possible to map a GDBM/NDBM/SDBM file into an @command{awk} array.
@@ -29063,9 +29072,9 @@ and implemented to make module writing easier.
so that using the same value to index multiple arrays only
stores one copy of the index value.
-@item Integrating the DBUG library
-Integrating Fred Fish's DBUG library would be helpful during development,
-but it's a lot of work to do.
+@c @item Integrating the DBUG library
+@c Integrating Fred Fish's DBUG library would be helpful during development,
+@c but it's a lot of work to do.
@end table
Finally,
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 23a30bcf..1130b8fc 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -1,13 +1,13 @@
% texinfo.tex -- TeX macros to handle Texinfo files.
-%
+%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2009-03-28.05}
+\def\texinfoversion{2010-12-23.17}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010 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
@@ -65,7 +65,6 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
-
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
@@ -93,14 +92,13 @@
\let\ptexnewwrite\newwrite
\let\ptexnoindent=\noindent
\let\ptexplus=+
+\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
\let\ptextop=\top
-{\catcode`\'=\active
-\global\let\ptexquoteright'}% Math-mode def from plain.tex.
-\let\ptexraggedright=\raggedright
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
% If this character appears in an error message or help string, it
% starts a new line in the output.
@@ -199,36 +197,7 @@
% that mark overfull boxes (in case you have decided
% that the text looks ok even though it passes the margin).
%
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
+\def\finalout{\overfullrule=0pt }
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
@@ -267,7 +236,6 @@
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
-% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
@@ -599,85 +567,6 @@
\newhelp\EMsimple{Press RETURN to continue.}
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
- \def\temp{#1}%
- \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
- \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
- \else \errmessage{@dotless can be used only with i or j}%
- \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence. (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo. Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
- L\kern-.36em
- {\setbox0=\hbox{T}%
- \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
- \kern-.15em
- \TeX
-}
-
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
@@ -873,7 +762,7 @@ where each line of input produces a line of output.}
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
% paragraph. For more general purposes, use the \margin insertion
-% class. WHICH is `l' or `r'.
+% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
@@ -920,6 +809,36 @@ where each line of input produces a line of output.}
\temp
}
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change). This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -1095,109 +1014,6 @@ where each line of input produces a line of output.}
}
-% @asis just yields its argument. Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}. So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
- \catcode`\_ = \active
- \gdef\mathunderscore{%
- \catcode`\_=\active
- \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
- }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care. Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- % make the texinfo accent commands work in math mode
- \let\"=\ddot
- \let\'=\acute
- \let\==\bar
- \let\^=\hat
- \let\`=\grave
- \let\u=\breve
- \let\v=\check
- \let\~=\tilde
- \let\dotaccent=\dot
- $\finishmath
-}
-\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
- \catcode`^ = \active
- \catcode`< = \active
- \catcode`> = \active
- \catcode`+ = \active
- \catcode`' = \active
- \gdef\mathactive{%
- \let^ = \ptexhat
- \let< = \ptexless
- \let> = \ptexgtr
- \let+ = \ptexplus
- \let' = \ptexquoteright
- }
-}
-
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
-
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em. So do
-% whichever is larger.
-%
-\def\dots{%
- \leavevmode
- \setbox0=\hbox{...}% get width of three periods
- \ifdim\wd0 > 1.5em
- \dimen0 = \wd0
- \else
- \dimen0 = 1.5em
- \fi
- \hbox to \dimen0{%
- \hskip 0pt plus.25fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus.5fil
- }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
- \dots
- \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
% @refill is a no-op.
\let\refill=\relax
@@ -1332,13 +1148,16 @@ output) for that.)}
\ifpdf
%
- % Color manipulation macros based on pdfcolor.tex.
- \def\cmykDarkRed{0.28 1 1 0.35}
- \def\cmykBlack{0 0 0 1}
+ % Color manipulation macros based on pdfcolor.tex,
+ % except using rgb instead of cmyk; the latter is said to render as a
+ % very dark gray on-screen and a very dark halftone in print, instead
+ % of actual black.
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
%
% k sets the color for filling (usual text, etc.);
% K sets the color for stroking (thin rules, e.g., normal _'s).
- \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}}
+ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
% so that \makeheadline knows which color to restore.
@@ -1348,7 +1167,7 @@ output) for that.)}
\pdfsetcolor{#1}%
}
%
- \def\maincolor{\cmykBlack}
+ \def\maincolor{\rgbBlack}
\pdfsetcolor{\maincolor}
\edef\thiscolor{\maincolor}
\def\lastcolordefs{}
@@ -1443,8 +1262,8 @@ output) for that.)}
%
% by default, use a color that is dark enough to print on paper as
% nearly black, but still distinguishable for online viewing.
- \def\urlcolor{\cmykDarkRed}
- \def\linkcolor{\cmykDarkRed}
+ \def\urlcolor{\rgbDarkRed}
+ \def\linkcolor{\rgbDarkRed}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -1489,6 +1308,7 @@ output) for that.)}
\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{%
\def\thischapnum{##2}%
\def\thissecnum{0}%
@@ -2102,8 +1922,8 @@ end
\font\reducedsy=cmsy10
\def\reducedecsize{1000}
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts % reset the current fonts
\rm
} % end of 11pt text font size definitions
@@ -2233,11 +2053,9 @@ end
\font\reducedsy=cmsy9
\def\reducedecsize{0900}
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2 % reduce space between paragraphs
+\textleading = 12pt % line spacing for 10pt CM
+\textfonts % reset the current fonts
\rm
} % end of 10pt text font size definitions
@@ -2246,8 +2064,9 @@ end
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
-\def\xword{10}
\def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
@@ -2305,7 +2124,7 @@ end
\let\tenttsl=\titlettsl
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{25pt}}
+ \resetmathfonts \setleading{27pt}}
\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
@@ -2457,14 +2276,19 @@ end
\let\markupsetuplqcode \markupsetcodequoteleft
\let\markupsetuprqcode \markupsetcodequoteright
+%
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
\let\markupsetuplqverb \markupsetcodequoteleft
\let\markupsetuprqverb \markupsetcodequoteright
+%
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
-\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
% Allow an option to not replace quotes with a regular directed right
@@ -2502,27 +2326,40 @@ end
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% Font commands.
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
- \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+ \ifusingtt
+ {{\ttsl #2}\let\next=\relax}%
+ {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+ \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
-% like \smartslanted except unconditionally uses \ttsl.
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+ \ifx\next,%
+ \else\ifx\next-%
+ \else\ifx\next.%
+ \else\ptexslash
+ \fi\fi\fi}
+
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
% @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+\def\ttslanted#1{{\ttsl #1}}
% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
\let\i=\smartitalic
\let\slanted=\smartslanted
-\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
+\def\var#1{\smartslanted{#1}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
@@ -2816,8 +2653,188 @@ end
\fi
}
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \catcode`' = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ \let' = \ptexquoteright
+ }
+}
+
\message{glyphs,}
+% and logos.
+
+% @@ prints an @.
+\def\@{\char64 }
+
+% 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.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{%
+ \ifx\textnominalsize\xwordpt
+ % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+ % Revert to plain's \scriptsize, which is 7pt.
+ \count255=\the\fam $\fam\count255 \scriptstyle A$%
+ \else
+ % For 11pt, we can use our lllsize.
+ \selectfonts\lllsize A%
+ \fi
+ }%
+ \vss
+ }}%
+ \kern-.15em
+ \TeX
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
+%
+\def\dots{%
+ \leavevmode
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
%
@@ -3204,10 +3221,14 @@ end
\def\headings #1 {\csname HEADINGS#1\endcsname}
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff % it's the default
+
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
@@ -3319,7 +3340,7 @@ end
\begingroup
\advance\leftskip by-\tableindent
\advance\hsize by\tableindent
- \advance\rightskip by0pt plus1fil
+ \advance\rightskip by0pt plus1fil\relax
\leavevmode\unhbox0\par
\endgroup
%
@@ -4131,11 +4152,14 @@ end
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
- % Need these in case \tex is in effect and \{ is a \delimiter again.
- % But can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters.
- \let\{ = \mylbrace
- \let\} = \myrbrace
+ % Need these unexpandable (because we define \tt as a dummy)
+ % definitions when @{ or @} appear in index entry text. Also, more
+ % complicated, when \tex is in effect and \{ is a \delimiter again.
+ % We can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters. Perhaps we
+ % should define @lbrace and @rbrace commands a la @comma.
+ \def\{{{\tt\char123}}%
+ \def\}{{\tt\char125}}%
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
@@ -4188,7 +4212,7 @@ end
\def\commondummies{%
%
% \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control% words,
+ % preventing its expansion. This is used only for control words,
% not control letters, because the \space would be incorrect for
% control characters, but is needed to separate the control word
% from whatever follows.
@@ -4207,6 +4231,7 @@ end
\commondummiesnofonts
%
\definedummyletter\_%
+ \definedummyletter\-%
%
% Non-English letters.
\definedummyword\AA
@@ -4243,20 +4268,24 @@ end
\definedummyword\TeX
%
% Assorted special characters.
+ \definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
\definedummyword\copyright
\definedummyword\registeredsymbol
\definedummyword\dots
\definedummyword\enddots
+ \definedummyword\entrybreak
\definedummyword\equiv
\definedummyword\error
\definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\geq
\definedummyword\guillemetleft
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
- \definedummyword\expansion
+ \definedummyword\leq
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
@@ -4313,7 +4342,9 @@ end
\definedummyword\b
\definedummyword\i
\definedummyword\r
+ \definedummyword\sansserif
\definedummyword\sc
+ \definedummyword\slanted
\definedummyword\t
%
% Commands that take arguments.
@@ -4322,9 +4353,12 @@ end
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
+ \definedummyword\dmn
+ \definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
+ \definedummyword\indicateurl
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
@@ -4352,7 +4386,7 @@ end
\def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
\def\definedummyletter##1{\let##1\empty}%
- % Hopefully, all control words can become @asis.
+ % All control words become @asis by default; overrides below.
\let\definedummyword\definedummyaccent
%
\commondummiesnofonts
@@ -4364,8 +4398,14 @@ end
%
\def\ { }%
\def\@{@}%
- % how to handle braces?
\def\_{\normalunderscore}%
+ \def\-{}% @- shouldn't affect sorting
+ %
+ % Unfortunately, texindex is not prepared to handle braces in the
+ % content at all. So for index sorting, we map @{ and @} to strings
+ % starting with |, since that ASCII character is between ASCII { and }.
+ \def\{{|a}%
+ \def\}{|b}%
%
% Non-English letters.
\def\AA{AA}%
@@ -4393,23 +4433,25 @@ end
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
+ \def\arrow{->}%
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
- \def\registeredsymbol{R}%
\def\dots{...}%
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
\def\euro{euro}%
+ \def\expansion{==>}%
+ \def\geq{>=}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
- \def\expansion{==>}%
+ \def\leq{<=}%
\def\minus{-}%
- \def\pounds{pounds}%
\def\point{.}%
+ \def\pounds{pounds}%
\def\print{-|}%
\def\quotedblbase{"}%
\def\quotedblleft{"}%
@@ -4417,8 +4459,12 @@ end
\def\quoteleft{`}%
\def\quoteright{'}%
\def\quotesinglbase{,}%
+ \def\registeredsymbol{R}%
\def\result{=>}%
- \def\textdegree{degrees}%
+ \def\textdegree{o}%
+ %
+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+ \else \indexlquoteignore \fi
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
@@ -4433,6 +4479,11 @@ end
\macrolist
}
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
@@ -4690,7 +4741,6 @@ end
% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
-%
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
@@ -4727,10 +4777,17 @@ end
% columns.
\vskip 0pt plus1pt
%
+ % When reading the text of entry, convert explicit line breaks
+ % from @* into spaces. The user might give these in long section
+ % titles, for instance.
+ \def\*{\unskip\space\ignorespaces}%
+ \def\entrybreak{\hfil\break}%
+ %
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
}
+\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
\bgroup % Instead of the swallowed brace.
\noindent
@@ -4963,7 +5020,22 @@ end
\message{sectioning,}
% Chapters, sections, etc.
-% \unnumberedno is an oxymoron, of course. But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+ \chapoddpage
+ \null
+ \vskip.3\vsize % move it down on the page a bit
+ \begingroup
+ \noindent \titlefonts\rmisbold #1\par % the text
+ \let\lastnode=\empty % no node to associate with
+ \writetocentry{part}{#1}{}% but put it in the toc
+ \headingsoff % no headline or footline on the part page
+ \chapoddpage
+ \endgroup
+}
+
+% \unnumberedno is an oxymoron. But we count the unnumbered
% sections so that we can refer to them unambiguously in the pdf
% outlines by their "section number". We avoid collisions with chapter
% numbers by starting them at 10000. (If a document ever has 10000
@@ -5042,8 +5114,8 @@ end
\chardef\maxseclevel = 3
%
% A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
%
% Trace whether the current chapter is an appendix or not:
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -5068,8 +5140,8 @@ end
% The heading type:
\def\headtype{#1}%
\if \headtype U%
- \ifnum \absseclevel < \unmlevel
- \chardef\unmlevel = \absseclevel
+ \ifnum \absseclevel < \unnlevel
+ \chardef\unnlevel = \absseclevel
\fi
\else
% Check for appendix sections:
@@ -5081,10 +5153,10 @@ end
\fi\fi
\fi
% Check for numbered within unnumbered:
- \ifnum \absseclevel > \unmlevel
+ \ifnum \absseclevel > \unnlevel
\def\headtype{U}%
\else
- \chardef\unmlevel = 3
+ \chardef\unnlevel = 3
\fi
\fi
% Now print the heading:
@@ -5336,9 +5408,8 @@ end
\chappager
\ifodd\pageno \else
\begingroup
- \evenheadline={\hfil}\evenfootline={\hfil}%
- \oddheadline={\hfil}\oddfootline={\hfil}%
- \hbox to 0pt{}%
+ \headingsoff
+ \null
\chappager
\endgroup
\fi
@@ -5781,6 +5852,7 @@ end
\def\summarycontents{%
\startcontents{\putwordShortTOC}%
%
+ \let\partentry = \shortpartentry
\let\numchapentry = \shortchapentry
\let\appentry = \shortchapentry
\let\unnchapentry = \shortunnchapentry
@@ -5836,6 +5908,19 @@ end
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
+% Parts, in the main contents. Replace the part number, which doesn't
+% exist, with an empty box. Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+ \penalty-300
+ \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+ \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
%
@@ -5925,9 +6010,9 @@ end
\message{environments,}
% @foo ... @end foo.
-% @tex ... @end tex escapes into raw Tex temporarily.
+% @tex ... @end tex escapes into raw TeX temporarily.
% One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain tex @ character.
+% But \@ or @@ will get a plain @ character.
\envdef\tex{%
\setupmarkupstyle{tex}%
@@ -5944,6 +6029,10 @@ end
\catcode`\'=\other
\escapechar=`\\
%
+ % ' is active in math mode (mathcode"8000). So reset it, and all our
+ % other math active characters (just in case), to plain's definitions.
+ \mathactive
+ %
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
@@ -6146,41 +6235,42 @@ end
}
% We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
- \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
- \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command. #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
\expandafter\let\csname E#1\endcsname \afterenvbreak
\expandafter\let\csname Esmall#1\endcsname \afterenvbreak
}
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
- \makedispenv{#1}{#3}
- \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+ \makedispenvdef{#1}{#3}%
+ \makedispenvdef{#2}{#3}%
}
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
%
% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
%
-\maketwodispenvs {lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
\nonfillstart
\tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
- \gobble % eat return
+ \gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
-\makedispenv {display}{%
+\makedispenvdef{display}{%
\nonfillstart
\gobble
}
% @format/@smallformat: same as @display except don't narrow margins.
%
-\makedispenv{format}{%
+\makedispenvdef{format}{%
\let\nonarrowing = t%
\nonfillstart
\gobble
@@ -6199,7 +6289,7 @@ end
\envdef\flushright{%
\let\nonarrowing = t%
\nonfillstart
- \advance\leftskip by 0pt plus 1fill
+ \advance\leftskip by 0pt plus 1fill\relax
\gobble
}
\let\Eflushright = \afterenvbreak
@@ -6234,6 +6324,8 @@ end
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
+\makedispenvdef{quotation}{\quotationstart}
+%
\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
@@ -6249,17 +6341,6 @@ end
\parsearg\quotationlabel
}
-\envdef\quotation{%
- \setnormaldispenv
- \quotationstart
-}
-
-\envdef\smallquotation{%
- \setsmalldispenv
- \quotationstart
-}
-\let\Esmallquotation = \Equotation
-
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
%
@@ -6271,6 +6352,7 @@ end
\fi
{\parskip=0pt \afterenvbreak}%
}
+\def\Esmallquotation{\Equotation}
% If we're given an argument, typeset it in bold with a colon after.
\def\quotationlabel#1{%
@@ -6327,21 +6409,28 @@ end
% Setup for the @verbatim environment
%
-% Real tab expansion
+% Real tab expansion.
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
-\def\starttabbox{\setbox0=\hbox\bgroup}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs. The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group. Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset. Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
\catcode`\^^I=\active
\def^^I{\leavevmode\egroup
- \dimen0=\wd0 % the width so far, or since the previous tab
- \divide\dimen0 by\tabw
- \multiply\dimen0 by\tabw % compute previous multiple of \tabw
- \advance\dimen0 by\tabw % advance to next multiple of \tabw
- \wd0=\dimen0 \box0 \starttabbox
+ \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+ \divide\dimen\verbbox by\tabw
+ \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+ \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
+ \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
}%
}
\endgroup
@@ -6350,15 +6439,16 @@ end
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
- % Easiest (and conventionally used) font for verbatim
- \tt
- \def\par{\leavevmode\egroup\box0\endgraf}%
+ \tt % easiest (and conventionally used) font for verbatim
+ % The \leavevmode here is for blank lines. Otherwise, we would
+ % never \starttabox and the \egroup would end verbatim mode.
+ \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
\tabexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
- % make each space count
- % must do in this order:
+ % make each space count.
+ % Must do in this order:
\obeylines \uncatcodespecials \sepspaces
\everypar{\starttabbox}%
}
@@ -6501,7 +6591,7 @@ end
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
- \advance\rightskip by 0pt plus 1fil
+ \advance\rightskip by 0pt plus 1fil\relax
\endgraf
\nobreak\vskip -\parskip
\penalty\defunpenalty % signal to \startdefun and \dodefunx
@@ -6801,25 +6891,28 @@ end
}
\fi
-\def\scanmacro#1{%
- \begingroup
- \newlinechar`\^^M
- \let\xeatspaces\eatspaces
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
- % ... and \example
- \spaceisspace
- %
- % Append \endinput to make sure that TeX does not see the ending newline.
- % I've verified that it is necessary both for e-TeX and for ordinary TeX
- % --kasal, 29nov03
- \scantokens{#1\endinput}%
- \endgroup
-}
+\def\scanmacro#1{\begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ %
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ %
+ % ... 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
+ % line-oriented commands.
+ \scantokens{#1\empty}%
+\endgroup}
\def\scanexp#1{%
\edef\temp{\noexpand\scanmacro{#1}}%
@@ -6873,17 +6966,18 @@ end
% Macro bodies are absorbed as an argument in a context where
% all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
% Non-ASCII encodings make 8-bit characters active, so un-activate
% them to avoid their expansion. Must do this non-globally, to
% confine the change to the current group.
-
+%
% It's necessary to have hard CRs when the macro is executed. This is
-% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
\catcode`\"=\other
\catcode`\+=\other
\catcode`\<=\other
@@ -6896,13 +6990,13 @@ end
\ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
\catcode`\\=\other
\catcode`\^^M=\other
}
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
\scanctxt
\catcode`\{=\other
\catcode`\}=\other
@@ -6910,30 +7004,48 @@ end
\usembodybackslash
}
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
\scanctxt
- \catcode`\\=\other
+ \catcode`\\=0
}
+% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }. Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+%
+% We already have @{ and @}. For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+%
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent. Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
-
+%
{\catcode`@=0 @catcode`@\=@active
@gdef@usembodybackslash{@let\=@mbodybackslash}
@gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
}
\expandafter\def\csname macarg.\endcsname{\realbackslash}
+\def\margbackslash#1{\char`\#1 }
+
\def\macro{\recursivefalse\parsearg\macroxxx}
\def\rmacro{\recursivetrue\parsearg\macroxxx}
\def\macroxxx#1{%
- \getargs{#1}% now \macname is the macname and \argl the arglist
+ \getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
- \paramno=0%
+ \paramno=0
\else
\expandafter\parsemargdef \argl;%
\fi
@@ -6982,28 +7094,32 @@ end
% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
% 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.
+% in the params list to be ##N where N is the position in that list.
% That gets used by \mbodybackslash (above).
-
+%
% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
% unexpandable, insert that wherever you need a #, and then redefine
% it to # just before using the token list produced.
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
- \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdef#1;{%
+ \paramno=0\def\paramlist{}%
+ \let\hash\relax
+ \let\xeatspaces\relax
+ \parsemargdefxxx#1,;,%
+}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
\else \let\next=\parsemargdefxxx
- \advance\paramno by 1%
+ \advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
{\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
@@ -7011,7 +7127,7 @@ end
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
-
+%
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
@@ -7022,6 +7138,7 @@ end
% 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.
+%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
\ifrecursive
@@ -7085,7 +7202,8 @@ end
% \braceorline decides whether the next nonwhitespace character is a
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
+% as an argument (by \parsebrace or \parsearg).
+%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
@@ -7095,7 +7213,8 @@ end
% @alias.
% We need some trickery to remove the optional spaces around the equal
-% sign. Just make them active and then expand them all to nothing.
+% sign. Make them active and then expand them all to nothing.
+%
\def\alias{\parseargusing\obeyspaces\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{%
@@ -7353,7 +7472,8 @@ end
\angleleft un\-de\-fined\angleright
\iflinks
\ifhavexrefs
- \message{\linenumber Undefined cross reference `#1'.}%
+ {\toks0 = {#1}% avoid expansion of possibly-complex value
+ \message{\linenumber Undefined cross reference `\the\toks0'.}}%
\else
\ifwarnedxrefs\else
\global\warnedxrefstrue
@@ -7683,7 +7803,7 @@ end
% #2 is (optional) width, #3 is (optional) height.
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
@@ -8335,8 +8455,8 @@ directory should work if nowhere else does.}
\gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
- \gdef^^ed{\'\i}
- \gdef^^ee{\^\i}
+ \gdef^^ed{\'{\dotless{i}}}
+ \gdef^^ee{\^{\dotless{i}}}
\gdef^^ef{\v d}
%
\gdef^^f0{\dh}
@@ -8895,8 +9015,8 @@ directory should work if nowhere else does.}
% Prevent underfull vbox error messages.
\vbadness = 10000
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
@@ -9272,12 +9392,8 @@ directory should work if nowhere else does.}
@markupsetuplqdefault
@markupsetuprqdefault
-@c Gnulib now utterly and painfully insists on no trailing whitespace.
-@c So we have to nuke it.
-
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
-@c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace)
@c page-delimiter: "^\\\\message"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
diff --git a/extension/ChangeLog b/extension/ChangeLog
index e531d8f7..19cfbee0 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jan 2 21:08:17 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * filefuncs.c: Synched with code in gawk.texi, copyright dates
+ updated.
+
Sat Dec 18 20:22:44 2010 Arnold D. Robbins <arnold@skeeve.com>
* pcext.def: Removed, since we don't support MSFT compilers.
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index c1268508..46873f1f 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (C) 2001, 2004, 2005 the Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -56,8 +56,7 @@ do_chdir(int nargs)
/* format_mode --- turn a stat mode field into something readable */
static char *
-format_mode(fmode)
-unsigned long fmode;
+format_mode(unsigned long fmode)
{
static char outbuf[12];
int i;
@@ -185,7 +184,7 @@ do_stat(int nargs)
ret = lstat(file->stptr, & sbuf);
if (ret < 0) {
update_ERRNO();
- return make_number((AWKNUM) 0);
+ return make_number((AWKNUM) ret);
}
/* fill in the array */
@@ -327,9 +326,7 @@ do_stat(int nargs)
/* dlload --- load new builtins in this library */
NODE *
-dlload(tree, dl)
-NODE *tree;
-void *dl;
+dlload(NODE *tree, void *dl)
{
make_builtin("chdir", do_chdir, 1);
make_builtin("stat", do_stat, 2);