diff options
-rw-r--r-- | awklib/eg/network/coreserv.awk | 2 | ||||
-rw-r--r-- | build-aux/ChangeLog | 4 | ||||
-rwxr-xr-x | build-aux/config.guess | 30 | ||||
-rwxr-xr-x | build-aux/config.sub | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 1 | ||||
-rw-r--r-- | doc/gawk.info | 1243 | ||||
-rw-r--r-- | doc/gawk.texi | 51 | ||||
-rw-r--r-- | doc/gawktexi.in | 51 |
8 files changed, 774 insertions, 612 deletions
diff --git a/awklib/eg/network/coreserv.awk b/awklib/eg/network/coreserv.awk index a5c8b1ed..7a17693e 100644 --- a/awklib/eg/network/coreserv.awk +++ b/awklib/eg/network/coreserv.awk @@ -58,7 +58,7 @@ BEGIN { } } -function CGI_setup( method, uri, version, i) +function CGI_setup(method, uri, version, i) { delete GETARG delete MENU diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index ed59e3db..43351a66 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -1,3 +1,7 @@ +2020-12-01 Arnold D. Robbins <arnold@skeeve.com> + + * config.guess, config.sub: Updated from GNULIB. + 2020-11-16 Arnold D. Robbins <arnold@skeeve.com> * config.guess, config.sub, install-sh: Updated from GNULIB. diff --git a/build-aux/config.guess b/build-aux/config.guess index 0fc11edb..699b3a10 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-11-07' +timestamp='2020-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ timestamp='2020-11-07' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. @@ -138,9 +138,7 @@ UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" @@ -149,16 +147,30 @@ Linux|GNU|GNU/*) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu #else #include <stdarg.h> + /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl - #else - LIBC=gnu #endif #endif EOF eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi ;; esac @@ -1638,9 +1650,9 @@ This script (version $timestamp), has failed to recognize the operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub EOF year=$(echo $timestamp | sed 's,-.*,,') diff --git a/build-aux/config.sub b/build-aux/config.sub index c874b7a9..f2ead8d2 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2020 Free Software Foundation, Inc. -timestamp='2020-11-07' +timestamp='2020-11-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ timestamp='2020-11-07' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases diff --git a/doc/ChangeLog b/doc/ChangeLog index 1ccea783..796051a5 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -2,6 +2,7 @@ * gawkinet.texi: Lots of cleanup edits. Bump the minor part of the edition. + * gawktexi.in: New section on extension philosphy. 2020-11-28 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index b7f772a2..22a15a62 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -495,6 +495,7 @@ in (a) below. A copy of the license is included in the section entitled * TCP/IP Networking:: Using 'gawk' for network programming. * Profiling:: Profiling your 'awk' programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. * I18N and L10N:: Internationalization and Localization. * Explaining gettext:: How GNU 'gettext' works. @@ -20832,6 +20833,7 @@ their own: * Two-way I/O:: Two-way communications with another process. * TCP/IP Networking:: Using 'gawk' for network programming. * Profiling:: Profiling your 'awk' programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. @@ -21551,7 +21553,7 @@ complete introduction and discussion, as well as extensive examples. this includes any web service whose URL starts with 'https://'. -File: gawk.info, Node: Profiling, Next: Advanced Features Summary, Prev: TCP/IP Networking, Up: Advanced Features +File: gawk.info, Node: Profiling, Next: Extension Philosophy, Prev: TCP/IP Networking, Up: Advanced Features 12.5 Profiling Your 'awk' Programs ================================== @@ -21813,9 +21815,46 @@ numeric constants; if you used an octal or hexadecimal value in your source code, it will appear that way in the output. -File: gawk.info, Node: Advanced Features Summary, Prev: Profiling, Up: Advanced Features +File: gawk.info, Node: Extension Philosophy, Next: Advanced Features Summary, Prev: Profiling, Up: Advanced Features -12.6 Summary +12.6 Builtin Features vs. Extensions +==================================== + +As this and subsequent major nodes show, 'gawk' has a large number of +extensions over standard 'awk' built-in to the program. These have +developed over time. More recently, the focus has moved to using the +extension mechanism (*note Dynamic Extensions::) for adding features. +This minor node discusses the "guiding philosophy" behind what should be +added to the interpreter as a built-in feature vs. what should be done +in extensions. + + There are several goals: + + 1. Keep the language 'awk'; it should not become unrecognizable, even + if programs in it will only run on 'gawk'. + + 2. Keep the core from getting any larger unless absolutely necessary. + + 3. Add new functionality either in 'awk' scripts ('-f', '@include') or + in loadable extensions written in C or C++ ('-l', '@load'). + + 4. Extend the core interpreter only if some feature is: + + A. Truly desirable. + B. Cannot be done via (2) or (3) above. + C. Can be implemented without too much pain in the core. + + Combining modules with 'awk' files is a powerful technique. Some of +the sample extensions demonstrate this. + + Loading extensions and library files should not be done +automatically, because then there's overhead that most users don't want +or need. + + +File: gawk.info, Node: Advanced Features Summary, Prev: Extension Philosophy, Up: Advanced Features + +12.7 Summary ============ * The '--non-decimal-data' option causes 'gawk' to treat octal- and @@ -21853,6 +21892,9 @@ File: gawk.info, Node: Advanced Features Summary, Prev: Profiling, Up: Advanc * You can also just "pretty-print" the program. + * New features should be developed using the extension mechansim if + possible, and added to the core interpreter only as a last resort. + File: gawk.info, Node: Internationalization, Next: Debugger, Prev: Advanced Features, Up: Top @@ -37989,603 +38031,604 @@ Index Tag Table: Node: Top1200 -Node: Foreword344553 -Node: Foreword448995 -Node: Preface50527 -Ref: Preface-Footnote-153386 -Ref: Preface-Footnote-253495 -Ref: Preface-Footnote-353729 -Node: History53871 -Node: Names56223 -Ref: Names-Footnote-157327 -Node: This Manual57474 -Ref: This Manual-Footnote-164113 -Node: Conventions64213 -Node: Manual History66582 -Ref: Manual History-Footnote-169579 -Ref: Manual History-Footnote-269620 -Node: How To Contribute69694 -Node: Acknowledgments70620 -Node: Getting Started75557 -Node: Running gawk77996 -Node: One-shot79186 -Node: Read Terminal80449 -Node: Long82442 -Node: Executable Scripts83955 -Ref: Executable Scripts-Footnote-186588 -Node: Comments86691 -Node: Quoting89175 -Node: DOS Quoting94701 -Node: Sample Data Files96757 -Node: Very Simple99352 -Node: Two Rules105454 -Node: More Complex107339 -Node: Statements/Lines109671 -Ref: Statements/Lines-Footnote-1114155 -Node: Other Features114420 -Node: When115356 -Ref: When-Footnote-1117110 -Node: Intro Summary117175 -Node: Invoking Gawk118059 -Node: Command Line119573 -Node: Options120371 -Ref: Options-Footnote-1138285 -Ref: Options-Footnote-2138516 -Node: Other Arguments138541 -Node: Naming Standard Input142552 -Node: Environment Variables143762 -Node: AWKPATH Variable144320 -Ref: AWKPATH Variable-Footnote-1147732 -Ref: AWKPATH Variable-Footnote-2147766 -Node: AWKLIBPATH Variable148137 -Ref: AWKLIBPATH Variable-Footnote-1149834 -Node: Other Environment Variables150209 -Node: Exit Status154030 -Node: Include Files154707 -Node: Loading Shared Libraries158397 -Node: Obsolete159825 -Node: Undocumented160517 -Node: Invoking Summary160814 -Node: Regexp163655 -Node: Regexp Usage165109 -Node: Escape Sequences167146 -Node: Regexp Operators173387 -Node: Regexp Operator Details173872 -Ref: Regexp Operator Details-Footnote-1180304 -Node: Interval Expressions180451 -Ref: Interval Expressions-Footnote-1181872 -Node: Bracket Expressions181970 -Ref: table-char-classes184446 -Node: Leftmost Longest187772 -Node: Computed Regexps189075 -Node: GNU Regexp Operators192502 -Node: Case-sensitivity196239 -Ref: Case-sensitivity-Footnote-1199105 -Ref: Case-sensitivity-Footnote-2199340 -Node: Regexp Summary199448 -Node: Reading Files200914 -Node: Records203183 -Node: awk split records204258 -Node: gawk split records209533 -Ref: gawk split records-Footnote-1214266 -Node: Fields214303 -Node: Nonconstant Fields217044 -Ref: Nonconstant Fields-Footnote-1219280 -Node: Changing Fields219484 -Node: Field Separators225515 -Node: Default Field Splitting228213 -Node: Regexp Field Splitting229331 -Node: Single Character Fields232684 -Node: Command Line Field Separator233744 -Node: Full Line Fields236962 -Ref: Full Line Fields-Footnote-1238484 -Ref: Full Line Fields-Footnote-2238530 -Node: Field Splitting Summary238631 -Node: Constant Size240705 -Node: Fixed width data241437 -Node: Skipping intervening244904 -Node: Allowing trailing data245702 -Node: Fields with fixed data246739 -Node: Splitting By Content248257 -Ref: Splitting By Content-Footnote-1252040 -Node: More CSV252203 -Node: Testing field creation253513 -Node: Multiple Line255138 -Node: Getline261415 -Node: Plain Getline263884 -Node: Getline/Variable266457 -Node: Getline/File267608 -Node: Getline/Variable/File268996 -Ref: Getline/Variable/File-Footnote-1270601 -Node: Getline/Pipe270689 -Node: Getline/Variable/Pipe273393 -Node: Getline/Coprocess274528 -Node: Getline/Variable/Coprocess275795 -Node: Getline Notes276537 -Node: Getline Summary279334 -Ref: table-getline-variants279758 -Node: Read Timeout280506 -Ref: Read Timeout-Footnote-1284412 -Node: Retrying Input284470 -Node: Command-line directories285669 -Node: Input Summary286575 -Node: Input Exercises289747 -Node: Printing290181 -Node: Print292015 -Node: Print Examples293472 -Node: Output Separators296252 -Node: OFMT298269 -Node: Printf299625 -Node: Basic Printf300410 -Node: Control Letters301984 -Node: Format Modifiers307146 -Node: Printf Examples313161 -Node: Redirection315647 -Node: Special FD322488 -Ref: Special FD-Footnote-1325656 -Node: Special Files325730 -Node: Other Inherited Files326347 -Node: Special Network327348 -Node: Special Caveats328208 -Node: Close Files And Pipes329157 -Ref: table-close-pipe-return-values336064 -Ref: Close Files And Pipes-Footnote-1336877 -Ref: Close Files And Pipes-Footnote-2337025 -Node: Nonfatal337177 -Node: Output Summary339515 -Node: Output Exercises340737 -Node: Expressions341416 -Node: Values342604 -Node: Constants343282 -Node: Scalar Constants343973 -Ref: Scalar Constants-Footnote-1346483 -Node: Nondecimal-numbers346733 -Node: Regexp Constants349734 -Node: Using Constant Regexps350260 -Node: Standard Regexp Constants350882 -Node: Strong Regexp Constants354070 -Node: Variables357082 -Node: Using Variables357739 -Node: Assignment Options359649 -Node: Conversion362120 -Node: Strings And Numbers362644 -Ref: Strings And Numbers-Footnote-1365707 -Node: Locale influences conversions365816 -Ref: table-locale-affects368574 -Node: All Operators369192 -Node: Arithmetic Ops369821 -Node: Concatenation372537 -Ref: Concatenation-Footnote-1375384 -Node: Assignment Ops375491 -Ref: table-assign-ops380482 -Node: Increment Ops381795 -Node: Truth Values and Conditions385255 -Node: Truth Values386329 -Node: Typing and Comparison387377 -Node: Variable Typing388197 -Ref: Variable Typing-Footnote-1394660 -Ref: Variable Typing-Footnote-2394732 -Node: Comparison Operators394809 -Ref: table-relational-ops395228 -Node: POSIX String Comparison398723 -Ref: POSIX String Comparison-Footnote-1400418 -Ref: POSIX String Comparison-Footnote-2400557 -Node: Boolean Ops400641 -Ref: Boolean Ops-Footnote-1405123 -Node: Conditional Exp405215 -Node: Function Calls406951 -Node: Precedence410828 -Node: Locales414487 -Node: Expressions Summary416119 -Node: Patterns and Actions418692 -Node: Pattern Overview419812 -Node: Regexp Patterns421489 -Node: Expression Patterns422031 -Node: Ranges425812 -Node: BEGIN/END428920 -Node: Using BEGIN/END429681 -Ref: Using BEGIN/END-Footnote-1432435 -Node: I/O And BEGIN/END432541 -Node: BEGINFILE/ENDFILE434854 -Node: Empty438085 -Node: Using Shell Variables438402 -Node: Action Overview440676 -Node: Statements443001 -Node: If Statement444849 -Node: While Statement446344 -Node: Do Statement448372 -Node: For Statement449520 -Node: Switch Statement452691 -Node: Break Statement455132 -Node: Continue Statement457224 -Node: Next Statement459051 -Node: Nextfile Statement461434 -Node: Exit Statement464123 -Node: Built-in Variables466526 -Node: User-modified467659 -Node: Auto-set475426 -Ref: Auto-set-Footnote-1492233 -Ref: Auto-set-Footnote-2492439 -Node: ARGC and ARGV492495 -Node: Pattern Action Summary496708 -Node: Arrays499138 -Node: Array Basics500467 -Node: Array Intro501311 -Ref: figure-array-elements503286 -Ref: Array Intro-Footnote-1505990 -Node: Reference to Elements506118 -Node: Assigning Elements508582 -Node: Array Example509073 -Node: Scanning an Array510832 -Node: Controlling Scanning513854 -Ref: Controlling Scanning-Footnote-1520310 -Node: Numeric Array Subscripts520626 -Node: Uninitialized Subscripts522810 -Node: Delete524429 -Ref: Delete-Footnote-1527181 -Node: Multidimensional527238 -Node: Multiscanning530333 -Node: Arrays of Arrays531924 -Node: Arrays Summary536692 -Node: Functions538785 -Node: Built-in539823 -Node: Calling Built-in540904 -Node: Numeric Functions542900 -Ref: Numeric Functions-Footnote-1546926 -Ref: Numeric Functions-Footnote-2547574 -Ref: Numeric Functions-Footnote-3547622 -Node: String Functions547894 -Ref: String Functions-Footnote-1572035 -Ref: String Functions-Footnote-2572163 -Ref: String Functions-Footnote-3572411 -Node: Gory Details572498 -Ref: table-sub-escapes574289 -Ref: table-sub-proposed575808 -Ref: table-posix-sub577171 -Ref: table-gensub-escapes578712 -Ref: Gory Details-Footnote-1579535 -Node: I/O Functions579689 -Ref: table-system-return-values586143 -Ref: I/O Functions-Footnote-1588223 -Ref: I/O Functions-Footnote-2588371 -Node: Time Functions588491 -Ref: Time Functions-Footnote-1599162 -Ref: Time Functions-Footnote-2599230 -Ref: Time Functions-Footnote-3599388 -Ref: Time Functions-Footnote-4599499 -Ref: Time Functions-Footnote-5599611 -Ref: Time Functions-Footnote-6599838 -Node: Bitwise Functions600104 -Ref: table-bitwise-ops600698 -Ref: Bitwise Functions-Footnote-1606761 -Ref: Bitwise Functions-Footnote-2606934 -Node: Type Functions607125 -Node: I18N Functions609988 -Node: User-defined611639 -Node: Definition Syntax612451 -Ref: Definition Syntax-Footnote-1618145 -Node: Function Example618216 -Ref: Function Example-Footnote-1621138 -Node: Function Calling621160 -Node: Calling A Function621748 -Node: Variable Scope622706 -Node: Pass By Value/Reference625700 -Node: Function Caveats628344 -Ref: Function Caveats-Footnote-1630391 -Node: Return Statement630511 -Node: Dynamic Typing633490 -Node: Indirect Calls634420 -Ref: Indirect Calls-Footnote-1644672 -Node: Functions Summary644800 -Node: Library Functions647505 -Ref: Library Functions-Footnote-1651112 -Ref: Library Functions-Footnote-2651255 -Node: Library Names651426 -Ref: Library Names-Footnote-1655093 -Ref: Library Names-Footnote-2655316 -Node: General Functions655402 -Node: Strtonum Function656505 -Node: Assert Function659527 -Node: Round Function662853 -Node: Cliff Random Function664393 -Node: Ordinal Functions665409 -Ref: Ordinal Functions-Footnote-1668472 -Ref: Ordinal Functions-Footnote-2668724 -Node: Join Function668934 -Ref: Join Function-Footnote-1670704 -Node: Getlocaltime Function670904 -Node: Readfile Function674646 -Node: Shell Quoting676623 -Node: Data File Management678024 -Node: Filetrans Function678656 -Node: Rewind Function682752 -Node: File Checking684661 -Ref: File Checking-Footnote-1685995 -Node: Empty Files686196 -Node: Ignoring Assigns688175 -Node: Getopt Function689725 -Ref: Getopt Function-Footnote-1704936 -Node: Passwd Functions705136 -Ref: Passwd Functions-Footnote-1713975 -Node: Group Functions714063 -Ref: Group Functions-Footnote-1721961 -Node: Walking Arrays722168 -Node: Library Functions Summary725176 -Node: Library Exercises726582 -Node: Sample Programs727047 -Node: Running Examples727817 -Node: Clones728545 -Node: Cut Program729769 -Node: Egrep Program739909 -Node: Id Program748920 -Node: Split Program758867 -Ref: Split Program-Footnote-1768757 -Node: Tee Program768930 -Node: Uniq Program771720 -Node: Wc Program779308 -Node: Bytes vs. Characters779705 -Node: Using extensions781253 -Node: wc program782007 -Node: Miscellaneous Programs786872 -Node: Dupword Program788085 -Node: Alarm Program790115 -Node: Translate Program794970 -Ref: Translate Program-Footnote-1799535 -Node: Labels Program799805 -Ref: Labels Program-Footnote-1803156 -Node: Word Sorting803240 -Node: History Sorting807312 -Node: Extract Program809537 -Node: Simple Sed817591 -Node: Igawk Program820665 -Ref: Igawk Program-Footnote-1834996 -Ref: Igawk Program-Footnote-2835198 -Ref: Igawk Program-Footnote-3835320 -Node: Anagram Program835435 -Node: Signature Program838497 -Node: Programs Summary839744 -Node: Programs Exercises840958 -Ref: Programs Exercises-Footnote-1845088 -Node: Advanced Features845174 -Node: Nondecimal Data847164 -Node: Array Sorting848755 -Node: Controlling Array Traversal849455 -Ref: Controlling Array Traversal-Footnote-1857823 -Node: Array Sorting Functions857941 -Ref: Array Sorting Functions-Footnote-1863032 -Node: Two-way I/O863228 -Ref: Two-way I/O-Footnote-1870949 -Ref: Two-way I/O-Footnote-2871136 -Node: TCP/IP Networking871218 -Node: Profiling874336 -Node: Advanced Features Summary883650 -Node: Internationalization885494 -Node: I18N and L10N886974 -Node: Explaining gettext887661 -Ref: Explaining gettext-Footnote-1893553 -Ref: Explaining gettext-Footnote-2893738 -Node: Programmer i18n893903 -Ref: Programmer i18n-Footnote-1898852 -Node: Translator i18n898901 -Node: String Extraction899695 -Ref: String Extraction-Footnote-1900827 -Node: Printf Ordering900913 -Ref: Printf Ordering-Footnote-1903699 -Node: I18N Portability903763 -Ref: I18N Portability-Footnote-1906219 -Node: I18N Example906282 -Ref: I18N Example-Footnote-1909557 -Ref: I18N Example-Footnote-2909630 -Node: Gawk I18N909739 -Node: I18N Summary910388 -Node: Debugger911729 -Node: Debugging912729 -Node: Debugging Concepts913170 -Node: Debugging Terms914979 -Node: Awk Debugging917554 -Ref: Awk Debugging-Footnote-1918499 -Node: Sample Debugging Session918631 -Node: Debugger Invocation919165 -Node: Finding The Bug920551 -Node: List of Debugger Commands927025 -Node: Breakpoint Control928358 -Node: Debugger Execution Control932052 -Node: Viewing And Changing Data935414 -Node: Execution Stack938955 -Node: Debugger Info940592 -Node: Miscellaneous Debugger Commands944663 -Node: Readline Support949725 -Node: Limitations950621 -Node: Debugging Summary953175 -Node: Namespaces954454 -Node: Global Namespace955565 -Node: Qualified Names956963 -Node: Default Namespace957962 -Node: Changing The Namespace958703 -Node: Naming Rules960317 -Node: Internal Name Management962165 -Node: Namespace Example963207 -Node: Namespace And Features965769 -Node: Namespace Summary967204 -Node: Arbitrary Precision Arithmetic968681 -Node: Computer Arithmetic970168 -Ref: table-numeric-ranges973934 -Ref: table-floating-point-ranges974427 -Ref: Computer Arithmetic-Footnote-1975085 -Node: Math Definitions975142 -Ref: table-ieee-formats978118 -Node: MPFR features978685 -Node: FP Math Caution980403 -Ref: FP Math Caution-Footnote-1981475 -Node: Inexactness of computations981844 -Node: Inexact representation982875 -Node: Comparing FP Values984235 -Node: Errors accumulate985476 -Node: Strange values986932 -Ref: Strange values-Footnote-1989520 -Node: Getting Accuracy989625 -Node: Try To Round992335 -Node: Setting precision993234 -Ref: table-predefined-precision-strings993931 -Node: Setting the rounding mode995761 -Ref: table-gawk-rounding-modes996135 -Ref: Setting the rounding mode-Footnote-11000066 -Node: Arbitrary Precision Integers1000245 -Ref: Arbitrary Precision Integers-Footnote-11003420 -Node: Checking for MPFR1003569 -Node: POSIX Floating Point Problems1005043 -Ref: POSIX Floating Point Problems-Footnote-11009328 -Node: Floating point summary1009366 -Node: Dynamic Extensions1011556 -Node: Extension Intro1013109 -Node: Plugin License1014375 -Node: Extension Mechanism Outline1015172 -Ref: figure-load-extension1015611 -Ref: figure-register-new-function1017176 -Ref: figure-call-new-function1018268 -Node: Extension API Description1020330 -Node: Extension API Functions Introduction1022043 -Ref: table-api-std-headers1023879 -Node: General Data Types1028128 -Ref: General Data Types-Footnote-11036758 -Node: Memory Allocation Functions1037057 -Ref: Memory Allocation Functions-Footnote-11041558 -Node: Constructor Functions1041657 -Node: API Ownership of MPFR and GMP Values1045123 -Node: Registration Functions1046436 -Node: Extension Functions1047136 -Node: Exit Callback Functions1052458 -Node: Extension Version String1053708 -Node: Input Parsers1054371 -Node: Output Wrappers1067092 -Node: Two-way processors1071604 -Node: Printing Messages1073869 -Ref: Printing Messages-Footnote-11075040 -Node: Updating ERRNO1075193 -Node: Requesting Values1075932 -Ref: table-value-types-returned1076669 -Node: Accessing Parameters1077605 -Node: Symbol Table Access1078842 -Node: Symbol table by name1079354 -Ref: Symbol table by name-Footnote-11082378 -Node: Symbol table by cookie1082506 -Ref: Symbol table by cookie-Footnote-11086691 -Node: Cached values1086755 -Ref: Cached values-Footnote-11090291 -Node: Array Manipulation1090444 -Ref: Array Manipulation-Footnote-11091535 -Node: Array Data Types1091572 -Ref: Array Data Types-Footnote-11094230 -Node: Array Functions1094322 -Node: Flattening Arrays1098820 -Node: Creating Arrays1105796 -Node: Redirection API1110563 -Node: Extension API Variables1113396 -Node: Extension Versioning1114107 -Ref: gawk-api-version1114536 -Node: Extension GMP/MPFR Versioning1116267 -Node: Extension API Informational Variables1117895 -Node: Extension API Boilerplate1118968 -Node: Changes from API V11122942 -Node: Finding Extensions1124514 -Node: Extension Example1125073 -Node: Internal File Description1125871 -Node: Internal File Ops1129951 -Ref: Internal File Ops-Footnote-11141301 -Node: Using Internal File Ops1141441 -Ref: Using Internal File Ops-Footnote-11143824 -Node: Extension Samples1144098 -Node: Extension Sample File Functions1145627 -Node: Extension Sample Fnmatch1153276 -Node: Extension Sample Fork1154763 -Node: Extension Sample Inplace1155981 -Node: Extension Sample Ord1159607 -Node: Extension Sample Readdir1160443 -Ref: table-readdir-file-types1161332 -Node: Extension Sample Revout1162399 -Node: Extension Sample Rev2way1162988 -Node: Extension Sample Read write array1163728 -Node: Extension Sample Readfile1165670 -Node: Extension Sample Time1166765 -Node: Extension Sample API Tests1168517 -Node: gawkextlib1169009 -Node: Extension summary1171927 -Node: Extension Exercises1175629 -Node: Language History1176871 -Node: V7/SVR3.11178527 -Node: SVR41180679 -Node: POSIX1182113 -Node: BTL1183494 -Node: POSIX/GNU1184223 -Node: Feature History1190001 -Node: Common Extensions1206320 -Node: Ranges and Locales1207603 -Ref: Ranges and Locales-Footnote-11212219 -Ref: Ranges and Locales-Footnote-21212246 -Ref: Ranges and Locales-Footnote-31212481 -Node: Contributors1212704 -Node: History summary1218701 -Node: Installation1220081 -Node: Gawk Distribution1221025 -Node: Getting1221509 -Node: Extracting1222472 -Node: Distribution contents1224110 -Node: Unix Installation1230590 -Node: Quick Installation1231272 -Node: Shell Startup Files1233686 -Node: Additional Configuration Options1234775 -Node: Configuration Philosophy1237090 -Node: Non-Unix Installation1239459 -Node: PC Installation1239919 -Node: PC Binary Installation1240757 -Node: PC Compiling1241192 -Node: PC Using1242309 -Node: Cygwin1245862 -Node: MSYS1247086 -Node: VMS Installation1247688 -Node: VMS Compilation1248479 -Ref: VMS Compilation-Footnote-11249708 -Node: VMS Dynamic Extensions1249766 -Node: VMS Installation Details1251451 -Node: VMS Running1253704 -Node: VMS GNV1257983 -Node: VMS Old Gawk1258718 -Node: Bugs1259189 -Node: Bug address1259852 -Node: Usenet1262834 -Node: Maintainers1263838 -Node: Other Versions1265023 -Node: Installation summary1272111 -Node: Notes1273320 -Node: Compatibility Mode1274114 -Node: Additions1274896 -Node: Accessing The Source1275821 -Node: Adding Code1277258 -Node: New Ports1283477 -Node: Derived Files1287852 -Ref: Derived Files-Footnote-11293512 -Ref: Derived Files-Footnote-21293547 -Ref: Derived Files-Footnote-31294145 -Node: Future Extensions1294259 -Node: Implementation Limitations1294917 -Node: Extension Design1296127 -Node: Old Extension Problems1297271 -Ref: Old Extension Problems-Footnote-11298789 -Node: Extension New Mechanism Goals1298846 -Ref: Extension New Mechanism Goals-Footnote-11302210 -Node: Extension Other Design Decisions1302399 -Node: Extension Future Growth1304512 -Node: Notes summary1305118 -Node: Basic Concepts1306276 -Node: Basic High Level1306957 -Ref: figure-general-flow1307239 -Ref: figure-process-flow1307924 -Ref: Basic High Level-Footnote-11311225 -Node: Basic Data Typing1311410 -Node: Glossary1314738 -Node: Copying1346623 -Node: GNU Free Documentation License1384166 -Node: Index1409286 +Node: Foreword344638 +Node: Foreword449080 +Node: Preface50612 +Ref: Preface-Footnote-153471 +Ref: Preface-Footnote-253580 +Ref: Preface-Footnote-353814 +Node: History53956 +Node: Names56308 +Ref: Names-Footnote-157412 +Node: This Manual57559 +Ref: This Manual-Footnote-164198 +Node: Conventions64298 +Node: Manual History66667 +Ref: Manual History-Footnote-169664 +Ref: Manual History-Footnote-269705 +Node: How To Contribute69779 +Node: Acknowledgments70705 +Node: Getting Started75642 +Node: Running gawk78081 +Node: One-shot79271 +Node: Read Terminal80534 +Node: Long82527 +Node: Executable Scripts84040 +Ref: Executable Scripts-Footnote-186673 +Node: Comments86776 +Node: Quoting89260 +Node: DOS Quoting94786 +Node: Sample Data Files96842 +Node: Very Simple99437 +Node: Two Rules105539 +Node: More Complex107424 +Node: Statements/Lines109756 +Ref: Statements/Lines-Footnote-1114240 +Node: Other Features114505 +Node: When115441 +Ref: When-Footnote-1117195 +Node: Intro Summary117260 +Node: Invoking Gawk118144 +Node: Command Line119658 +Node: Options120456 +Ref: Options-Footnote-1138370 +Ref: Options-Footnote-2138601 +Node: Other Arguments138626 +Node: Naming Standard Input142637 +Node: Environment Variables143847 +Node: AWKPATH Variable144405 +Ref: AWKPATH Variable-Footnote-1147817 +Ref: AWKPATH Variable-Footnote-2147851 +Node: AWKLIBPATH Variable148222 +Ref: AWKLIBPATH Variable-Footnote-1149919 +Node: Other Environment Variables150294 +Node: Exit Status154115 +Node: Include Files154792 +Node: Loading Shared Libraries158482 +Node: Obsolete159910 +Node: Undocumented160602 +Node: Invoking Summary160899 +Node: Regexp163740 +Node: Regexp Usage165194 +Node: Escape Sequences167231 +Node: Regexp Operators173472 +Node: Regexp Operator Details173957 +Ref: Regexp Operator Details-Footnote-1180389 +Node: Interval Expressions180536 +Ref: Interval Expressions-Footnote-1181957 +Node: Bracket Expressions182055 +Ref: table-char-classes184531 +Node: Leftmost Longest187857 +Node: Computed Regexps189160 +Node: GNU Regexp Operators192587 +Node: Case-sensitivity196324 +Ref: Case-sensitivity-Footnote-1199190 +Ref: Case-sensitivity-Footnote-2199425 +Node: Regexp Summary199533 +Node: Reading Files200999 +Node: Records203268 +Node: awk split records204343 +Node: gawk split records209618 +Ref: gawk split records-Footnote-1214351 +Node: Fields214388 +Node: Nonconstant Fields217129 +Ref: Nonconstant Fields-Footnote-1219365 +Node: Changing Fields219569 +Node: Field Separators225600 +Node: Default Field Splitting228298 +Node: Regexp Field Splitting229416 +Node: Single Character Fields232769 +Node: Command Line Field Separator233829 +Node: Full Line Fields237047 +Ref: Full Line Fields-Footnote-1238569 +Ref: Full Line Fields-Footnote-2238615 +Node: Field Splitting Summary238716 +Node: Constant Size240790 +Node: Fixed width data241522 +Node: Skipping intervening244989 +Node: Allowing trailing data245787 +Node: Fields with fixed data246824 +Node: Splitting By Content248342 +Ref: Splitting By Content-Footnote-1252125 +Node: More CSV252288 +Node: Testing field creation253598 +Node: Multiple Line255223 +Node: Getline261500 +Node: Plain Getline263969 +Node: Getline/Variable266542 +Node: Getline/File267693 +Node: Getline/Variable/File269081 +Ref: Getline/Variable/File-Footnote-1270686 +Node: Getline/Pipe270774 +Node: Getline/Variable/Pipe273478 +Node: Getline/Coprocess274613 +Node: Getline/Variable/Coprocess275880 +Node: Getline Notes276622 +Node: Getline Summary279419 +Ref: table-getline-variants279843 +Node: Read Timeout280591 +Ref: Read Timeout-Footnote-1284497 +Node: Retrying Input284555 +Node: Command-line directories285754 +Node: Input Summary286660 +Node: Input Exercises289832 +Node: Printing290266 +Node: Print292100 +Node: Print Examples293557 +Node: Output Separators296337 +Node: OFMT298354 +Node: Printf299710 +Node: Basic Printf300495 +Node: Control Letters302069 +Node: Format Modifiers307231 +Node: Printf Examples313246 +Node: Redirection315732 +Node: Special FD322573 +Ref: Special FD-Footnote-1325741 +Node: Special Files325815 +Node: Other Inherited Files326432 +Node: Special Network327433 +Node: Special Caveats328293 +Node: Close Files And Pipes329242 +Ref: table-close-pipe-return-values336149 +Ref: Close Files And Pipes-Footnote-1336962 +Ref: Close Files And Pipes-Footnote-2337110 +Node: Nonfatal337262 +Node: Output Summary339600 +Node: Output Exercises340822 +Node: Expressions341501 +Node: Values342689 +Node: Constants343367 +Node: Scalar Constants344058 +Ref: Scalar Constants-Footnote-1346568 +Node: Nondecimal-numbers346818 +Node: Regexp Constants349819 +Node: Using Constant Regexps350345 +Node: Standard Regexp Constants350967 +Node: Strong Regexp Constants354155 +Node: Variables357167 +Node: Using Variables357824 +Node: Assignment Options359734 +Node: Conversion362205 +Node: Strings And Numbers362729 +Ref: Strings And Numbers-Footnote-1365792 +Node: Locale influences conversions365901 +Ref: table-locale-affects368659 +Node: All Operators369277 +Node: Arithmetic Ops369906 +Node: Concatenation372622 +Ref: Concatenation-Footnote-1375469 +Node: Assignment Ops375576 +Ref: table-assign-ops380567 +Node: Increment Ops381880 +Node: Truth Values and Conditions385340 +Node: Truth Values386414 +Node: Typing and Comparison387462 +Node: Variable Typing388282 +Ref: Variable Typing-Footnote-1394745 +Ref: Variable Typing-Footnote-2394817 +Node: Comparison Operators394894 +Ref: table-relational-ops395313 +Node: POSIX String Comparison398808 +Ref: POSIX String Comparison-Footnote-1400503 +Ref: POSIX String Comparison-Footnote-2400642 +Node: Boolean Ops400726 +Ref: Boolean Ops-Footnote-1405208 +Node: Conditional Exp405300 +Node: Function Calls407036 +Node: Precedence410913 +Node: Locales414572 +Node: Expressions Summary416204 +Node: Patterns and Actions418777 +Node: Pattern Overview419897 +Node: Regexp Patterns421574 +Node: Expression Patterns422116 +Node: Ranges425897 +Node: BEGIN/END429005 +Node: Using BEGIN/END429766 +Ref: Using BEGIN/END-Footnote-1432520 +Node: I/O And BEGIN/END432626 +Node: BEGINFILE/ENDFILE434939 +Node: Empty438170 +Node: Using Shell Variables438487 +Node: Action Overview440761 +Node: Statements443086 +Node: If Statement444934 +Node: While Statement446429 +Node: Do Statement448457 +Node: For Statement449605 +Node: Switch Statement452776 +Node: Break Statement455217 +Node: Continue Statement457309 +Node: Next Statement459136 +Node: Nextfile Statement461519 +Node: Exit Statement464208 +Node: Built-in Variables466611 +Node: User-modified467744 +Node: Auto-set475511 +Ref: Auto-set-Footnote-1492318 +Ref: Auto-set-Footnote-2492524 +Node: ARGC and ARGV492580 +Node: Pattern Action Summary496793 +Node: Arrays499223 +Node: Array Basics500552 +Node: Array Intro501396 +Ref: figure-array-elements503371 +Ref: Array Intro-Footnote-1506075 +Node: Reference to Elements506203 +Node: Assigning Elements508667 +Node: Array Example509158 +Node: Scanning an Array510917 +Node: Controlling Scanning513939 +Ref: Controlling Scanning-Footnote-1520395 +Node: Numeric Array Subscripts520711 +Node: Uninitialized Subscripts522895 +Node: Delete524514 +Ref: Delete-Footnote-1527266 +Node: Multidimensional527323 +Node: Multiscanning530418 +Node: Arrays of Arrays532009 +Node: Arrays Summary536777 +Node: Functions538870 +Node: Built-in539908 +Node: Calling Built-in540989 +Node: Numeric Functions542985 +Ref: Numeric Functions-Footnote-1547011 +Ref: Numeric Functions-Footnote-2547659 +Ref: Numeric Functions-Footnote-3547707 +Node: String Functions547979 +Ref: String Functions-Footnote-1572120 +Ref: String Functions-Footnote-2572248 +Ref: String Functions-Footnote-3572496 +Node: Gory Details572583 +Ref: table-sub-escapes574374 +Ref: table-sub-proposed575893 +Ref: table-posix-sub577256 +Ref: table-gensub-escapes578797 +Ref: Gory Details-Footnote-1579620 +Node: I/O Functions579774 +Ref: table-system-return-values586228 +Ref: I/O Functions-Footnote-1588308 +Ref: I/O Functions-Footnote-2588456 +Node: Time Functions588576 +Ref: Time Functions-Footnote-1599247 +Ref: Time Functions-Footnote-2599315 +Ref: Time Functions-Footnote-3599473 +Ref: Time Functions-Footnote-4599584 +Ref: Time Functions-Footnote-5599696 +Ref: Time Functions-Footnote-6599923 +Node: Bitwise Functions600189 +Ref: table-bitwise-ops600783 +Ref: Bitwise Functions-Footnote-1606846 +Ref: Bitwise Functions-Footnote-2607019 +Node: Type Functions607210 +Node: I18N Functions610073 +Node: User-defined611724 +Node: Definition Syntax612536 +Ref: Definition Syntax-Footnote-1618230 +Node: Function Example618301 +Ref: Function Example-Footnote-1621223 +Node: Function Calling621245 +Node: Calling A Function621833 +Node: Variable Scope622791 +Node: Pass By Value/Reference625785 +Node: Function Caveats628429 +Ref: Function Caveats-Footnote-1630476 +Node: Return Statement630596 +Node: Dynamic Typing633575 +Node: Indirect Calls634505 +Ref: Indirect Calls-Footnote-1644757 +Node: Functions Summary644885 +Node: Library Functions647590 +Ref: Library Functions-Footnote-1651197 +Ref: Library Functions-Footnote-2651340 +Node: Library Names651511 +Ref: Library Names-Footnote-1655178 +Ref: Library Names-Footnote-2655401 +Node: General Functions655487 +Node: Strtonum Function656590 +Node: Assert Function659612 +Node: Round Function662938 +Node: Cliff Random Function664478 +Node: Ordinal Functions665494 +Ref: Ordinal Functions-Footnote-1668557 +Ref: Ordinal Functions-Footnote-2668809 +Node: Join Function669019 +Ref: Join Function-Footnote-1670789 +Node: Getlocaltime Function670989 +Node: Readfile Function674731 +Node: Shell Quoting676708 +Node: Data File Management678109 +Node: Filetrans Function678741 +Node: Rewind Function682837 +Node: File Checking684746 +Ref: File Checking-Footnote-1686080 +Node: Empty Files686281 +Node: Ignoring Assigns688260 +Node: Getopt Function689810 +Ref: Getopt Function-Footnote-1705021 +Node: Passwd Functions705221 +Ref: Passwd Functions-Footnote-1714060 +Node: Group Functions714148 +Ref: Group Functions-Footnote-1722046 +Node: Walking Arrays722253 +Node: Library Functions Summary725261 +Node: Library Exercises726667 +Node: Sample Programs727132 +Node: Running Examples727902 +Node: Clones728630 +Node: Cut Program729854 +Node: Egrep Program739994 +Node: Id Program749005 +Node: Split Program758952 +Ref: Split Program-Footnote-1768842 +Node: Tee Program769015 +Node: Uniq Program771805 +Node: Wc Program779393 +Node: Bytes vs. Characters779790 +Node: Using extensions781338 +Node: wc program782092 +Node: Miscellaneous Programs786957 +Node: Dupword Program788170 +Node: Alarm Program790200 +Node: Translate Program795055 +Ref: Translate Program-Footnote-1799620 +Node: Labels Program799890 +Ref: Labels Program-Footnote-1803241 +Node: Word Sorting803325 +Node: History Sorting807397 +Node: Extract Program809622 +Node: Simple Sed817676 +Node: Igawk Program820750 +Ref: Igawk Program-Footnote-1835081 +Ref: Igawk Program-Footnote-2835283 +Ref: Igawk Program-Footnote-3835405 +Node: Anagram Program835520 +Node: Signature Program838582 +Node: Programs Summary839829 +Node: Programs Exercises841043 +Ref: Programs Exercises-Footnote-1845173 +Node: Advanced Features845259 +Node: Nondecimal Data847326 +Node: Array Sorting848917 +Node: Controlling Array Traversal849617 +Ref: Controlling Array Traversal-Footnote-1857985 +Node: Array Sorting Functions858103 +Ref: Array Sorting Functions-Footnote-1863194 +Node: Two-way I/O863390 +Ref: Two-way I/O-Footnote-1871111 +Ref: Two-way I/O-Footnote-2871298 +Node: TCP/IP Networking871380 +Node: Profiling874498 +Node: Extension Philosophy883807 +Node: Advanced Features Summary885258 +Node: Internationalization887257 +Node: I18N and L10N888737 +Node: Explaining gettext889424 +Ref: Explaining gettext-Footnote-1895316 +Ref: Explaining gettext-Footnote-2895501 +Node: Programmer i18n895666 +Ref: Programmer i18n-Footnote-1900615 +Node: Translator i18n900664 +Node: String Extraction901458 +Ref: String Extraction-Footnote-1902590 +Node: Printf Ordering902676 +Ref: Printf Ordering-Footnote-1905462 +Node: I18N Portability905526 +Ref: I18N Portability-Footnote-1907982 +Node: I18N Example908045 +Ref: I18N Example-Footnote-1911320 +Ref: I18N Example-Footnote-2911393 +Node: Gawk I18N911502 +Node: I18N Summary912151 +Node: Debugger913492 +Node: Debugging914492 +Node: Debugging Concepts914933 +Node: Debugging Terms916742 +Node: Awk Debugging919317 +Ref: Awk Debugging-Footnote-1920262 +Node: Sample Debugging Session920394 +Node: Debugger Invocation920928 +Node: Finding The Bug922314 +Node: List of Debugger Commands928788 +Node: Breakpoint Control930121 +Node: Debugger Execution Control933815 +Node: Viewing And Changing Data937177 +Node: Execution Stack940718 +Node: Debugger Info942355 +Node: Miscellaneous Debugger Commands946426 +Node: Readline Support951488 +Node: Limitations952384 +Node: Debugging Summary954938 +Node: Namespaces956217 +Node: Global Namespace957328 +Node: Qualified Names958726 +Node: Default Namespace959725 +Node: Changing The Namespace960466 +Node: Naming Rules962080 +Node: Internal Name Management963928 +Node: Namespace Example964970 +Node: Namespace And Features967532 +Node: Namespace Summary968967 +Node: Arbitrary Precision Arithmetic970444 +Node: Computer Arithmetic971931 +Ref: table-numeric-ranges975697 +Ref: table-floating-point-ranges976190 +Ref: Computer Arithmetic-Footnote-1976848 +Node: Math Definitions976905 +Ref: table-ieee-formats979881 +Node: MPFR features980448 +Node: FP Math Caution982166 +Ref: FP Math Caution-Footnote-1983238 +Node: Inexactness of computations983607 +Node: Inexact representation984638 +Node: Comparing FP Values985998 +Node: Errors accumulate987239 +Node: Strange values988695 +Ref: Strange values-Footnote-1991283 +Node: Getting Accuracy991388 +Node: Try To Round994098 +Node: Setting precision994997 +Ref: table-predefined-precision-strings995694 +Node: Setting the rounding mode997524 +Ref: table-gawk-rounding-modes997898 +Ref: Setting the rounding mode-Footnote-11001829 +Node: Arbitrary Precision Integers1002008 +Ref: Arbitrary Precision Integers-Footnote-11005183 +Node: Checking for MPFR1005332 +Node: POSIX Floating Point Problems1006806 +Ref: POSIX Floating Point Problems-Footnote-11011091 +Node: Floating point summary1011129 +Node: Dynamic Extensions1013319 +Node: Extension Intro1014872 +Node: Plugin License1016138 +Node: Extension Mechanism Outline1016935 +Ref: figure-load-extension1017374 +Ref: figure-register-new-function1018939 +Ref: figure-call-new-function1020031 +Node: Extension API Description1022093 +Node: Extension API Functions Introduction1023806 +Ref: table-api-std-headers1025642 +Node: General Data Types1029891 +Ref: General Data Types-Footnote-11038521 +Node: Memory Allocation Functions1038820 +Ref: Memory Allocation Functions-Footnote-11043321 +Node: Constructor Functions1043420 +Node: API Ownership of MPFR and GMP Values1046886 +Node: Registration Functions1048199 +Node: Extension Functions1048899 +Node: Exit Callback Functions1054221 +Node: Extension Version String1055471 +Node: Input Parsers1056134 +Node: Output Wrappers1068855 +Node: Two-way processors1073367 +Node: Printing Messages1075632 +Ref: Printing Messages-Footnote-11076803 +Node: Updating ERRNO1076956 +Node: Requesting Values1077695 +Ref: table-value-types-returned1078432 +Node: Accessing Parameters1079368 +Node: Symbol Table Access1080605 +Node: Symbol table by name1081117 +Ref: Symbol table by name-Footnote-11084141 +Node: Symbol table by cookie1084269 +Ref: Symbol table by cookie-Footnote-11088454 +Node: Cached values1088518 +Ref: Cached values-Footnote-11092054 +Node: Array Manipulation1092207 +Ref: Array Manipulation-Footnote-11093298 +Node: Array Data Types1093335 +Ref: Array Data Types-Footnote-11095993 +Node: Array Functions1096085 +Node: Flattening Arrays1100583 +Node: Creating Arrays1107559 +Node: Redirection API1112326 +Node: Extension API Variables1115159 +Node: Extension Versioning1115870 +Ref: gawk-api-version1116299 +Node: Extension GMP/MPFR Versioning1118030 +Node: Extension API Informational Variables1119658 +Node: Extension API Boilerplate1120731 +Node: Changes from API V11124705 +Node: Finding Extensions1126277 +Node: Extension Example1126836 +Node: Internal File Description1127634 +Node: Internal File Ops1131714 +Ref: Internal File Ops-Footnote-11143064 +Node: Using Internal File Ops1143204 +Ref: Using Internal File Ops-Footnote-11145587 +Node: Extension Samples1145861 +Node: Extension Sample File Functions1147390 +Node: Extension Sample Fnmatch1155039 +Node: Extension Sample Fork1156526 +Node: Extension Sample Inplace1157744 +Node: Extension Sample Ord1161370 +Node: Extension Sample Readdir1162206 +Ref: table-readdir-file-types1163095 +Node: Extension Sample Revout1164162 +Node: Extension Sample Rev2way1164751 +Node: Extension Sample Read write array1165491 +Node: Extension Sample Readfile1167433 +Node: Extension Sample Time1168528 +Node: Extension Sample API Tests1170280 +Node: gawkextlib1170772 +Node: Extension summary1173690 +Node: Extension Exercises1177392 +Node: Language History1178634 +Node: V7/SVR3.11180290 +Node: SVR41182442 +Node: POSIX1183876 +Node: BTL1185257 +Node: POSIX/GNU1185986 +Node: Feature History1191764 +Node: Common Extensions1208083 +Node: Ranges and Locales1209366 +Ref: Ranges and Locales-Footnote-11213982 +Ref: Ranges and Locales-Footnote-21214009 +Ref: Ranges and Locales-Footnote-31214244 +Node: Contributors1214467 +Node: History summary1220464 +Node: Installation1221844 +Node: Gawk Distribution1222788 +Node: Getting1223272 +Node: Extracting1224235 +Node: Distribution contents1225873 +Node: Unix Installation1232353 +Node: Quick Installation1233035 +Node: Shell Startup Files1235449 +Node: Additional Configuration Options1236538 +Node: Configuration Philosophy1238853 +Node: Non-Unix Installation1241222 +Node: PC Installation1241682 +Node: PC Binary Installation1242520 +Node: PC Compiling1242955 +Node: PC Using1244072 +Node: Cygwin1247625 +Node: MSYS1248849 +Node: VMS Installation1249451 +Node: VMS Compilation1250242 +Ref: VMS Compilation-Footnote-11251471 +Node: VMS Dynamic Extensions1251529 +Node: VMS Installation Details1253214 +Node: VMS Running1255467 +Node: VMS GNV1259746 +Node: VMS Old Gawk1260481 +Node: Bugs1260952 +Node: Bug address1261615 +Node: Usenet1264597 +Node: Maintainers1265601 +Node: Other Versions1266786 +Node: Installation summary1273874 +Node: Notes1275083 +Node: Compatibility Mode1275877 +Node: Additions1276659 +Node: Accessing The Source1277584 +Node: Adding Code1279021 +Node: New Ports1285240 +Node: Derived Files1289615 +Ref: Derived Files-Footnote-11295275 +Ref: Derived Files-Footnote-21295310 +Ref: Derived Files-Footnote-31295908 +Node: Future Extensions1296022 +Node: Implementation Limitations1296680 +Node: Extension Design1297890 +Node: Old Extension Problems1299034 +Ref: Old Extension Problems-Footnote-11300552 +Node: Extension New Mechanism Goals1300609 +Ref: Extension New Mechanism Goals-Footnote-11303973 +Node: Extension Other Design Decisions1304162 +Node: Extension Future Growth1306275 +Node: Notes summary1306881 +Node: Basic Concepts1308039 +Node: Basic High Level1308720 +Ref: figure-general-flow1309002 +Ref: figure-process-flow1309687 +Ref: Basic High Level-Footnote-11312988 +Node: Basic Data Typing1313173 +Node: Glossary1316501 +Node: Copying1348386 +Node: GNU Free Documentation License1385929 +Node: Index1411049 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index ad2cc6fe..40c85a81 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -868,6 +868,7 @@ particular records in a file and perform operations upon them. * TCP/IP Networking:: Using @command{gawk} for network programming. * Profiling:: Profiling your @command{awk} programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. * I18N and L10N:: Internationalization and Localization. * Explaining gettext:: How GNU @command{gettext} works. @@ -29251,6 +29252,7 @@ discusses the ability to dynamically add new built-in functions to * Two-way I/O:: Two-way communications with another process. * TCP/IP Networking:: Using @command{gawk} for network programming. * Profiling:: Profiling your @command{awk} programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. @end menu @@ -30525,6 +30527,52 @@ Profiling and pretty-printing also preserve the original format of numeric constants; if you used an octal or hexadecimal value in your source code, it will appear that way in the output. +@node Extension Philosophy +@section Builtin Features vs.@: Extensions + +As this and subsequent @value{CHAPTER}s show, @command{gawk} has a +large number of extensions over standard @command{awk} built-in to +the program. These have developed over time. More recently, the +focus has moved to using the extension mechanism (@pxref{Dynamic Extensions}) +for adding features. This @value{SECTION} discusses the ``guiding philosophy'' +behind what should be added to the interpreter as a built-in +feature vs.@: what should be done in extensions. + +There are several goals: + +@enumerate 1 +@item +Keep the language @command{awk}; it should not become unrecognizable, even +if programs in it will only run on @command{gawk}. + +@item +Keep the core from getting any larger unless absolutely necessary. + +@item +Add new functionality either in @command{awk} scripts (@option{-f}, +@code{@@include}) or in loadable extensions written in C or C++ +(@option{-l}, @code{@@load}). + +@item +Extend the core interpreter only if some feature is: + +@c sublist +@enumerate A +@item +Truly desirable. +@item +Cannot be done via (2) or (3) above. +@item +Can be implemented without too much pain in the core. +@end enumerate +@end enumerate + +Combining modules with @command{awk} files is a powerful technique. +Some of the sample extensions demonstrate this. + +Loading extensions and library files should not be done automatically, +because then there's overhead that most users don't want or need. + @node Advanced Features Summary @section Summary @@ -30567,6 +30615,9 @@ you tune them more easily. Sending the @code{USR1} signal while profiling cause @item You can also just ``pretty-print'' the program. +@item +New features should be developed using the extension mechansim if possible, and added +to the core interpreter only as a last resort. @end itemize diff --git a/doc/gawktexi.in b/doc/gawktexi.in index a33e933f..5a4e7479 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -863,6 +863,7 @@ particular records in a file and perform operations upon them. * TCP/IP Networking:: Using @command{gawk} for network programming. * Profiling:: Profiling your @command{awk} programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. * I18N and L10N:: Internationalization and Localization. * Explaining gettext:: How GNU @command{gettext} works. @@ -28217,6 +28218,7 @@ discusses the ability to dynamically add new built-in functions to * Two-way I/O:: Two-way communications with another process. * TCP/IP Networking:: Using @command{gawk} for network programming. * Profiling:: Profiling your @command{awk} programs. +* Extension Philosophy:: What should be built-in and what should not. * Advanced Features Summary:: Summary of advanced features. @end menu @@ -29491,6 +29493,52 @@ Profiling and pretty-printing also preserve the original format of numeric constants; if you used an octal or hexadecimal value in your source code, it will appear that way in the output. +@node Extension Philosophy +@section Builtin Features vs.@: Extensions + +As this and subsequent @value{CHAPTER}s show, @command{gawk} has a +large number of extensions over standard @command{awk} built-in to +the program. These have developed over time. More recently, the +focus has moved to using the extension mechanism (@pxref{Dynamic Extensions}) +for adding features. This @value{SECTION} discusses the ``guiding philosophy'' +behind what should be added to the interpreter as a built-in +feature vs.@: what should be done in extensions. + +There are several goals: + +@enumerate 1 +@item +Keep the language @command{awk}; it should not become unrecognizable, even +if programs in it will only run on @command{gawk}. + +@item +Keep the core from getting any larger unless absolutely necessary. + +@item +Add new functionality either in @command{awk} scripts (@option{-f}, +@code{@@include}) or in loadable extensions written in C or C++ +(@option{-l}, @code{@@load}). + +@item +Extend the core interpreter only if some feature is: + +@c sublist +@enumerate A +@item +Truly desirable. +@item +Cannot be done via (2) or (3) above. +@item +Can be implemented without too much pain in the core. +@end enumerate +@end enumerate + +Combining modules with @command{awk} files is a powerful technique. +Some of the sample extensions demonstrate this. + +Loading extensions and library files should not be done automatically, +because then there's overhead that most users don't want or need. + @node Advanced Features Summary @section Summary @@ -29533,6 +29581,9 @@ you tune them more easily. Sending the @code{USR1} signal while profiling cause @item You can also just ``pretty-print'' the program. +@item +New features should be developed using the extension mechansim if possible, and added +to the core interpreter only as a last resort. @end itemize |