From 97ffd21c9b52c3405d27fb9f8d69480a9e681c4e Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 28 Mar 2014 14:54:40 +0300 Subject: Create valid DocBook XML output with current makeinfo. --- doc/ChangeLog | 5 + doc/gawk.info | 1078 +++++++++++++++++++++++++++---------------------------- doc/gawk.texi | 346 ++++++++++++++++-- doc/gawktexi.in | 346 ++++++++++++++++-- 4 files changed, 1180 insertions(+), 595 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 23522a7b..8c34d4c0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,11 @@ * gawktexi.in: Minor cleanups to the indexing. + Unrelated: + + * gawktexi.in: Merge in changes needed for creating valid + DocBook XML. Works with post-5.2 Texinfo and dblatex! + 2014-03-27 Arnold D. Robbins * gawktexi.in: Finish the massive indexing improvements such that diff --git a/doc/gawk.info b/doc/gawk.info index 41c35282..f63c62ce 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -9,8 +9,7 @@ START-INFO-DIR-ENTRY * awk: (gawk)Invoking gawk. Text scanning and processing. END-INFO-DIR-ENTRY - Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012, 2013, 2014 + Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2014 Free Software Foundation, Inc. @@ -41,8 +40,7 @@ General Introduction 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, 2012, 2013, 2014 + Copyright (C) 1989, 1991, 1992, 1993, 1996-2005, 2007, 2009-2014 Free Software Foundation, Inc. @@ -28014,7 +28012,7 @@ D.1 What a Program Does ======================= At the most basic level, the job of a program is to process some input -data and produce results. See *note figure-general-flow::. +data and produce results. See *note figure-general-flow::. _______ +------+ / \ +---------+ @@ -28398,8 +28396,8 @@ Dynamic Regular Expression (*Note Computed Regexps::.) Environment - A collection of strings, of the form NAME`='VAL, that each program - has available to it. Users generally place values into the + A collection of strings, of the form NAME`='`val', that each + program has available to it. Users generally place values into the environment in order to provide information to various programs. Typical examples are the environment variables `HOME' and `PATH'. @@ -28814,7 +28812,6 @@ GNU General Public License ************************** Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this @@ -29537,7 +29534,6 @@ GNU Free Documentation License ****************************** Version 1.3, 3 November 2008 - Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' @@ -30662,7 +30658,7 @@ Index * Brown, Martin: Contributors. (line 82) * BSD-based operating systems: Glossary. (line 616) * bt debugger command (alias for backtrace): Execution Stack. (line 13) -* Buening, Andreas <1>: Bugs. (line 71) +* Buening, Andreas <1>: Bugs. (line 70) * Buening, Andreas <2>: Contributors. (line 92) * Buening, Andreas: Acknowledgments. (line 60) * buffering, input/output <1>: Two-way I/O. (line 70) @@ -31308,7 +31304,7 @@ Index * f debugger command (alias for frame): Execution Stack. (line 25) * false, logical: Truth Values. (line 6) * FDL (Free Documentation License): GNU Free Documentation License. - (line 6) + (line 7) * features, adding to gawk: Adding Code. (line 6) * features, advanced, See advanced features: Obsolete. (line 6) * features, deprecated: Obsolete. (line 6) @@ -31453,7 +31449,7 @@ Index (line 27) * frame debugger command: Execution Stack. (line 25) * Free Documentation License (FDL): GNU Free Documentation License. - (line 6) + (line 7) * Free Software Foundation (FSF) <1>: Glossary. (line 297) * Free Software Foundation (FSF) <2>: Getting. (line 10) * Free Software Foundation (FSF): Manual History. (line 6) @@ -31678,7 +31674,7 @@ Index * GNITS mailing list: Acknowledgments. (line 52) * GNU awk, See gawk: Preface. (line 49) * GNU Free Documentation License: GNU Free Documentation License. - (line 6) + (line 7) * GNU General Public License: Glossary. (line 306) * GNU Lesser General Public License: Glossary. (line 397) * GNU long options <1>: Options. (line 6) @@ -31972,7 +31968,7 @@ Index * mail-list file: Sample Data Files. (line 6) * mailing labels, printing: Labels Program. (line 6) * mailing list, GNITS: Acknowledgments. (line 52) -* Malmberg, John <1>: Bugs. (line 72) +* Malmberg, John <1>: Bugs. (line 70) * Malmberg, John: Acknowledgments. (line 60) * mark parity: Ordinal Functions. (line 45) * marked string extraction (internationalization): String Extraction. @@ -32214,7 +32210,7 @@ Index (line 6) * pipe, input: Getline/Pipe. (line 9) * pipe, output: Redirection. (line 57) -* Pitts, Dave <1>: Bugs. (line 73) +* Pitts, Dave <1>: Bugs. (line 70) * Pitts, Dave: Acknowledgments. (line 60) * Plauger, P.J.: Library Functions. (line 12) * plug-in: Extension Intro. (line 6) @@ -32418,7 +32414,7 @@ Index * range expressions (regexps): Bracket Expressions. (line 6) * range patterns: Ranges. (line 6) * range patterns, line continuation and: Ranges. (line 65) -* Rankin, Pat <1>: Bugs. (line 72) +* Rankin, Pat <1>: Bugs. (line 70) * Rankin, Pat <2>: Contributors. (line 37) * Rankin, Pat <3>: Assignment Ops. (line 100) * Rankin, Pat: Acknowledgments. (line 60) @@ -33092,530 +33088,530 @@ Index  Tag Table: -Node: Top1366 -Node: Foreword40929 -Node: Preface45274 -Ref: Preface-Footnote-148327 -Ref: Preface-Footnote-248423 -Node: History48655 -Node: Names51029 -Ref: Names-Footnote-152506 -Node: This Manual52578 -Ref: This Manual-Footnote-158352 -Node: Conventions58452 -Node: Manual History60608 -Ref: Manual History-Footnote-164056 -Ref: Manual History-Footnote-264097 -Node: How To Contribute64171 -Node: Acknowledgments65315 -Node: Getting Started69509 -Node: Running gawk71888 -Node: One-shot73074 -Node: Read Terminal74299 -Ref: Read Terminal-Footnote-175949 -Ref: Read Terminal-Footnote-276225 -Node: Long76396 -Node: Executable Scripts77772 -Ref: Executable Scripts-Footnote-179605 -Ref: Executable Scripts-Footnote-279707 -Node: Comments80254 -Node: Quoting82721 -Node: DOS Quoting87344 -Node: Sample Data Files88019 -Node: Very Simple90534 -Node: Two Rules95185 -Node: More Complex97083 -Ref: More Complex-Footnote-1100013 -Node: Statements/Lines100098 -Ref: Statements/Lines-Footnote-1104561 -Node: Other Features104826 -Node: When105754 -Node: Invoking Gawk107901 -Node: Command Line109364 -Node: Options110147 -Ref: Options-Footnote-1125525 -Node: Other Arguments125550 -Node: Naming Standard Input128208 -Node: Environment Variables129302 -Node: AWKPATH Variable129860 -Ref: AWKPATH Variable-Footnote-1132641 -Ref: AWKPATH Variable-Footnote-2132686 -Node: AWKLIBPATH Variable132946 -Node: Other Environment Variables133664 -Node: Exit Status136627 -Node: Include Files137302 -Node: Loading Shared Libraries140871 -Node: Obsolete142235 -Node: Undocumented142932 -Node: Regexp143174 -Node: Regexp Usage144563 -Node: Escape Sequences146588 -Node: Regexp Operators152257 -Ref: Regexp Operators-Footnote-1159637 -Ref: Regexp Operators-Footnote-2159784 -Node: Bracket Expressions159882 -Ref: table-char-classes161772 -Node: GNU Regexp Operators164295 -Node: Case-sensitivity168018 -Ref: Case-sensitivity-Footnote-1170986 -Ref: Case-sensitivity-Footnote-2171221 -Node: Leftmost Longest171329 -Node: Computed Regexps172530 -Node: Reading Files175867 -Node: Records177869 -Ref: Records-Footnote-1187392 -Node: Fields187429 -Ref: Fields-Footnote-1190385 -Node: Nonconstant Fields190471 -Node: Changing Fields192677 -Node: Field Separators198636 -Node: Default Field Splitting201338 -Node: Regexp Field Splitting202455 -Node: Single Character Fields205797 -Node: Command Line Field Separator206856 -Node: Full Line Fields210198 -Ref: Full Line Fields-Footnote-1210706 -Node: Field Splitting Summary210752 -Ref: Field Splitting Summary-Footnote-1213851 -Node: Constant Size213952 -Node: Splitting By Content218559 -Ref: Splitting By Content-Footnote-1222308 -Node: Multiple Line222348 -Ref: Multiple Line-Footnote-1228195 -Node: Getline228374 -Node: Plain Getline230590 -Node: Getline/Variable232685 -Node: Getline/File233832 -Node: Getline/Variable/File235173 -Ref: Getline/Variable/File-Footnote-1236772 -Node: Getline/Pipe236859 -Node: Getline/Variable/Pipe239558 -Node: Getline/Coprocess240665 -Node: Getline/Variable/Coprocess241917 -Node: Getline Notes242654 -Node: Getline Summary245441 -Ref: table-getline-variants245849 -Node: Read Timeout246761 -Ref: Read Timeout-Footnote-1250502 -Node: Command line directories250559 -Node: Printing251189 -Node: Print252820 -Node: Print Examples254157 -Node: Output Separators256941 -Node: OFMT258957 -Node: Printf260315 -Node: Basic Printf261221 -Node: Control Letters262760 -Node: Format Modifiers266572 -Node: Printf Examples272581 -Node: Redirection275293 -Node: Special Files282267 -Node: Special FD282800 -Ref: Special FD-Footnote-1286425 -Node: Special Network286499 -Node: Special Caveats287349 -Node: Close Files And Pipes288145 -Ref: Close Files And Pipes-Footnote-1295128 -Ref: Close Files And Pipes-Footnote-2295276 -Node: Expressions295426 -Node: Values296558 -Node: Constants297234 -Node: Scalar Constants297914 -Ref: Scalar Constants-Footnote-1298773 -Node: Nondecimal-numbers298955 -Node: Regexp Constants301955 -Node: Using Constant Regexps302430 -Node: Variables305485 -Node: Using Variables306140 -Node: Assignment Options307864 -Node: Conversion309739 -Ref: table-locale-affects315239 -Ref: Conversion-Footnote-1315863 -Node: All Operators315972 -Node: Arithmetic Ops316602 -Node: Concatenation319107 -Ref: Concatenation-Footnote-1321895 -Node: Assignment Ops322015 -Ref: table-assign-ops327003 -Node: Increment Ops328334 -Node: Truth Values and Conditions331768 -Node: Truth Values332851 -Node: Typing and Comparison333900 -Node: Variable Typing334693 -Ref: Variable Typing-Footnote-1338590 -Node: Comparison Operators338712 -Ref: table-relational-ops339122 -Node: POSIX String Comparison342670 -Ref: POSIX String Comparison-Footnote-1343626 -Node: Boolean Ops343764 -Ref: Boolean Ops-Footnote-1347834 -Node: Conditional Exp347925 -Node: Function Calls349657 -Node: Precedence353251 -Node: Locales356920 -Node: Patterns and Actions358009 -Node: Pattern Overview359063 -Node: Regexp Patterns360732 -Node: Expression Patterns361275 -Node: Ranges365056 -Node: BEGIN/END368160 -Node: Using BEGIN/END368922 -Ref: Using BEGIN/END-Footnote-1371658 -Node: I/O And BEGIN/END371764 -Node: BEGINFILE/ENDFILE374046 -Node: Empty376960 -Node: Using Shell Variables377277 -Node: Action Overview379562 -Node: Statements381919 -Node: If Statement383773 -Node: While Statement385272 -Node: Do Statement387316 -Node: For Statement388472 -Node: Switch Statement391624 -Node: Break Statement393778 -Node: Continue Statement395768 -Node: Next Statement397561 -Node: Nextfile Statement399951 -Node: Exit Statement402606 -Node: Built-in Variables405022 -Node: User-modified406117 -Ref: User-modified-Footnote-1414475 -Node: Auto-set414537 -Ref: Auto-set-Footnote-1427601 -Ref: Auto-set-Footnote-2427806 -Node: ARGC and ARGV427862 -Node: Arrays431716 -Node: Array Basics433221 -Node: Array Intro434047 -Node: Reference to Elements438364 -Node: Assigning Elements440634 -Node: Array Example441125 -Node: Scanning an Array442857 -Node: Controlling Scanning445171 -Ref: Controlling Scanning-Footnote-1450258 -Node: Delete450574 -Ref: Delete-Footnote-1453339 -Node: Numeric Array Subscripts453396 -Node: Uninitialized Subscripts455579 -Node: Multidimensional457206 -Node: Multiscanning460299 -Node: Arrays of Arrays461888 -Node: Functions466528 -Node: Built-in467347 -Node: Calling Built-in468425 -Node: Numeric Functions470413 -Ref: Numeric Functions-Footnote-1474245 -Ref: Numeric Functions-Footnote-2474602 -Ref: Numeric Functions-Footnote-3474650 -Node: String Functions474919 -Ref: String Functions-Footnote-1497877 -Ref: String Functions-Footnote-2498006 -Ref: String Functions-Footnote-3498254 -Node: Gory Details498341 -Ref: table-sub-escapes500020 -Ref: table-sub-posix-92501374 -Ref: table-sub-proposed502725 -Ref: table-posix-sub504079 -Ref: table-gensub-escapes505624 -Ref: Gory Details-Footnote-1506800 -Ref: Gory Details-Footnote-2506851 -Node: I/O Functions507002 -Ref: I/O Functions-Footnote-1513992 -Node: Time Functions514139 -Ref: Time Functions-Footnote-1525122 -Ref: Time Functions-Footnote-2525190 -Ref: Time Functions-Footnote-3525348 -Ref: Time Functions-Footnote-4525459 -Ref: Time Functions-Footnote-5525571 -Ref: Time Functions-Footnote-6525798 -Node: Bitwise Functions526064 -Ref: table-bitwise-ops526626 -Ref: Bitwise Functions-Footnote-1530847 -Node: Type Functions531031 -Node: I18N Functions532182 -Node: User-defined533809 -Node: Definition Syntax534613 -Ref: Definition Syntax-Footnote-1539527 -Node: Function Example539596 -Ref: Function Example-Footnote-1542245 -Node: Function Caveats542267 -Node: Calling A Function542785 -Node: Variable Scope543740 -Node: Pass By Value/Reference546703 -Node: Return Statement550211 -Node: Dynamic Typing553192 -Node: Indirect Calls554123 -Node: Library Functions563810 -Ref: Library Functions-Footnote-1567323 -Ref: Library Functions-Footnote-2567466 -Node: Library Names567637 -Ref: Library Names-Footnote-1571110 -Ref: Library Names-Footnote-2571330 -Node: General Functions571416 -Node: Strtonum Function572444 -Node: Assert Function575374 -Node: Round Function578700 -Node: Cliff Random Function580241 -Node: Ordinal Functions581257 -Ref: Ordinal Functions-Footnote-1584334 -Ref: Ordinal Functions-Footnote-2584586 -Node: Join Function584797 -Ref: Join Function-Footnote-1586568 -Node: Getlocaltime Function586768 -Node: Readfile Function590509 -Node: Data File Management592348 -Node: Filetrans Function592980 -Node: Rewind Function597049 -Node: File Checking598436 -Node: Empty Files599530 -Node: Ignoring Assigns601760 -Node: Getopt Function603314 -Ref: Getopt Function-Footnote-1614617 -Node: Passwd Functions614820 -Ref: Passwd Functions-Footnote-1623798 -Node: Group Functions623886 -Node: Walking Arrays631970 -Node: Sample Programs634106 -Node: Running Examples634780 -Node: Clones635508 -Node: Cut Program636732 -Node: Egrep Program646583 -Ref: Egrep Program-Footnote-1654356 -Node: Id Program654466 -Node: Split Program658115 -Ref: Split Program-Footnote-1661634 -Node: Tee Program661762 -Node: Uniq Program664565 -Node: Wc Program671994 -Ref: Wc Program-Footnote-1676260 -Ref: Wc Program-Footnote-2676460 -Node: Miscellaneous Programs676552 -Node: Dupword Program677740 -Node: Alarm Program679771 -Node: Translate Program684578 -Ref: Translate Program-Footnote-1688965 -Ref: Translate Program-Footnote-2689213 -Node: Labels Program689347 -Ref: Labels Program-Footnote-1692718 -Node: Word Sorting692802 -Node: History Sorting696686 -Node: Extract Program698525 -Ref: Extract Program-Footnote-1706028 -Node: Simple Sed706156 -Node: Igawk Program709218 -Ref: Igawk Program-Footnote-1724375 -Ref: Igawk Program-Footnote-2724576 -Node: Anagram Program724714 -Node: Signature Program727782 -Node: Advanced Features728882 -Node: Nondecimal Data730768 -Node: Array Sorting732351 -Node: Controlling Array Traversal733048 -Node: Array Sorting Functions741332 -Ref: Array Sorting Functions-Footnote-1745201 -Node: Two-way I/O745395 -Ref: Two-way I/O-Footnote-1750827 -Node: TCP/IP Networking750909 -Node: Profiling753753 -Node: Internationalization761256 -Node: I18N and L10N762681 -Node: Explaining gettext763367 -Ref: Explaining gettext-Footnote-1768435 -Ref: Explaining gettext-Footnote-2768619 -Node: Programmer i18n768784 -Node: Translator i18n772986 -Node: String Extraction773780 -Ref: String Extraction-Footnote-1774741 -Node: Printf Ordering774827 -Ref: Printf Ordering-Footnote-1777609 -Node: I18N Portability777673 -Ref: I18N Portability-Footnote-1780122 -Node: I18N Example780185 -Ref: I18N Example-Footnote-1782823 -Node: Gawk I18N782895 -Node: Debugger783516 -Node: Debugging784487 -Node: Debugging Concepts784920 -Node: Debugging Terms786776 -Node: Awk Debugging789373 -Node: Sample Debugging Session790265 -Node: Debugger Invocation790785 -Node: Finding The Bug792118 -Node: List of Debugger Commands798605 -Node: Breakpoint Control799939 -Node: Debugger Execution Control803603 -Node: Viewing And Changing Data806963 -Node: Execution Stack810319 -Node: Debugger Info811786 -Node: Miscellaneous Debugger Commands815768 -Node: Readline Support820944 -Node: Limitations821775 -Node: Arbitrary Precision Arithmetic824027 -Ref: Arbitrary Precision Arithmetic-Footnote-1825676 -Node: General Arithmetic825824 -Node: Floating Point Issues827544 -Node: String Conversion Precision828425 -Ref: String Conversion Precision-Footnote-1830130 -Node: Unexpected Results830239 -Node: POSIX Floating Point Problems832392 -Ref: POSIX Floating Point Problems-Footnote-1836217 -Node: Integer Programming836255 -Node: Floating-point Programming837994 -Ref: Floating-point Programming-Footnote-1844325 -Ref: Floating-point Programming-Footnote-2844595 -Node: Floating-point Representation844859 -Node: Floating-point Context846024 -Ref: table-ieee-formats846863 -Node: Rounding Mode848247 -Ref: table-rounding-modes848726 -Ref: Rounding Mode-Footnote-1851741 -Node: Gawk and MPFR851920 -Node: Arbitrary Precision Floats853175 -Ref: Arbitrary Precision Floats-Footnote-1855618 -Node: Setting Precision855934 -Ref: table-predefined-precision-strings856620 -Node: Setting Rounding Mode858765 -Ref: table-gawk-rounding-modes859169 -Node: Floating-point Constants860356 -Node: Changing Precision861785 -Ref: Changing Precision-Footnote-1863182 -Node: Exact Arithmetic863356 -Node: Arbitrary Precision Integers866494 -Ref: Arbitrary Precision Integers-Footnote-1869509 -Node: Dynamic Extensions869656 -Node: Extension Intro871114 -Node: Plugin License872379 -Node: Extension Mechanism Outline873064 -Ref: load-extension873481 -Ref: load-new-function874959 -Ref: call-new-function875954 -Node: Extension API Description877969 -Node: Extension API Functions Introduction879256 -Node: General Data Types884183 -Ref: General Data Types-Footnote-1889878 -Node: Requesting Values890177 -Ref: table-value-types-returned890914 -Node: Memory Allocation Functions891868 -Ref: Memory Allocation Functions-Footnote-1894614 -Node: Constructor Functions894710 -Node: Registration Functions896468 -Node: Extension Functions897153 -Node: Exit Callback Functions899455 -Node: Extension Version String900704 -Node: Input Parsers901354 -Node: Output Wrappers911111 -Node: Two-way processors915621 -Node: Printing Messages917829 -Ref: Printing Messages-Footnote-1918906 -Node: Updating `ERRNO'919058 -Node: Accessing Parameters919797 -Node: Symbol Table Access921027 -Node: Symbol table by name921541 -Node: Symbol table by cookie923517 -Ref: Symbol table by cookie-Footnote-1927649 -Node: Cached values927712 -Ref: Cached values-Footnote-1931202 -Node: Array Manipulation931293 -Ref: Array Manipulation-Footnote-1932391 -Node: Array Data Types932430 -Ref: Array Data Types-Footnote-1935133 -Node: Array Functions935225 -Node: Flattening Arrays939061 -Node: Creating Arrays945913 -Node: Extension API Variables950638 -Node: Extension Versioning951274 -Node: Extension API Informational Variables953175 -Node: Extension API Boilerplate954261 -Node: Finding Extensions958065 -Node: Extension Example958625 -Node: Internal File Description959355 -Node: Internal File Ops963446 -Ref: Internal File Ops-Footnote-1974955 -Node: Using Internal File Ops975095 -Ref: Using Internal File Ops-Footnote-1977448 -Node: Extension Samples977714 -Node: Extension Sample File Functions979238 -Node: Extension Sample Fnmatch987723 -Node: Extension Sample Fork989492 -Node: Extension Sample Inplace990705 -Node: Extension Sample Ord992483 -Node: Extension Sample Readdir993319 -Node: Extension Sample Revout994851 -Node: Extension Sample Rev2way995444 -Node: Extension Sample Read write array996134 -Node: Extension Sample Readfile998017 -Node: Extension Sample API Tests999117 -Node: Extension Sample Time999642 -Node: gawkextlib1001006 -Node: Language History1003787 -Node: V7/SVR3.11005380 -Node: SVR41007700 -Node: POSIX1009142 -Node: BTL1010528 -Node: POSIX/GNU1011262 -Node: Feature History1016861 -Node: Common Extensions1029837 -Node: Ranges and Locales1031149 -Ref: Ranges and Locales-Footnote-11035766 -Ref: Ranges and Locales-Footnote-21035793 -Ref: Ranges and Locales-Footnote-31036027 -Node: Contributors1036248 -Node: Installation1041629 -Node: Gawk Distribution1042523 -Node: Getting1043007 -Node: Extracting1043833 -Node: Distribution contents1045525 -Node: Unix Installation1051230 -Node: Quick Installation1051847 -Node: Additional Configuration Options1054293 -Node: Configuration Philosophy1056029 -Node: Non-Unix Installation1058383 -Node: PC Installation1058841 -Node: PC Binary Installation1060140 -Node: PC Compiling1061988 -Node: PC Testing1064932 -Node: PC Using1066108 -Node: Cygwin1070276 -Node: MSYS1071085 -Node: VMS Installation1071599 -Node: VMS Compilation1072363 -Ref: VMS Compilation-Footnote-11073615 -Node: VMS Dynamic Extensions1073673 -Node: VMS Installation Details1075046 -Node: VMS Running1077297 -Node: VMS GNV1080131 -Node: VMS Old Gawk1080854 -Node: Bugs1081324 -Node: Other Versions1085242 -Node: Notes1091326 -Node: Compatibility Mode1092126 -Node: Additions1092909 -Node: Accessing The Source1093836 -Node: Adding Code1095276 -Node: New Ports1101321 -Node: Derived Files1105456 -Ref: Derived Files-Footnote-11110777 -Ref: Derived Files-Footnote-21110811 -Ref: Derived Files-Footnote-31111411 -Node: Future Extensions1111509 -Node: Implementation Limitations1112092 -Node: Extension Design1113344 -Node: Old Extension Problems1114498 -Ref: Old Extension Problems-Footnote-11116006 -Node: Extension New Mechanism Goals1116063 -Ref: Extension New Mechanism Goals-Footnote-11119428 -Node: Extension Other Design Decisions1119614 -Node: Extension Future Growth1121720 -Node: Old Extension Mechanism1122556 -Node: Basic Concepts1124296 -Node: Basic High Level1124977 -Ref: figure-general-flow1125248 -Ref: figure-process-flow1125847 -Ref: Basic High Level-Footnote-11129076 -Node: Basic Data Typing1129261 -Node: Glossary1132616 -Node: Copying1157845 -Node: GNU Free Documentation License1195402 -Node: Index1220539 +Node: Top1292 +Node: Foreword40781 +Node: Preface45126 +Ref: Preface-Footnote-148179 +Ref: Preface-Footnote-248275 +Node: History48507 +Node: Names50881 +Ref: Names-Footnote-152358 +Node: This Manual52430 +Ref: This Manual-Footnote-158204 +Node: Conventions58304 +Node: Manual History60460 +Ref: Manual History-Footnote-163908 +Ref: Manual History-Footnote-263949 +Node: How To Contribute64023 +Node: Acknowledgments65167 +Node: Getting Started69361 +Node: Running gawk71740 +Node: One-shot72926 +Node: Read Terminal74151 +Ref: Read Terminal-Footnote-175801 +Ref: Read Terminal-Footnote-276077 +Node: Long76248 +Node: Executable Scripts77624 +Ref: Executable Scripts-Footnote-179457 +Ref: Executable Scripts-Footnote-279559 +Node: Comments80106 +Node: Quoting82573 +Node: DOS Quoting87196 +Node: Sample Data Files87871 +Node: Very Simple90386 +Node: Two Rules95037 +Node: More Complex96935 +Ref: More Complex-Footnote-199865 +Node: Statements/Lines99950 +Ref: Statements/Lines-Footnote-1104413 +Node: Other Features104678 +Node: When105606 +Node: Invoking Gawk107753 +Node: Command Line109216 +Node: Options109999 +Ref: Options-Footnote-1125377 +Node: Other Arguments125402 +Node: Naming Standard Input128060 +Node: Environment Variables129154 +Node: AWKPATH Variable129712 +Ref: AWKPATH Variable-Footnote-1132493 +Ref: AWKPATH Variable-Footnote-2132538 +Node: AWKLIBPATH Variable132798 +Node: Other Environment Variables133516 +Node: Exit Status136479 +Node: Include Files137154 +Node: Loading Shared Libraries140723 +Node: Obsolete142087 +Node: Undocumented142784 +Node: Regexp143026 +Node: Regexp Usage144415 +Node: Escape Sequences146440 +Node: Regexp Operators152109 +Ref: Regexp Operators-Footnote-1159489 +Ref: Regexp Operators-Footnote-2159636 +Node: Bracket Expressions159734 +Ref: table-char-classes161624 +Node: GNU Regexp Operators164147 +Node: Case-sensitivity167870 +Ref: Case-sensitivity-Footnote-1170838 +Ref: Case-sensitivity-Footnote-2171073 +Node: Leftmost Longest171181 +Node: Computed Regexps172382 +Node: Reading Files175719 +Node: Records177721 +Ref: Records-Footnote-1187244 +Node: Fields187281 +Ref: Fields-Footnote-1190237 +Node: Nonconstant Fields190323 +Node: Changing Fields192529 +Node: Field Separators198488 +Node: Default Field Splitting201190 +Node: Regexp Field Splitting202307 +Node: Single Character Fields205649 +Node: Command Line Field Separator206708 +Node: Full Line Fields210050 +Ref: Full Line Fields-Footnote-1210558 +Node: Field Splitting Summary210604 +Ref: Field Splitting Summary-Footnote-1213703 +Node: Constant Size213804 +Node: Splitting By Content218411 +Ref: Splitting By Content-Footnote-1222160 +Node: Multiple Line222200 +Ref: Multiple Line-Footnote-1228047 +Node: Getline228226 +Node: Plain Getline230442 +Node: Getline/Variable232537 +Node: Getline/File233684 +Node: Getline/Variable/File235025 +Ref: Getline/Variable/File-Footnote-1236624 +Node: Getline/Pipe236711 +Node: Getline/Variable/Pipe239410 +Node: Getline/Coprocess240517 +Node: Getline/Variable/Coprocess241769 +Node: Getline Notes242506 +Node: Getline Summary245293 +Ref: table-getline-variants245701 +Node: Read Timeout246613 +Ref: Read Timeout-Footnote-1250354 +Node: Command line directories250411 +Node: Printing251041 +Node: Print252672 +Node: Print Examples254009 +Node: Output Separators256793 +Node: OFMT258809 +Node: Printf260167 +Node: Basic Printf261073 +Node: Control Letters262612 +Node: Format Modifiers266424 +Node: Printf Examples272433 +Node: Redirection275145 +Node: Special Files282119 +Node: Special FD282652 +Ref: Special FD-Footnote-1286277 +Node: Special Network286351 +Node: Special Caveats287201 +Node: Close Files And Pipes287997 +Ref: Close Files And Pipes-Footnote-1294980 +Ref: Close Files And Pipes-Footnote-2295128 +Node: Expressions295278 +Node: Values296410 +Node: Constants297086 +Node: Scalar Constants297766 +Ref: Scalar Constants-Footnote-1298625 +Node: Nondecimal-numbers298807 +Node: Regexp Constants301807 +Node: Using Constant Regexps302282 +Node: Variables305337 +Node: Using Variables305992 +Node: Assignment Options307716 +Node: Conversion309591 +Ref: table-locale-affects315091 +Ref: Conversion-Footnote-1315715 +Node: All Operators315824 +Node: Arithmetic Ops316454 +Node: Concatenation318959 +Ref: Concatenation-Footnote-1321747 +Node: Assignment Ops321867 +Ref: table-assign-ops326855 +Node: Increment Ops328186 +Node: Truth Values and Conditions331620 +Node: Truth Values332703 +Node: Typing and Comparison333752 +Node: Variable Typing334545 +Ref: Variable Typing-Footnote-1338442 +Node: Comparison Operators338564 +Ref: table-relational-ops338974 +Node: POSIX String Comparison342522 +Ref: POSIX String Comparison-Footnote-1343478 +Node: Boolean Ops343616 +Ref: Boolean Ops-Footnote-1347686 +Node: Conditional Exp347777 +Node: Function Calls349509 +Node: Precedence353103 +Node: Locales356772 +Node: Patterns and Actions357861 +Node: Pattern Overview358915 +Node: Regexp Patterns360584 +Node: Expression Patterns361127 +Node: Ranges364908 +Node: BEGIN/END368012 +Node: Using BEGIN/END368774 +Ref: Using BEGIN/END-Footnote-1371510 +Node: I/O And BEGIN/END371616 +Node: BEGINFILE/ENDFILE373898 +Node: Empty376812 +Node: Using Shell Variables377129 +Node: Action Overview379414 +Node: Statements381771 +Node: If Statement383625 +Node: While Statement385124 +Node: Do Statement387168 +Node: For Statement388324 +Node: Switch Statement391476 +Node: Break Statement393630 +Node: Continue Statement395620 +Node: Next Statement397413 +Node: Nextfile Statement399803 +Node: Exit Statement402458 +Node: Built-in Variables404874 +Node: User-modified405969 +Ref: User-modified-Footnote-1414327 +Node: Auto-set414389 +Ref: Auto-set-Footnote-1427453 +Ref: Auto-set-Footnote-2427658 +Node: ARGC and ARGV427714 +Node: Arrays431568 +Node: Array Basics433073 +Node: Array Intro433899 +Node: Reference to Elements438216 +Node: Assigning Elements440486 +Node: Array Example440977 +Node: Scanning an Array442709 +Node: Controlling Scanning445023 +Ref: Controlling Scanning-Footnote-1450110 +Node: Delete450426 +Ref: Delete-Footnote-1453191 +Node: Numeric Array Subscripts453248 +Node: Uninitialized Subscripts455431 +Node: Multidimensional457058 +Node: Multiscanning460151 +Node: Arrays of Arrays461740 +Node: Functions466380 +Node: Built-in467199 +Node: Calling Built-in468277 +Node: Numeric Functions470265 +Ref: Numeric Functions-Footnote-1474097 +Ref: Numeric Functions-Footnote-2474454 +Ref: Numeric Functions-Footnote-3474502 +Node: String Functions474771 +Ref: String Functions-Footnote-1497729 +Ref: String Functions-Footnote-2497858 +Ref: String Functions-Footnote-3498106 +Node: Gory Details498193 +Ref: table-sub-escapes499872 +Ref: table-sub-posix-92501226 +Ref: table-sub-proposed502577 +Ref: table-posix-sub503931 +Ref: table-gensub-escapes505476 +Ref: Gory Details-Footnote-1506652 +Ref: Gory Details-Footnote-2506703 +Node: I/O Functions506854 +Ref: I/O Functions-Footnote-1513844 +Node: Time Functions513991 +Ref: Time Functions-Footnote-1524974 +Ref: Time Functions-Footnote-2525042 +Ref: Time Functions-Footnote-3525200 +Ref: Time Functions-Footnote-4525311 +Ref: Time Functions-Footnote-5525423 +Ref: Time Functions-Footnote-6525650 +Node: Bitwise Functions525916 +Ref: table-bitwise-ops526478 +Ref: Bitwise Functions-Footnote-1530699 +Node: Type Functions530883 +Node: I18N Functions532034 +Node: User-defined533661 +Node: Definition Syntax534465 +Ref: Definition Syntax-Footnote-1539379 +Node: Function Example539448 +Ref: Function Example-Footnote-1542097 +Node: Function Caveats542119 +Node: Calling A Function542637 +Node: Variable Scope543592 +Node: Pass By Value/Reference546555 +Node: Return Statement550063 +Node: Dynamic Typing553044 +Node: Indirect Calls553975 +Node: Library Functions563662 +Ref: Library Functions-Footnote-1567175 +Ref: Library Functions-Footnote-2567318 +Node: Library Names567489 +Ref: Library Names-Footnote-1570962 +Ref: Library Names-Footnote-2571182 +Node: General Functions571268 +Node: Strtonum Function572296 +Node: Assert Function575226 +Node: Round Function578552 +Node: Cliff Random Function580093 +Node: Ordinal Functions581109 +Ref: Ordinal Functions-Footnote-1584186 +Ref: Ordinal Functions-Footnote-2584438 +Node: Join Function584649 +Ref: Join Function-Footnote-1586420 +Node: Getlocaltime Function586620 +Node: Readfile Function590361 +Node: Data File Management592200 +Node: Filetrans Function592832 +Node: Rewind Function596901 +Node: File Checking598288 +Node: Empty Files599382 +Node: Ignoring Assigns601612 +Node: Getopt Function603166 +Ref: Getopt Function-Footnote-1614469 +Node: Passwd Functions614672 +Ref: Passwd Functions-Footnote-1623650 +Node: Group Functions623738 +Node: Walking Arrays631822 +Node: Sample Programs633958 +Node: Running Examples634632 +Node: Clones635360 +Node: Cut Program636584 +Node: Egrep Program646435 +Ref: Egrep Program-Footnote-1654208 +Node: Id Program654318 +Node: Split Program657967 +Ref: Split Program-Footnote-1661486 +Node: Tee Program661614 +Node: Uniq Program664417 +Node: Wc Program671846 +Ref: Wc Program-Footnote-1676112 +Ref: Wc Program-Footnote-2676312 +Node: Miscellaneous Programs676404 +Node: Dupword Program677592 +Node: Alarm Program679623 +Node: Translate Program684430 +Ref: Translate Program-Footnote-1688817 +Ref: Translate Program-Footnote-2689065 +Node: Labels Program689199 +Ref: Labels Program-Footnote-1692570 +Node: Word Sorting692654 +Node: History Sorting696538 +Node: Extract Program698377 +Ref: Extract Program-Footnote-1705880 +Node: Simple Sed706008 +Node: Igawk Program709070 +Ref: Igawk Program-Footnote-1724227 +Ref: Igawk Program-Footnote-2724428 +Node: Anagram Program724566 +Node: Signature Program727634 +Node: Advanced Features728734 +Node: Nondecimal Data730620 +Node: Array Sorting732203 +Node: Controlling Array Traversal732900 +Node: Array Sorting Functions741184 +Ref: Array Sorting Functions-Footnote-1745053 +Node: Two-way I/O745247 +Ref: Two-way I/O-Footnote-1750679 +Node: TCP/IP Networking750761 +Node: Profiling753605 +Node: Internationalization761108 +Node: I18N and L10N762533 +Node: Explaining gettext763219 +Ref: Explaining gettext-Footnote-1768287 +Ref: Explaining gettext-Footnote-2768471 +Node: Programmer i18n768636 +Node: Translator i18n772838 +Node: String Extraction773632 +Ref: String Extraction-Footnote-1774593 +Node: Printf Ordering774679 +Ref: Printf Ordering-Footnote-1777461 +Node: I18N Portability777525 +Ref: I18N Portability-Footnote-1779974 +Node: I18N Example780037 +Ref: I18N Example-Footnote-1782675 +Node: Gawk I18N782747 +Node: Debugger783368 +Node: Debugging784339 +Node: Debugging Concepts784772 +Node: Debugging Terms786628 +Node: Awk Debugging789225 +Node: Sample Debugging Session790117 +Node: Debugger Invocation790637 +Node: Finding The Bug791970 +Node: List of Debugger Commands798457 +Node: Breakpoint Control799791 +Node: Debugger Execution Control803455 +Node: Viewing And Changing Data806815 +Node: Execution Stack810171 +Node: Debugger Info811638 +Node: Miscellaneous Debugger Commands815620 +Node: Readline Support820796 +Node: Limitations821627 +Node: Arbitrary Precision Arithmetic823879 +Ref: Arbitrary Precision Arithmetic-Footnote-1825528 +Node: General Arithmetic825676 +Node: Floating Point Issues827396 +Node: String Conversion Precision828277 +Ref: String Conversion Precision-Footnote-1829982 +Node: Unexpected Results830091 +Node: POSIX Floating Point Problems832244 +Ref: POSIX Floating Point Problems-Footnote-1836069 +Node: Integer Programming836107 +Node: Floating-point Programming837846 +Ref: Floating-point Programming-Footnote-1844177 +Ref: Floating-point Programming-Footnote-2844447 +Node: Floating-point Representation844711 +Node: Floating-point Context845876 +Ref: table-ieee-formats846715 +Node: Rounding Mode848099 +Ref: table-rounding-modes848578 +Ref: Rounding Mode-Footnote-1851593 +Node: Gawk and MPFR851772 +Node: Arbitrary Precision Floats853027 +Ref: Arbitrary Precision Floats-Footnote-1855470 +Node: Setting Precision855786 +Ref: table-predefined-precision-strings856472 +Node: Setting Rounding Mode858617 +Ref: table-gawk-rounding-modes859021 +Node: Floating-point Constants860208 +Node: Changing Precision861637 +Ref: Changing Precision-Footnote-1863034 +Node: Exact Arithmetic863208 +Node: Arbitrary Precision Integers866346 +Ref: Arbitrary Precision Integers-Footnote-1869361 +Node: Dynamic Extensions869508 +Node: Extension Intro870966 +Node: Plugin License872231 +Node: Extension Mechanism Outline872916 +Ref: load-extension873333 +Ref: load-new-function874811 +Ref: call-new-function875806 +Node: Extension API Description877821 +Node: Extension API Functions Introduction879108 +Node: General Data Types884035 +Ref: General Data Types-Footnote-1889730 +Node: Requesting Values890029 +Ref: table-value-types-returned890766 +Node: Memory Allocation Functions891720 +Ref: Memory Allocation Functions-Footnote-1894466 +Node: Constructor Functions894562 +Node: Registration Functions896320 +Node: Extension Functions897005 +Node: Exit Callback Functions899307 +Node: Extension Version String900556 +Node: Input Parsers901206 +Node: Output Wrappers910963 +Node: Two-way processors915473 +Node: Printing Messages917681 +Ref: Printing Messages-Footnote-1918758 +Node: Updating `ERRNO'918910 +Node: Accessing Parameters919649 +Node: Symbol Table Access920879 +Node: Symbol table by name921393 +Node: Symbol table by cookie923369 +Ref: Symbol table by cookie-Footnote-1927501 +Node: Cached values927564 +Ref: Cached values-Footnote-1931054 +Node: Array Manipulation931145 +Ref: Array Manipulation-Footnote-1932243 +Node: Array Data Types932282 +Ref: Array Data Types-Footnote-1934985 +Node: Array Functions935077 +Node: Flattening Arrays938913 +Node: Creating Arrays945765 +Node: Extension API Variables950490 +Node: Extension Versioning951126 +Node: Extension API Informational Variables953027 +Node: Extension API Boilerplate954113 +Node: Finding Extensions957917 +Node: Extension Example958477 +Node: Internal File Description959207 +Node: Internal File Ops963298 +Ref: Internal File Ops-Footnote-1974807 +Node: Using Internal File Ops974947 +Ref: Using Internal File Ops-Footnote-1977300 +Node: Extension Samples977566 +Node: Extension Sample File Functions979090 +Node: Extension Sample Fnmatch987575 +Node: Extension Sample Fork989344 +Node: Extension Sample Inplace990557 +Node: Extension Sample Ord992335 +Node: Extension Sample Readdir993171 +Node: Extension Sample Revout994703 +Node: Extension Sample Rev2way995296 +Node: Extension Sample Read write array995986 +Node: Extension Sample Readfile997869 +Node: Extension Sample API Tests998969 +Node: Extension Sample Time999494 +Node: gawkextlib1000858 +Node: Language History1003639 +Node: V7/SVR3.11005232 +Node: SVR41007552 +Node: POSIX1008994 +Node: BTL1010380 +Node: POSIX/GNU1011114 +Node: Feature History1016713 +Node: Common Extensions1029689 +Node: Ranges and Locales1031001 +Ref: Ranges and Locales-Footnote-11035618 +Ref: Ranges and Locales-Footnote-21035645 +Ref: Ranges and Locales-Footnote-31035879 +Node: Contributors1036100 +Node: Installation1041481 +Node: Gawk Distribution1042375 +Node: Getting1042859 +Node: Extracting1043685 +Node: Distribution contents1045377 +Node: Unix Installation1051082 +Node: Quick Installation1051699 +Node: Additional Configuration Options1054145 +Node: Configuration Philosophy1055881 +Node: Non-Unix Installation1058235 +Node: PC Installation1058693 +Node: PC Binary Installation1059992 +Node: PC Compiling1061840 +Node: PC Testing1064784 +Node: PC Using1065960 +Node: Cygwin1070128 +Node: MSYS1070937 +Node: VMS Installation1071451 +Node: VMS Compilation1072215 +Ref: VMS Compilation-Footnote-11073467 +Node: VMS Dynamic Extensions1073525 +Node: VMS Installation Details1074898 +Node: VMS Running1077149 +Node: VMS GNV1079983 +Node: VMS Old Gawk1080706 +Node: Bugs1081176 +Node: Other Versions1085094 +Node: Notes1091178 +Node: Compatibility Mode1091978 +Node: Additions1092761 +Node: Accessing The Source1093688 +Node: Adding Code1095128 +Node: New Ports1101173 +Node: Derived Files1105308 +Ref: Derived Files-Footnote-11110629 +Ref: Derived Files-Footnote-21110663 +Ref: Derived Files-Footnote-31111263 +Node: Future Extensions1111361 +Node: Implementation Limitations1111944 +Node: Extension Design1113196 +Node: Old Extension Problems1114350 +Ref: Old Extension Problems-Footnote-11115858 +Node: Extension New Mechanism Goals1115915 +Ref: Extension New Mechanism Goals-Footnote-11119280 +Node: Extension Other Design Decisions1119466 +Node: Extension Future Growth1121572 +Node: Old Extension Mechanism1122408 +Node: Basic Concepts1124148 +Node: Basic High Level1124829 +Ref: figure-general-flow1125101 +Ref: figure-process-flow1125700 +Ref: Basic High Level-Footnote-11128929 +Node: Basic Data Typing1129114 +Node: Glossary1132469 +Node: Copying1157700 +Node: GNU Free Documentation License1195256 +Node: Index1220392  End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 22230d10..b6af32e5 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -116,11 +116,19 @@ @end ifnottex @ifnottex +@ifnotdocbook @macro ii{text} @i{\text\} @end macro +@end ifnotdocbook @end ifnottex +@ifdocbook +@macro ii{text} +@inlineraw{docbook,\text\} +@end macro +@end ifdocbook + @c For HTML, spell out email addresses, to avoid problems with @c address harvesters for spammers. @ifhtml @@ -176,6 +184,10 @@ Some comments on the layout for TeX. @syncodeindex fn cp @syncodeindex vr cp @end ifxml +@ifdocbook +@synindex fn cp +@synindex vr cp +@end ifdocbook @c If "finalout" is commented out, the printed output will show @c black boxes that mark lines that are too long. Thus, it is @@ -187,10 +199,26 @@ Some comments on the layout for TeX. @end iftex @copying -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012, 2013, -2014 +@docbook +Published by: + +Free Software Foundation +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301 USA +Phone: +1-617-542-5942 +Fax: +1-617-542-2652 +Email: gnu@@gnu.org +URL: http://www.gnu.org/ + +Copyright © 1989, 1991, 1992, 1993, 1996–2005, 2007, 2009–2014 +Free Software Foundation, Inc. +All Rights Reserved. +@end docbook + +@ifnotdocbook +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2014 @* Free Software Foundation, Inc. +@end ifnotdocbook @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -238,6 +266,7 @@ supports it in developing GNU and promoting software freedom.'' @subtitle @value{UPDATE-MONTH} @author Arnold D. Robbins +@ifnotdocbook @c Include the Distribution inside the titlepage environment so @c that headings are turned off. Headings on and off do not work. @@ -262,6 +291,7 @@ URL: @uref{http://www.gnu.org/} @* ISBN 1-882114-28-0 @* @sp 2 @insertcopying +@end ifnotdocbook @end titlepage @c Thanks to Bob Chassell for directions on doing dedications. @@ -286,6 +316,18 @@ ISBN 1-882114-28-0 @* @headings on @end iftex +@docbook + + +To Miriam, for making me complete. +To Chana, for the joy you bring us. +To Rivka, for the exponential increase. +To Nachum, for the added dimension. +To Malka, for the new beginning. + + +@end docbook + @iftex @headings off @evenheading @thispage@ @ @ @strong{@value{TITLE}} @| @| @@ -294,6 +336,7 @@ ISBN 1-882114-28-0 @* @ifnottex @ifnotxml +@ifnotdocbook @node Top @top General Introduction @c Preface node should come right after the Top @@ -305,6 +348,7 @@ particular records in a file and perform operations upon them. @insertcopying +@end ifnotdocbook @end ifnotxml @end ifnottex @@ -1001,21 +1045,37 @@ and the AWK prototype becomes the product. The new @command{pgawk} (profiling @command{gawk}), produces program execution counts. I recently experimented with an algorithm that for -@math{n} lines of input, exhibited +@ifnotdocbook +@math{n} +@end ifnotdocbook +@ifdocbook +@i{n} +@end ifdocbook +lines of input, exhibited @tex $\sim\! Cn^2$ @end tex @ifnottex +@ifnotdocbook ~ C n^2 +@end ifnotdocbook @end ifnottex +@docbook +∼ Cn2  +@end docbook performance, while theory predicted @tex $\sim\! Cn\log n$ @end tex @ifnottex +@ifnotdocbook ~ C n log n +@end ifnotdocbook @end ifnottex +@docbook +∼ Cn log n  +@end docbook behavior. A few minutes poring over the @file{awkprof.out} profile pinpointed the problem to a single line of code. @command{pgawk} is a welcome addition to @@ -3176,10 +3236,19 @@ There are two ways to run @command{awk}---with an explicit program or with one or more program files. Here are templates for both of them; items enclosed in [@dots{}] in these templates are optional: +@ifnotdocbook @example awk @r{[@var{options}]} -f progfile @r{[@code{--}]} @var{file} @dots{} awk @r{[@var{options}]} @r{[@code{--}]} '@var{program}' @var{file} @dots{} @end example +@end ifnotdocbook + +@c FIXME - find a better way to mark this up in docbook +@docbook +awk [options] -f progfile [--] file … +awk [options] [--] 'program' file … + +@end docbook @cindex GNU long options @cindex long options @@ -17225,7 +17294,18 @@ it is the number of seconds since 1970-01-01 00:00:00 UTC, not counting leap seconds.@footnote{@xref{Glossary}, especially the entries ``Epoch'' and ``UTC.''} All known POSIX-compliant systems support timestamps from 0 through -@math{2^{31} - 1}, which is sufficient to represent times through +@iftex +@math{2^{31} - 1}, +@end iftex +@ifnottex +@ifnotdocbook +2^31 - 1, +@end ifnotdocbook +@end ifnottex +@docbook +231 − 1,  +@end docbook +which is sufficient to represent times through 2038-01-19 03:14:07 UTC. Many systems support a wider range of timestamps, including negative timestamps that represent times before the epoch. @@ -27574,15 +27654,16 @@ Without any argument, set a breakpoint at the next instruction to be executed in the selected stack frame. Arguments can be one of the following: +@c @asis for docbook @c nested table -@table @var -@item n +@table @asis +@item @var{n} Set a breakpoint at line number @var{n} in the current source file. -@item filename@code{:}n +@item @var{filename}@code{:}@var{n} Set a breakpoint at line number @var{n} in source file @var{filename}. -@item function +@item @var{function} Set a breakpoint at entry to (the first instruction of) function @var{function}. @end table @@ -27607,14 +27688,14 @@ a breakpoint, this deletes that breakpoint so that the program does not stop at that location again. Arguments can be one of the following: @c nested table -@table @var -@item n +@table @asis +@item @var{n} Delete breakpoint(s) set at line number @var{n} in the current source file. -@item filename@code{:}n +@item @var{filename}@code{:}@var{n} Delete breakpoint(s) set at line number @var{n} in source file @var{filename}. -@item function +@item @var{function} Delete breakpoint(s) set at entry to function @var{function}. @end table @@ -28216,8 +28297,8 @@ about the command @var{command}. @cindex debugger commands, @code{list} @cindex @code{list} debugger command @cindex @code{l} debugger command (alias for @code{list}) -@item @code{list} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}--@var{m} | @var{function}] -@itemx @code{l} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}--@var{m} | @var{function}] +@item @code{list} [@code{-} | @code{+} | @var{n} | @var{filename}@code{:}@var{n} | @var{n}--@var{m} | @var{function}] +@itemx @code{l} [@code{-} | @code{+} | @var{n} | @var{filename}@code{:}@var{n} | @var{n}--@var{m} | @var{function}] Print the specified lines (default 15) from the current source file or the file named @var{filename}. The possible arguments to @code{list} are as follows: @@ -28237,7 +28318,7 @@ Print lines centered around line number @var{n}. @item @var{n}--@var{m} Print lines from @var{n} to @var{m}. -@item @var{filename@code{:}n} +@item @var{filename}@code{:}@var{n} Print lines centered around line number @var{n} in source file @var{filename}. This command may change the current source file. @@ -28707,23 +28788,38 @@ then the answer is @math{2^{53}}. @end iftex @ifnottex +@ifnotdocbook 2^53. +@end ifnotdocbook @end ifnottex +@docbook +253.  +@end docbook The next representable number is the even number @iftex @math{2^{53} + 2}, @end iftex @ifnottex +@ifnotdocbook 2^53 + 2, +@end ifnotdocbook @end ifnottex +@docbook +253 + 2, +@end docbook meaning it is unlikely that you will be able to make @command{gawk} print @iftex @math{2^{53} + 1} @end iftex @ifnottex +@ifnotdocbook 2^53 + 1 +@end ifnotdocbook @end ifnottex +@docbook +253 + 1  +@end docbook in integer format. The range of integers exactly representable by a 64-bit double is @@ -28731,8 +28827,13 @@ is @math{[-2^{53}, 2^{53}]}. @end iftex @ifnottex +@ifnotdocbook [@minus{}2^53, 2^53]. +@end ifnotdocbook @end ifnottex +@docbook +[−253, 253].  +@end docbook If you ever see an integer outside this range in @command{awk} using 64-bit doubles, you have reason to be very suspicious about the accuracy of the output. Here is a simple program with erroneous output: @@ -28956,8 +29057,13 @@ number is then @math{s @cdot 2^e}. @end iftex @ifnottex +@ifnotdocbook @var{s * 2^e}. +@end ifnotdocbook @end ifnottex +@docbook +s ċ 2e.  +@end docbook The first bit of a non-zero binary significand is always one, so the significand in an IEEE-754 format only includes the fractional part, leaving the leading one implicit. @@ -29200,8 +29306,13 @@ numbers are not implemented.} (@math{emax = 2^{30} - 1, emin = -emax}) @end iftex @ifnottex +@ifnotdocbook (@var{emax} = 2^30 @minus{} 1, @var{emin} = @minus{}@var{emax}) +@end ifnotdocbook @end ifnottex +@docbook +(emax = 230 − 1, emin = −emax)  +@end docbook for all floating-point contexts. There is no explicit mechanism to adjust the exponent range. MPFR does not implement subnormal numbers by default, @@ -29273,8 +29384,15 @@ formula: @math{prec = 3.322 @cdot dps} @end iftex @ifnottex +@ifnotdocbook @var{prec} = 3.322 * @var{dps} +@end ifnotdocbook @end ifnottex +@docbook + +prec = 3.322 ċ dps + +@end docbook @noindent Here, @var{prec} denotes the binary precision @@ -29674,8 +29792,14 @@ Communication between @command{gawk} and an extension is two-way. First, when an extension is loaded, it is passed a pointer to a @code{struct} whose fields are function pointers. +@ifnotdocbook This is shown in @ref{load-extension}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,load-extension @caption{Loading The Extension} @c FIXME: One day, it should not be necessary to have two cases, @@ -29688,13 +29812,27 @@ This is shown in @ref{load-extension}. @center @image{api-figure1, , , Loading the extension} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Loading the extension + +
+@end docbook The extension can call functions inside @command{gawk} through these function pointers, at runtime, without needing (link-time) access to @command{gawk}'s symbols. One of these function pointers is to a function for ``registering'' new built-in functions. +@ifnotdocbook This is shown in @ref{load-new-function}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docboook, }. +@end ifdocbook +@ifnotdocbook @float Figure,load-new-function @caption{Loading The New Function} @ifinfo @@ -29704,14 +29842,28 @@ This is shown in @ref{load-new-function}. @center @image{api-figure2, , , Loading the new function} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Loading the new function + +
+@end docbook In the other direction, the extension registers its new functions with @command{gawk} by passing function pointers to the functions that provide the new feature (@code{do_chdir()}, for example). @command{gawk} associates the function pointer with a name and can then call it, using a defined calling convention. +@ifnotdocbook This is shown in @ref{call-new-function}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,call-new-function @caption{Calling The New Function} @ifinfo @@ -29721,6 +29873,14 @@ This is shown in @ref{call-new-function}. @center @image{api-figure3, , , Calling the new function} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Calling The New Function + +
+@end docbook The @code{do_@var{xxx}()} function, in turn, then uses the function pointers in the API @code{struct} to do its work, such as updating @@ -30094,7 +30254,94 @@ print an error message, or reissue the request for the actual value type, as appropriate. This behavior is summarized in @ref{table-value-types-returned}. +@c FIXME: Try to do this with spans... +@ifdocbook +@anchor{table-value-types-returned} +@end ifdocbook +@docbook + + + + + Type of Actual Value: + + + + + + + + + + + + + + + + + String + Number + Array + Undefined + + + + + + String + String + String + false + false + + + + Number + Number if can be converted, else false + Number + false + false + + + Type + Array + false + false + Array + false + + + Requested: + Scalar + Scalar + Scalar + false + false + + + + Undefined + String + Number + Array + Undefined + + + + Value Cookie + false + false + false + false + + + + +@end docbook + @ifnotplaintext +@ifnotdocbook @float Table,table-value-types-returned @caption{Value Types Returned} @multitable @columnfractions .50 .50 @@ -30110,6 +30357,7 @@ value type, as appropriate. This behavior is summarized in @item @tab @b{Value Cookie} @tab false @tab false @tab false @tab false @end multitable @end float +@end ifnotdocbook @end ifnotplaintext @ifplaintext @float Table,table-value-types-returned @@ -36266,22 +36514,23 @@ authoritative if it conflicts with this @value{DOCUMENT}. The people maintaining the non-Unix ports of @command{gawk} are as follows: -@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} +@c put the index entries outside the table, for docbook @cindex Deifik, Scott +@cindex Zaretskii, Eli +@cindex Buening, Andreas +@cindex Rankin, Pat +@cindex Malmberg, John +@cindex Pitts, Dave +@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} @item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net}. -@cindex Zaretskii, Eli @item MS-Windows with MINGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org}. -@cindex Buening, Andreas @item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de}. -@cindex Rankin, Pat -@cindex Malmberg, John @item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com}, and John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}. -@cindex Pitts, Dave @item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}. @end multitable @@ -37432,8 +37681,15 @@ other introductory texts that you should refer to instead.) @cindex processing data At the most basic level, the job of a program is to process -some input data and produce results. See @ref{figure-general-flow}. +some input data and produce results. +@ifnotdocbook +See @ref{figure-general-flow}. +@end ifnotdocbook +@ifdocbook +See @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,figure-general-flow @caption{General Program Flow} @ifinfo @@ -37443,6 +37699,14 @@ some input data and produce results. See @ref{figure-general-flow}. @center @image{general-program, , , General program flow} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+General Program Flow + +
+@end docbook @cindex compiled programs @cindex interpreted programs @@ -37458,9 +37722,15 @@ instructions in your program to process the data. @cindex programming, basic steps When you write a program, it usually consists -of the following, very basic set of steps, as shown -in @ref{figure-process-flow}: +of the following, very basic set of steps, +@ifnotdocbook +as shown in @ref{figure-process-flow}: +@end ifnotdocbook +@ifdocbook +as shown in @inlineraw{docbook }: +@end ifdocbook +@ifnotdocbook @float Figure,figure-process-flow @caption{Basic Program Steps} @ifinfo @@ -37470,6 +37740,14 @@ in @ref{figure-process-flow}: @center @image{process-flow, , , Basic Program Stages} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Basic Program Stages + +
+@end docbook @table @asis @item Initialization @@ -37946,7 +38224,7 @@ ordinary expression. It could be a string constant, such as (@xref{Computed Regexps}.) @item Environment -A collection of strings, of the form @var{name@code{=}val}, that each +A collection of strings, of the form @var{name}@code{=}@code{val}, that each program has available to it. Users generally place values into the environment in order to provide information to various programs. Typical examples are the environment variables @env{HOME} and @env{PATH}. @@ -38402,7 +38680,12 @@ record or a string. @c The GNU General Public License. @node Copying @unnumbered GNU General Public License +@ifnotdocbook @center Version 3, 29 June 2007 +@end ifnotdocbook +@docbook +Version 3, 29 June 2007 +@end docbook @c This file is intended to be included within another document, @c hence no sectioning command or @node. @@ -39127,10 +39410,17 @@ first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. @c The GNU Free Documentation License. @node GNU Free Documentation License @unnumbered GNU Free Documentation License +@ifnotdocbook +@center Version 1.3, 3 November 2008 +@end ifnotdocbook + +@docbook +Version 1.3, 3 November 2008 +@end docbook + @cindex FDL (Free Documentation License) @cindex Free Documentation License (FDL) @cindex GNU Free Documentation License -@center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @@ -39635,8 +39925,10 @@ to permit their use in free software. @c ispell-local-pdict: "ispell-dict" @c End: +@ifnotdocbook @node Index @unnumbered Index +@end ifnotdocbook @printindex cp @bye diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 74920586..8b0ddda0 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -111,11 +111,19 @@ @end ifnottex @ifnottex +@ifnotdocbook @macro ii{text} @i{\text\} @end macro +@end ifnotdocbook @end ifnottex +@ifdocbook +@macro ii{text} +@inlineraw{docbook,\text\} +@end macro +@end ifdocbook + @c For HTML, spell out email addresses, to avoid problems with @c address harvesters for spammers. @ifhtml @@ -171,6 +179,10 @@ Some comments on the layout for TeX. @syncodeindex fn cp @syncodeindex vr cp @end ifxml +@ifdocbook +@synindex fn cp +@synindex vr cp +@end ifdocbook @c If "finalout" is commented out, the printed output will show @c black boxes that mark lines that are too long. Thus, it is @@ -182,10 +194,26 @@ Some comments on the layout for TeX. @end iftex @copying -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012, 2013, -2014 +@docbook +Published by: + +Free Software Foundation +51 Franklin Street, Fifth Floor +Boston, MA 02110-1301 USA +Phone: +1-617-542-5942 +Fax: +1-617-542-2652 +Email: gnu@@gnu.org +URL: http://www.gnu.org/ + +Copyright © 1989, 1991, 1992, 1993, 1996–2005, 2007, 2009–2014 +Free Software Foundation, Inc. +All Rights Reserved. +@end docbook + +@ifnotdocbook +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996--2005, 2007, 2009--2014 @* Free Software Foundation, Inc. +@end ifnotdocbook @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -233,6 +261,7 @@ supports it in developing GNU and promoting software freedom.'' @subtitle @value{UPDATE-MONTH} @author Arnold D. Robbins +@ifnotdocbook @c Include the Distribution inside the titlepage environment so @c that headings are turned off. Headings on and off do not work. @@ -257,6 +286,7 @@ URL: @uref{http://www.gnu.org/} @* ISBN 1-882114-28-0 @* @sp 2 @insertcopying +@end ifnotdocbook @end titlepage @c Thanks to Bob Chassell for directions on doing dedications. @@ -281,6 +311,18 @@ ISBN 1-882114-28-0 @* @headings on @end iftex +@docbook + + +To Miriam, for making me complete. +To Chana, for the joy you bring us. +To Rivka, for the exponential increase. +To Nachum, for the added dimension. +To Malka, for the new beginning. + + +@end docbook + @iftex @headings off @evenheading @thispage@ @ @ @strong{@value{TITLE}} @| @| @@ -289,6 +331,7 @@ ISBN 1-882114-28-0 @* @ifnottex @ifnotxml +@ifnotdocbook @node Top @top General Introduction @c Preface node should come right after the Top @@ -300,6 +343,7 @@ particular records in a file and perform operations upon them. @insertcopying +@end ifnotdocbook @end ifnotxml @end ifnottex @@ -996,21 +1040,37 @@ and the AWK prototype becomes the product. The new @command{pgawk} (profiling @command{gawk}), produces program execution counts. I recently experimented with an algorithm that for -@math{n} lines of input, exhibited +@ifnotdocbook +@math{n} +@end ifnotdocbook +@ifdocbook +@i{n} +@end ifdocbook +lines of input, exhibited @tex $\sim\! Cn^2$ @end tex @ifnottex +@ifnotdocbook ~ C n^2 +@end ifnotdocbook @end ifnottex +@docbook +∼ Cn2  +@end docbook performance, while theory predicted @tex $\sim\! Cn\log n$ @end tex @ifnottex +@ifnotdocbook ~ C n log n +@end ifnotdocbook @end ifnottex +@docbook +∼ Cn log n  +@end docbook behavior. A few minutes poring over the @file{awkprof.out} profile pinpointed the problem to a single line of code. @command{pgawk} is a welcome addition to @@ -3104,10 +3164,19 @@ There are two ways to run @command{awk}---with an explicit program or with one or more program files. Here are templates for both of them; items enclosed in [@dots{}] in these templates are optional: +@ifnotdocbook @example awk @r{[@var{options}]} -f progfile @r{[@code{--}]} @var{file} @dots{} awk @r{[@var{options}]} @r{[@code{--}]} '@var{program}' @var{file} @dots{} @end example +@end ifnotdocbook + +@c FIXME - find a better way to mark this up in docbook +@docbook +awk [options] -f progfile [--] file … +awk [options] [--] 'program' file … + +@end docbook @cindex GNU long options @cindex long options @@ -16395,7 +16464,18 @@ it is the number of seconds since 1970-01-01 00:00:00 UTC, not counting leap seconds.@footnote{@xref{Glossary}, especially the entries ``Epoch'' and ``UTC.''} All known POSIX-compliant systems support timestamps from 0 through -@math{2^{31} - 1}, which is sufficient to represent times through +@iftex +@math{2^{31} - 1}, +@end iftex +@ifnottex +@ifnotdocbook +2^31 - 1, +@end ifnotdocbook +@end ifnottex +@docbook +231 − 1,  +@end docbook +which is sufficient to represent times through 2038-01-19 03:14:07 UTC. Many systems support a wider range of timestamps, including negative timestamps that represent times before the epoch. @@ -26715,15 +26795,16 @@ Without any argument, set a breakpoint at the next instruction to be executed in the selected stack frame. Arguments can be one of the following: +@c @asis for docbook @c nested table -@table @var -@item n +@table @asis +@item @var{n} Set a breakpoint at line number @var{n} in the current source file. -@item filename@code{:}n +@item @var{filename}@code{:}@var{n} Set a breakpoint at line number @var{n} in source file @var{filename}. -@item function +@item @var{function} Set a breakpoint at entry to (the first instruction of) function @var{function}. @end table @@ -26748,14 +26829,14 @@ a breakpoint, this deletes that breakpoint so that the program does not stop at that location again. Arguments can be one of the following: @c nested table -@table @var -@item n +@table @asis +@item @var{n} Delete breakpoint(s) set at line number @var{n} in the current source file. -@item filename@code{:}n +@item @var{filename}@code{:}@var{n} Delete breakpoint(s) set at line number @var{n} in source file @var{filename}. -@item function +@item @var{function} Delete breakpoint(s) set at entry to function @var{function}. @end table @@ -27357,8 +27438,8 @@ about the command @var{command}. @cindex debugger commands, @code{list} @cindex @code{list} debugger command @cindex @code{l} debugger command (alias for @code{list}) -@item @code{list} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}--@var{m} | @var{function}] -@itemx @code{l} [@code{-} | @code{+} | @var{n} | @var{filename@code{:}n} | @var{n}--@var{m} | @var{function}] +@item @code{list} [@code{-} | @code{+} | @var{n} | @var{filename}@code{:}@var{n} | @var{n}--@var{m} | @var{function}] +@itemx @code{l} [@code{-} | @code{+} | @var{n} | @var{filename}@code{:}@var{n} | @var{n}--@var{m} | @var{function}] Print the specified lines (default 15) from the current source file or the file named @var{filename}. The possible arguments to @code{list} are as follows: @@ -27378,7 +27459,7 @@ Print lines centered around line number @var{n}. @item @var{n}--@var{m} Print lines from @var{n} to @var{m}. -@item @var{filename@code{:}n} +@item @var{filename}@code{:}@var{n} Print lines centered around line number @var{n} in source file @var{filename}. This command may change the current source file. @@ -27848,23 +27929,38 @@ then the answer is @math{2^{53}}. @end iftex @ifnottex +@ifnotdocbook 2^53. +@end ifnotdocbook @end ifnottex +@docbook +253.  +@end docbook The next representable number is the even number @iftex @math{2^{53} + 2}, @end iftex @ifnottex +@ifnotdocbook 2^53 + 2, +@end ifnotdocbook @end ifnottex +@docbook +253 + 2, +@end docbook meaning it is unlikely that you will be able to make @command{gawk} print @iftex @math{2^{53} + 1} @end iftex @ifnottex +@ifnotdocbook 2^53 + 1 +@end ifnotdocbook @end ifnottex +@docbook +253 + 1  +@end docbook in integer format. The range of integers exactly representable by a 64-bit double is @@ -27872,8 +27968,13 @@ is @math{[-2^{53}, 2^{53}]}. @end iftex @ifnottex +@ifnotdocbook [@minus{}2^53, 2^53]. +@end ifnotdocbook @end ifnottex +@docbook +[−253, 253].  +@end docbook If you ever see an integer outside this range in @command{awk} using 64-bit doubles, you have reason to be very suspicious about the accuracy of the output. Here is a simple program with erroneous output: @@ -28097,8 +28198,13 @@ number is then @math{s @cdot 2^e}. @end iftex @ifnottex +@ifnotdocbook @var{s * 2^e}. +@end ifnotdocbook @end ifnottex +@docbook +s ċ 2e.  +@end docbook The first bit of a non-zero binary significand is always one, so the significand in an IEEE-754 format only includes the fractional part, leaving the leading one implicit. @@ -28341,8 +28447,13 @@ numbers are not implemented.} (@math{emax = 2^{30} - 1, emin = -emax}) @end iftex @ifnottex +@ifnotdocbook (@var{emax} = 2^30 @minus{} 1, @var{emin} = @minus{}@var{emax}) +@end ifnotdocbook @end ifnottex +@docbook +(emax = 230 − 1, emin = −emax)  +@end docbook for all floating-point contexts. There is no explicit mechanism to adjust the exponent range. MPFR does not implement subnormal numbers by default, @@ -28414,8 +28525,15 @@ formula: @math{prec = 3.322 @cdot dps} @end iftex @ifnottex +@ifnotdocbook @var{prec} = 3.322 * @var{dps} +@end ifnotdocbook @end ifnottex +@docbook + +prec = 3.322 ċ dps + +@end docbook @noindent Here, @var{prec} denotes the binary precision @@ -28815,8 +28933,14 @@ Communication between @command{gawk} and an extension is two-way. First, when an extension is loaded, it is passed a pointer to a @code{struct} whose fields are function pointers. +@ifnotdocbook This is shown in @ref{load-extension}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,load-extension @caption{Loading The Extension} @c FIXME: One day, it should not be necessary to have two cases, @@ -28829,13 +28953,27 @@ This is shown in @ref{load-extension}. @center @image{api-figure1, , , Loading the extension} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Loading the extension + +
+@end docbook The extension can call functions inside @command{gawk} through these function pointers, at runtime, without needing (link-time) access to @command{gawk}'s symbols. One of these function pointers is to a function for ``registering'' new built-in functions. +@ifnotdocbook This is shown in @ref{load-new-function}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docboook, }. +@end ifdocbook +@ifnotdocbook @float Figure,load-new-function @caption{Loading The New Function} @ifinfo @@ -28845,14 +28983,28 @@ This is shown in @ref{load-new-function}. @center @image{api-figure2, , , Loading the new function} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Loading the new function + +
+@end docbook In the other direction, the extension registers its new functions with @command{gawk} by passing function pointers to the functions that provide the new feature (@code{do_chdir()}, for example). @command{gawk} associates the function pointer with a name and can then call it, using a defined calling convention. +@ifnotdocbook This is shown in @ref{call-new-function}. +@end ifnotdocbook +@ifdocbook +This is shown in @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,call-new-function @caption{Calling The New Function} @ifinfo @@ -28862,6 +29014,14 @@ This is shown in @ref{call-new-function}. @center @image{api-figure3, , , Calling the new function} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Calling The New Function + +
+@end docbook The @code{do_@var{xxx}()} function, in turn, then uses the function pointers in the API @code{struct} to do its work, such as updating @@ -29235,7 +29395,94 @@ print an error message, or reissue the request for the actual value type, as appropriate. This behavior is summarized in @ref{table-value-types-returned}. +@c FIXME: Try to do this with spans... +@ifdocbook +@anchor{table-value-types-returned} +@end ifdocbook +@docbook + + + + + Type of Actual Value: + + + + + + + + + + + + + + + + + String + Number + Array + Undefined + + + + + + String + String + String + false + false + + + + Number + Number if can be converted, else false + Number + false + false + + + Type + Array + false + false + Array + false + + + Requested: + Scalar + Scalar + Scalar + false + false + + + + Undefined + String + Number + Array + Undefined + + + + Value Cookie + false + false + false + false + + + + +@end docbook + @ifnotplaintext +@ifnotdocbook @float Table,table-value-types-returned @caption{Value Types Returned} @multitable @columnfractions .50 .50 @@ -29251,6 +29498,7 @@ value type, as appropriate. This behavior is summarized in @item @tab @b{Value Cookie} @tab false @tab false @tab false @tab false @end multitable @end float +@end ifnotdocbook @end ifnotplaintext @ifplaintext @float Table,table-value-types-returned @@ -35407,22 +35655,23 @@ authoritative if it conflicts with this @value{DOCUMENT}. The people maintaining the non-Unix ports of @command{gawk} are as follows: -@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} +@c put the index entries outside the table, for docbook @cindex Deifik, Scott +@cindex Zaretskii, Eli +@cindex Buening, Andreas +@cindex Rankin, Pat +@cindex Malmberg, John +@cindex Pitts, Dave +@multitable {MS-Windows with MINGW} {123456789012345678901234567890123456789001234567890} @item MS-DOS with DJGPP @tab Scott Deifik, @EMAIL{scottd.mail@@sbcglobal.net,scottd dot mail at sbcglobal dot net}. -@cindex Zaretskii, Eli @item MS-Windows with MINGW @tab Eli Zaretskii, @EMAIL{eliz@@gnu.org,eliz at gnu dot org}. -@cindex Buening, Andreas @item OS/2 @tab Andreas Buening, @EMAIL{andreas.buening@@nexgo.de,andreas dot buening at nexgo dot de}. -@cindex Rankin, Pat -@cindex Malmberg, John @item VMS @tab Pat Rankin, @EMAIL{r.pat.rankin@@gmail.com,r.pat.rankin at gmail.com}, and John Malmberg, @EMAIL{wb8tyw@@qsl.net,wb8tyw at qsl.net}. -@cindex Pitts, Dave @item z/OS (OS/390) @tab Dave Pitts, @EMAIL{dpitts@@cozx.com,dpitts at cozx dot com}. @end multitable @@ -36573,8 +36822,15 @@ other introductory texts that you should refer to instead.) @cindex processing data At the most basic level, the job of a program is to process -some input data and produce results. See @ref{figure-general-flow}. +some input data and produce results. +@ifnotdocbook +See @ref{figure-general-flow}. +@end ifnotdocbook +@ifdocbook +See @inlineraw{docbook, }. +@end ifdocbook +@ifnotdocbook @float Figure,figure-general-flow @caption{General Program Flow} @ifinfo @@ -36584,6 +36840,14 @@ some input data and produce results. See @ref{figure-general-flow}. @center @image{general-program, , , General program flow} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+General Program Flow + +
+@end docbook @cindex compiled programs @cindex interpreted programs @@ -36599,9 +36863,15 @@ instructions in your program to process the data. @cindex programming, basic steps When you write a program, it usually consists -of the following, very basic set of steps, as shown -in @ref{figure-process-flow}: +of the following, very basic set of steps, +@ifnotdocbook +as shown in @ref{figure-process-flow}: +@end ifnotdocbook +@ifdocbook +as shown in @inlineraw{docbook }: +@end ifdocbook +@ifnotdocbook @float Figure,figure-process-flow @caption{Basic Program Steps} @ifinfo @@ -36611,6 +36881,14 @@ in @ref{figure-process-flow}: @center @image{process-flow, , , Basic Program Stages} @end ifnotinfo @end float +@end ifnotdocbook + +@docbook +
+Basic Program Stages + +
+@end docbook @table @asis @item Initialization @@ -37087,7 +37365,7 @@ ordinary expression. It could be a string constant, such as (@xref{Computed Regexps}.) @item Environment -A collection of strings, of the form @var{name@code{=}val}, that each +A collection of strings, of the form @var{name}@code{=}@code{val}, that each program has available to it. Users generally place values into the environment in order to provide information to various programs. Typical examples are the environment variables @env{HOME} and @env{PATH}. @@ -37543,7 +37821,12 @@ record or a string. @c The GNU General Public License. @node Copying @unnumbered GNU General Public License +@ifnotdocbook @center Version 3, 29 June 2007 +@end ifnotdocbook +@docbook +Version 3, 29 June 2007 +@end docbook @c This file is intended to be included within another document, @c hence no sectioning command or @node. @@ -38268,10 +38551,17 @@ first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. @c The GNU Free Documentation License. @node GNU Free Documentation License @unnumbered GNU Free Documentation License +@ifnotdocbook +@center Version 1.3, 3 November 2008 +@end ifnotdocbook + +@docbook +Version 1.3, 3 November 2008 +@end docbook + @cindex FDL (Free Documentation License) @cindex Free Documentation License (FDL) @cindex GNU Free Documentation License -@center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @@ -38776,8 +39066,10 @@ to permit their use in free software. @c ispell-local-pdict: "ispell-dict" @c End: +@ifnotdocbook @node Index @unnumbered Index +@end ifnotdocbook @printindex cp @bye -- cgit v1.2.1