diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | awkgram.c | 6 | ||||
-rw-r--r-- | awkgram.y | 6 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 1270 | ||||
-rw-r--r-- | doc/gawk.texi | 121 | ||||
-rw-r--r-- | doc/gawktexi.in | 121 | ||||
-rw-r--r-- | io.c | 17 | ||||
-rw-r--r-- | pc/ChangeLog | 4 | ||||
-rw-r--r-- | pc/Makefile.tst | 79 |
10 files changed, 899 insertions, 740 deletions
@@ -1,3 +1,13 @@ +2014-09-23 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (yylex): Don't check for junk characters inside + quoted strings. Caused issues on DJGPP and Solaris. + + Unrelated + + * io.c (devopen): Straighten things out with respect to + compatibility with BWK awk. + 2014-09-19 Arnold D. Robbins <arnold@skeeve.com> * awkgram.y: Further commentary as to the treacherousness @@ -5735,7 +5735,11 @@ retry: case '"': string: esc_seen = false; - while ((c = nextc(true)) != '"') { + /* + * Allow any kind of junk in quoted string, + * so pass false to nextc(). + */ + while ((c = nextc(false)) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); @@ -3396,7 +3396,11 @@ retry: case '"': string: esc_seen = false; - while ((c = nextc(true)) != '"') { + /* + * Allow any kind of junk in quoted string, + * so pass false to nextc(). + */ + while ((c = nextc(false)) != '"') { if (c == '\n') { pushback(); yyerror(_("unterminated string")); diff --git a/doc/ChangeLog b/doc/ChangeLog index c0ecbeaf..245af617 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-23 Arnold D. Robbins <arnold@skeeve.com> + + * gawktex.in: Rework the documentation of special files in + Chapter 5; some reordering as well as rewriting. + 2014-09-22 Arnold D. Robbins <arnold@skeeve.com> * gawktex.in: Continue fixes after reading through the MS. diff --git a/doc/gawk.info b/doc/gawk.info index dc347a0f..77a3b20e 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -189,8 +189,8 @@ entitled "GNU Free Documentation License". * Regexp Field Splitting:: Using regexps as the field separator. * Single Character Fields:: Making each character a separate field. -* Command Line Field Separator:: Setting `FS' from the - command line. +* Command Line Field Separator:: Setting `FS' from the command + line. * Full Line Fields:: Making the full line be a single field. * Field Splitting Summary:: Some final points and a summary table. @@ -234,10 +234,12 @@ entitled "GNU Free Documentation License". * Printf Examples:: Several examples. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in `gawk'. `gawk' allows access to inherited file descriptors. -* Special FD:: Special files for I/O. +* Other Inherited Files:: Accessing other open files with + `gawk'. * Special Network:: Special files for network communications. * Special Caveats:: Things to watch out for. @@ -6036,6 +6038,7 @@ function. * Printf:: The `printf' statement. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in `gawk'. `gawk' allows access to inherited file descriptors. @@ -6637,7 +6640,7 @@ be emphasized by storing it in a variable, like this: { printf format, $1, $2 }' mail-list -File: gawk.info, Node: Redirection, Next: Special Files, Prev: Printf, Up: Printing +File: gawk.info, Node: Redirection, Next: Special FD, Prev: Printf, Up: Printing 5.6 Redirecting Output of `print' and `printf' ============================================== @@ -6788,39 +6791,26 @@ The program builds up a list of command lines, using the `mv' utility to rename the files. It then sends the list to the shell for execution. -File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Redirection, Up: Printing - -5.7 Special File Names in `gawk' -================================ - -`gawk' provides a number of special file names that it interprets -internally. These file names provide access to standard pre-opened -files and TCP/IP networking. - -* Menu: - -* Special FD:: Special files for I/O. -* Special Network:: Special files for network communications. -* Special Caveats:: Things to watch out for. - - -File: gawk.info, Node: Special FD, Next: Special Network, Up: Special Files +File: gawk.info, Node: Special FD, Next: Special Files, Prev: Redirection, Up: Printing -5.7.1 Special Files for Standard Pre-Opened Files -------------------------------------------------- +5.7 Special Files for Standard Pre-Opened Data Streams +====================================================== Running programs conventionally have three input and output streams already available to them for reading and writing. These are known as the "standard input", "standard output", and "standard error output". -These streams are, by default, connected to your keyboard and screen, -but they are often redirected with the shell, via the `<', `<<', `>', -`>>', `>&', and `|' operators. Standard error is typically used for -writing error messages; the reason there are two separate streams, +These open streams (and any other open file or pipe) are often referred +to by the technical term "file descriptors". + + These streams are, by default, connected to your keyboard and +screen, but they are often redirected with the shell, via the `<', `<<', +`>', `>>', `>&', and `|' operators. Standard error is typically used +for writing error messages; the reason there are two separate streams, standard output and standard error, is so that they can be redirected separately. - In other implementations of `awk', the only way to write an error -message to standard error in an `awk' program is as follows: + In traditional implementations of `awk', the only way to write an +error message to standard error in an `awk' program is as follows: print "Serious error detected!" | "cat 1>&2" @@ -6841,14 +6831,12 @@ that happens, writing to the screen is not correct. In fact, if `awk' is run from a background job, it may not have a terminal at all. Then opening `/dev/tty' fails. - `gawk' provides special file names for accessing the three standard -streams. (c.e.) It also provides syntax for accessing any other -inherited open files. These open files are often referred to by the -technical term "file descriptor". If the file name matches one of -these special names when `gawk' redirects input or output, then it -directly uses the descriptor that the file name stands for. These -special file names work for all operating systems that `gawk' has been -ported to, not just those that are POSIX-compliant: + `gawk', BWK `awk' and `mawk' provide special file names for +accessing the three standard streams. If the file name matches one of +these special names when `gawk' (or one of the others) redirects input +or output, then it directly uses the descriptor that the file name +stands for. These special file names work for all operating systems +that `gawk' has been ported to, not just those that are POSIX-compliant: `/dev/stdin' The standard input (file descriptor 0). @@ -6859,16 +6847,8 @@ ported to, not just those that are POSIX-compliant: `/dev/stderr' The standard error output (file descriptor 2). -`/dev/fd/N' - The file associated with file descriptor N. Such a file must be - opened by the program initiating the `awk' execution (typically - the shell). Unless special pains are taken in the shell from which - `gawk' is invoked, only descriptors 0, 1, and 2 are available. - - The file names `/dev/stdin', `/dev/stdout', and `/dev/stderr' are -aliases for `/dev/fd/0', `/dev/fd/1', and `/dev/fd/2', respectively. -However, they are more self-explanatory. The proper way to write an -error message in a `gawk' program is to use `/dev/stderr', like this: + With these facilities, the proper way to write an error message then +becomes: print "Serious error detected!" > "/dev/stderr" @@ -6876,21 +6856,60 @@ error message in a `gawk' program is to use `/dev/stderr', like this: redirection, the value must be a string. It is a common error to omit the quotes, which leads to confusing results. - Finally, using the `close()' function on a file name of the form -`"/dev/fd/N"', for file descriptor numbers above two, does actually -close the given file descriptor. - - The `/dev/stdin', `/dev/stdout', and `/dev/stderr' special files are -also recognized internally by several other versions of `awk'. + `gawk' does not treat these file names as special when in POSIX +compatibility mode. However, since BWK `awk' supports them, `gawk' does +support them even when invoked with the `--traditional' option (*note +Options::). ---------- Footnotes ---------- (1) The "tty" in `/dev/tty' stands for "Teletype," a serial terminal. -File: gawk.info, Node: Special Network, Next: Special Caveats, Prev: Special FD, Up: Special Files +File: gawk.info, Node: Special Files, Next: Close Files And Pipes, Prev: Special FD, Up: Printing + +5.8 Special File Names in `gawk' +================================ -5.7.2 Special Files for Network Communications +Besides access to standard input, stanard output, and standard error, +`gawk' provides access to any open file descriptor. Additionally, +there are special file names reserved for TCP/IP networking. + +* Menu: + +* Other Inherited Files:: Accessing other open files with + `gawk'. +* Special Network:: Special files for network communications. +* Special Caveats:: Things to watch out for. + + +File: gawk.info, Node: Other Inherited Files, Next: Special Network, Up: Special Files + +5.8.1 Accessing Other Open Files With `gawk' +-------------------------------------------- + +Besides the `/dev/stdin', `/dev/stdout', and `/dev/stderr' special file +names mentioned earlier, `gawk' provides syntax for accessing any other +inherited open file: + +`/dev/fd/N' + The file associated with file descriptor N. Such a file must be + opened by the program initiating the `awk' execution (typically + the shell). Unless special pains are taken in the shell from which + `gawk' is invoked, only descriptors 0, 1, and 2 are available. + + The file names `/dev/stdin', `/dev/stdout', and `/dev/stderr' are +essentially aliases for `/dev/fd/0', `/dev/fd/1', and `/dev/fd/2', +respectively. However, those names are more self-explanatory. + + Note that using `close()' on a file name of the form `"/dev/fd/N"', +for file descriptor numbers above two, does actually close the given +file descriptor. + + +File: gawk.info, Node: Special Network, Next: Special Caveats, Prev: Other Inherited Files, Up: Special Files + +5.8.2 Special Files for Network Communications ---------------------------------------------- `gawk' programs can open a two-way TCP/IP connection, acting as either @@ -6910,14 +6929,18 @@ mentioned here only for completeness. Full discussion is delayed until File: gawk.info, Node: Special Caveats, Prev: Special Network, Up: Special Files -5.7.3 Special File Name Caveats +5.8.3 Special File Name Caveats ------------------------------- Here are some things to bear in mind when using the special file names that `gawk' provides: - * Recognition of these special file names is disabled if `gawk' is in - compatibility mode (*note Options::). + * Recognition of the file names for the three standard pre-opened + files is disabled only in POSIX mode. + + * Recognition of the other special file names is disabled if `gawk' + is in compatibility mode (either `--traditional' or `--posix'; + *note Options::). * `gawk' _always_ interprets these special file names. For example, using `/dev/fd/4' for output actually writes on file descriptor 4, @@ -6930,7 +6953,7 @@ that `gawk' provides: File: gawk.info, Node: Close Files And Pipes, Next: Output Summary, Prev: Special Files, Up: Printing -5.8 Closing Input and Output Redirections +5.9 Closing Input and Output Redirections ========================================= If the same file name or the same shell command is used with `getline' @@ -7098,8 +7121,8 @@ value. File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Files And Pipes, Up: Printing -5.9 Summary -=========== +5.10 Summary +============ * The `print' statement prints comma-separated expressions. Each expression is separated by the value of `OFS' and terminated by @@ -7124,7 +7147,7 @@ File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Fi File: gawk.info, Node: Output Exercises, Prev: Output Summary, Up: Printing -5.10 Exercises +5.11 Exercises ============== 1. Rewrite the program: @@ -31233,8 +31256,8 @@ Index (line 148) * / (forward slash), patterns and: Expression Patterns. (line 24) * /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) -* /dev/... special files: Special FD. (line 47) -* /dev/fd/N special files (gawk): Special FD. (line 47) +* /dev/... special files: Special FD. (line 48) +* /dev/fd/N special files (gawk): Special FD. (line 48) * /inet/... special files (gawk): TCP/IP Networking. (line 6) * /inet4/... special files (gawk): TCP/IP Networking. (line 6) * /inet6/... special files (gawk): TCP/IP Networking. (line 6) @@ -31809,9 +31832,9 @@ Index * commenting, backslash continuation and: Statements/Lines. (line 76) * common extensions, ** operator: Arithmetic Ops. (line 30) * common extensions, **= operator: Assignment Ops. (line 137) -* common extensions, /dev/stderr special file: Special FD. (line 47) -* common extensions, /dev/stdin special file: Special FD. (line 47) -* common extensions, /dev/stdout special file: Special FD. (line 47) +* common extensions, /dev/stderr special file: Special FD. (line 48) +* common extensions, /dev/stdin special file: Special FD. (line 48) +* common extensions, /dev/stdout special file: Special FD. (line 48) * common extensions, \x escape sequence: Escape Sequences. (line 61) * common extensions, BINMODE variable: PC Using. (line 33) * common extensions, delete to delete entire arrays: Delete. (line 39) @@ -32114,7 +32137,7 @@ Index * differences in awk and gawk, command-line directories: Command-line directories. (line 6) * differences in awk and gawk, ERRNO variable: Auto-set. (line 82) -* differences in awk and gawk, error messages: Special FD. (line 16) +* differences in awk and gawk, error messages: Special FD. (line 19) * differences in awk and gawk, FIELDWIDTHS variable: User-modified. (line 37) * differences in awk and gawk, FPAT variable: User-modified. (line 43) @@ -32260,7 +32283,7 @@ Index * ERRNO variable, with close() function: Close Files And Pipes. (line 140) * ERRNO variable, with getline command: Getline. (line 19) -* error handling: Special FD. (line 16) +* error handling: Special FD. (line 19) * error handling, ERRNO variable and: Auto-set. (line 82) * error output: Special FD. (line 6) * escape processing, gsub()/gensub()/sub() functions: Gory Details. @@ -32327,9 +32350,9 @@ Index * extensions, Brian Kernighan's awk: BTL. (line 6) * extensions, common, ** operator: Arithmetic Ops. (line 30) * extensions, common, **= operator: Assignment Ops. (line 137) -* extensions, common, /dev/stderr special file: Special FD. (line 47) -* extensions, common, /dev/stdin special file: Special FD. (line 47) -* extensions, common, /dev/stdout special file: Special FD. (line 47) +* extensions, common, /dev/stderr special file: Special FD. (line 48) +* extensions, common, /dev/stdin special file: Special FD. (line 48) +* extensions, common, /dev/stdout special file: Special FD. (line 48) * extensions, common, \x escape sequence: Escape Sequences. (line 61) * extensions, common, BINMODE variable: PC Using. (line 33) * extensions, common, delete to delete entire arrays: Delete. (line 39) @@ -32396,7 +32419,7 @@ Index * file inclusion, @include directive: Include Files. (line 8) * file names, distinguishing: Auto-set. (line 56) * file names, in compatibility mode: Special Caveats. (line 9) -* file names, standard streams in gawk: Special FD. (line 47) +* file names, standard streams in gawk: Special FD. (line 48) * FILENAME variable <1>: Auto-set. (line 98) * FILENAME variable: Reading Files. (line 6) * FILENAME variable, getline, setting with: Getline Notes. (line 19) @@ -32409,7 +32432,7 @@ Index * files, .po: Explaining gettext. (line 37) * files, .po, converting to .mo: I18N Example. (line 63) * files, .pot: Explaining gettext. (line 31) -* files, /dev/... special files: Special FD. (line 47) +* files, /dev/... special files: Special FD. (line 48) * files, /inet/... (gawk): TCP/IP Networking. (line 6) * files, /inet4/... (gawk): TCP/IP Networking. (line 6) * files, /inet6/... (gawk): TCP/IP Networking. (line 6) @@ -33937,7 +33960,7 @@ Index * troubleshooting, print statement, omitting commas: Print Examples. (line 31) * troubleshooting, printing: Redirection. (line 112) -* troubleshooting, quotes with file names: Special FD. (line 69) +* troubleshooting, quotes with file names: Special FD. (line 62) * troubleshooting, readable data files: File Checking. (line 6) * troubleshooting, regexp constants vs. string constants: Computed Regexps. (line 39) @@ -34119,553 +34142,554 @@ Index Tag Table: Node: Top1204 -Node: Foreword41858 -Node: Preface46205 -Ref: Preface-Footnote-149100 -Ref: Preface-Footnote-249207 -Ref: Preface-Footnote-349440 -Node: History49582 -Node: Names51956 -Ref: Names-Footnote-153050 -Node: This Manual53196 -Ref: This Manual-Footnote-159031 -Node: Conventions59131 -Node: Manual History61476 -Ref: Manual History-Footnote-164552 -Ref: Manual History-Footnote-264593 -Node: How To Contribute64667 -Node: Acknowledgments65906 -Node: Getting Started70654 -Node: Running gawk73088 -Node: One-shot74278 -Node: Read Terminal75503 -Node: Long77530 -Node: Executable Scripts79046 -Ref: Executable Scripts-Footnote-181835 -Node: Comments81937 -Node: Quoting84410 -Node: DOS Quoting89920 -Node: Sample Data Files90595 -Node: Very Simple93188 -Node: Two Rules98079 -Node: More Complex99965 -Node: Statements/Lines102827 -Ref: Statements/Lines-Footnote-1107283 -Node: Other Features107548 -Node: When108479 -Ref: When-Footnote-1110235 -Node: Intro Summary110300 -Node: Invoking Gawk111183 -Node: Command Line112698 -Node: Options113489 -Ref: Options-Footnote-1129187 -Node: Other Arguments129212 -Node: Naming Standard Input132173 -Node: Environment Variables133266 -Node: AWKPATH Variable133824 -Ref: AWKPATH Variable-Footnote-1136676 -Ref: AWKPATH Variable-Footnote-2136721 -Node: AWKLIBPATH Variable136981 -Node: Other Environment Variables137740 -Node: Exit Status141213 -Node: Include Files141888 -Node: Loading Shared Libraries145466 -Node: Obsolete146893 -Node: Undocumented147590 -Node: Invoking Summary147857 -Node: Regexp149523 -Node: Regexp Usage150982 -Node: Escape Sequences153015 -Node: Regexp Operators159115 -Ref: Regexp Operators-Footnote-1166550 -Ref: Regexp Operators-Footnote-2166697 -Node: Bracket Expressions166795 -Ref: table-char-classes168812 -Node: Leftmost Longest171752 -Node: Computed Regexps173054 -Node: GNU Regexp Operators176451 -Node: Case-sensitivity180157 -Ref: Case-sensitivity-Footnote-1183047 -Ref: Case-sensitivity-Footnote-2183282 -Node: Regexp Summary183390 -Node: Reading Files184859 -Node: Records186951 -Node: awk split records187679 -Node: gawk split records192591 -Ref: gawk split records-Footnote-1197130 -Node: Fields197167 -Ref: Fields-Footnote-1199963 -Node: Nonconstant Fields200049 -Ref: Nonconstant Fields-Footnote-1202279 -Node: Changing Fields202481 -Node: Field Separators208413 -Node: Default Field Splitting211115 -Node: Regexp Field Splitting212232 -Node: Single Character Fields215582 -Node: Command Line Field Separator216641 -Node: Full Line Fields219851 -Ref: Full Line Fields-Footnote-1220359 -Node: Field Splitting Summary220405 -Ref: Field Splitting Summary-Footnote-1223536 -Node: Constant Size223637 -Node: Splitting By Content228243 -Ref: Splitting By Content-Footnote-1232316 -Node: Multiple Line232356 -Ref: Multiple Line-Footnote-1238245 -Node: Getline238424 -Node: Plain Getline240635 -Node: Getline/Variable243275 -Node: Getline/File244422 -Node: Getline/Variable/File245806 -Ref: Getline/Variable/File-Footnote-1247405 -Node: Getline/Pipe247492 -Node: Getline/Variable/Pipe250175 -Node: Getline/Coprocess251304 -Node: Getline/Variable/Coprocess252556 -Node: Getline Notes253293 -Node: Getline Summary256085 -Ref: table-getline-variants256493 -Node: Read Timeout257322 -Ref: Read Timeout-Footnote-1261136 -Node: Command-line directories261194 -Node: Input Summary262098 -Node: Input Exercises265350 -Node: Printing266078 -Node: Print267800 -Node: Print Examples269257 -Node: Output Separators272036 -Node: OFMT274052 -Node: Printf275404 -Node: Basic Printf276189 -Node: Control Letters277760 -Node: Format Modifiers281744 -Node: Printf Examples287751 -Node: Redirection290233 -Node: Special Files296967 -Node: Special FD297500 -Ref: Special FD-Footnote-1301194 -Node: Special Network301268 -Node: Special Caveats302118 -Node: Close Files And Pipes302910 -Ref: Close Files And Pipes-Footnote-1310087 -Ref: Close Files And Pipes-Footnote-2310235 -Node: Output Summary310385 -Node: Output Exercises311379 -Node: Expressions312059 -Node: Values313244 -Node: Constants313920 -Node: Scalar Constants314600 -Ref: Scalar Constants-Footnote-1315459 -Node: Nondecimal-numbers315709 -Node: Regexp Constants318709 -Node: Using Constant Regexps319234 -Node: Variables322372 -Node: Using Variables323027 -Node: Assignment Options324931 -Node: Conversion326806 -Node: Strings And Numbers327330 -Ref: Strings And Numbers-Footnote-1330392 -Node: Locale influences conversions330501 -Ref: table-locale-affects333216 -Node: All Operators333804 -Node: Arithmetic Ops334434 -Node: Concatenation336939 -Ref: Concatenation-Footnote-1339758 -Node: Assignment Ops339864 -Ref: table-assign-ops344847 -Node: Increment Ops346125 -Node: Truth Values and Conditions349563 -Node: Truth Values350646 -Node: Typing and Comparison351695 -Node: Variable Typing352488 -Node: Comparison Operators356140 -Ref: table-relational-ops356550 -Node: POSIX String Comparison360065 -Ref: POSIX String Comparison-Footnote-1361137 -Node: Boolean Ops361275 -Ref: Boolean Ops-Footnote-1365754 -Node: Conditional Exp365845 -Node: Function Calls367572 -Node: Precedence371452 -Node: Locales375120 -Node: Expressions Summary376751 -Node: Patterns and Actions379325 -Node: Pattern Overview380441 -Node: Regexp Patterns382120 -Node: Expression Patterns382663 -Node: Ranges386443 -Node: BEGIN/END389549 -Node: Using BEGIN/END390311 -Ref: Using BEGIN/END-Footnote-1393048 -Node: I/O And BEGIN/END393154 -Node: BEGINFILE/ENDFILE395468 -Node: Empty398369 -Node: Using Shell Variables398686 -Node: Action Overview400962 -Node: Statements403289 -Node: If Statement405137 -Node: While Statement406635 -Node: Do Statement408663 -Node: For Statement409805 -Node: Switch Statement412960 -Node: Break Statement415348 -Node: Continue Statement417389 -Node: Next Statement419214 -Node: Nextfile Statement421594 -Node: Exit Statement424224 -Node: Built-in Variables426627 -Node: User-modified427754 -Ref: User-modified-Footnote-1435434 -Node: Auto-set435496 -Ref: Auto-set-Footnote-1448690 -Ref: Auto-set-Footnote-2448895 -Node: ARGC and ARGV448951 -Node: Pattern Action Summary453155 -Node: Arrays455574 -Node: Array Basics456903 -Node: Array Intro457747 -Ref: figure-array-elements459720 -Ref: Array Intro-Footnote-1462244 -Node: Reference to Elements462372 -Node: Assigning Elements464822 -Node: Array Example465313 -Node: Scanning an Array467071 -Node: Controlling Scanning470087 -Ref: Controlling Scanning-Footnote-1475276 -Node: Numeric Array Subscripts475592 -Node: Uninitialized Subscripts477775 -Node: Delete479392 -Ref: Delete-Footnote-1482136 -Node: Multidimensional482193 -Node: Multiscanning485288 -Node: Arrays of Arrays486877 -Node: Arrays Summary491638 -Node: Functions493743 -Node: Built-in494616 -Node: Calling Built-in495694 -Node: Numeric Functions497682 -Ref: Numeric Functions-Footnote-1502506 -Ref: Numeric Functions-Footnote-2502863 -Ref: Numeric Functions-Footnote-3502911 -Node: String Functions503180 -Ref: String Functions-Footnote-1526640 -Ref: String Functions-Footnote-2526769 -Ref: String Functions-Footnote-3527017 -Node: Gory Details527104 -Ref: table-sub-escapes528885 -Ref: table-sub-proposed530405 -Ref: table-posix-sub531769 -Ref: table-gensub-escapes533309 -Ref: Gory Details-Footnote-1534141 -Node: I/O Functions534292 -Ref: I/O Functions-Footnote-1541393 -Node: Time Functions541540 -Ref: Time Functions-Footnote-1552009 -Ref: Time Functions-Footnote-2552077 -Ref: Time Functions-Footnote-3552235 -Ref: Time Functions-Footnote-4552346 -Ref: Time Functions-Footnote-5552458 -Ref: Time Functions-Footnote-6552685 -Node: Bitwise Functions552951 -Ref: table-bitwise-ops553513 -Ref: Bitwise Functions-Footnote-1557821 -Node: Type Functions557990 -Node: I18N Functions559139 -Node: User-defined560784 -Node: Definition Syntax561588 -Ref: Definition Syntax-Footnote-1566992 -Node: Function Example567061 -Ref: Function Example-Footnote-1569978 -Node: Function Caveats570000 -Node: Calling A Function570518 -Node: Variable Scope571473 -Node: Pass By Value/Reference574461 -Node: Return Statement577971 -Node: Dynamic Typing580955 -Node: Indirect Calls581884 -Ref: Indirect Calls-Footnote-1591605 -Node: Functions Summary591733 -Node: Library Functions594432 -Ref: Library Functions-Footnote-1598050 -Ref: Library Functions-Footnote-2598193 -Node: Library Names598364 -Ref: Library Names-Footnote-1601822 -Ref: Library Names-Footnote-2602042 -Node: General Functions602128 -Node: Strtonum Function603156 -Node: Assert Function606176 -Node: Round Function609500 -Node: Cliff Random Function611041 -Node: Ordinal Functions612057 -Ref: Ordinal Functions-Footnote-1615122 -Ref: Ordinal Functions-Footnote-2615374 -Node: Join Function615585 -Ref: Join Function-Footnote-1617356 -Node: Getlocaltime Function617556 -Node: Readfile Function621297 -Node: Data File Management623245 -Node: Filetrans Function623877 -Node: Rewind Function627936 -Node: File Checking629494 -Ref: File Checking-Footnote-1630626 -Node: Empty Files630827 -Node: Ignoring Assigns632806 -Node: Getopt Function634360 -Ref: Getopt Function-Footnote-1645624 -Node: Passwd Functions645827 -Ref: Passwd Functions-Footnote-1654806 -Node: Group Functions654894 -Ref: Group Functions-Footnote-1662825 -Node: Walking Arrays663038 -Node: Library Functions Summary664641 -Node: Library Exercises666029 -Node: Sample Programs667309 -Node: Running Examples668079 -Node: Clones668807 -Node: Cut Program670031 -Node: Egrep Program679889 -Ref: Egrep Program-Footnote-1687476 -Node: Id Program687586 -Node: Split Program691240 -Ref: Split Program-Footnote-1694778 -Node: Tee Program694906 -Node: Uniq Program697693 -Node: Wc Program705116 -Ref: Wc Program-Footnote-1709381 -Node: Miscellaneous Programs709473 -Node: Dupword Program710686 -Node: Alarm Program712717 -Node: Translate Program717521 -Ref: Translate Program-Footnote-1722094 -Ref: Translate Program-Footnote-2722364 -Node: Labels Program722503 -Ref: Labels Program-Footnote-1725864 -Node: Word Sorting725948 -Node: History Sorting729991 -Node: Extract Program731827 -Node: Simple Sed739363 -Node: Igawk Program742425 -Ref: Igawk Program-Footnote-1756729 -Ref: Igawk Program-Footnote-2756930 -Node: Anagram Program757052 -Node: Signature Program760120 -Node: Programs Summary761367 -Node: Programs Exercises762582 -Ref: Programs Exercises-Footnote-1766713 -Node: Advanced Features766804 -Node: Nondecimal Data768752 -Node: Array Sorting770329 -Node: Controlling Array Traversal771026 -Node: Array Sorting Functions779306 -Ref: Array Sorting Functions-Footnote-1783198 -Node: Two-way I/O783392 -Ref: Two-way I/O-Footnote-1788336 -Ref: Two-way I/O-Footnote-2788515 -Node: TCP/IP Networking788597 -Node: Profiling791439 -Node: Advanced Features Summary798990 -Node: Internationalization800851 -Node: I18N and L10N802331 -Node: Explaining gettext803017 -Ref: Explaining gettext-Footnote-1808043 -Ref: Explaining gettext-Footnote-2808227 -Node: Programmer i18n808392 -Ref: Programmer i18n-Footnote-1813186 -Node: Translator i18n813235 -Node: String Extraction814029 -Ref: String Extraction-Footnote-1815162 -Node: Printf Ordering815248 -Ref: Printf Ordering-Footnote-1818030 -Node: I18N Portability818094 -Ref: I18N Portability-Footnote-1820543 -Node: I18N Example820606 -Ref: I18N Example-Footnote-1823312 -Node: Gawk I18N823384 -Node: I18N Summary824022 -Node: Debugger825361 -Node: Debugging826383 -Node: Debugging Concepts826824 -Node: Debugging Terms828680 -Node: Awk Debugging831277 -Node: Sample Debugging Session832169 -Node: Debugger Invocation832689 -Node: Finding The Bug834025 -Node: List of Debugger Commands840504 -Node: Breakpoint Control841836 -Node: Debugger Execution Control845500 -Node: Viewing And Changing Data848860 -Node: Execution Stack852218 -Node: Debugger Info853731 -Node: Miscellaneous Debugger Commands857725 -Node: Readline Support862909 -Node: Limitations863801 -Node: Debugging Summary866074 -Node: Arbitrary Precision Arithmetic867242 -Node: Computer Arithmetic868729 -Ref: Computer Arithmetic-Footnote-1873116 -Node: Math Definitions873173 -Ref: table-ieee-formats876462 -Ref: Math Definitions-Footnote-1877002 -Node: MPFR features877105 -Node: FP Math Caution878722 -Ref: FP Math Caution-Footnote-1879772 -Node: Inexactness of computations880141 -Node: Inexact representation881089 -Node: Comparing FP Values882444 -Node: Errors accumulate883408 -Node: Getting Accuracy884841 -Node: Try To Round887500 -Node: Setting precision888399 -Ref: table-predefined-precision-strings889081 -Node: Setting the rounding mode890874 -Ref: table-gawk-rounding-modes891238 -Ref: Setting the rounding mode-Footnote-1894692 -Node: Arbitrary Precision Integers894871 -Ref: Arbitrary Precision Integers-Footnote-1898644 -Node: POSIX Floating Point Problems898793 -Ref: POSIX Floating Point Problems-Footnote-1902669 -Node: Floating point summary902707 -Node: Dynamic Extensions904911 -Node: Extension Intro906463 -Node: Plugin License907728 -Node: Extension Mechanism Outline908413 -Ref: figure-load-extension908837 -Ref: figure-load-new-function910322 -Ref: figure-call-new-function911324 -Node: Extension API Description913308 -Node: Extension API Functions Introduction914758 -Node: General Data Types919625 -Ref: General Data Types-Footnote-1925318 -Node: Requesting Values925617 -Ref: table-value-types-returned926354 -Node: Memory Allocation Functions927312 -Ref: Memory Allocation Functions-Footnote-1930059 -Node: Constructor Functions930155 -Node: Registration Functions931913 -Node: Extension Functions932598 -Node: Exit Callback Functions934900 -Node: Extension Version String936148 -Node: Input Parsers936798 -Node: Output Wrappers946612 -Node: Two-way processors951128 -Node: Printing Messages953332 -Ref: Printing Messages-Footnote-1954409 -Node: Updating `ERRNO'954561 -Node: Accessing Parameters955300 -Node: Symbol Table Access956530 -Node: Symbol table by name957044 -Node: Symbol table by cookie959020 -Ref: Symbol table by cookie-Footnote-1963153 -Node: Cached values963216 -Ref: Cached values-Footnote-1966720 -Node: Array Manipulation966811 -Ref: Array Manipulation-Footnote-1967909 -Node: Array Data Types967948 -Ref: Array Data Types-Footnote-1970651 -Node: Array Functions970743 -Node: Flattening Arrays974617 -Node: Creating Arrays981469 -Node: Extension API Variables986200 -Node: Extension Versioning986836 -Node: Extension API Informational Variables988737 -Node: Extension API Boilerplate989823 -Node: Finding Extensions993627 -Node: Extension Example994187 -Node: Internal File Description994917 -Node: Internal File Ops999008 -Ref: Internal File Ops-Footnote-11010440 -Node: Using Internal File Ops1010580 -Ref: Using Internal File Ops-Footnote-11012927 -Node: Extension Samples1013195 -Node: Extension Sample File Functions1014719 -Node: Extension Sample Fnmatch1022287 -Node: Extension Sample Fork1023769 -Node: Extension Sample Inplace1024982 -Node: Extension Sample Ord1026657 -Node: Extension Sample Readdir1027493 -Ref: table-readdir-file-types1028349 -Node: Extension Sample Revout1029148 -Node: Extension Sample Rev2way1029739 -Node: Extension Sample Read write array1030480 -Node: Extension Sample Readfile1032359 -Node: Extension Sample API Tests1033459 -Node: Extension Sample Time1033984 -Node: gawkextlib1035299 -Node: Extension summary1038112 -Node: Extension Exercises1041805 -Node: Language History1042527 -Node: V7/SVR3.11044170 -Node: SVR41046490 -Node: POSIX1047932 -Node: BTL1049318 -Node: POSIX/GNU1050052 -Node: Feature History1055828 -Node: Common Extensions1068919 -Node: Ranges and Locales1070231 -Ref: Ranges and Locales-Footnote-11074848 -Ref: Ranges and Locales-Footnote-21074875 -Ref: Ranges and Locales-Footnote-31075109 -Node: Contributors1075330 -Node: History summary1080755 -Node: Installation1082124 -Node: Gawk Distribution1083075 -Node: Getting1083559 -Node: Extracting1084383 -Node: Distribution contents1086025 -Node: Unix Installation1091795 -Node: Quick Installation1092412 -Node: Additional Configuration Options1094854 -Node: Configuration Philosophy1096592 -Node: Non-Unix Installation1098943 -Node: PC Installation1099401 -Node: PC Binary Installation1100712 -Node: PC Compiling1102560 -Ref: PC Compiling-Footnote-11105559 -Node: PC Testing1105664 -Node: PC Using1106840 -Node: Cygwin1110992 -Node: MSYS1111801 -Node: VMS Installation1112299 -Node: VMS Compilation1113095 -Ref: VMS Compilation-Footnote-11114317 -Node: VMS Dynamic Extensions1114375 -Node: VMS Installation Details1115748 -Node: VMS Running1118000 -Node: VMS GNV1120834 -Node: VMS Old Gawk1121557 -Node: Bugs1122027 -Node: Other Versions1126031 -Node: Installation summary1132255 -Node: Notes1133311 -Node: Compatibility Mode1134176 -Node: Additions1134958 -Node: Accessing The Source1135883 -Node: Adding Code1137319 -Node: New Ports1143497 -Node: Derived Files1147978 -Ref: Derived Files-Footnote-11153453 -Ref: Derived Files-Footnote-21153487 -Ref: Derived Files-Footnote-31154083 -Node: Future Extensions1154197 -Node: Implementation Limitations1154803 -Node: Extension Design1156051 -Node: Old Extension Problems1157205 -Ref: Old Extension Problems-Footnote-11158722 -Node: Extension New Mechanism Goals1158779 -Ref: Extension New Mechanism Goals-Footnote-11162139 -Node: Extension Other Design Decisions1162328 -Node: Extension Future Growth1164434 -Node: Old Extension Mechanism1165270 -Node: Notes summary1167032 -Node: Basic Concepts1168218 -Node: Basic High Level1168899 -Ref: figure-general-flow1169171 -Ref: figure-process-flow1169770 -Ref: Basic High Level-Footnote-11172999 -Node: Basic Data Typing1173184 -Node: Glossary1176512 -Node: Copying1201664 -Node: GNU Free Documentation License1239220 -Node: Index1264356 +Node: Foreword41978 +Node: Preface46325 +Ref: Preface-Footnote-149220 +Ref: Preface-Footnote-249327 +Ref: Preface-Footnote-349560 +Node: History49702 +Node: Names52076 +Ref: Names-Footnote-153170 +Node: This Manual53316 +Ref: This Manual-Footnote-159151 +Node: Conventions59251 +Node: Manual History61596 +Ref: Manual History-Footnote-164672 +Ref: Manual History-Footnote-264713 +Node: How To Contribute64787 +Node: Acknowledgments66026 +Node: Getting Started70774 +Node: Running gawk73208 +Node: One-shot74398 +Node: Read Terminal75623 +Node: Long77650 +Node: Executable Scripts79166 +Ref: Executable Scripts-Footnote-181955 +Node: Comments82057 +Node: Quoting84530 +Node: DOS Quoting90040 +Node: Sample Data Files90715 +Node: Very Simple93308 +Node: Two Rules98199 +Node: More Complex100085 +Node: Statements/Lines102947 +Ref: Statements/Lines-Footnote-1107403 +Node: Other Features107668 +Node: When108599 +Ref: When-Footnote-1110355 +Node: Intro Summary110420 +Node: Invoking Gawk111303 +Node: Command Line112818 +Node: Options113609 +Ref: Options-Footnote-1129307 +Node: Other Arguments129332 +Node: Naming Standard Input132293 +Node: Environment Variables133386 +Node: AWKPATH Variable133944 +Ref: AWKPATH Variable-Footnote-1136796 +Ref: AWKPATH Variable-Footnote-2136841 +Node: AWKLIBPATH Variable137101 +Node: Other Environment Variables137860 +Node: Exit Status141333 +Node: Include Files142008 +Node: Loading Shared Libraries145586 +Node: Obsolete147013 +Node: Undocumented147710 +Node: Invoking Summary147977 +Node: Regexp149643 +Node: Regexp Usage151102 +Node: Escape Sequences153135 +Node: Regexp Operators159235 +Ref: Regexp Operators-Footnote-1166670 +Ref: Regexp Operators-Footnote-2166817 +Node: Bracket Expressions166915 +Ref: table-char-classes168932 +Node: Leftmost Longest171872 +Node: Computed Regexps173174 +Node: GNU Regexp Operators176571 +Node: Case-sensitivity180277 +Ref: Case-sensitivity-Footnote-1183167 +Ref: Case-sensitivity-Footnote-2183402 +Node: Regexp Summary183510 +Node: Reading Files184979 +Node: Records187071 +Node: awk split records187799 +Node: gawk split records192711 +Ref: gawk split records-Footnote-1197250 +Node: Fields197287 +Ref: Fields-Footnote-1200083 +Node: Nonconstant Fields200169 +Ref: Nonconstant Fields-Footnote-1202399 +Node: Changing Fields202601 +Node: Field Separators208533 +Node: Default Field Splitting211235 +Node: Regexp Field Splitting212352 +Node: Single Character Fields215702 +Node: Command Line Field Separator216761 +Node: Full Line Fields219971 +Ref: Full Line Fields-Footnote-1220479 +Node: Field Splitting Summary220525 +Ref: Field Splitting Summary-Footnote-1223656 +Node: Constant Size223757 +Node: Splitting By Content228363 +Ref: Splitting By Content-Footnote-1232436 +Node: Multiple Line232476 +Ref: Multiple Line-Footnote-1238365 +Node: Getline238544 +Node: Plain Getline240755 +Node: Getline/Variable243395 +Node: Getline/File244542 +Node: Getline/Variable/File245926 +Ref: Getline/Variable/File-Footnote-1247525 +Node: Getline/Pipe247612 +Node: Getline/Variable/Pipe250295 +Node: Getline/Coprocess251424 +Node: Getline/Variable/Coprocess252676 +Node: Getline Notes253413 +Node: Getline Summary256205 +Ref: table-getline-variants256613 +Node: Read Timeout257442 +Ref: Read Timeout-Footnote-1261256 +Node: Command-line directories261314 +Node: Input Summary262218 +Node: Input Exercises265470 +Node: Printing266198 +Node: Print267975 +Node: Print Examples269432 +Node: Output Separators272211 +Node: OFMT274227 +Node: Printf275579 +Node: Basic Printf276364 +Node: Control Letters277935 +Node: Format Modifiers281919 +Node: Printf Examples287926 +Node: Redirection290408 +Node: Special FD297139 +Ref: Special FD-Footnote-1300296 +Node: Special Files300370 +Node: Other Inherited Files300986 +Node: Special Network301986 +Node: Special Caveats302847 +Node: Close Files And Pipes303798 +Ref: Close Files And Pipes-Footnote-1310975 +Ref: Close Files And Pipes-Footnote-2311123 +Node: Output Summary311273 +Node: Output Exercises312269 +Node: Expressions312949 +Node: Values314134 +Node: Constants314810 +Node: Scalar Constants315490 +Ref: Scalar Constants-Footnote-1316349 +Node: Nondecimal-numbers316599 +Node: Regexp Constants319599 +Node: Using Constant Regexps320124 +Node: Variables323262 +Node: Using Variables323917 +Node: Assignment Options325821 +Node: Conversion327696 +Node: Strings And Numbers328220 +Ref: Strings And Numbers-Footnote-1331282 +Node: Locale influences conversions331391 +Ref: table-locale-affects334106 +Node: All Operators334694 +Node: Arithmetic Ops335324 +Node: Concatenation337829 +Ref: Concatenation-Footnote-1340648 +Node: Assignment Ops340754 +Ref: table-assign-ops345737 +Node: Increment Ops347015 +Node: Truth Values and Conditions350453 +Node: Truth Values351536 +Node: Typing and Comparison352585 +Node: Variable Typing353378 +Node: Comparison Operators357030 +Ref: table-relational-ops357440 +Node: POSIX String Comparison360955 +Ref: POSIX String Comparison-Footnote-1362027 +Node: Boolean Ops362165 +Ref: Boolean Ops-Footnote-1366644 +Node: Conditional Exp366735 +Node: Function Calls368462 +Node: Precedence372342 +Node: Locales376010 +Node: Expressions Summary377641 +Node: Patterns and Actions380215 +Node: Pattern Overview381331 +Node: Regexp Patterns383010 +Node: Expression Patterns383553 +Node: Ranges387333 +Node: BEGIN/END390439 +Node: Using BEGIN/END391201 +Ref: Using BEGIN/END-Footnote-1393938 +Node: I/O And BEGIN/END394044 +Node: BEGINFILE/ENDFILE396358 +Node: Empty399259 +Node: Using Shell Variables399576 +Node: Action Overview401852 +Node: Statements404179 +Node: If Statement406027 +Node: While Statement407525 +Node: Do Statement409553 +Node: For Statement410695 +Node: Switch Statement413850 +Node: Break Statement416238 +Node: Continue Statement418279 +Node: Next Statement420104 +Node: Nextfile Statement422484 +Node: Exit Statement425114 +Node: Built-in Variables427517 +Node: User-modified428644 +Ref: User-modified-Footnote-1436324 +Node: Auto-set436386 +Ref: Auto-set-Footnote-1449580 +Ref: Auto-set-Footnote-2449785 +Node: ARGC and ARGV449841 +Node: Pattern Action Summary454045 +Node: Arrays456464 +Node: Array Basics457793 +Node: Array Intro458637 +Ref: figure-array-elements460610 +Ref: Array Intro-Footnote-1463134 +Node: Reference to Elements463262 +Node: Assigning Elements465712 +Node: Array Example466203 +Node: Scanning an Array467961 +Node: Controlling Scanning470977 +Ref: Controlling Scanning-Footnote-1476166 +Node: Numeric Array Subscripts476482 +Node: Uninitialized Subscripts478665 +Node: Delete480282 +Ref: Delete-Footnote-1483026 +Node: Multidimensional483083 +Node: Multiscanning486178 +Node: Arrays of Arrays487767 +Node: Arrays Summary492528 +Node: Functions494633 +Node: Built-in495506 +Node: Calling Built-in496584 +Node: Numeric Functions498572 +Ref: Numeric Functions-Footnote-1503396 +Ref: Numeric Functions-Footnote-2503753 +Ref: Numeric Functions-Footnote-3503801 +Node: String Functions504070 +Ref: String Functions-Footnote-1527530 +Ref: String Functions-Footnote-2527659 +Ref: String Functions-Footnote-3527907 +Node: Gory Details527994 +Ref: table-sub-escapes529775 +Ref: table-sub-proposed531295 +Ref: table-posix-sub532659 +Ref: table-gensub-escapes534199 +Ref: Gory Details-Footnote-1535031 +Node: I/O Functions535182 +Ref: I/O Functions-Footnote-1542283 +Node: Time Functions542430 +Ref: Time Functions-Footnote-1552899 +Ref: Time Functions-Footnote-2552967 +Ref: Time Functions-Footnote-3553125 +Ref: Time Functions-Footnote-4553236 +Ref: Time Functions-Footnote-5553348 +Ref: Time Functions-Footnote-6553575 +Node: Bitwise Functions553841 +Ref: table-bitwise-ops554403 +Ref: Bitwise Functions-Footnote-1558711 +Node: Type Functions558880 +Node: I18N Functions560029 +Node: User-defined561674 +Node: Definition Syntax562478 +Ref: Definition Syntax-Footnote-1567882 +Node: Function Example567951 +Ref: Function Example-Footnote-1570868 +Node: Function Caveats570890 +Node: Calling A Function571408 +Node: Variable Scope572363 +Node: Pass By Value/Reference575351 +Node: Return Statement578861 +Node: Dynamic Typing581845 +Node: Indirect Calls582774 +Ref: Indirect Calls-Footnote-1592495 +Node: Functions Summary592623 +Node: Library Functions595322 +Ref: Library Functions-Footnote-1598940 +Ref: Library Functions-Footnote-2599083 +Node: Library Names599254 +Ref: Library Names-Footnote-1602712 +Ref: Library Names-Footnote-2602932 +Node: General Functions603018 +Node: Strtonum Function604046 +Node: Assert Function607066 +Node: Round Function610390 +Node: Cliff Random Function611931 +Node: Ordinal Functions612947 +Ref: Ordinal Functions-Footnote-1616012 +Ref: Ordinal Functions-Footnote-2616264 +Node: Join Function616475 +Ref: Join Function-Footnote-1618246 +Node: Getlocaltime Function618446 +Node: Readfile Function622187 +Node: Data File Management624135 +Node: Filetrans Function624767 +Node: Rewind Function628826 +Node: File Checking630384 +Ref: File Checking-Footnote-1631516 +Node: Empty Files631717 +Node: Ignoring Assigns633696 +Node: Getopt Function635250 +Ref: Getopt Function-Footnote-1646514 +Node: Passwd Functions646717 +Ref: Passwd Functions-Footnote-1655696 +Node: Group Functions655784 +Ref: Group Functions-Footnote-1663715 +Node: Walking Arrays663928 +Node: Library Functions Summary665531 +Node: Library Exercises666919 +Node: Sample Programs668199 +Node: Running Examples668969 +Node: Clones669697 +Node: Cut Program670921 +Node: Egrep Program680779 +Ref: Egrep Program-Footnote-1688366 +Node: Id Program688476 +Node: Split Program692130 +Ref: Split Program-Footnote-1695668 +Node: Tee Program695796 +Node: Uniq Program698583 +Node: Wc Program706006 +Ref: Wc Program-Footnote-1710271 +Node: Miscellaneous Programs710363 +Node: Dupword Program711576 +Node: Alarm Program713607 +Node: Translate Program718411 +Ref: Translate Program-Footnote-1722984 +Ref: Translate Program-Footnote-2723254 +Node: Labels Program723393 +Ref: Labels Program-Footnote-1726754 +Node: Word Sorting726838 +Node: History Sorting730881 +Node: Extract Program732717 +Node: Simple Sed740253 +Node: Igawk Program743315 +Ref: Igawk Program-Footnote-1757619 +Ref: Igawk Program-Footnote-2757820 +Node: Anagram Program757942 +Node: Signature Program761010 +Node: Programs Summary762257 +Node: Programs Exercises763472 +Ref: Programs Exercises-Footnote-1767603 +Node: Advanced Features767694 +Node: Nondecimal Data769642 +Node: Array Sorting771219 +Node: Controlling Array Traversal771916 +Node: Array Sorting Functions780196 +Ref: Array Sorting Functions-Footnote-1784088 +Node: Two-way I/O784282 +Ref: Two-way I/O-Footnote-1789226 +Ref: Two-way I/O-Footnote-2789405 +Node: TCP/IP Networking789487 +Node: Profiling792329 +Node: Advanced Features Summary799880 +Node: Internationalization801741 +Node: I18N and L10N803221 +Node: Explaining gettext803907 +Ref: Explaining gettext-Footnote-1808933 +Ref: Explaining gettext-Footnote-2809117 +Node: Programmer i18n809282 +Ref: Programmer i18n-Footnote-1814076 +Node: Translator i18n814125 +Node: String Extraction814919 +Ref: String Extraction-Footnote-1816052 +Node: Printf Ordering816138 +Ref: Printf Ordering-Footnote-1818920 +Node: I18N Portability818984 +Ref: I18N Portability-Footnote-1821433 +Node: I18N Example821496 +Ref: I18N Example-Footnote-1824202 +Node: Gawk I18N824274 +Node: I18N Summary824912 +Node: Debugger826251 +Node: Debugging827273 +Node: Debugging Concepts827714 +Node: Debugging Terms829570 +Node: Awk Debugging832167 +Node: Sample Debugging Session833059 +Node: Debugger Invocation833579 +Node: Finding The Bug834915 +Node: List of Debugger Commands841394 +Node: Breakpoint Control842726 +Node: Debugger Execution Control846390 +Node: Viewing And Changing Data849750 +Node: Execution Stack853108 +Node: Debugger Info854621 +Node: Miscellaneous Debugger Commands858615 +Node: Readline Support863799 +Node: Limitations864691 +Node: Debugging Summary866964 +Node: Arbitrary Precision Arithmetic868132 +Node: Computer Arithmetic869619 +Ref: Computer Arithmetic-Footnote-1874006 +Node: Math Definitions874063 +Ref: table-ieee-formats877352 +Ref: Math Definitions-Footnote-1877892 +Node: MPFR features877995 +Node: FP Math Caution879612 +Ref: FP Math Caution-Footnote-1880662 +Node: Inexactness of computations881031 +Node: Inexact representation881979 +Node: Comparing FP Values883334 +Node: Errors accumulate884298 +Node: Getting Accuracy885731 +Node: Try To Round888390 +Node: Setting precision889289 +Ref: table-predefined-precision-strings889971 +Node: Setting the rounding mode891764 +Ref: table-gawk-rounding-modes892128 +Ref: Setting the rounding mode-Footnote-1895582 +Node: Arbitrary Precision Integers895761 +Ref: Arbitrary Precision Integers-Footnote-1899534 +Node: POSIX Floating Point Problems899683 +Ref: POSIX Floating Point Problems-Footnote-1903559 +Node: Floating point summary903597 +Node: Dynamic Extensions905801 +Node: Extension Intro907353 +Node: Plugin License908618 +Node: Extension Mechanism Outline909303 +Ref: figure-load-extension909727 +Ref: figure-load-new-function911212 +Ref: figure-call-new-function912214 +Node: Extension API Description914198 +Node: Extension API Functions Introduction915648 +Node: General Data Types920515 +Ref: General Data Types-Footnote-1926208 +Node: Requesting Values926507 +Ref: table-value-types-returned927244 +Node: Memory Allocation Functions928202 +Ref: Memory Allocation Functions-Footnote-1930949 +Node: Constructor Functions931045 +Node: Registration Functions932803 +Node: Extension Functions933488 +Node: Exit Callback Functions935790 +Node: Extension Version String937038 +Node: Input Parsers937688 +Node: Output Wrappers947502 +Node: Two-way processors952018 +Node: Printing Messages954222 +Ref: Printing Messages-Footnote-1955299 +Node: Updating `ERRNO'955451 +Node: Accessing Parameters956190 +Node: Symbol Table Access957420 +Node: Symbol table by name957934 +Node: Symbol table by cookie959910 +Ref: Symbol table by cookie-Footnote-1964043 +Node: Cached values964106 +Ref: Cached values-Footnote-1967610 +Node: Array Manipulation967701 +Ref: Array Manipulation-Footnote-1968799 +Node: Array Data Types968838 +Ref: Array Data Types-Footnote-1971541 +Node: Array Functions971633 +Node: Flattening Arrays975507 +Node: Creating Arrays982359 +Node: Extension API Variables987090 +Node: Extension Versioning987726 +Node: Extension API Informational Variables989627 +Node: Extension API Boilerplate990713 +Node: Finding Extensions994517 +Node: Extension Example995077 +Node: Internal File Description995807 +Node: Internal File Ops999898 +Ref: Internal File Ops-Footnote-11011330 +Node: Using Internal File Ops1011470 +Ref: Using Internal File Ops-Footnote-11013817 +Node: Extension Samples1014085 +Node: Extension Sample File Functions1015609 +Node: Extension Sample Fnmatch1023177 +Node: Extension Sample Fork1024659 +Node: Extension Sample Inplace1025872 +Node: Extension Sample Ord1027547 +Node: Extension Sample Readdir1028383 +Ref: table-readdir-file-types1029239 +Node: Extension Sample Revout1030038 +Node: Extension Sample Rev2way1030629 +Node: Extension Sample Read write array1031370 +Node: Extension Sample Readfile1033249 +Node: Extension Sample API Tests1034349 +Node: Extension Sample Time1034874 +Node: gawkextlib1036189 +Node: Extension summary1039002 +Node: Extension Exercises1042695 +Node: Language History1043417 +Node: V7/SVR3.11045060 +Node: SVR41047380 +Node: POSIX1048822 +Node: BTL1050208 +Node: POSIX/GNU1050942 +Node: Feature History1056718 +Node: Common Extensions1069809 +Node: Ranges and Locales1071121 +Ref: Ranges and Locales-Footnote-11075738 +Ref: Ranges and Locales-Footnote-21075765 +Ref: Ranges and Locales-Footnote-31075999 +Node: Contributors1076220 +Node: History summary1081645 +Node: Installation1083014 +Node: Gawk Distribution1083965 +Node: Getting1084449 +Node: Extracting1085273 +Node: Distribution contents1086915 +Node: Unix Installation1092685 +Node: Quick Installation1093302 +Node: Additional Configuration Options1095744 +Node: Configuration Philosophy1097482 +Node: Non-Unix Installation1099833 +Node: PC Installation1100291 +Node: PC Binary Installation1101602 +Node: PC Compiling1103450 +Ref: PC Compiling-Footnote-11106449 +Node: PC Testing1106554 +Node: PC Using1107730 +Node: Cygwin1111882 +Node: MSYS1112691 +Node: VMS Installation1113189 +Node: VMS Compilation1113985 +Ref: VMS Compilation-Footnote-11115207 +Node: VMS Dynamic Extensions1115265 +Node: VMS Installation Details1116638 +Node: VMS Running1118890 +Node: VMS GNV1121724 +Node: VMS Old Gawk1122447 +Node: Bugs1122917 +Node: Other Versions1126921 +Node: Installation summary1133145 +Node: Notes1134201 +Node: Compatibility Mode1135066 +Node: Additions1135848 +Node: Accessing The Source1136773 +Node: Adding Code1138209 +Node: New Ports1144387 +Node: Derived Files1148868 +Ref: Derived Files-Footnote-11154343 +Ref: Derived Files-Footnote-21154377 +Ref: Derived Files-Footnote-31154973 +Node: Future Extensions1155087 +Node: Implementation Limitations1155693 +Node: Extension Design1156941 +Node: Old Extension Problems1158095 +Ref: Old Extension Problems-Footnote-11159612 +Node: Extension New Mechanism Goals1159669 +Ref: Extension New Mechanism Goals-Footnote-11163029 +Node: Extension Other Design Decisions1163218 +Node: Extension Future Growth1165324 +Node: Old Extension Mechanism1166160 +Node: Notes summary1167922 +Node: Basic Concepts1169108 +Node: Basic High Level1169789 +Ref: figure-general-flow1170061 +Ref: figure-process-flow1170660 +Ref: Basic High Level-Footnote-11173889 +Node: Basic Data Typing1174074 +Node: Glossary1177402 +Node: Copying1202554 +Node: GNU Free Documentation License1240110 +Node: Index1265246 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 718afe09..b3077fa5 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -565,8 +565,8 @@ particular records in a file and perform operations upon them. * Regexp Field Splitting:: Using regexps as the field separator. * Single Character Fields:: Making each character a separate field. -* Command Line Field Separator:: Setting @code{FS} from the - command line. +* Command Line Field Separator:: Setting @code{FS} from the command + line. * Full Line Fields:: Making the full line be a single field. * Field Splitting Summary:: Some final points and a summary table. @@ -610,10 +610,12 @@ particular records in a file and perform operations upon them. * Printf Examples:: Several examples. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in @command{gawk}. @command{gawk} allows access to inherited file descriptors. -* Special FD:: Special files for I/O. +* Other Inherited Files:: Accessing other open files with + @command{gawk}. * Special Network:: Special files for network communications. * Special Caveats:: Things to watch out for. @@ -8795,6 +8797,7 @@ and discusses the @code{close()} built-in function. * Printf:: The @code{printf} statement. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in @command{gawk}. @command{gawk} allows access to inherited file descriptors. @@ -9818,23 +9821,8 @@ It then sends the list to the shell for execution. @c ENDOFRANGE outre @c ENDOFRANGE reout -@node Special Files -@section Special @value{FFN}s in @command{gawk} -@c STARTOFRANGE gfn -@cindex @command{gawk}, file names in - -@command{gawk} provides a number of special @value{FN}s that it interprets -internally. These @value{FN}s provide access to standard pre-opened files -and TCP/IP networking. - -@menu -* Special FD:: Special files for I/O. -* Special Network:: Special files for network communications. -* Special Caveats:: Things to watch out for. -@end menu - @node Special FD -@subsection Special Files for Standard Pre-Opened Files +@section Special Files for Standard Pre-Opened Data Streams @cindex standard input @cindex input, standard @cindex standard output @@ -9845,9 +9833,12 @@ and TCP/IP networking. @cindex files, descriptors, See file descriptors Running programs conventionally have three input and output streams -already available to them for reading and writing. These are known as -the @dfn{standard input}, @dfn{standard output}, and @dfn{standard error -output}. These streams are, by default, connected to your keyboard and screen, but +already available to them for reading and writing. These are known +as the @dfn{standard input}, @dfn{standard output}, and @dfn{standard +error output}. These open streams (and any other open file or pipe) +are often referred to by the technical term @dfn{file descriptors}. + +These streams are, by default, connected to your keyboard and screen, but they are often redirected with the shell, via the @samp{<}, @samp{<<}, @samp{>}, @samp{>>}, @samp{>&}, and @samp{|} operators. Standard error is typically used for writing error messages; the reason there are two separate @@ -9856,7 +9847,7 @@ redirected separately. @cindex differences in @command{awk} and @command{gawk}, error messages @cindex error handling -In other implementations of @command{awk}, the only way to write an error +In traditional implementations of @command{awk}, the only way to write an error message to standard error in an @command{awk} program is as follows: @example @@ -9889,15 +9880,12 @@ that happens, writing to the screen is not correct. In fact, if terminal at all. Then opening @file{/dev/tty} fails. -@command{gawk} provides special @value{FN}s for accessing the three standard -streams. @value{COMMONEXT} It also provides syntax for accessing -any other inherited open files. -These open files are often referred to by the technical term -@dfn{file descriptor}. -If the @value{FN} matches -one of these special names when @command{gawk} redirects input or output, -then it directly uses the descriptor that the @value{FN} stands for. -These special @value{FN}s work for all operating systems that @command{gawk} +@command{gawk}, BWK @command{awk} and @command{mawk} provide +special @value{FN}s for accessing the three standard streams. +If the @value{FN} matches one of these special names when @command{gawk} +(or one of the others) redirects input or output, then it directly uses +the descriptor that the @value{FN} stands for. These special +@value{FN}s work for all operating systems that @command{gawk} has been ported to, not just those that are POSIX-compliant: @cindex common extensions, @code{/dev/stdin} special file @@ -9919,19 +9907,10 @@ The standard output (file descriptor 1). @item /dev/stderr The standard error output (file descriptor 2). - -@item /dev/fd/@var{N} -The file associated with file descriptor @var{N}. Such a file must -be opened by the program initiating the @command{awk} execution (typically -the shell). Unless special pains are taken in the shell from which -@command{gawk} is invoked, only descriptors 0, 1, and 2 are available. @end table -The @value{FN}s @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} -are aliases for @file{/dev/fd/0}, @file{/dev/fd/1}, and @file{/dev/fd/2}, -respectively. However, they are more self-explanatory. -The proper way to write an error message in a @command{gawk} program -is to use @file{/dev/stderr}, like this: +With these facilities, +the proper way to write an error message then becomes: @example print "Serious error detected!" > "/dev/stderr" @@ -9943,14 +9922,51 @@ Like any other redirection, the value must be a string. It is a common error to omit the quotes, which leads to confusing results. -Finally, using the @code{close()} function on a @value{FN} of the +@command{gawk} does not treat these @value{FN}s as special when +in POSIX compatibility mode. However, since BWK @command{awk} +supports them, @command{gawk} does support them even when +invoked with the @option{--traditional} option (@pxref{Options}). + +@node Special Files +@section Special @value{FFN}s in @command{gawk} +@c STARTOFRANGE gfn +@cindex @command{gawk}, file names in + +Besides access to standard input, stanard output, and standard error, +@command{gawk} provides access to any open file descriptor. +Additionally, there are special @value{FN}s reserved for +TCP/IP networking. + +@menu +* Other Inherited Files:: Accessing other open files with + @command{gawk}. +* Special Network:: Special files for network communications. +* Special Caveats:: Things to watch out for. +@end menu + +@node Other Inherited Files +@subsection Accessing Other Open Files With @command{gawk} + +Besides the @code{/dev/stdin}, @code{/dev/stdout}, and @code{/dev/stderr} +special @value{FN}s mentioned earlier, @command{gawk} provides syntax +for accessing any other inherited open file: + +@table @file +@item /dev/fd/@var{N} +The file associated with file descriptor @var{N}. Such a file must +be opened by the program initiating the @command{awk} execution (typically +the shell). Unless special pains are taken in the shell from which +@command{gawk} is invoked, only descriptors 0, 1, and 2 are available. +@end table + +The @value{FN}s @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} +are essentially aliases for @file{/dev/fd/0}, @file{/dev/fd/1}, and +@file{/dev/fd/2}, respectively. However, those names are more self-explanatory. + +Note that using @code{close()} on a @value{FN} of the form @code{"/dev/fd/@var{N}"}, for file descriptor numbers above two, does actually close the given file descriptor. -The @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} -special files are also recognized internally by several other -versions of @command{awk}. - @node Special Network @subsection Special Files for Network Communications @cindex networks, support for @@ -9986,8 +10002,13 @@ special @value{FN}s that @command{gawk} provides: @cindex compatibility mode (@command{gawk}), file names @cindex file names, in compatibility mode @item -Recognition of these special @value{FN}s is disabled if @command{gawk} is in -compatibility mode (@pxref{Options}). +Recognition of the @value{FN}s for the three standard pre-opened +files is disabled only in POSIX mode. + +@item +Recognition of the other special @value{FN}s is disabled if @command{gawk} is in +compatibility mode (either @option{--traditional} or @option{--posix}; +@pxref{Options}). @item @command{gawk} @emph{always} diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 3bea4ba2..43234e7c 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -560,8 +560,8 @@ particular records in a file and perform operations upon them. * Regexp Field Splitting:: Using regexps as the field separator. * Single Character Fields:: Making each character a separate field. -* Command Line Field Separator:: Setting @code{FS} from the - command line. +* Command Line Field Separator:: Setting @code{FS} from the command + line. * Full Line Fields:: Making the full line be a single field. * Field Splitting Summary:: Some final points and a summary table. @@ -605,10 +605,12 @@ particular records in a file and perform operations upon them. * Printf Examples:: Several examples. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in @command{gawk}. @command{gawk} allows access to inherited file descriptors. -* Special FD:: Special files for I/O. +* Other Inherited Files:: Accessing other open files with + @command{gawk}. * Special Network:: Special files for network communications. * Special Caveats:: Things to watch out for. @@ -8396,6 +8398,7 @@ and discusses the @code{close()} built-in function. * Printf:: The @code{printf} statement. * Redirection:: How to redirect output to multiple files and pipes. +* Special FD:: Special files for I/O. * Special Files:: File name interpretation in @command{gawk}. @command{gawk} allows access to inherited file descriptors. @@ -9381,23 +9384,8 @@ It then sends the list to the shell for execution. @c ENDOFRANGE outre @c ENDOFRANGE reout -@node Special Files -@section Special @value{FFN}s in @command{gawk} -@c STARTOFRANGE gfn -@cindex @command{gawk}, file names in - -@command{gawk} provides a number of special @value{FN}s that it interprets -internally. These @value{FN}s provide access to standard pre-opened files -and TCP/IP networking. - -@menu -* Special FD:: Special files for I/O. -* Special Network:: Special files for network communications. -* Special Caveats:: Things to watch out for. -@end menu - @node Special FD -@subsection Special Files for Standard Pre-Opened Files +@section Special Files for Standard Pre-Opened Data Streams @cindex standard input @cindex input, standard @cindex standard output @@ -9408,9 +9396,12 @@ and TCP/IP networking. @cindex files, descriptors, See file descriptors Running programs conventionally have three input and output streams -already available to them for reading and writing. These are known as -the @dfn{standard input}, @dfn{standard output}, and @dfn{standard error -output}. These streams are, by default, connected to your keyboard and screen, but +already available to them for reading and writing. These are known +as the @dfn{standard input}, @dfn{standard output}, and @dfn{standard +error output}. These open streams (and any other open file or pipe) +are often referred to by the technical term @dfn{file descriptors}. + +These streams are, by default, connected to your keyboard and screen, but they are often redirected with the shell, via the @samp{<}, @samp{<<}, @samp{>}, @samp{>>}, @samp{>&}, and @samp{|} operators. Standard error is typically used for writing error messages; the reason there are two separate @@ -9419,7 +9410,7 @@ redirected separately. @cindex differences in @command{awk} and @command{gawk}, error messages @cindex error handling -In other implementations of @command{awk}, the only way to write an error +In traditional implementations of @command{awk}, the only way to write an error message to standard error in an @command{awk} program is as follows: @example @@ -9452,15 +9443,12 @@ that happens, writing to the screen is not correct. In fact, if terminal at all. Then opening @file{/dev/tty} fails. -@command{gawk} provides special @value{FN}s for accessing the three standard -streams. @value{COMMONEXT} It also provides syntax for accessing -any other inherited open files. -These open files are often referred to by the technical term -@dfn{file descriptor}. -If the @value{FN} matches -one of these special names when @command{gawk} redirects input or output, -then it directly uses the descriptor that the @value{FN} stands for. -These special @value{FN}s work for all operating systems that @command{gawk} +@command{gawk}, BWK @command{awk} and @command{mawk} provide +special @value{FN}s for accessing the three standard streams. +If the @value{FN} matches one of these special names when @command{gawk} +(or one of the others) redirects input or output, then it directly uses +the descriptor that the @value{FN} stands for. These special +@value{FN}s work for all operating systems that @command{gawk} has been ported to, not just those that are POSIX-compliant: @cindex common extensions, @code{/dev/stdin} special file @@ -9482,19 +9470,10 @@ The standard output (file descriptor 1). @item /dev/stderr The standard error output (file descriptor 2). - -@item /dev/fd/@var{N} -The file associated with file descriptor @var{N}. Such a file must -be opened by the program initiating the @command{awk} execution (typically -the shell). Unless special pains are taken in the shell from which -@command{gawk} is invoked, only descriptors 0, 1, and 2 are available. @end table -The @value{FN}s @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} -are aliases for @file{/dev/fd/0}, @file{/dev/fd/1}, and @file{/dev/fd/2}, -respectively. However, they are more self-explanatory. -The proper way to write an error message in a @command{gawk} program -is to use @file{/dev/stderr}, like this: +With these facilities, +the proper way to write an error message then becomes: @example print "Serious error detected!" > "/dev/stderr" @@ -9506,14 +9485,51 @@ Like any other redirection, the value must be a string. It is a common error to omit the quotes, which leads to confusing results. -Finally, using the @code{close()} function on a @value{FN} of the +@command{gawk} does not treat these @value{FN}s as special when +in POSIX compatibility mode. However, since BWK @command{awk} +supports them, @command{gawk} does support them even when +invoked with the @option{--traditional} option (@pxref{Options}). + +@node Special Files +@section Special @value{FFN}s in @command{gawk} +@c STARTOFRANGE gfn +@cindex @command{gawk}, file names in + +Besides access to standard input, stanard output, and standard error, +@command{gawk} provides access to any open file descriptor. +Additionally, there are special @value{FN}s reserved for +TCP/IP networking. + +@menu +* Other Inherited Files:: Accessing other open files with + @command{gawk}. +* Special Network:: Special files for network communications. +* Special Caveats:: Things to watch out for. +@end menu + +@node Other Inherited Files +@subsection Accessing Other Open Files With @command{gawk} + +Besides the @code{/dev/stdin}, @code{/dev/stdout}, and @code{/dev/stderr} +special @value{FN}s mentioned earlier, @command{gawk} provides syntax +for accessing any other inherited open file: + +@table @file +@item /dev/fd/@var{N} +The file associated with file descriptor @var{N}. Such a file must +be opened by the program initiating the @command{awk} execution (typically +the shell). Unless special pains are taken in the shell from which +@command{gawk} is invoked, only descriptors 0, 1, and 2 are available. +@end table + +The @value{FN}s @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} +are essentially aliases for @file{/dev/fd/0}, @file{/dev/fd/1}, and +@file{/dev/fd/2}, respectively. However, those names are more self-explanatory. + +Note that using @code{close()} on a @value{FN} of the form @code{"/dev/fd/@var{N}"}, for file descriptor numbers above two, does actually close the given file descriptor. -The @file{/dev/stdin}, @file{/dev/stdout}, and @file{/dev/stderr} -special files are also recognized internally by several other -versions of @command{awk}. - @node Special Network @subsection Special Files for Network Communications @cindex networks, support for @@ -9549,8 +9565,13 @@ special @value{FN}s that @command{gawk} provides: @cindex compatibility mode (@command{gawk}), file names @cindex file names, in compatibility mode @item -Recognition of these special @value{FN}s is disabled if @command{gawk} is in -compatibility mode (@pxref{Options}). +Recognition of the @value{FN}s for the three standard pre-opened +files is disabled only in POSIX mode. + +@item +Recognition of the other special @value{FN}s is disabled if @command{gawk} is in +compatibility mode (either @option{--traditional} or @option{--posix}; +@pxref{Options}). @item @command{gawk} @emph{always} @@ -1550,6 +1550,17 @@ nextrres: * change the string. */ +/* + * 9/2014: Flow here is a little messy. + * + * For do_posix, we don't allow any of the special filenames. + * + * For do_traditional, we allow /dev/{stdin,stdout,stderr} since BWK awk + * (and mawk) support them. But we don't allow /dev/fd/N or /inet. + * + * Note that for POSIX systems os_devopen() is a no-op. + */ + int devopen(const char *name, const char *mode) { @@ -1565,7 +1576,7 @@ devopen(const char *name, const char *mode) flag = str2mode(mode); openfd = INVALID_HANDLE; - if (do_traditional) + if (do_posix) goto strictopen; if ((openfd = os_devopen(name, flag)) != INVALID_HANDLE) { @@ -1582,6 +1593,8 @@ devopen(const char *name, const char *mode) openfd = fileno(stdout); else if (strcmp(cp, "stderr") == 0 && (flag & O_ACCMODE) == O_WRONLY) openfd = fileno(stderr); + else if (do_traditional) + goto strictopen; else if (strncmp(cp, "fd/", 3) == 0) { struct stat sbuf; @@ -1594,6 +1607,8 @@ devopen(const char *name, const char *mode) /* do not set close-on-exec for inherited fd's */ if (openfd != INVALID_HANDLE) return openfd; + } else if (do_traditional) { + goto strictopen; } else if (inetfile(name, & isi)) { #ifdef HAVE_SOCKETS cp = (char *) name; diff --git a/pc/ChangeLog b/pc/ChangeLog index a66edae9..235f520c 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2014-09-23 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst: Sync with mainline. + 2014-04-17 Scott Deifik <scottd.mail@sbcglobal.net> * Makefile.tst: Add readfile2 test. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 610704e4..48fc5189 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -180,19 +180,19 @@ UNIX_TESTS = \ GAWK_EXT_TESTS = \ aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \ backw badargs beginfile1 beginfile2 binmode1 charasbytes \ - colonwarn clos1way delsub devfd devfd1 devfd2 dumpvars exit \ + colonwarn clos1way dbugeval delsub devfd devfd1 devfd2 dumpvars exit \ fieldwdth fpat1 fpat2 fpat3 fpatnull fsfwfs funlen \ functab1 functab2 functab3 fwtest fwtest2 fwtest3 \ gensub gensub2 getlndir gnuops2 gnuops3 gnureops \ icasefs icasers id igncdym igncfs ignrcas2 ignrcase \ incdupe incdupe2 incdupe3 incdupe4 incdupe5 incdupe6 incdupe7 \ - include include2 indirectcall \ + include include2 indirectcall indirectcall2 \ lint lintold lintwarn \ manyfiles match1 match2 match3 mbstr1 \ nastyparm next nondec nondec2 \ - patsplit posix printfbad1 printfbad2 printfbad3 procinfs \ + patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \ profile1 profile2 profile3 profile4 profile5 pty1 \ - rebuf regx8bit reginttrad reint reint2 rsstart1 \ + rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \ splitarg4 strftime \ strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \ @@ -201,8 +201,9 @@ GAWK_EXT_TESTS = \ EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht MACHINE_TESTS = double1 double2 fmtspcl intformat -MPFR_TESTS = mpfrnr mpfrnegzero mpfrrnd mpfrieee mpfrexprange \ - mpfrsort mpfrbigint +MPFR_TESTS = mpfrnr mpfrnegzero mpfrrem mpfrrnd mpfrieee mpfrexprange \ + mpfrsort mpfrsqrt mpfrbigint + LOCALE_CHARSET_TESTS = \ asort asorti backbigs1 backsmalls1 backsmalls2 \ fmttest fnarydel fnparydl jarebug lc_num1 mbfw1 \ @@ -318,6 +319,10 @@ machine-msg-end: charset-msg-start: @echo "======== Starting tests that can vary based on character set or locale support ========" + @echo "************************************************" + @echo "** Some or all of these tests may fail if you **" + @echo "** have inadequate or missing locale support **" + @echo "************************************************" charset-msg-end: @echo "======== Done with tests that can vary based on character set or locale support ========" @@ -352,7 +357,7 @@ poundbang:: @if ./_pbd.awk "$(srcdir)"/poundbang.awk > _`basename $@` ; \ then : ; \ else \ - sed "s;/tmp/gawk;../$(AWKPROG);" < "$(srcdir)"/poundbang.awk > ./_pbd.awk ; \ + sed "s;/tmp/gawk;$(AWKPROG);" < "$(srcdir)"/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ LC_ALL=$${GAWKLOCALE:-C} LANG=$${GAWKLOCALE:-C} ./_pbd.awk "$(srcdir)"/poundbang.awk > _`basename $@`; \ fi @@ -503,6 +508,16 @@ fmtspcl: fmtspcl.ok $(CMP) "$(srcdir)"/$@-mpfr.ok _$@ && rm -f _$@ ; \ fi +rebuf:: + @echo $@ + @AWKBUFSIZE=4096 AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +rsglstdin:: + @echo $@ + @cat "$(srcdir)"/rsgetline.in | AWKPATH="$(srcdir)" $(AWK) -f rsgetline.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + reint:: @echo $@ @$(AWK) --re-interval -f "$(srcdir)"/reint.awk "$(srcdir)"/reint.in >_$@ @@ -932,6 +947,16 @@ mpfrbigint: @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +mpfrsqrt: + @echo $@ + @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +mpfrrem: + @echo $@ + @$(AWK) -M -f "$(srcdir)"/$@.awk > _$@ 2>&1 + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + jarebug:: @echo $@ @echo Expect jarebug to fail with DJGPP and MinGW. @@ -1135,6 +1160,22 @@ backsmalls2: @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +dbugeval:: + @echo $@ + @$(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +printhuge:: + @echo $@ + @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ + AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +filefuncs: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk -v builddir="$(abs_top_builddir)" >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -2227,6 +2268,11 @@ indirectcall: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +indirectcall2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + lint: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2299,9 +2345,14 @@ pty1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -rebuf: +regnul1: @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +regnul2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ regx8bit: @@ -2309,6 +2360,11 @@ regx8bit: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +rsgetline: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + rstest6: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @@ -2445,11 +2501,6 @@ fnmatch: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -filefuncs: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - fork: @echo $@ @echo Expect $@ to fail with MinGW because fork.dll is not available |