diff options
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | doc/ChangeLog | 11 | ||||
-rw-r--r-- | doc/gawk.1 | 10 | ||||
-rw-r--r-- | doc/gawk.info | 1116 | ||||
-rw-r--r-- | doc/gawk.texi | 31 | ||||
-rw-r--r-- | doc/gawktexi.in | 31 | ||||
-rw-r--r-- | field.c | 81 | ||||
-rw-r--r-- | floatcomp.c | 25 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rw-r--r-- | helpers/mb_cur_max.c | 10 | ||||
-rw-r--r-- | helpers/timeformat.c | 13 | ||||
-rw-r--r-- | pc/ChangeLog | 8 | ||||
-rw-r--r-- | pc/Makefile.tst | 9 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 3 | ||||
-rw-r--r-- | test/checknegtime.awk | 22 |
19 files changed, 716 insertions, 699 deletions
@@ -1,3 +1,24 @@ +2015-05-31 Arnold D. Robbins <arnold@skeeve.com> + + * field.c (posix_def_parse_field): Removed. It's no longer + needed after updates to the POSIX standard. Thanks to + Michael Klement <michael.klement@usa.net> for pointing this out. + +2015-05-26 Paul Eggert <eggert@Penguin.CS.UCLA.EDU> + + * floatcomp.c (count_trailing_zeros): New function. + This compiles to a single TZCNT instruction on the x86-64. + (adjust_uint): Use it to keep more high-order bits when + some of the lowest-order bits are zero. This implements + the documented behavior: "If the result cannot be represented + exactly as a C 'double', leading nonzero bits are removed one by + one until it can be represented exactly." + +2015-05-26 Arnold D. Robbins <arnold@skeeve.com> + + * regcomp.c: Fix offsets so error messages come out correct + once again. + 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> * 4.1.3: Release tar ball made. @@ -51,12 +51,16 @@ Changes from 4.1.x to 4.2.0 12. The API minor version has been increased to 2; the get_file() API provides access to open redirections. Also see the manual. -13. Gawk now supports strongly typed regexp constants. Such constants +13. Revisions in the POSIX standard remove the special case for POSIX + mode when FS = " " where newline was not a field separator. The code + and doc have been updated. + +14. Gawk now supports strongly typed regexp constants. Such constants look like @/.../. You can assign them to variables, pass them to functions, use them in ~, !~ and the case part of a switch statement. More details are provided in the manual. -14. The new typeof() function can be used to indicate if a variable or +15. The new typeof() function can be used to indicate if a variable or array element is an array, regexp, string or number. The isarray() function is deprecated in favor of typeof(). diff --git a/doc/ChangeLog b/doc/ChangeLog index 812bfd4d..e8055c6e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,14 @@ +2015-05-31 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Revised description of default field parsing + for POSIX. Newline is now a separator also. Thanks to + Michael Klement <michael.klement@usa.net> for pointing this out. + * gawk.1: Updated too. + +2015-05-30 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Bitwise Functions): Update results of testbits.awk. + 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> * 4.1.3: Release tar ball made. @@ -13,7 +13,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 02 2015" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "May 31 2015" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -444,11 +444,6 @@ mode, with the following additional restrictions: escape sequences are not recognized. .TP \(bu -Only space and tab act as field separators when -.B FS -is set to a single space, newline does not. -.TP -\(bu You cannot continue lines after .B ? and @@ -785,9 +780,6 @@ In the special case that .B FS is a single space, fields are separated by runs of spaces and/or tabs and/or newlines. -(But see the section -.BR "POSIX COMPATIBILITY" , -below). .BR NOTE : The value of .B IGNORECASE diff --git a/doc/gawk.info b/doc/gawk.info index b0adffb7..99f29492 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2663,9 +2663,6 @@ The following list describes options mandated by the POSIX standard: extensions in 'gawk' that are disabled by this option. Also, the following additional restrictions apply: - * Newlines do not act as whitespace to separate fields when 'FS' - is equal to a single space (*note Fields::). - * Newlines are not allowed after '?' or ':' (*note Conditional Exp::). @@ -4498,7 +4495,7 @@ When 'awk' reads an input record, the record is automatically "parsed" or separated by the 'awk' utility into chunks called "fields". By default, fields are separated by "whitespace", like words in a line. Whitespace in 'awk' means any string of one or more spaces, TABs, or -newlines;(1) other characters that are considered whitespace by other +newlines; other characters that are considered whitespace by other languages (such as formfeed, vertical tab, etc.) are _not_ considered whitespace by 'awk'. @@ -4550,11 +4547,6 @@ record: -| Julie F -| Samuel A - ---------- Footnotes ---------- - - (1) In POSIX 'awk', newlines are not considered whitespace for -separating fields. - File: gawk.info, Node: Nonconstant Fields, Next: Changing Fields, Prev: Fields, Up: Reading Files @@ -10295,7 +10287,7 @@ each variable.) The default value is '" "', a string consisting of a single space. As a special exception, this value means that any sequence of - spaces, TABs, and/or newlines is a single separator.(1) It also + spaces, TABs, and/or newlines is a single separator. It also causes spaces, TABs, and newlines at the beginning and end of a record to be ignored. @@ -10392,10 +10384,6 @@ each variable.) Internationalization::). The default value of 'TEXTDOMAIN' is '"messages"'. - ---------- Footnotes ---------- - - (1) In POSIX 'awk', newline does not count as whitespace. - File: gawk.info, Node: Auto-set, Next: ARGC and ARGV, Prev: User-modified, Up: Built-in Variables @@ -13476,7 +13464,7 @@ This program produces the following output when run: -| 123 = 01111011 -| 0123 = 01010011 -| 0x99 = 10011001 - -| compl(0x99) = 0xffffff66 = 11111111111111111111111101100110 + -| compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110 -| lshift(0x99, 2) = 0x264 = 0000001001100100 -| rshift(0x99, 2) = 0x26 = 00100110 @@ -27209,6 +27197,12 @@ POSIX 'awk', in the order they were added to 'gawk'. * Nonfatal output with 'print' and 'printf'. *Note Nonfatal::. + * For many years, POSIX specified that default field splitting only + allowed spaces and tabs to separate fields, and this was how 'gawk' + behaved with '--posix'. As of 2013, the standard restored + historical behavior, and now default field splitting with '--posix' + also allows newlines to separate fields. + * Support for MirBSD was removed. @@ -31903,7 +31897,7 @@ Index * '--include' option: Options. (line 159) * '--lint' option: Command Line. (line 20) * '--lint' option <1>: Options. (line 184) -* '--lint-old' option: Options. (line 292) +* '--lint-old' option: Options. (line 289) * '--load' option: Options. (line 172) * '--non-decimal-data' option: Options. (line 209) * '--non-decimal-data' option <1>: Nondecimal Data. (line 6) @@ -31911,12 +31905,12 @@ Index (line 35) * '--optimize' option: Options. (line 234) * '--posix' option: Options. (line 252) -* '--posix' option, '--traditional' option and: Options. (line 270) +* '--posix' option, '--traditional' option and: Options. (line 267) * '--pretty-print' option: Options. (line 223) * '--profile' option: Options. (line 240) * '--profile' option <1>: Profiling. (line 12) -* '--re-interval' option: Options. (line 276) -* '--sandbox' option: Options. (line 283) +* '--re-interval' option: Options. (line 273) +* '--sandbox' option: Options. (line 280) * '--sandbox' option, disabling 'system()' function: I/O Functions. (line 129) * '--sandbox' option, input redirection with 'getline': Getline. @@ -31925,9 +31919,9 @@ Index (line 6) * '--source' option: Options. (line 117) * '--traditional' option: Options. (line 82) -* '--traditional' option, '--posix' option and: Options. (line 270) +* '--traditional' option, '--posix' option and: Options. (line 267) * '--use-lc-numeric' option: Options. (line 218) -* '--version' option: Options. (line 297) +* '--version' option: Options. (line 294) * '--with-whiny-user-strftime' configuration option: Additional Configuration Options. (line 37) * '-b' option: Options. (line 69) @@ -31937,20 +31931,20 @@ Index * '-D' option: Options. (line 108) * '-e' option: Options. (line 117) * '-E' option: Options. (line 125) -* '-e' option <1>: Options. (line 333) +* '-e' option <1>: Options. (line 330) * '-f' option: Long. (line 12) * '-F' option: Options. (line 21) * '-f' option <1>: Options. (line 25) -* '-F' option, '-Ft' sets 'FS' to TAB: Options. (line 305) +* '-F' option, '-Ft' sets 'FS' to TAB: Options. (line 302) * '-F' option, command-line: Command Line Field Separator. (line 6) -* '-f' option, multiple uses: Options. (line 310) +* '-f' option, multiple uses: Options. (line 307) * '-g' option: Options. (line 147) * '-h' option: Options. (line 154) * '-i' option: Options. (line 159) * '-l' option: Options. (line 172) * '-l' option <1>: Options. (line 184) -* '-L' option: Options. (line 292) +* '-L' option: Options. (line 289) * '-M' option: Options. (line 203) * '-n' option: Options. (line 209) * '-N' option: Options. (line 218) @@ -31958,10 +31952,10 @@ Index * '-O' option: Options. (line 234) * '-p' option: Options. (line 240) * '-P' option: Options. (line 252) -* '-r' option: Options. (line 276) -* '-S' option: Options. (line 283) +* '-r' option: Options. (line 273) +* '-S' option: Options. (line 280) * '-v' option: Options. (line 32) -* '-V' option: Options. (line 297) +* '-V' option: Options. (line 294) * '-v' option <1>: Assignment Options. (line 12) * '-W' option: Options. (line 47) * '.' (period), regexp operator: Regexp Operators. (line 44) @@ -32680,7 +32674,7 @@ Index * counting: Wc Program. (line 6) * 'csh' utility: Statements/Lines. (line 43) * 'csh' utility, 'POSIXLY_CORRECT' environment variable: Options. - (line 351) + (line 348) * 'csh' utility, '|&' operator, comparison with: Two-way I/O. (line 27) * 'ctime()' user-defined function: Function Example. (line 74) * currency symbols, localization: Explaining gettext. (line 104) @@ -32870,7 +32864,7 @@ Index * debugger, read commands from a file: Debugger Info. (line 97) * debugging 'awk' programs: Debugger. (line 6) * debugging 'gawk', bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 267) +* decimal point character, locale specific: Options. (line 264) * decrement operators: Increment Ops. (line 35) * 'default' keyword: Switch Statement. (line 6) * Deifik, Scott: Acknowledgments. (line 60) @@ -33191,7 +33185,6 @@ Index * field separators, 'FIELDWIDTHS' variable and: User-modified. (line 37) * field separators, 'FPAT' variable and: User-modified. (line 43) -* field separators, POSIX and: Fields. (line 6) * field separators, regular expressions as: Field Separators. (line 50) * field separators, regular expressions as <1>: Regexp Field Splitting. (line 6) @@ -33328,7 +33321,7 @@ Index * 'FS' variable, '--field-separator' option and: Options. (line 21) * 'FS' variable, as null string: Single Character Fields. (line 20) -* 'FS' variable, as TAB character: Options. (line 264) +* 'FS' variable, as TAB character: Options. (line 261) * 'FS' variable, changing value of: Field Separators. (line 34) * 'FS' variable, running 'awk' programs and: Cut Program. (line 63) * 'FS' variable, setting from command line: Command Line Field Separator. @@ -33481,7 +33474,7 @@ Index * 'gawk', 'TEXTDOMAIN' variable in: User-modified. (line 152) * 'gawk', timestamps: Time Functions. (line 6) * 'gawk', uses for: Preface. (line 34) -* 'gawk', versions of, information about, printing: Options. (line 297) +* 'gawk', versions of, information about, printing: Options. (line 294) * 'gawk', VMS version of: VMS Installation. (line 6) * 'gawk', word-boundary operator: GNU Regexp Operators. (line 66) @@ -33810,7 +33803,7 @@ Index * lint checking, empty programs: Command Line. (line 16) * lint checking, issuing warnings: Options. (line 184) * lint checking, 'POSIXLY_CORRECT' environment variable: Options. - (line 336) + (line 333) * lint checking, undefined functions: Pass By Value/Reference. (line 85) * 'LINT' variable: User-modified. (line 87) @@ -33826,7 +33819,7 @@ Index * loading, extensions: Options. (line 172) * local variables, in a function: Variable Scope. (line 6) * locale categories: Explaining gettext. (line 81) -* locale decimal point character: Options. (line 267) +* locale decimal point character: Options. (line 264) * locale, definition of: Locales. (line 6) * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. @@ -33910,8 +33903,6 @@ Index * newlines: Statements/Lines. (line 6) * newlines <1>: Options. (line 258) * newlines <2>: Boolean Ops. (line 69) -* newlines, as field separators: Default Field Splitting. - (line 6) * newlines, as record separators: awk split records. (line 12) * newlines, in dynamic regexps: Computed Regexps. (line 60) * newlines, in regexp constants: Computed Regexps. (line 70) @@ -34142,7 +34133,7 @@ Index * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX 'awk': Precedence. (line 97) * portability, 'POSIXLY_CORRECT' environment variable: Options. - (line 356) + (line 353) * portability, 'substr()' function: String Functions. (line 513) * portable object files: Explaining gettext. (line 37) * portable object files <1>: Translator i18n. (line 6) @@ -34176,9 +34167,7 @@ Index * POSIX 'awk', 'continue' statement and: Continue Statement. (line 44) * POSIX 'awk', 'CONVFMT' variable and: User-modified. (line 30) * POSIX 'awk', 'date' utility and: Time Functions. (line 252) -* POSIX 'awk', field separators and: Fields. (line 6) -* POSIX 'awk', field separators and <1>: Full Line Fields. (line 16) -* POSIX 'awk', 'FS' variable and: User-modified. (line 60) +* POSIX 'awk', field separators and: Full Line Fields. (line 16) * POSIX 'awk', 'function' keyword in: Definition Syntax. (line 99) * POSIX 'awk', functions and, 'gsub()'/'sub()': Gory Details. (line 90) * POSIX 'awk', functions and, 'length()': String Functions. (line 179) @@ -34195,11 +34184,11 @@ Index * POSIX 'awk', timestamps and: Time Functions. (line 6) * POSIX 'awk', '|' I/O operator and: Getline/Pipe. (line 56) * POSIX mode: Options. (line 252) -* POSIX mode <1>: Options. (line 336) +* POSIX mode <1>: Options. (line 333) * POSIX, 'awk' and: Preface. (line 21) * POSIX, 'gawk' extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in 'awk': Clones. (line 6) -* 'POSIXLY_CORRECT' environment variable: Options. (line 336) +* 'POSIXLY_CORRECT' environment variable: Options. (line 333) * 'PREC' variable: User-modified. (line 124) * precedence: Increment Ops. (line 60) * precedence <1>: Precedence. (line 6) @@ -34388,7 +34377,7 @@ Index (line 60) * regular expressions, 'gawk', command-line options: GNU Regexp Operators. (line 73) -* regular expressions, interval expressions and: Options. (line 276) +* regular expressions, interval expressions and: Options. (line 273) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators: Regexp Usage. (line 19) @@ -34475,7 +34464,7 @@ Index (line 68) * sample debugging session: Sample Debugging Session. (line 6) -* sandbox mode: Options. (line 283) +* sandbox mode: Options. (line 280) * save debugger options: Debugger Info. (line 85) * scalar or array: Type Functions. (line 11) * scalar values: Basic Data Typing. (line 13) @@ -34514,7 +34503,6 @@ Index * separators, field, 'FIELDWIDTHS' variable and: User-modified. (line 37) * separators, field, 'FPAT' variable and: User-modified. (line 43) -* separators, field, POSIX and: Fields. (line 6) * separators, for records: awk split records. (line 6) * separators, for records <1>: awk split records. (line 85) * separators, for records <2>: User-modified. (line 133) @@ -35031,524 +35019,522 @@ Node: Intro Summary113214 Node: Invoking Gawk114098 Node: Command Line115612 Node: Options116410 -Ref: Options-Footnote-1132190 -Ref: Options-Footnote-2132420 -Node: Other Arguments132445 -Node: Naming Standard Input135392 -Node: Environment Variables136485 -Node: AWKPATH Variable137043 -Ref: AWKPATH Variable-Footnote-1140454 -Ref: AWKPATH Variable-Footnote-2140499 -Node: AWKLIBPATH Variable140760 -Node: Other Environment Variables142017 -Node: Exit Status145655 -Node: Include Files146332 -Node: Loading Shared Libraries149927 -Node: Obsolete151355 -Node: Undocumented152047 -Node: Invoking Summary152344 -Node: Regexp154004 -Node: Regexp Usage155523 -Node: Escape Sequences157560 -Node: Regexp Operators163793 -Ref: Regexp Operators-Footnote-1171210 -Ref: Regexp Operators-Footnote-2171357 -Node: Bracket Expressions171455 -Ref: table-char-classes173478 -Node: Leftmost Longest176424 -Node: Computed Regexps177727 -Node: GNU Regexp Operators181154 -Node: Case-sensitivity184833 -Ref: Case-sensitivity-Footnote-1187729 -Ref: Case-sensitivity-Footnote-2187964 -Node: Strong Regexp Constants188072 -Node: Regexp Summary191014 -Node: Reading Files192620 -Node: Records194783 -Node: awk split records195516 -Node: gawk split records200448 -Ref: gawk split records-Footnote-1204992 -Node: Fields205029 -Ref: Fields-Footnote-1207809 -Node: Nonconstant Fields207895 -Ref: Nonconstant Fields-Footnote-1210131 -Node: Changing Fields210335 -Node: Field Separators216265 -Node: Default Field Splitting218963 -Node: Regexp Field Splitting220081 -Node: Single Character Fields223434 -Node: Command Line Field Separator224494 -Node: Full Line Fields227712 -Ref: Full Line Fields-Footnote-1229234 -Ref: Full Line Fields-Footnote-2229280 -Node: Field Splitting Summary229381 -Node: Constant Size231455 -Node: Splitting By Content236034 -Ref: Splitting By Content-Footnote-1240005 -Node: Multiple Line240168 -Ref: Multiple Line-Footnote-1246051 -Node: Getline246230 -Node: Plain Getline248697 -Node: Getline/Variable251336 -Node: Getline/File252485 -Node: Getline/Variable/File253871 -Ref: Getline/Variable/File-Footnote-1255475 -Node: Getline/Pipe255563 -Node: Getline/Variable/Pipe258268 -Node: Getline/Coprocess259401 -Node: Getline/Variable/Coprocess260666 -Node: Getline Notes261406 -Node: Getline Summary264201 -Ref: table-getline-variants264623 -Node: Read Timeout265371 -Ref: Read Timeout-Footnote-1269278 -Node: Retrying Input269336 -Node: Command-line directories270535 -Node: Input Summary271442 -Node: Input Exercises274614 -Node: Printing275342 -Node: Print277177 -Node: Print Examples278634 -Node: Output Separators281414 -Node: OFMT283431 -Node: Printf284787 -Node: Basic Printf285572 -Node: Control Letters287146 -Node: Format Modifiers291134 -Node: Printf Examples297149 -Node: Redirection299635 -Node: Special FD306478 -Ref: Special FD-Footnote-1309646 -Node: Special Files309720 -Node: Other Inherited Files310337 -Node: Special Network311338 -Node: Special Caveats312198 -Node: Close Files And Pipes313147 -Ref: Close Files And Pipes-Footnote-1320334 -Ref: Close Files And Pipes-Footnote-2320482 -Node: Nonfatal320633 -Node: Output Summary322958 -Node: Output Exercises324180 -Node: Expressions324859 -Node: Values326047 -Node: Constants326725 -Node: Scalar Constants327416 -Ref: Scalar Constants-Footnote-1328280 -Node: Nondecimal-numbers328530 -Node: Regexp Constants331544 -Node: Using Constant Regexps332070 -Node: Variables335233 -Node: Using Variables335890 -Node: Assignment Options337801 -Node: Conversion339675 -Node: Strings And Numbers340199 -Ref: Strings And Numbers-Footnote-1343263 -Node: Locale influences conversions343372 -Ref: table-locale-affects346130 -Node: All Operators346748 -Node: Arithmetic Ops347377 -Node: Concatenation349883 -Ref: Concatenation-Footnote-1352730 -Node: Assignment Ops352837 -Ref: table-assign-ops357829 -Node: Increment Ops359142 -Node: Truth Values and Conditions362602 -Node: Truth Values363676 -Node: Typing and Comparison364724 -Node: Variable Typing365544 -Node: Comparison Operators369168 -Ref: table-relational-ops369587 -Node: POSIX String Comparison373082 -Ref: POSIX String Comparison-Footnote-1374156 -Node: Boolean Ops374295 -Ref: Boolean Ops-Footnote-1378777 -Node: Conditional Exp378869 -Node: Function Calls380605 -Node: Precedence384485 -Node: Locales388144 -Node: Expressions Summary389776 -Node: Patterns and Actions392349 -Node: Pattern Overview393469 -Node: Regexp Patterns395146 -Node: Expression Patterns395688 -Node: Ranges399469 -Node: BEGIN/END402577 -Node: Using BEGIN/END403338 -Ref: Using BEGIN/END-Footnote-1406075 -Node: I/O And BEGIN/END406181 -Node: BEGINFILE/ENDFILE408497 -Node: Empty411404 -Node: Using Shell Variables411721 -Node: Action Overview413995 -Node: Statements416320 -Node: If Statement418168 -Node: While Statement419663 -Node: Do Statement421691 -Node: For Statement422839 -Node: Switch Statement425998 -Node: Break Statement428384 -Node: Continue Statement430476 -Node: Next Statement432303 -Node: Nextfile Statement434686 -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-1476577 -Node: Reference to Elements476705 -Node: Assigning Elements479169 -Node: Array Example479660 -Node: Scanning an Array481419 -Node: Controlling Scanning484443 -Ref: Controlling Scanning-Footnote-1489842 -Node: Numeric Array Subscripts490158 -Node: Uninitialized Subscripts492342 -Node: Delete493961 -Ref: Delete-Footnote-1496713 -Node: Multidimensional496770 -Node: Multiscanning499865 -Node: Arrays of Arrays501456 -Node: Arrays Summary506224 -Node: Functions508317 -Node: Built-in509355 -Node: Calling Built-in510433 -Node: Numeric Functions512429 -Ref: Numeric Functions-Footnote-1517262 -Ref: Numeric Functions-Footnote-2517619 -Ref: Numeric Functions-Footnote-3517667 -Node: String Functions517939 -Ref: String Functions-Footnote-1541447 -Ref: String Functions-Footnote-2541576 -Ref: String Functions-Footnote-3541824 -Node: Gory Details541911 -Ref: table-sub-escapes543702 -Ref: table-sub-proposed545221 -Ref: table-posix-sub546584 -Ref: table-gensub-escapes548125 -Ref: Gory Details-Footnote-1548948 -Node: I/O Functions549099 -Ref: I/O Functions-Footnote-1556320 -Node: Time Functions556468 -Ref: Time Functions-Footnote-1566973 -Ref: Time Functions-Footnote-2567041 -Ref: Time Functions-Footnote-3567199 -Ref: Time Functions-Footnote-4567310 -Ref: Time Functions-Footnote-5567422 -Ref: Time Functions-Footnote-6567649 -Node: Bitwise Functions567915 -Ref: table-bitwise-ops568509 -Ref: Bitwise Functions-Footnote-1572817 -Node: Type Functions572990 -Node: I18N Functions574852 -Node: User-defined576503 -Node: Definition Syntax577308 -Ref: Definition Syntax-Footnote-1582995 -Node: Function Example583066 -Ref: Function Example-Footnote-1585988 -Node: Function Caveats586010 -Node: Calling A Function586528 -Node: Variable Scope587486 -Node: Pass By Value/Reference590480 -Node: Return Statement593979 -Node: Dynamic Typing596958 -Node: Indirect Calls597888 -Ref: Indirect Calls-Footnote-1608139 -Node: Functions Summary608267 -Node: Library Functions610972 -Ref: Library Functions-Footnote-1614581 -Ref: Library Functions-Footnote-2614724 -Node: Library Names614895 -Ref: Library Names-Footnote-1618356 -Ref: Library Names-Footnote-2618579 -Node: General Functions618665 -Node: Strtonum Function619768 -Node: Assert Function622790 -Node: Round Function626116 -Node: Cliff Random Function627657 -Node: Ordinal Functions628673 -Ref: Ordinal Functions-Footnote-1631736 -Ref: Ordinal Functions-Footnote-2631988 -Node: Join Function632198 -Ref: Join Function-Footnote-1633968 -Node: Getlocaltime Function634168 -Node: Readfile Function637912 -Node: Shell Quoting639886 -Node: Data File Management641287 -Node: Filetrans Function641919 -Node: Rewind Function646016 -Node: File Checking647402 -Ref: File Checking-Footnote-1648736 -Node: Empty Files648937 -Node: Ignoring Assigns650916 -Node: Getopt Function652466 -Ref: Getopt Function-Footnote-1663936 -Node: Passwd Functions664136 -Ref: Passwd Functions-Footnote-1672977 -Node: Group Functions673065 -Ref: Group Functions-Footnote-1680964 -Node: Walking Arrays681171 -Node: Library Functions Summary684181 -Node: Library Exercises685587 -Node: Sample Programs686866 -Node: Running Examples687636 -Node: Clones688364 -Node: Cut Program689588 -Node: Egrep Program699309 -Ref: Egrep Program-Footnote-1706821 -Node: Id Program706931 -Node: Split Program710611 -Ref: Split Program-Footnote-1714070 -Node: Tee Program714199 -Node: Uniq Program716989 -Node: Wc Program724415 -Ref: Wc Program-Footnote-1728670 -Node: Miscellaneous Programs728764 -Node: Dupword Program729977 -Node: Alarm Program732007 -Node: Translate Program736862 -Ref: Translate Program-Footnote-1741427 -Node: Labels Program741697 -Ref: Labels Program-Footnote-1745048 -Node: Word Sorting745132 -Node: History Sorting749204 -Node: Extract Program751039 -Node: Simple Sed758570 -Node: Igawk Program761644 -Ref: Igawk Program-Footnote-1775975 -Ref: Igawk Program-Footnote-2776177 -Ref: Igawk Program-Footnote-3776299 -Node: Anagram Program776414 -Node: Signature Program779476 -Node: Programs Summary780723 -Node: Programs Exercises781938 -Ref: Programs Exercises-Footnote-1786067 -Node: Advanced Features786158 -Node: Nondecimal Data788148 -Node: Array Sorting789739 -Node: Controlling Array Traversal790439 -Ref: Controlling Array Traversal-Footnote-1798808 -Node: Array Sorting Functions798926 -Ref: Array Sorting Functions-Footnote-1802813 -Node: Two-way I/O803009 -Ref: Two-way I/O-Footnote-1807960 -Ref: Two-way I/O-Footnote-2808147 -Node: TCP/IP Networking808229 -Node: Profiling811136 -Node: Advanced Features Summary819407 -Node: Internationalization821343 -Node: I18N and L10N822823 -Node: Explaining gettext823510 -Ref: Explaining gettext-Footnote-1828533 -Ref: Explaining gettext-Footnote-2828718 -Node: Programmer i18n828883 -Ref: Programmer i18n-Footnote-1833739 -Node: Translator i18n833788 -Node: String Extraction834582 -Ref: String Extraction-Footnote-1835715 -Node: Printf Ordering835801 -Ref: Printf Ordering-Footnote-1838587 -Node: I18N Portability838651 -Ref: I18N Portability-Footnote-1841107 -Node: I18N Example841170 -Ref: I18N Example-Footnote-1843976 -Node: Gawk I18N844049 -Node: I18N Summary844694 -Node: Debugger846035 -Node: Debugging847057 -Node: Debugging Concepts847498 -Node: Debugging Terms849307 -Node: Awk Debugging851882 -Node: Sample Debugging Session852788 -Node: Debugger Invocation853322 -Node: Finding The Bug854708 -Node: List of Debugger Commands861186 -Node: Breakpoint Control862519 -Node: Debugger Execution Control866213 -Node: Viewing And Changing Data869575 -Node: Execution Stack872949 -Node: Debugger Info874586 -Node: Miscellaneous Debugger Commands878657 -Node: Readline Support883666 -Node: Limitations884562 -Node: Debugging Summary886671 -Node: Arbitrary Precision Arithmetic887844 -Node: Computer Arithmetic889260 -Ref: table-numeric-ranges892851 -Ref: Computer Arithmetic-Footnote-1893573 -Node: Math Definitions893630 -Ref: table-ieee-formats896944 -Ref: Math Definitions-Footnote-1897547 -Node: MPFR features897652 -Node: FP Math Caution899325 -Ref: FP Math Caution-Footnote-1900397 -Node: Inexactness of computations900766 -Node: Inexact representation901726 -Node: Comparing FP Values903086 -Node: Errors accumulate904168 -Node: Getting Accuracy905601 -Node: Try To Round908311 -Node: Setting precision909210 -Ref: table-predefined-precision-strings909907 -Node: Setting the rounding mode911737 -Ref: table-gawk-rounding-modes912111 -Ref: Setting the rounding mode-Footnote-1915519 -Node: Arbitrary Precision Integers915698 -Ref: Arbitrary Precision Integers-Footnote-1920615 -Node: POSIX Floating Point Problems920764 -Ref: POSIX Floating Point Problems-Footnote-1924646 -Node: Floating point summary924684 -Node: Dynamic Extensions926874 -Node: Extension Intro928427 -Node: Plugin License929693 -Node: Extension Mechanism Outline930490 -Ref: figure-load-extension930929 -Ref: figure-register-new-function932494 -Ref: figure-call-new-function933586 -Node: Extension API Description935649 -Node: Extension API Functions Introduction937183 -Node: General Data Types942042 -Ref: General Data Types-Footnote-1947997 -Node: Memory Allocation Functions948296 -Ref: Memory Allocation Functions-Footnote-1951141 -Node: Constructor Functions951240 -Node: Registration Functions952985 -Node: Extension Functions953670 -Node: Exit Callback Functions955969 -Node: Extension Version String957219 -Node: Input Parsers957882 -Node: Output Wrappers967767 -Node: Two-way processors972279 -Node: Printing Messages974543 -Ref: Printing Messages-Footnote-1975619 -Node: Updating 'ERRNO'975772 -Node: Requesting Values976513 -Ref: table-value-types-returned977252 -Node: Accessing Parameters978135 -Node: Symbol Table Access979371 -Node: Symbol table by name979883 -Node: Symbol table by cookie981904 -Ref: Symbol table by cookie-Footnote-1986053 -Node: Cached values986117 -Ref: Cached values-Footnote-1989618 -Node: Array Manipulation989709 -Ref: Array Manipulation-Footnote-1990800 -Node: Array Data Types990837 -Ref: Array Data Types-Footnote-1993495 -Node: Array Functions993587 -Node: Flattening Arrays997446 -Node: Creating Arrays1004354 -Node: Redirection API1009126 -Node: Extension API Variables1011957 -Node: Extension Versioning1012590 -Node: Extension API Informational Variables1014481 -Node: Extension API Boilerplate1015545 -Node: Finding Extensions1019359 -Node: Extension Example1019919 -Node: Internal File Description1020717 -Node: Internal File Ops1024797 -Ref: Internal File Ops-Footnote-11036559 -Node: Using Internal File Ops1036699 -Ref: Using Internal File Ops-Footnote-11039082 -Node: Extension Samples1039357 -Node: Extension Sample File Functions1040886 -Node: Extension Sample Fnmatch1048535 -Node: Extension Sample Fork1050022 -Node: Extension Sample Inplace1051240 -Node: Extension Sample Ord1053326 -Node: Extension Sample Readdir1054162 -Ref: table-readdir-file-types1055051 -Node: Extension Sample Revout1055856 -Node: Extension Sample Rev2way1056445 -Node: Extension Sample Read write array1057185 -Node: Extension Sample Readfile1059127 -Node: Extension Sample Time1060222 -Node: Extension Sample API Tests1061570 -Node: gawkextlib1062062 -Node: Extension summary1064509 -Node: Extension Exercises1068201 -Node: Language History1069698 -Node: V7/SVR3.11071354 -Node: SVR41073507 -Node: POSIX1074941 -Node: BTL1076321 -Node: POSIX/GNU1077051 -Node: Feature History1082890 -Node: Common Extensions1096881 -Node: Ranges and Locales1098164 -Ref: Ranges and Locales-Footnote-11102780 -Ref: Ranges and Locales-Footnote-21102807 -Ref: Ranges and Locales-Footnote-31103042 -Node: Contributors1103263 -Node: History summary1108832 -Node: Installation1110212 -Node: Gawk Distribution1111157 -Node: Getting1111641 -Node: Extracting1112464 -Node: Distribution contents1114102 -Node: Unix Installation1120198 -Node: Quick Installation1120880 -Node: Shell Startup Files1123294 -Node: Additional Configuration Options1124372 -Node: Configuration Philosophy1126177 -Node: Non-Unix Installation1128547 -Node: PC Installation1129005 -Node: PC Binary Installation1130325 -Node: PC Compiling1132177 -Ref: PC Compiling-Footnote-11135201 -Node: PC Testing1135310 -Node: PC Using1136490 -Node: Cygwin1140604 -Node: MSYS1141374 -Node: VMS Installation1141875 -Node: VMS Compilation1142666 -Ref: VMS Compilation-Footnote-11143896 -Node: VMS Dynamic Extensions1143954 -Node: VMS Installation Details1145639 -Node: VMS Running1147892 -Node: VMS GNV1150733 -Node: VMS Old Gawk1151468 -Node: Bugs1151939 -Node: Other Versions1156053 -Node: Installation summary1162527 -Node: Notes1163585 -Node: Compatibility Mode1164450 -Node: Additions1165232 -Node: Accessing The Source1166157 -Node: Adding Code1167593 -Node: New Ports1173748 -Node: Derived Files1178236 -Ref: Derived Files-Footnote-11183721 -Ref: Derived Files-Footnote-21183756 -Ref: Derived Files-Footnote-31184354 -Node: Future Extensions1184468 -Node: Implementation Limitations1185126 -Node: Extension Design1186309 -Node: Old Extension Problems1187463 -Ref: Old Extension Problems-Footnote-11188981 -Node: Extension New Mechanism Goals1189038 -Ref: Extension New Mechanism Goals-Footnote-11192402 -Node: Extension Other Design Decisions1192591 -Node: Extension Future Growth1194704 -Node: Old Extension Mechanism1195540 -Node: Notes summary1197303 -Node: Basic Concepts1198485 -Node: Basic High Level1199166 -Ref: figure-general-flow1199448 -Ref: figure-process-flow1200133 -Ref: Basic High Level-Footnote-11203434 -Node: Basic Data Typing1203619 -Node: Glossary1206947 -Node: Copying1238893 -Node: GNU Free Documentation License1276432 -Node: Index1301550 +Ref: Options-Footnote-1132061 +Ref: Options-Footnote-2132291 +Node: Other Arguments132316 +Node: Naming Standard Input135263 +Node: Environment Variables136356 +Node: AWKPATH Variable136914 +Ref: AWKPATH Variable-Footnote-1140325 +Ref: AWKPATH Variable-Footnote-2140370 +Node: AWKLIBPATH Variable140631 +Node: Other Environment Variables141888 +Node: Exit Status145526 +Node: Include Files146203 +Node: Loading Shared Libraries149798 +Node: Obsolete151226 +Node: Undocumented151918 +Node: Invoking Summary152215 +Node: Regexp153875 +Node: Regexp Usage155394 +Node: Escape Sequences157431 +Node: Regexp Operators163664 +Ref: Regexp Operators-Footnote-1171081 +Ref: Regexp Operators-Footnote-2171228 +Node: Bracket Expressions171326 +Ref: table-char-classes173349 +Node: Leftmost Longest176295 +Node: Computed Regexps177598 +Node: GNU Regexp Operators181025 +Node: Case-sensitivity184704 +Ref: Case-sensitivity-Footnote-1187600 +Ref: Case-sensitivity-Footnote-2187835 +Node: Strong Regexp Constants187943 +Node: Regexp Summary190885 +Node: Reading Files192491 +Node: Records194654 +Node: awk split records195387 +Node: gawk split records200319 +Ref: gawk split records-Footnote-1204863 +Node: Fields204900 +Node: Nonconstant Fields207641 +Ref: Nonconstant Fields-Footnote-1209877 +Node: Changing Fields210081 +Node: Field Separators216011 +Node: Default Field Splitting218709 +Node: Regexp Field Splitting219827 +Node: Single Character Fields223180 +Node: Command Line Field Separator224240 +Node: Full Line Fields227458 +Ref: Full Line Fields-Footnote-1228980 +Ref: Full Line Fields-Footnote-2229026 +Node: Field Splitting Summary229127 +Node: Constant Size231201 +Node: Splitting By Content235780 +Ref: Splitting By Content-Footnote-1239751 +Node: Multiple Line239914 +Ref: Multiple Line-Footnote-1245797 +Node: Getline245976 +Node: Plain Getline248443 +Node: Getline/Variable251082 +Node: Getline/File252231 +Node: Getline/Variable/File253617 +Ref: Getline/Variable/File-Footnote-1255221 +Node: Getline/Pipe255309 +Node: Getline/Variable/Pipe258014 +Node: Getline/Coprocess259147 +Node: Getline/Variable/Coprocess260412 +Node: Getline Notes261152 +Node: Getline Summary263947 +Ref: table-getline-variants264369 +Node: Read Timeout265117 +Ref: Read Timeout-Footnote-1269024 +Node: Retrying Input269082 +Node: Command-line directories270281 +Node: Input Summary271188 +Node: Input Exercises274360 +Node: Printing275088 +Node: Print276923 +Node: Print Examples278380 +Node: Output Separators281160 +Node: OFMT283177 +Node: Printf284533 +Node: Basic Printf285318 +Node: Control Letters286892 +Node: Format Modifiers290880 +Node: Printf Examples296895 +Node: Redirection299381 +Node: Special FD306224 +Ref: Special FD-Footnote-1309392 +Node: Special Files309466 +Node: Other Inherited Files310083 +Node: Special Network311084 +Node: Special Caveats311944 +Node: Close Files And Pipes312893 +Ref: Close Files And Pipes-Footnote-1320080 +Ref: Close Files And Pipes-Footnote-2320228 +Node: Nonfatal320379 +Node: Output Summary322704 +Node: Output Exercises323926 +Node: Expressions324605 +Node: Values325793 +Node: Constants326471 +Node: Scalar Constants327162 +Ref: Scalar Constants-Footnote-1328026 +Node: Nondecimal-numbers328276 +Node: Regexp Constants331290 +Node: Using Constant Regexps331816 +Node: Variables334979 +Node: Using Variables335636 +Node: Assignment Options337547 +Node: Conversion339421 +Node: Strings And Numbers339945 +Ref: Strings And Numbers-Footnote-1343009 +Node: Locale influences conversions343118 +Ref: table-locale-affects345876 +Node: All Operators346494 +Node: Arithmetic Ops347123 +Node: Concatenation349629 +Ref: Concatenation-Footnote-1352476 +Node: Assignment Ops352583 +Ref: table-assign-ops357575 +Node: Increment Ops358888 +Node: Truth Values and Conditions362348 +Node: Truth Values363422 +Node: Typing and Comparison364470 +Node: Variable Typing365290 +Node: Comparison Operators368914 +Ref: table-relational-ops369333 +Node: POSIX String Comparison372828 +Ref: POSIX String Comparison-Footnote-1373902 +Node: Boolean Ops374041 +Ref: Boolean Ops-Footnote-1378523 +Node: Conditional Exp378615 +Node: Function Calls380351 +Node: Precedence384231 +Node: Locales387890 +Node: Expressions Summary389522 +Node: Patterns and Actions392095 +Node: Pattern Overview393215 +Node: Regexp Patterns394892 +Node: Expression Patterns395434 +Node: Ranges399215 +Node: BEGIN/END402323 +Node: Using BEGIN/END403084 +Ref: Using BEGIN/END-Footnote-1405821 +Node: I/O And BEGIN/END405927 +Node: BEGINFILE/ENDFILE408243 +Node: Empty411150 +Node: Using Shell Variables411467 +Node: Action Overview413741 +Node: Statements416066 +Node: If Statement417914 +Node: While Statement419409 +Node: Do Statement421437 +Node: For Statement422585 +Node: Switch Statement425744 +Node: Break Statement428130 +Node: Continue Statement430222 +Node: Next Statement432049 +Node: Nextfile Statement434432 +Node: Exit Statement437084 +Node: Built-in Variables439489 +Node: User-modified440622 +Node: Auto-set448210 +Ref: Auto-set-Footnote-1462459 +Ref: Auto-set-Footnote-2462665 +Node: ARGC and ARGV462721 +Node: Pattern Action Summary466940 +Node: Arrays469370 +Node: Array Basics470699 +Node: Array Intro471543 +Ref: figure-array-elements473518 +Ref: Array Intro-Footnote-1476222 +Node: Reference to Elements476350 +Node: Assigning Elements478814 +Node: Array Example479305 +Node: Scanning an Array481064 +Node: Controlling Scanning484088 +Ref: Controlling Scanning-Footnote-1489487 +Node: Numeric Array Subscripts489803 +Node: Uninitialized Subscripts491987 +Node: Delete493606 +Ref: Delete-Footnote-1496358 +Node: Multidimensional496415 +Node: Multiscanning499510 +Node: Arrays of Arrays501101 +Node: Arrays Summary505869 +Node: Functions507962 +Node: Built-in509000 +Node: Calling Built-in510078 +Node: Numeric Functions512074 +Ref: Numeric Functions-Footnote-1516907 +Ref: Numeric Functions-Footnote-2517264 +Ref: Numeric Functions-Footnote-3517312 +Node: String Functions517584 +Ref: String Functions-Footnote-1541092 +Ref: String Functions-Footnote-2541221 +Ref: String Functions-Footnote-3541469 +Node: Gory Details541556 +Ref: table-sub-escapes543347 +Ref: table-sub-proposed544866 +Ref: table-posix-sub546229 +Ref: table-gensub-escapes547770 +Ref: Gory Details-Footnote-1548593 +Node: I/O Functions548744 +Ref: I/O Functions-Footnote-1555965 +Node: Time Functions556113 +Ref: Time Functions-Footnote-1566618 +Ref: Time Functions-Footnote-2566686 +Ref: Time Functions-Footnote-3566844 +Ref: Time Functions-Footnote-4566955 +Ref: Time Functions-Footnote-5567067 +Ref: Time Functions-Footnote-6567294 +Node: Bitwise Functions567560 +Ref: table-bitwise-ops568154 +Ref: Bitwise Functions-Footnote-1572492 +Node: Type Functions572665 +Node: I18N Functions574527 +Node: User-defined576178 +Node: Definition Syntax576983 +Ref: Definition Syntax-Footnote-1582670 +Node: Function Example582741 +Ref: Function Example-Footnote-1585663 +Node: Function Caveats585685 +Node: Calling A Function586203 +Node: Variable Scope587161 +Node: Pass By Value/Reference590155 +Node: Return Statement593654 +Node: Dynamic Typing596633 +Node: Indirect Calls597563 +Ref: Indirect Calls-Footnote-1607814 +Node: Functions Summary607942 +Node: Library Functions610647 +Ref: Library Functions-Footnote-1614256 +Ref: Library Functions-Footnote-2614399 +Node: Library Names614570 +Ref: Library Names-Footnote-1618031 +Ref: Library Names-Footnote-2618254 +Node: General Functions618340 +Node: Strtonum Function619443 +Node: Assert Function622465 +Node: Round Function625791 +Node: Cliff Random Function627332 +Node: Ordinal Functions628348 +Ref: Ordinal Functions-Footnote-1631411 +Ref: Ordinal Functions-Footnote-2631663 +Node: Join Function631873 +Ref: Join Function-Footnote-1633643 +Node: Getlocaltime Function633843 +Node: Readfile Function637587 +Node: Shell Quoting639561 +Node: Data File Management640962 +Node: Filetrans Function641594 +Node: Rewind Function645691 +Node: File Checking647077 +Ref: File Checking-Footnote-1648411 +Node: Empty Files648612 +Node: Ignoring Assigns650591 +Node: Getopt Function652141 +Ref: Getopt Function-Footnote-1663611 +Node: Passwd Functions663811 +Ref: Passwd Functions-Footnote-1672652 +Node: Group Functions672740 +Ref: Group Functions-Footnote-1680639 +Node: Walking Arrays680846 +Node: Library Functions Summary683856 +Node: Library Exercises685262 +Node: Sample Programs686541 +Node: Running Examples687311 +Node: Clones688039 +Node: Cut Program689263 +Node: Egrep Program698984 +Ref: Egrep Program-Footnote-1706496 +Node: Id Program706606 +Node: Split Program710286 +Ref: Split Program-Footnote-1713745 +Node: Tee Program713874 +Node: Uniq Program716664 +Node: Wc Program724090 +Ref: Wc Program-Footnote-1728345 +Node: Miscellaneous Programs728439 +Node: Dupword Program729652 +Node: Alarm Program731682 +Node: Translate Program736537 +Ref: Translate Program-Footnote-1741102 +Node: Labels Program741372 +Ref: Labels Program-Footnote-1744723 +Node: Word Sorting744807 +Node: History Sorting748879 +Node: Extract Program750714 +Node: Simple Sed758245 +Node: Igawk Program761319 +Ref: Igawk Program-Footnote-1775650 +Ref: Igawk Program-Footnote-2775852 +Ref: Igawk Program-Footnote-3775974 +Node: Anagram Program776089 +Node: Signature Program779151 +Node: Programs Summary780398 +Node: Programs Exercises781613 +Ref: Programs Exercises-Footnote-1785742 +Node: Advanced Features785833 +Node: Nondecimal Data787823 +Node: Array Sorting789414 +Node: Controlling Array Traversal790114 +Ref: Controlling Array Traversal-Footnote-1798483 +Node: Array Sorting Functions798601 +Ref: Array Sorting Functions-Footnote-1802488 +Node: Two-way I/O802684 +Ref: Two-way I/O-Footnote-1807635 +Ref: Two-way I/O-Footnote-2807822 +Node: TCP/IP Networking807904 +Node: Profiling810811 +Node: Advanced Features Summary819082 +Node: Internationalization821018 +Node: I18N and L10N822498 +Node: Explaining gettext823185 +Ref: Explaining gettext-Footnote-1828208 +Ref: Explaining gettext-Footnote-2828393 +Node: Programmer i18n828558 +Ref: Programmer i18n-Footnote-1833414 +Node: Translator i18n833463 +Node: String Extraction834257 +Ref: String Extraction-Footnote-1835390 +Node: Printf Ordering835476 +Ref: Printf Ordering-Footnote-1838262 +Node: I18N Portability838326 +Ref: I18N Portability-Footnote-1840782 +Node: I18N Example840845 +Ref: I18N Example-Footnote-1843651 +Node: Gawk I18N843724 +Node: I18N Summary844369 +Node: Debugger845710 +Node: Debugging846732 +Node: Debugging Concepts847173 +Node: Debugging Terms848982 +Node: Awk Debugging851557 +Node: Sample Debugging Session852463 +Node: Debugger Invocation852997 +Node: Finding The Bug854383 +Node: List of Debugger Commands860861 +Node: Breakpoint Control862194 +Node: Debugger Execution Control865888 +Node: Viewing And Changing Data869250 +Node: Execution Stack872624 +Node: Debugger Info874261 +Node: Miscellaneous Debugger Commands878332 +Node: Readline Support883341 +Node: Limitations884237 +Node: Debugging Summary886346 +Node: Arbitrary Precision Arithmetic887519 +Node: Computer Arithmetic888935 +Ref: table-numeric-ranges892526 +Ref: Computer Arithmetic-Footnote-1893248 +Node: Math Definitions893305 +Ref: table-ieee-formats896619 +Ref: Math Definitions-Footnote-1897222 +Node: MPFR features897327 +Node: FP Math Caution899000 +Ref: FP Math Caution-Footnote-1900072 +Node: Inexactness of computations900441 +Node: Inexact representation901401 +Node: Comparing FP Values902761 +Node: Errors accumulate903843 +Node: Getting Accuracy905276 +Node: Try To Round907986 +Node: Setting precision908885 +Ref: table-predefined-precision-strings909582 +Node: Setting the rounding mode911412 +Ref: table-gawk-rounding-modes911786 +Ref: Setting the rounding mode-Footnote-1915194 +Node: Arbitrary Precision Integers915373 +Ref: Arbitrary Precision Integers-Footnote-1920290 +Node: POSIX Floating Point Problems920439 +Ref: POSIX Floating Point Problems-Footnote-1924321 +Node: Floating point summary924359 +Node: Dynamic Extensions926549 +Node: Extension Intro928102 +Node: Plugin License929368 +Node: Extension Mechanism Outline930165 +Ref: figure-load-extension930604 +Ref: figure-register-new-function932169 +Ref: figure-call-new-function933261 +Node: Extension API Description935324 +Node: Extension API Functions Introduction936858 +Node: General Data Types941717 +Ref: General Data Types-Footnote-1947672 +Node: Memory Allocation Functions947971 +Ref: Memory Allocation Functions-Footnote-1950816 +Node: Constructor Functions950915 +Node: Registration Functions952660 +Node: Extension Functions953345 +Node: Exit Callback Functions955644 +Node: Extension Version String956894 +Node: Input Parsers957557 +Node: Output Wrappers967442 +Node: Two-way processors971954 +Node: Printing Messages974218 +Ref: Printing Messages-Footnote-1975294 +Node: Updating 'ERRNO'975447 +Node: Requesting Values976188 +Ref: table-value-types-returned976927 +Node: Accessing Parameters977810 +Node: Symbol Table Access979046 +Node: Symbol table by name979558 +Node: Symbol table by cookie981579 +Ref: Symbol table by cookie-Footnote-1985728 +Node: Cached values985792 +Ref: Cached values-Footnote-1989293 +Node: Array Manipulation989384 +Ref: Array Manipulation-Footnote-1990475 +Node: Array Data Types990512 +Ref: Array Data Types-Footnote-1993170 +Node: Array Functions993262 +Node: Flattening Arrays997121 +Node: Creating Arrays1004029 +Node: Redirection API1008801 +Node: Extension API Variables1011632 +Node: Extension Versioning1012265 +Node: Extension API Informational Variables1014156 +Node: Extension API Boilerplate1015220 +Node: Finding Extensions1019034 +Node: Extension Example1019594 +Node: Internal File Description1020392 +Node: Internal File Ops1024472 +Ref: Internal File Ops-Footnote-11036234 +Node: Using Internal File Ops1036374 +Ref: Using Internal File Ops-Footnote-11038757 +Node: Extension Samples1039032 +Node: Extension Sample File Functions1040561 +Node: Extension Sample Fnmatch1048210 +Node: Extension Sample Fork1049697 +Node: Extension Sample Inplace1050915 +Node: Extension Sample Ord1053001 +Node: Extension Sample Readdir1053837 +Ref: table-readdir-file-types1054726 +Node: Extension Sample Revout1055531 +Node: Extension Sample Rev2way1056120 +Node: Extension Sample Read write array1056860 +Node: Extension Sample Readfile1058802 +Node: Extension Sample Time1059897 +Node: Extension Sample API Tests1061245 +Node: gawkextlib1061737 +Node: Extension summary1064184 +Node: Extension Exercises1067876 +Node: Language History1069373 +Node: V7/SVR3.11071029 +Node: SVR41073182 +Node: POSIX1074616 +Node: BTL1075996 +Node: POSIX/GNU1076726 +Node: Feature History1082565 +Node: Common Extensions1096884 +Node: Ranges and Locales1098167 +Ref: Ranges and Locales-Footnote-11102783 +Ref: Ranges and Locales-Footnote-21102810 +Ref: Ranges and Locales-Footnote-31103045 +Node: Contributors1103266 +Node: History summary1108835 +Node: Installation1110215 +Node: Gawk Distribution1111160 +Node: Getting1111644 +Node: Extracting1112467 +Node: Distribution contents1114105 +Node: Unix Installation1120201 +Node: Quick Installation1120883 +Node: Shell Startup Files1123297 +Node: Additional Configuration Options1124375 +Node: Configuration Philosophy1126180 +Node: Non-Unix Installation1128550 +Node: PC Installation1129008 +Node: PC Binary Installation1130328 +Node: PC Compiling1132180 +Ref: PC Compiling-Footnote-11135204 +Node: PC Testing1135313 +Node: PC Using1136493 +Node: Cygwin1140607 +Node: MSYS1141377 +Node: VMS Installation1141878 +Node: VMS Compilation1142669 +Ref: VMS Compilation-Footnote-11143899 +Node: VMS Dynamic Extensions1143957 +Node: VMS Installation Details1145642 +Node: VMS Running1147895 +Node: VMS GNV1150736 +Node: VMS Old Gawk1151471 +Node: Bugs1151942 +Node: Other Versions1156056 +Node: Installation summary1162530 +Node: Notes1163588 +Node: Compatibility Mode1164453 +Node: Additions1165235 +Node: Accessing The Source1166160 +Node: Adding Code1167596 +Node: New Ports1173751 +Node: Derived Files1178239 +Ref: Derived Files-Footnote-11183724 +Ref: Derived Files-Footnote-21183759 +Ref: Derived Files-Footnote-31184357 +Node: Future Extensions1184471 +Node: Implementation Limitations1185129 +Node: Extension Design1186312 +Node: Old Extension Problems1187466 +Ref: Old Extension Problems-Footnote-11188984 +Node: Extension New Mechanism Goals1189041 +Ref: Extension New Mechanism Goals-Footnote-11192405 +Node: Extension Other Design Decisions1192594 +Node: Extension Future Growth1194707 +Node: Old Extension Mechanism1195543 +Node: Notes summary1197306 +Node: Basic Concepts1198488 +Node: Basic High Level1199169 +Ref: figure-general-flow1199451 +Ref: figure-process-flow1200136 +Ref: Basic High Level-Footnote-11203437 +Node: Basic Data Typing1203622 +Node: Glossary1206950 +Node: Copying1238896 +Node: GNU Free Documentation License1276435 +Node: Index1301553 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 407ce198..1d56e697 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4134,11 +4134,6 @@ restrictions apply: @cindex newlines @cindex whitespace, newlines as @item -Newlines do not act as whitespace to separate fields when @code{FS} is -equal to a single space -(@pxref{Fields}). - -@item Newlines are not allowed after @samp{?} or @samp{:} (@pxref{Conditional Exp}). @@ -6820,16 +6815,12 @@ Readfile} for another option. @cindex fields @cindex accessing fields @cindex fields, examining -@cindex POSIX @command{awk}, field separators and -@cindex field separators, POSIX and -@cindex separators, field, POSIX and When @command{awk} reads an input record, the record is automatically @dfn{parsed} or separated by the @command{awk} utility into chunks called @dfn{fields}. By default, fields are separated by @dfn{whitespace}, like words in a line. Whitespace in @command{awk} means any string of one or more spaces, -TABs, or newlines;@footnote{In POSIX @command{awk}, newlines are not -considered whitespace for separating fields.} other characters +TABs, or newlines; other characters that are considered whitespace by other languages (such as formfeed, vertical tab, etc.) are @emph{not} considered whitespace by @command{awk}. @@ -7274,7 +7265,6 @@ can massage it first with a separate @command{awk} program.) @node Default Field Splitting @subsection Whitespace Normally Separates Fields -@cindex newlines, as field separators @cindex whitespace, as field separators Fields are normally separated by whitespace sequences (spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not @@ -14810,12 +14800,11 @@ specify the behavior when @code{FS} is the null string. Nonetheless, some other versions of @command{awk} also treat @code{""} specially.) -@cindex POSIX @command{awk}, @code{FS} variable and The default value is @w{@code{" "}}, a string consisting of a single -space. As a special exception, this value means that any -sequence of spaces, TABs, and/or newlines is a single separator.@footnote{In -POSIX @command{awk}, newline does not count as whitespace.} It also causes -spaces, TABs, and newlines at the beginning and end of a record to be ignored. +space. As a special exception, this value means that any sequence of +spaces, TABs, and/or newlines is a single separator. It also causes +spaces, TABs, and newlines at the beginning and end of a record to +be ignored. You can set the value of @code{FS} on the command line using the @option{-F} option: @@ -19453,7 +19442,7 @@ $ @kbd{gawk -f testbits.awk} @print{} 123 = 01111011 @print{} 0123 = 01010011 @print{} 0x99 = 10011001 -@print{} compl(0x99) = 0xffffff66 = 11111111111111111111111101100110 +@print{} compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110 @print{} lshift(0x99, 2) = 0x264 = 0000001001100100 @print{} rshift(0x99, 2) = 0x26 = 00100110 @end example @@ -36972,6 +36961,14 @@ Nonfatal output with @code{print} and @code{printf}. @xref{Nonfatal}. @item +For many years, POSIX specified that default field splitting +only allowed spaces and tabs to separate fields, and this was +how @command{gawk} behaved with @option{--posix}. As of 2013, +the standard restored historical behavior, and now default +field splitting with @option{--posix} also allows newlines to +separate fields. + +@item Support for MirBSD was removed. @end itemize diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 5be9dede..28a8705c 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4045,11 +4045,6 @@ restrictions apply: @cindex newlines @cindex whitespace, newlines as @item -Newlines do not act as whitespace to separate fields when @code{FS} is -equal to a single space -(@pxref{Fields}). - -@item Newlines are not allowed after @samp{?} or @samp{:} (@pxref{Conditional Exp}). @@ -6547,16 +6542,12 @@ Readfile} for another option. @cindex fields @cindex accessing fields @cindex fields, examining -@cindex POSIX @command{awk}, field separators and -@cindex field separators, POSIX and -@cindex separators, field, POSIX and When @command{awk} reads an input record, the record is automatically @dfn{parsed} or separated by the @command{awk} utility into chunks called @dfn{fields}. By default, fields are separated by @dfn{whitespace}, like words in a line. Whitespace in @command{awk} means any string of one or more spaces, -TABs, or newlines;@footnote{In POSIX @command{awk}, newlines are not -considered whitespace for separating fields.} other characters +TABs, or newlines; other characters that are considered whitespace by other languages (such as formfeed, vertical tab, etc.) are @emph{not} considered whitespace by @command{awk}. @@ -6970,7 +6961,6 @@ can massage it first with a separate @command{awk} program.) @node Default Field Splitting @subsection Whitespace Normally Separates Fields -@cindex newlines, as field separators @cindex whitespace, as field separators Fields are normally separated by whitespace sequences (spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not @@ -14138,12 +14128,11 @@ specify the behavior when @code{FS} is the null string. Nonetheless, some other versions of @command{awk} also treat @code{""} specially.) -@cindex POSIX @command{awk}, @code{FS} variable and The default value is @w{@code{" "}}, a string consisting of a single -space. As a special exception, this value means that any -sequence of spaces, TABs, and/or newlines is a single separator.@footnote{In -POSIX @command{awk}, newline does not count as whitespace.} It also causes -spaces, TABs, and newlines at the beginning and end of a record to be ignored. +space. As a special exception, this value means that any sequence of +spaces, TABs, and/or newlines is a single separator. It also causes +spaces, TABs, and newlines at the beginning and end of a record to +be ignored. You can set the value of @code{FS} on the command line using the @option{-F} option: @@ -18574,7 +18563,7 @@ $ @kbd{gawk -f testbits.awk} @print{} 123 = 01111011 @print{} 0123 = 01010011 @print{} 0x99 = 10011001 -@print{} compl(0x99) = 0xffffff66 = 11111111111111111111111101100110 +@print{} compl(0x99) = 0x3fffffffffff66 = 00111111111111111111111111111111111111111111111101100110 @print{} lshift(0x99, 2) = 0x264 = 0000001001100100 @print{} rshift(0x99, 2) = 0x26 = 00100110 @end example @@ -36063,6 +36052,14 @@ Nonfatal output with @code{print} and @code{printf}. @xref{Nonfatal}. @item +For many years, POSIX specified that default field splitting +only allowed spaces and tabs to separate fields, and this was +how @command{gawk} behaved with @option{--posix}. As of 2013, +the standard restored historical behavior, and now default +field splitting with @option{--posix} also allows newlines to +separate fields. + +@item Support for MirBSD was removed. @end itemize @@ -44,8 +44,6 @@ static long re_parse_field(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); static long def_parse_field(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); -static long posix_def_parse_field(long, char **, int, NODE *, - Regexp *, Setfunc, NODE *, NODE *, bool); static long null_parse_field(long, char **, int, NODE *, Regexp *, Setfunc, NODE *, NODE *, bool); static long sc_parse_field(long, char **, int, NODE *, @@ -538,75 +536,6 @@ def_parse_field(long up_to, /* parse only up to this field number */ } /* - * posix_def_parse_field --- default field parsing. - * - * This is called both from get_field() and from do_split() - * via (*parse_field)(). This variation is for when FS is a single space - * character. The only difference between this and def_parse_field() - * is that this one does not allow newlines to separate fields. - */ - -static long -posix_def_parse_field(long up_to, /* parse only up to this field number */ - char **buf, /* on input: string to parse; on output: point to start next */ - int len, - NODE *fs, - Regexp *rp ATTRIBUTE_UNUSED, - Setfunc set, /* routine to set the value of the parsed field */ - NODE *n, - NODE *dummy ATTRIBUTE_UNUSED, /* sep_arr not needed here: hence dummy */ - bool in_middle ATTRIBUTE_UNUSED) -{ - char *scan = *buf; - long nf = parse_high_water; - char *field; - char *end = scan + len; - char sav; - - if (up_to == UNLIMITED) - nf = 0; - if (len == 0) - return nf; - - /* - * Nasty special case. If FS set to "", return whole record - * as first field. This is not worth a separate function. - */ - if (fs->stlen == 0) { - (*set)(++nf, *buf, len, n); - *buf += len; - return nf; - } - - /* before doing anything save the char at *end */ - sav = *end; - /* because it will be destroyed now: */ - - *end = ' '; /* sentinel character */ - for (; nf < up_to; scan++) { - /* - * special case: fs is single space, strip leading whitespace - */ - while (scan < end && (*scan == ' ' || *scan == '\t')) - scan++; - if (scan >= end) - break; - field = scan; - while (*scan != ' ' && *scan != '\t') - scan++; - (*set)(++nf, field, (long)(scan - field), n); - if (scan == end) - break; - } - - /* everything done, restore original char at *end */ - *end = sav; - - *buf = scan; - return nf; -} - -/* * null_parse_field --- each character is a separate field * * This is called both from get_field() and from do_split() @@ -1020,10 +949,7 @@ do_split(int nargs) } } else if (fs->stlen == 1 && (sep->re_flags & CONSTANT) == 0) { if (fs->stptr[0] == ' ') { - if (do_posix) - parseit = posix_def_parse_field; - else - parseit = def_parse_field; + parseit = def_parse_field; } else parseit = sc_parse_field; } else { @@ -1274,10 +1200,7 @@ choose_fs_function: sprintf(buf, "[%c\n]", fs->stptr[0]); } } else { - if (do_posix) - parse_field = posix_def_parse_field; - else - parse_field = def_parse_field; + parse_field = def_parse_field; if (fs->stlen == 1) { if (fs->stptr[0] == ' ') diff --git a/floatcomp.c b/floatcomp.c index 16a6d88e..d8d35694 100644 --- a/floatcomp.c +++ b/floatcomp.c @@ -71,6 +71,20 @@ Please port the following code to your weird host; #define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) #define DBL_FRACTION_BITS (DBL_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) +/* Return the number of trailing zeros in N. N must be nonzero. */ +static int +count_trailing_zeros(uintmax_t n) +{ +#if 3 < (__GNUC__ + (4 <= __GNUC_MINOR__)) && UINTMAX_MAX <= ULLONG_MAX + return __builtin_ctzll(n); +#else + int i = 0; + for (; (n & 3) == 0; n >>= 2) + i += 2; + return i + (1 & ~n); +#endif +} + /* adjust_uint --- fiddle with values, ask Paul Eggert to explain */ uintmax_t @@ -84,8 +98,15 @@ adjust_uint(uintmax_t n) * This is more desirable in practice, since it means the user sees * integers that are the same width as the AWKNUM fractions. */ - if (AWKNUM_FRACTION_BITS < CHAR_BIT * sizeof n) - n &= ((uintmax_t) 1 << AWKNUM_FRACTION_BITS) - 1; + int wordbits = CHAR_BIT * sizeof n; + if (AWKNUM_FRACTION_BITS < wordbits) { + uintmax_t one = 1; + uintmax_t sentinel = one << (wordbits - AWKNUM_FRACTION_BITS); + int shift = count_trailing_zeros(n | sentinel); + uintmax_t mask = (one << AWKNUM_FRACTION_BITS) - 1; + + n &= mask << shift; + } return n; } diff --git a/helpers/ChangeLog b/helpers/ChangeLog index 357bb09c..fb0cc109 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2015-05-27 Arnold D. Robbins <arnold@skeeve.com> + + * mb_cur_max.c, timeformat.c: New files. + 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> * 4.1.3: Release tar ball made. diff --git a/helpers/mb_cur_max.c b/helpers/mb_cur_max.c new file mode 100644 index 00000000..c36d7ef7 --- /dev/null +++ b/helpers/mb_cur_max.c @@ -0,0 +1,10 @@ +#include <stdio.h> +#include <locale.h> +#include <stdlib.h> + +int main() +{ + setlocale(LC_ALL, ""); + printf("MB_CUR_MAX = %lu\n", MB_CUR_MAX); + return 0; +} diff --git a/helpers/timeformat.c b/helpers/timeformat.c new file mode 100644 index 00000000..c3d1b933 --- /dev/null +++ b/helpers/timeformat.c @@ -0,0 +1,13 @@ +#include <stdio.h> +#include <locale.h> +#include <langinfo.h> + +int main(int argc, char **argv) +{ + setlocale(LC_ALL, ""); + printf("D_T_FMT: %s\n", nl_langinfo(D_T_FMT)); +#ifdef _DATE_FMT + printf("_DATE_FMT: %s\n", nl_langinfo(_DATE_FMT)); +#endif /* _DATE_FMT */ + return 0; +} diff --git a/pc/ChangeLog b/pc/ChangeLog index a9c7ec8e..fb44a486 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,11 @@ +2015-05-29 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst (negtime): Sync with mainline. + +2015-05-29 Scott Deifik <scottd.mail@sbcglobal.net> + + * Makefile.tst (dbugeval): Sync with mainline. + 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> * 4.1.3: Release tar ball made. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 8b7baa2b..a787563c 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -1201,8 +1201,10 @@ backsmalls2: dbugeval:: @echo $@ - @$(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + @if [ -t 0 ]; then \ + $(AWK) --debug -f /dev/null < "$(srcdir)"/$@.in > _$@ 2>&1 || echo EXIT CODE: $$? >>_$@ ; \ + $(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ ; \ + fi printhuge:: @echo $@ @@ -1232,9 +1234,8 @@ paramasfunc2:: negtime:: @echo $@ - @echo Expect negtime to fail with MinGW and DJGPP @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -159,7 +159,7 @@ const char __re_error_msgid[] attribute_hidden = #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [, [^, [:, [., or [=") /* REG_EBRACK */ "\0" -#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") +#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") diff --git a/test/ChangeLog b/test/ChangeLog index d609a226..524ce647 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2015-05-29 Arnold D. Robbins <arnold@skeeve.com> + + * checknegtime.awk: New file. + * Makefile.am (negtime): Use checknegtime.awk to test results. + Should solve some problems with BSD and also MinGW. + 2015-05-21 Arnold D. Robbins <arnold@skeeve.com> * fts.awk: Really remove atime from the output. diff --git a/test/Makefile.am b/test/Makefile.am index fe30cb41..f13fa2fb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -137,6 +137,7 @@ EXTRA_DIST = \ charasbytes.awk \ charasbytes.in \ charasbytes.ok \ + checknegtime.awk \ childin.awk \ childin.in \ childin.ok \ @@ -2116,8 +2117,7 @@ paramasfunc2:: negtime:: @echo $@ @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - + @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@ # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index cddc7a5e..08c04a02 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -394,6 +394,7 @@ EXTRA_DIST = \ charasbytes.awk \ charasbytes.in \ charasbytes.ok \ + checknegtime.awk \ childin.awk \ childin.in \ childin.ok \ @@ -2552,7 +2553,7 @@ paramasfunc2:: negtime:: @echo $@ @TZ=GMT AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + @AWKPATH="$(srcdir)" $(AWK) -f checknegtime.awk $@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/checknegtime.awk b/test/checknegtime.awk new file mode 100644 index 00000000..06dfcae9 --- /dev/null +++ b/test/checknegtime.awk @@ -0,0 +1,22 @@ +NR == 1 { + # Tue Dec 15 07:00:00 GMT 1959 + Weekday = $1 + Month = $2 + Day = $3 + Time = $4 + Timezone = $5 + Year = $6 +} + +NR == 2 { + if (NF == 0) # MinGW gives an empty line + exit 0 + + # Some BSDs give us UTC in the timezone + if ($1 == Weekday && $2 == Month && $3 == Day && + $4 == Time && $6 == Year) + exit 0 + + # Some other mismatch + exit 1 +} |