diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-05-16 23:10:29 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-05-16 23:10:29 +0300 |
commit | 1966bd9cd849c3d83dbb0fcb547684b17c2cd61e (patch) | |
tree | 817aa91f2e0720e810f20d0abc30895f1fe62bd1 | |
parent | c5bc34ad1537ceaba4962d1639f61ca4b4d50e94 (diff) | |
parent | b6963495dffd0bc11e2007b9854ad34d14b0b29c (diff) | |
download | egawk-1966bd9cd849c3d83dbb0fcb547684b17c2cd61e.tar.gz egawk-1966bd9cd849c3d83dbb0fcb547684b17c2cd61e.tar.bz2 egawk-1966bd9cd849c3d83dbb0fcb547684b17c2cd61e.zip |
Merge branch 'master' into feature/regex-type
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | doc/ChangeLog | 13 | ||||
-rw-r--r-- | doc/gawk.info | 743 | ||||
-rw-r--r-- | doc/gawk.texi | 25 | ||||
-rw-r--r-- | doc/gawktexi.in | 25 | ||||
-rw-r--r-- | main.c | 28 | ||||
-rw-r--r-- | symbol.c | 1 |
7 files changed, 472 insertions, 374 deletions
@@ -1,3 +1,14 @@ +2015-05-15 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * symbol.c (load_symbols): Plug minor memory leak by calling unref(tmp) + on "identifiers" string after assoc_lookup is done with it. + +2015-05-15 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * main.c (load_procinfo_argv): New function to save argv array values + in PROCINFO["argv"][0..argc-1]. + (load_procinfo): Call load_procinfo_argv. + 2015-05-11 Arnold D. Robbins <arnold@skeeve.com> * awk.h, awkgram.y, builtin.c, eval.c profile.c, re.c: diff --git a/doc/ChangeLog b/doc/ChangeLog index 7422bbc1..cb5b0cd2 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,16 @@ +2015-05-16 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Fix description of nextfile within a function. Sigh. + +2015-05-15 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * gawktexi.in (Undocumented): Describe the new PROCINFO["argv"] array. + +2015-05-14 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Bugs): Add that email should be in plain + text and not in HTML. Sigh. + 2015-05-11 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Add doc on conversions for strongly typed diff --git a/doc/gawk.info b/doc/gawk.info index 5ce1689b..6a2db963 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10147,8 +10147,9 @@ in 'ARGV'. The current version of BWK 'awk' and 'mawk' also support 'nextfile'. However, they don't allow the 'nextfile' statement inside function bodies (*note User-defined::). 'gawk' does; a 'nextfile' inside a -function body reads the next record and starts processing it with the -first rule in the program, just as any other 'nextfile' statement. +function body reads the first record from the next file and starts +processing it with the first rule in the program, just as any other +'nextfile' statement. File: gawk.info, Node: Exit Statement, Prev: Nextfile Statement, Up: Statements @@ -28614,7 +28615,9 @@ can get this information with the command 'gawk --version'. receive your bug report. Although you can send mail to the maintainers directly, the bug reporting address is preferred because the email list is archived at the GNU Project. _All email must be in English. This is -the only language understood in common by all the maintainers._ +the only language understood in common by all the maintainers._ In +addition, please be sure to send all mail in _plain text_, not (or not +exclusively) in HTML. CAUTION: Do _not_ try to report bugs in 'gawk' by posting to the Usenet/Internet newsgroup 'comp.lang.awk'. The 'gawk' developers @@ -32492,7 +32495,7 @@ Index (line 13) * Buening, Andreas: Acknowledgments. (line 60) * Buening, Andreas <1>: Contributors. (line 93) -* Buening, Andreas <2>: Bugs. (line 71) +* Buening, Andreas <2>: Bugs. (line 73) * buffering, input/output: I/O Functions. (line 139) * buffering, input/output <1>: Two-way I/O. (line 53) * buffering, interactive vs. noninteractive: I/O Functions. (line 76) @@ -32607,7 +32610,7 @@ Index * common extensions, single character fields: Single Character Fields. (line 6) * common extensions, '\x' escape sequence: Escape Sequences. (line 61) -* 'comp.lang.awk' newsgroup: Bugs. (line 39) +* 'comp.lang.awk' newsgroup: Bugs. (line 41) * comparison expressions: Typing and Comparison. (line 9) * comparison expressions, as patterns: Expression Patterns. (line 14) @@ -32872,7 +32875,7 @@ Index * 'default' keyword: Switch Statement. (line 6) * Deifik, Scott: Acknowledgments. (line 60) * Deifik, Scott <1>: Contributors. (line 54) -* Deifik, Scott <2>: Bugs. (line 71) +* Deifik, Scott <2>: Bugs. (line 73) * 'delete' ARRAY: Delete. (line 39) * delete breakpoint at location: Breakpoint Control. (line 36) * delete breakpoint by number: Breakpoint Control. (line 64) @@ -33852,7 +33855,7 @@ Index * mailing labels, printing: Labels Program. (line 6) * mailing list, GNITS: Acknowledgments. (line 52) * Malmberg, John: Acknowledgments. (line 60) -* Malmberg, John <1>: Bugs. (line 71) +* Malmberg, John <1>: Bugs. (line 73) * Malmberg, John E.: Contributors. (line 138) * mark parity: Ordinal Functions. (line 45) * marked string extraction (internationalization): String Extraction. @@ -34101,7 +34104,7 @@ Index * pipe, input: Getline/Pipe. (line 10) * pipe, output: Redirection. (line 57) * Pitts, Dave: Acknowledgments. (line 60) -* Pitts, Dave <1>: Bugs. (line 71) +* Pitts, Dave <1>: Bugs. (line 73) * Plauger, P.J.: Library Functions. (line 12) * plug-in: Extension Intro. (line 6) * plus sign ('+'), '+' operator: Precedence. (line 51) @@ -34439,7 +34442,7 @@ Index * Robbins, Arnold <3>: Alarm Program. (line 6) * Robbins, Arnold <4>: General Data Types. (line 6) * Robbins, Arnold <5>: Contributors. (line 145) -* Robbins, Arnold <6>: Bugs. (line 71) +* Robbins, Arnold <6>: Bugs. (line 73) * Robbins, Arnold <7>: Future Extensions. (line 6) * Robbins, Bill: Getline/Pipe. (line 40) * Robbins, Harry: Acknowledgments. (line 93) @@ -34980,7 +34983,7 @@ Index * Yawitz, Efraim: Contributors. (line 132) * Zaretskii, Eli: Acknowledgments. (line 60) * Zaretskii, Eli <1>: Contributors. (line 56) -* Zaretskii, Eli <2>: Bugs. (line 71) +* Zaretskii, Eli <2>: Bugs. (line 73) * 'zerofile.awk' program: Empty Files. (line 20) * Zoulas, Christos: Contributors. (line 67) @@ -35187,365 +35190,365 @@ Node: Break Statement428384 Node: Continue Statement430476 Node: Next Statement432303 Node: Nextfile Statement434686 -Node: Exit Statement437318 -Node: Built-in Variables439723 -Node: User-modified440856 -Ref: User-modified-Footnote-1448483 -Node: Auto-set448545 -Ref: Auto-set-Footnote-1462794 -Ref: Auto-set-Footnote-2463000 -Node: ARGC and ARGV463056 -Node: Pattern Action Summary467275 -Node: Arrays469705 -Node: Array Basics471034 -Node: Array Intro471878 -Ref: figure-array-elements473853 -Ref: Array Intro-Footnote-1476565 -Node: Reference to Elements476693 -Node: Assigning Elements479157 -Node: Array Example479648 -Node: Scanning an Array481407 -Node: Controlling Scanning484431 -Ref: Controlling Scanning-Footnote-1489830 -Node: Numeric Array Subscripts490146 -Node: Uninitialized Subscripts492330 -Node: Delete493949 -Ref: Delete-Footnote-1496701 -Node: Multidimensional496758 -Node: Multiscanning499853 -Node: Arrays of Arrays501444 -Node: Arrays Summary506212 -Node: Functions508305 -Node: Built-in509343 -Node: Calling Built-in510421 -Node: Numeric Functions512417 -Ref: Numeric Functions-Footnote-1517250 -Ref: Numeric Functions-Footnote-2517607 -Ref: Numeric Functions-Footnote-3517655 -Node: String Functions517927 -Ref: String Functions-Footnote-1541435 -Ref: String Functions-Footnote-2541564 -Ref: String Functions-Footnote-3541812 -Node: Gory Details541899 -Ref: table-sub-escapes543690 -Ref: table-sub-proposed545209 -Ref: table-posix-sub546572 -Ref: table-gensub-escapes548113 -Ref: Gory Details-Footnote-1548936 -Node: I/O Functions549087 -Ref: I/O Functions-Footnote-1556308 -Node: Time Functions556456 -Ref: Time Functions-Footnote-1566961 -Ref: Time Functions-Footnote-2567029 -Ref: Time Functions-Footnote-3567187 -Ref: Time Functions-Footnote-4567298 -Ref: Time Functions-Footnote-5567410 -Ref: Time Functions-Footnote-6567637 -Node: Bitwise Functions567903 -Ref: table-bitwise-ops568497 -Ref: Bitwise Functions-Footnote-1572805 -Node: Type Functions572978 -Node: I18N Functions574840 -Node: User-defined576491 -Node: Definition Syntax577296 -Ref: Definition Syntax-Footnote-1582983 -Node: Function Example583054 -Ref: Function Example-Footnote-1585976 -Node: Function Caveats585998 -Node: Calling A Function586516 -Node: Variable Scope587474 -Node: Pass By Value/Reference590468 -Node: Return Statement593967 -Node: Dynamic Typing596946 -Node: Indirect Calls597876 -Ref: Indirect Calls-Footnote-1608127 -Node: Functions Summary608255 -Node: Library Functions610960 -Ref: Library Functions-Footnote-1614569 -Ref: Library Functions-Footnote-2614712 -Node: Library Names614883 -Ref: Library Names-Footnote-1618344 -Ref: Library Names-Footnote-2618567 -Node: General Functions618653 -Node: Strtonum Function619756 -Node: Assert Function622778 -Node: Round Function626104 -Node: Cliff Random Function627645 -Node: Ordinal Functions628661 -Ref: Ordinal Functions-Footnote-1631724 -Ref: Ordinal Functions-Footnote-2631976 -Node: Join Function632186 -Ref: Join Function-Footnote-1633956 -Node: Getlocaltime Function634156 -Node: Readfile Function637900 -Node: Shell Quoting639874 -Node: Data File Management641275 -Node: Filetrans Function641907 -Node: Rewind Function646004 -Node: File Checking647390 -Ref: File Checking-Footnote-1648724 -Node: Empty Files648925 -Node: Ignoring Assigns650904 -Node: Getopt Function652454 -Ref: Getopt Function-Footnote-1663924 -Node: Passwd Functions664124 -Ref: Passwd Functions-Footnote-1672965 -Node: Group Functions673053 -Ref: Group Functions-Footnote-1680952 -Node: Walking Arrays681159 -Node: Library Functions Summary684169 -Node: Library Exercises685575 -Node: Sample Programs686854 -Node: Running Examples687624 -Node: Clones688352 -Node: Cut Program689576 -Node: Egrep Program699297 -Ref: Egrep Program-Footnote-1706809 -Node: Id Program706919 -Node: Split Program710599 -Ref: Split Program-Footnote-1714058 -Node: Tee Program714187 -Node: Uniq Program716977 -Node: Wc Program724403 -Ref: Wc Program-Footnote-1728658 -Node: Miscellaneous Programs728752 -Node: Dupword Program729965 -Node: Alarm Program731995 -Node: Translate Program736850 -Ref: Translate Program-Footnote-1741415 -Node: Labels Program741685 -Ref: Labels Program-Footnote-1745036 -Node: Word Sorting745120 -Node: History Sorting749192 -Node: Extract Program751027 -Node: Simple Sed758558 -Node: Igawk Program761632 -Ref: Igawk Program-Footnote-1775963 -Ref: Igawk Program-Footnote-2776165 -Ref: Igawk Program-Footnote-3776287 -Node: Anagram Program776402 -Node: Signature Program779464 -Node: Programs Summary780711 -Node: Programs Exercises781926 -Ref: Programs Exercises-Footnote-1786055 -Node: Advanced Features786146 -Node: Nondecimal Data788136 -Node: Array Sorting789727 -Node: Controlling Array Traversal790427 -Ref: Controlling Array Traversal-Footnote-1798796 -Node: Array Sorting Functions798914 -Ref: Array Sorting Functions-Footnote-1802801 -Node: Two-way I/O802997 -Ref: Two-way I/O-Footnote-1807948 -Ref: Two-way I/O-Footnote-2808135 -Node: TCP/IP Networking808217 -Node: Profiling811124 -Node: Advanced Features Summary819395 -Node: Internationalization821331 -Node: I18N and L10N822811 -Node: Explaining gettext823498 -Ref: Explaining gettext-Footnote-1828521 -Ref: Explaining gettext-Footnote-2828706 -Node: Programmer i18n828871 -Ref: Programmer i18n-Footnote-1833727 -Node: Translator i18n833776 -Node: String Extraction834570 -Ref: String Extraction-Footnote-1835703 -Node: Printf Ordering835789 -Ref: Printf Ordering-Footnote-1838575 -Node: I18N Portability838639 -Ref: I18N Portability-Footnote-1841095 -Node: I18N Example841158 -Ref: I18N Example-Footnote-1843964 -Node: Gawk I18N844037 -Node: I18N Summary844682 -Node: Debugger846023 -Node: Debugging847045 -Node: Debugging Concepts847486 -Node: Debugging Terms849295 -Node: Awk Debugging851870 -Node: Sample Debugging Session852776 -Node: Debugger Invocation853310 -Node: Finding The Bug854696 -Node: List of Debugger Commands861174 -Node: Breakpoint Control862507 -Node: Debugger Execution Control866201 -Node: Viewing And Changing Data869563 -Node: Execution Stack872937 -Node: Debugger Info874574 -Node: Miscellaneous Debugger Commands878645 -Node: Readline Support883654 -Node: Limitations884550 -Node: Debugging Summary886659 -Node: Arbitrary Precision Arithmetic887832 -Node: Computer Arithmetic889248 -Ref: table-numeric-ranges892839 -Ref: Computer Arithmetic-Footnote-1893561 -Node: Math Definitions893618 -Ref: table-ieee-formats896932 -Ref: Math Definitions-Footnote-1897535 -Node: MPFR features897640 -Node: FP Math Caution899313 -Ref: FP Math Caution-Footnote-1900385 -Node: Inexactness of computations900754 -Node: Inexact representation901714 -Node: Comparing FP Values903074 -Node: Errors accumulate904156 -Node: Getting Accuracy905589 -Node: Try To Round908299 -Node: Setting precision909198 -Ref: table-predefined-precision-strings909895 -Node: Setting the rounding mode911725 -Ref: table-gawk-rounding-modes912099 -Ref: Setting the rounding mode-Footnote-1915507 -Node: Arbitrary Precision Integers915686 -Ref: Arbitrary Precision Integers-Footnote-1920603 -Node: POSIX Floating Point Problems920752 -Ref: POSIX Floating Point Problems-Footnote-1924634 -Node: Floating point summary924672 -Node: Dynamic Extensions926862 -Node: Extension Intro928415 -Node: Plugin License929681 -Node: Extension Mechanism Outline930478 -Ref: figure-load-extension930917 -Ref: figure-register-new-function932482 -Ref: figure-call-new-function933574 -Node: Extension API Description935637 -Node: Extension API Functions Introduction937171 -Node: General Data Types942030 -Ref: General Data Types-Footnote-1947985 -Node: Memory Allocation Functions948284 -Ref: Memory Allocation Functions-Footnote-1951129 -Node: Constructor Functions951228 -Node: Registration Functions952973 -Node: Extension Functions953658 -Node: Exit Callback Functions955957 -Node: Extension Version String957207 -Node: Input Parsers957870 -Node: Output Wrappers967755 -Node: Two-way processors972267 -Node: Printing Messages974531 -Ref: Printing Messages-Footnote-1975607 -Node: Updating 'ERRNO'975760 -Node: Requesting Values976501 -Ref: table-value-types-returned977240 -Node: Accessing Parameters978123 -Node: Symbol Table Access979359 -Node: Symbol table by name979871 -Node: Symbol table by cookie981892 -Ref: Symbol table by cookie-Footnote-1986041 -Node: Cached values986105 -Ref: Cached values-Footnote-1989606 -Node: Array Manipulation989697 -Ref: Array Manipulation-Footnote-1990788 -Node: Array Data Types990825 -Ref: Array Data Types-Footnote-1993483 -Node: Array Functions993575 -Node: Flattening Arrays997434 -Node: Creating Arrays1004342 -Node: Redirection API1009114 -Node: Extension API Variables1011945 -Node: Extension Versioning1012578 -Node: Extension API Informational Variables1014469 -Node: Extension API Boilerplate1015533 -Node: Finding Extensions1019347 -Node: Extension Example1019907 -Node: Internal File Description1020705 -Node: Internal File Ops1024785 -Ref: Internal File Ops-Footnote-11036547 -Node: Using Internal File Ops1036687 -Ref: Using Internal File Ops-Footnote-11039070 -Node: Extension Samples1039345 -Node: Extension Sample File Functions1040874 -Node: Extension Sample Fnmatch1048523 -Node: Extension Sample Fork1050010 -Node: Extension Sample Inplace1051228 -Node: Extension Sample Ord1053314 -Node: Extension Sample Readdir1054150 -Ref: table-readdir-file-types1055039 -Node: Extension Sample Revout1055844 -Node: Extension Sample Rev2way1056433 -Node: Extension Sample Read write array1057173 -Node: Extension Sample Readfile1059115 -Node: Extension Sample Time1060210 -Node: Extension Sample API Tests1061558 -Node: gawkextlib1062050 -Node: Extension summary1064497 -Node: Extension Exercises1068189 -Node: Language History1069686 -Node: V7/SVR3.11071342 -Node: SVR41073495 -Node: POSIX1074929 -Node: BTL1076309 -Node: POSIX/GNU1077039 -Node: Feature History1082878 -Node: Common Extensions1096869 -Node: Ranges and Locales1098152 -Ref: Ranges and Locales-Footnote-11102768 -Ref: Ranges and Locales-Footnote-21102795 -Ref: Ranges and Locales-Footnote-31103030 -Node: Contributors1103251 -Node: History summary1108820 -Node: Installation1110200 -Node: Gawk Distribution1111145 -Node: Getting1111629 -Node: Extracting1112452 -Node: Distribution contents1114090 -Node: Unix Installation1120186 -Node: Quick Installation1120868 -Node: Shell Startup Files1123282 -Node: Additional Configuration Options1124360 -Node: Configuration Philosophy1126165 -Node: Non-Unix Installation1128535 -Node: PC Installation1128993 -Node: PC Binary Installation1130313 -Node: PC Compiling1132165 -Ref: PC Compiling-Footnote-11135189 -Node: PC Testing1135298 -Node: PC Using1136478 -Node: Cygwin1140592 -Node: MSYS1141362 -Node: VMS Installation1141863 -Node: VMS Compilation1142654 -Ref: VMS Compilation-Footnote-11143884 -Node: VMS Dynamic Extensions1143942 -Node: VMS Installation Details1145627 -Node: VMS Running1147880 -Node: VMS GNV1150721 -Node: VMS Old Gawk1151456 -Node: Bugs1151927 -Node: Other Versions1155944 -Node: Installation summary1162418 -Node: Notes1163476 -Node: Compatibility Mode1164341 -Node: Additions1165123 -Node: Accessing The Source1166048 -Node: Adding Code1167484 -Node: New Ports1173639 -Node: Derived Files1178127 -Ref: Derived Files-Footnote-11183612 -Ref: Derived Files-Footnote-21183647 -Ref: Derived Files-Footnote-31184245 -Node: Future Extensions1184359 -Node: Implementation Limitations1185017 -Node: Extension Design1186200 -Node: Old Extension Problems1187354 -Ref: Old Extension Problems-Footnote-11188872 -Node: Extension New Mechanism Goals1188929 -Ref: Extension New Mechanism Goals-Footnote-11192293 -Node: Extension Other Design Decisions1192482 -Node: Extension Future Growth1194595 -Node: Old Extension Mechanism1195431 -Node: Notes summary1197194 -Node: Basic Concepts1198376 -Node: Basic High Level1199057 -Ref: figure-general-flow1199339 -Ref: figure-process-flow1200024 -Ref: Basic High Level-Footnote-11203325 -Node: Basic Data Typing1203510 -Node: Glossary1206838 -Node: Copying1238784 -Node: GNU Free Documentation License1276323 -Node: Index1301441 +Node: Exit Statement437338 +Node: Built-in Variables439743 +Node: User-modified440876 +Ref: User-modified-Footnote-1448503 +Node: Auto-set448565 +Ref: Auto-set-Footnote-1462814 +Ref: Auto-set-Footnote-2463020 +Node: ARGC and ARGV463076 +Node: Pattern Action Summary467295 +Node: Arrays469725 +Node: Array Basics471054 +Node: Array Intro471898 +Ref: figure-array-elements473873 +Ref: Array Intro-Footnote-1476585 +Node: Reference to Elements476713 +Node: Assigning Elements479177 +Node: Array Example479668 +Node: Scanning an Array481427 +Node: Controlling Scanning484451 +Ref: Controlling Scanning-Footnote-1489850 +Node: Numeric Array Subscripts490166 +Node: Uninitialized Subscripts492350 +Node: Delete493969 +Ref: Delete-Footnote-1496721 +Node: Multidimensional496778 +Node: Multiscanning499873 +Node: Arrays of Arrays501464 +Node: Arrays Summary506232 +Node: Functions508325 +Node: Built-in509363 +Node: Calling Built-in510441 +Node: Numeric Functions512437 +Ref: Numeric Functions-Footnote-1517270 +Ref: Numeric Functions-Footnote-2517627 +Ref: Numeric Functions-Footnote-3517675 +Node: String Functions517947 +Ref: String Functions-Footnote-1541455 +Ref: String Functions-Footnote-2541584 +Ref: String Functions-Footnote-3541832 +Node: Gory Details541919 +Ref: table-sub-escapes543710 +Ref: table-sub-proposed545229 +Ref: table-posix-sub546592 +Ref: table-gensub-escapes548133 +Ref: Gory Details-Footnote-1548956 +Node: I/O Functions549107 +Ref: I/O Functions-Footnote-1556328 +Node: Time Functions556476 +Ref: Time Functions-Footnote-1566981 +Ref: Time Functions-Footnote-2567049 +Ref: Time Functions-Footnote-3567207 +Ref: Time Functions-Footnote-4567318 +Ref: Time Functions-Footnote-5567430 +Ref: Time Functions-Footnote-6567657 +Node: Bitwise Functions567923 +Ref: table-bitwise-ops568517 +Ref: Bitwise Functions-Footnote-1572825 +Node: Type Functions572998 +Node: I18N Functions574860 +Node: User-defined576511 +Node: Definition Syntax577316 +Ref: Definition Syntax-Footnote-1583003 +Node: Function Example583074 +Ref: Function Example-Footnote-1585996 +Node: Function Caveats586018 +Node: Calling A Function586536 +Node: Variable Scope587494 +Node: Pass By Value/Reference590488 +Node: Return Statement593987 +Node: Dynamic Typing596966 +Node: Indirect Calls597896 +Ref: Indirect Calls-Footnote-1608147 +Node: Functions Summary608275 +Node: Library Functions610980 +Ref: Library Functions-Footnote-1614589 +Ref: Library Functions-Footnote-2614732 +Node: Library Names614903 +Ref: Library Names-Footnote-1618364 +Ref: Library Names-Footnote-2618587 +Node: General Functions618673 +Node: Strtonum Function619776 +Node: Assert Function622798 +Node: Round Function626124 +Node: Cliff Random Function627665 +Node: Ordinal Functions628681 +Ref: Ordinal Functions-Footnote-1631744 +Ref: Ordinal Functions-Footnote-2631996 +Node: Join Function632206 +Ref: Join Function-Footnote-1633976 +Node: Getlocaltime Function634176 +Node: Readfile Function637920 +Node: Shell Quoting639894 +Node: Data File Management641295 +Node: Filetrans Function641927 +Node: Rewind Function646024 +Node: File Checking647410 +Ref: File Checking-Footnote-1648744 +Node: Empty Files648945 +Node: Ignoring Assigns650924 +Node: Getopt Function652474 +Ref: Getopt Function-Footnote-1663944 +Node: Passwd Functions664144 +Ref: Passwd Functions-Footnote-1672985 +Node: Group Functions673073 +Ref: Group Functions-Footnote-1680972 +Node: Walking Arrays681179 +Node: Library Functions Summary684189 +Node: Library Exercises685595 +Node: Sample Programs686874 +Node: Running Examples687644 +Node: Clones688372 +Node: Cut Program689596 +Node: Egrep Program699317 +Ref: Egrep Program-Footnote-1706829 +Node: Id Program706939 +Node: Split Program710619 +Ref: Split Program-Footnote-1714078 +Node: Tee Program714207 +Node: Uniq Program716997 +Node: Wc Program724423 +Ref: Wc Program-Footnote-1728678 +Node: Miscellaneous Programs728772 +Node: Dupword Program729985 +Node: Alarm Program732015 +Node: Translate Program736870 +Ref: Translate Program-Footnote-1741435 +Node: Labels Program741705 +Ref: Labels Program-Footnote-1745056 +Node: Word Sorting745140 +Node: History Sorting749212 +Node: Extract Program751047 +Node: Simple Sed758578 +Node: Igawk Program761652 +Ref: Igawk Program-Footnote-1775983 +Ref: Igawk Program-Footnote-2776185 +Ref: Igawk Program-Footnote-3776307 +Node: Anagram Program776422 +Node: Signature Program779484 +Node: Programs Summary780731 +Node: Programs Exercises781946 +Ref: Programs Exercises-Footnote-1786075 +Node: Advanced Features786166 +Node: Nondecimal Data788156 +Node: Array Sorting789747 +Node: Controlling Array Traversal790447 +Ref: Controlling Array Traversal-Footnote-1798816 +Node: Array Sorting Functions798934 +Ref: Array Sorting Functions-Footnote-1802821 +Node: Two-way I/O803017 +Ref: Two-way I/O-Footnote-1807968 +Ref: Two-way I/O-Footnote-2808155 +Node: TCP/IP Networking808237 +Node: Profiling811144 +Node: Advanced Features Summary819415 +Node: Internationalization821351 +Node: I18N and L10N822831 +Node: Explaining gettext823518 +Ref: Explaining gettext-Footnote-1828541 +Ref: Explaining gettext-Footnote-2828726 +Node: Programmer i18n828891 +Ref: Programmer i18n-Footnote-1833747 +Node: Translator i18n833796 +Node: String Extraction834590 +Ref: String Extraction-Footnote-1835723 +Node: Printf Ordering835809 +Ref: Printf Ordering-Footnote-1838595 +Node: I18N Portability838659 +Ref: I18N Portability-Footnote-1841115 +Node: I18N Example841178 +Ref: I18N Example-Footnote-1843984 +Node: Gawk I18N844057 +Node: I18N Summary844702 +Node: Debugger846043 +Node: Debugging847065 +Node: Debugging Concepts847506 +Node: Debugging Terms849315 +Node: Awk Debugging851890 +Node: Sample Debugging Session852796 +Node: Debugger Invocation853330 +Node: Finding The Bug854716 +Node: List of Debugger Commands861194 +Node: Breakpoint Control862527 +Node: Debugger Execution Control866221 +Node: Viewing And Changing Data869583 +Node: Execution Stack872957 +Node: Debugger Info874594 +Node: Miscellaneous Debugger Commands878665 +Node: Readline Support883674 +Node: Limitations884570 +Node: Debugging Summary886679 +Node: Arbitrary Precision Arithmetic887852 +Node: Computer Arithmetic889268 +Ref: table-numeric-ranges892859 +Ref: Computer Arithmetic-Footnote-1893581 +Node: Math Definitions893638 +Ref: table-ieee-formats896952 +Ref: Math Definitions-Footnote-1897555 +Node: MPFR features897660 +Node: FP Math Caution899333 +Ref: FP Math Caution-Footnote-1900405 +Node: Inexactness of computations900774 +Node: Inexact representation901734 +Node: Comparing FP Values903094 +Node: Errors accumulate904176 +Node: Getting Accuracy905609 +Node: Try To Round908319 +Node: Setting precision909218 +Ref: table-predefined-precision-strings909915 +Node: Setting the rounding mode911745 +Ref: table-gawk-rounding-modes912119 +Ref: Setting the rounding mode-Footnote-1915527 +Node: Arbitrary Precision Integers915706 +Ref: Arbitrary Precision Integers-Footnote-1920623 +Node: POSIX Floating Point Problems920772 +Ref: POSIX Floating Point Problems-Footnote-1924654 +Node: Floating point summary924692 +Node: Dynamic Extensions926882 +Node: Extension Intro928435 +Node: Plugin License929701 +Node: Extension Mechanism Outline930498 +Ref: figure-load-extension930937 +Ref: figure-register-new-function932502 +Ref: figure-call-new-function933594 +Node: Extension API Description935657 +Node: Extension API Functions Introduction937191 +Node: General Data Types942050 +Ref: General Data Types-Footnote-1948005 +Node: Memory Allocation Functions948304 +Ref: Memory Allocation Functions-Footnote-1951149 +Node: Constructor Functions951248 +Node: Registration Functions952993 +Node: Extension Functions953678 +Node: Exit Callback Functions955977 +Node: Extension Version String957227 +Node: Input Parsers957890 +Node: Output Wrappers967775 +Node: Two-way processors972287 +Node: Printing Messages974551 +Ref: Printing Messages-Footnote-1975627 +Node: Updating 'ERRNO'975780 +Node: Requesting Values976521 +Ref: table-value-types-returned977260 +Node: Accessing Parameters978143 +Node: Symbol Table Access979379 +Node: Symbol table by name979891 +Node: Symbol table by cookie981912 +Ref: Symbol table by cookie-Footnote-1986061 +Node: Cached values986125 +Ref: Cached values-Footnote-1989626 +Node: Array Manipulation989717 +Ref: Array Manipulation-Footnote-1990808 +Node: Array Data Types990845 +Ref: Array Data Types-Footnote-1993503 +Node: Array Functions993595 +Node: Flattening Arrays997454 +Node: Creating Arrays1004362 +Node: Redirection API1009134 +Node: Extension API Variables1011965 +Node: Extension Versioning1012598 +Node: Extension API Informational Variables1014489 +Node: Extension API Boilerplate1015553 +Node: Finding Extensions1019367 +Node: Extension Example1019927 +Node: Internal File Description1020725 +Node: Internal File Ops1024805 +Ref: Internal File Ops-Footnote-11036567 +Node: Using Internal File Ops1036707 +Ref: Using Internal File Ops-Footnote-11039090 +Node: Extension Samples1039365 +Node: Extension Sample File Functions1040894 +Node: Extension Sample Fnmatch1048543 +Node: Extension Sample Fork1050030 +Node: Extension Sample Inplace1051248 +Node: Extension Sample Ord1053334 +Node: Extension Sample Readdir1054170 +Ref: table-readdir-file-types1055059 +Node: Extension Sample Revout1055864 +Node: Extension Sample Rev2way1056453 +Node: Extension Sample Read write array1057193 +Node: Extension Sample Readfile1059135 +Node: Extension Sample Time1060230 +Node: Extension Sample API Tests1061578 +Node: gawkextlib1062070 +Node: Extension summary1064517 +Node: Extension Exercises1068209 +Node: Language History1069706 +Node: V7/SVR3.11071362 +Node: SVR41073515 +Node: POSIX1074949 +Node: BTL1076329 +Node: POSIX/GNU1077059 +Node: Feature History1082898 +Node: Common Extensions1096889 +Node: Ranges and Locales1098172 +Ref: Ranges and Locales-Footnote-11102788 +Ref: Ranges and Locales-Footnote-21102815 +Ref: Ranges and Locales-Footnote-31103050 +Node: Contributors1103271 +Node: History summary1108840 +Node: Installation1110220 +Node: Gawk Distribution1111165 +Node: Getting1111649 +Node: Extracting1112472 +Node: Distribution contents1114110 +Node: Unix Installation1120206 +Node: Quick Installation1120888 +Node: Shell Startup Files1123302 +Node: Additional Configuration Options1124380 +Node: Configuration Philosophy1126185 +Node: Non-Unix Installation1128555 +Node: PC Installation1129013 +Node: PC Binary Installation1130333 +Node: PC Compiling1132185 +Ref: PC Compiling-Footnote-11135209 +Node: PC Testing1135318 +Node: PC Using1136498 +Node: Cygwin1140612 +Node: MSYS1141382 +Node: VMS Installation1141883 +Node: VMS Compilation1142674 +Ref: VMS Compilation-Footnote-11143904 +Node: VMS Dynamic Extensions1143962 +Node: VMS Installation Details1145647 +Node: VMS Running1147900 +Node: VMS GNV1150741 +Node: VMS Old Gawk1151476 +Node: Bugs1151947 +Node: Other Versions1156061 +Node: Installation summary1162535 +Node: Notes1163593 +Node: Compatibility Mode1164458 +Node: Additions1165240 +Node: Accessing The Source1166165 +Node: Adding Code1167601 +Node: New Ports1173756 +Node: Derived Files1178244 +Ref: Derived Files-Footnote-11183729 +Ref: Derived Files-Footnote-21183764 +Ref: Derived Files-Footnote-31184362 +Node: Future Extensions1184476 +Node: Implementation Limitations1185134 +Node: Extension Design1186317 +Node: Old Extension Problems1187471 +Ref: Old Extension Problems-Footnote-11188989 +Node: Extension New Mechanism Goals1189046 +Ref: Extension New Mechanism Goals-Footnote-11192410 +Node: Extension Other Design Decisions1192599 +Node: Extension Future Growth1194712 +Node: Old Extension Mechanism1195548 +Node: Notes summary1197311 +Node: Basic Concepts1198493 +Node: Basic High Level1199174 +Ref: figure-general-flow1199456 +Ref: figure-process-flow1200141 +Ref: Basic High Level-Footnote-11203442 +Node: Basic Data Typing1203627 +Node: Glossary1206955 +Node: Copying1238901 +Node: GNU Free Documentation License1276440 +Node: Index1301558 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 13cd8dd4..825c97b0 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4908,6 +4908,25 @@ function names added by @command{gawk} after the code was written. Standard @command{awk} built-in functions, such as @code{sin()} or @code{substr()} are @emph{not} shadowed in this way. +The @code{PROCINFO["argv"]} array contains all of the command-line arguments +(after glob expansion and redirection processing on platforms where that must +be done manually by the program) with subscripts ranging from 0 through +@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain +the name by which @command{gawk} was invoked. Here is an example of how this +feature may be used: + +@example +awk ' +BEGIN @{ + for (i = 0; i < length(PROCINFO["argv"]); i++) + print i, PROCINFO["argv"][i] +@}' +@end example + +Please note that this differs from the standard @code{ARGV} array which does +not include command-line arguments that have already been processed by +@command{gawk} (@pxref{ARGC and ARGV}). + @end ignore @node Invoking Summary @@ -14606,8 +14625,8 @@ The current version of BWK @command{awk} and @command{mawk} also support @code{nextfile}. However, they don't allow the @code{nextfile} statement inside function bodies (@pxref{User-defined}). @command{gawk} does; a @code{nextfile} inside a function body reads the -next record and starts processing it with the first rule in the program, -just as any other @code{nextfile} statement. +first record from the next file and starts processing it with the first +rule in the program, just as any other @code{nextfile} statement. @node Exit Statement @subsection The @code{exit} Statement @@ -38746,6 +38765,8 @@ the bug reporting address is preferred because the email list is archived at the GNU Project. @emph{All email must be in English. This is the only language understood in common by all the maintainers.} +In addition, please be sure to send all mail in @emph{plain text}, +not (or not exclusively) in HTML. @cindex @code{comp.lang.awk} newsgroup @quotation CAUTION diff --git a/doc/gawktexi.in b/doc/gawktexi.in index e75fd214..a8af903e 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4819,6 +4819,25 @@ function names added by @command{gawk} after the code was written. Standard @command{awk} built-in functions, such as @code{sin()} or @code{substr()} are @emph{not} shadowed in this way. +The @code{PROCINFO["argv"]} array contains all of the command-line arguments +(after glob expansion and redirection processing on platforms where that must +be done manually by the program) with subscripts ranging from 0 through +@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain +the name by which @command{gawk} was invoked. Here is an example of how this +feature may be used: + +@example +awk ' +BEGIN @{ + for (i = 0; i < length(PROCINFO["argv"]); i++) + print i, PROCINFO["argv"][i] +@}' +@end example + +Please note that this differs from the standard @code{ARGV} array which does +not include command-line arguments that have already been processed by +@command{gawk} (@pxref{ARGC and ARGV}). + @end ignore @node Invoking Summary @@ -13934,8 +13953,8 @@ The current version of BWK @command{awk} and @command{mawk} also support @code{nextfile}. However, they don't allow the @code{nextfile} statement inside function bodies (@pxref{User-defined}). @command{gawk} does; a @code{nextfile} inside a function body reads the -next record and starts processing it with the first rule in the program, -just as any other @code{nextfile} statement. +first record from the next file and starts processing it with the first +rule in the program, just as any other @code{nextfile} statement. @node Exit Statement @subsection The @code{exit} Statement @@ -37837,6 +37856,8 @@ the bug reporting address is preferred because the email list is archived at the GNU Project. @emph{All email must be in English. This is the only language understood in common by all the maintainers.} +In addition, please be sure to send all mail in @emph{plain text}, +not (or not exclusively) in HTML. @cindex @code{comp.lang.awk} newsgroup @quotation CAUTION @@ -892,6 +892,33 @@ load_environ() return ENVIRON_node; } +static void +load_procinfo_argv() +{ + NODE *tmp; + NODE **aptr; + NODE *argv_array; + int i; + + tmp = make_string("argv", 4); + aptr = assoc_lookup(PROCINFO_node, tmp); + unref(tmp); + unref(*aptr); + getnode(argv_array); + memset(argv_array, '\0', sizeof(NODE)); /* valgrind wants this */ + null_array(argv_array); + *aptr = argv_array; + argv_array->parent_array = PROCINFO_node; + argv_array->vname = estrdup("argv", 4); + for (i = 0; d_argv[i] != NULL; i++) { + tmp = make_number(i); + aptr = assoc_lookup(argv_array, tmp); + unref(tmp); + unref(*aptr); + *aptr = make_string(d_argv[i], strlen(d_argv[i])); + } +} + /* load_procinfo --- populate the PROCINFO array */ static NODE * @@ -991,6 +1018,7 @@ load_procinfo() groupset = NULL; } #endif + load_procinfo_argv(); return PROCINFO_node; } @@ -560,6 +560,7 @@ load_symbols() memset(sym_array, '\0', sizeof(NODE)); /* PPC Mac OS X wants this */ null_array(sym_array); + unref(tmp); unref(*aptr); *aptr = sym_array; |