diff options
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 11 | ||||
-rw-r--r-- | doc/gawk.1 | 10 | ||||
-rw-r--r-- | doc/gawk.info | 1114 | ||||
-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, 713 insertions, 696 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,6 +51,10 @@ Changes from 4.1.x to 4.2.0 12. The API minor version has been increased to two; the get_file() API provides access to open redirections. Also see the manual. +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. + Changes from 4.1.2 to 4.1.3 --------------------------- diff --git a/doc/ChangeLog b/doc/ChangeLog index 70a7147c..4f0ab9b9 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 6a52baec..102bc769 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2662,9 +2662,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::). @@ -4426,7 +4423,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'. @@ -4478,11 +4475,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 @@ -10223,7 +10215,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. @@ -10320,10 +10312,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 @@ -13404,7 +13392,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 @@ -27110,6 +27098,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. @@ -31804,7 +31798,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) @@ -31812,12 +31806,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. @@ -31826,9 +31820,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) @@ -31838,20 +31832,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) @@ -31859,10 +31853,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) @@ -32581,7 +32575,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) @@ -32771,7 +32765,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) @@ -33092,7 +33086,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) @@ -33229,7 +33222,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. @@ -33382,7 +33375,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) @@ -33711,7 +33704,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) @@ -33727,7 +33720,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. @@ -33811,8 +33804,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) @@ -34043,7 +34034,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) @@ -34077,9 +34068,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) @@ -34096,11 +34085,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) @@ -34289,7 +34278,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) @@ -34376,7 +34365,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) @@ -34415,7 +34404,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) @@ -34929,523 +34917,521 @@ Node: Intro Summary113141 Node: Invoking Gawk114025 Node: Command Line115539 Node: Options116337 -Ref: Options-Footnote-1132117 -Ref: Options-Footnote-2132347 -Node: Other Arguments132372 -Node: Naming Standard Input135319 -Node: Environment Variables136412 -Node: AWKPATH Variable136970 -Ref: AWKPATH Variable-Footnote-1140381 -Ref: AWKPATH Variable-Footnote-2140426 -Node: AWKLIBPATH Variable140687 -Node: Other Environment Variables141944 -Node: Exit Status145582 -Node: Include Files146259 -Node: Loading Shared Libraries149854 -Node: Obsolete151282 -Node: Undocumented151974 -Node: Invoking Summary152271 -Node: Regexp153931 -Node: Regexp Usage155385 -Node: Escape Sequences157422 -Node: Regexp Operators163655 -Ref: Regexp Operators-Footnote-1171072 -Ref: Regexp Operators-Footnote-2171219 -Node: Bracket Expressions171317 -Ref: table-char-classes173340 -Node: Leftmost Longest176286 -Node: Computed Regexps177589 -Node: GNU Regexp Operators181016 -Node: Case-sensitivity184695 -Ref: Case-sensitivity-Footnote-1187582 -Ref: Case-sensitivity-Footnote-2187817 -Node: Regexp Summary187925 -Node: Reading Files189391 -Node: Records191554 -Node: awk split records192287 -Node: gawk split records197219 -Ref: gawk split records-Footnote-1201763 -Node: Fields201800 -Ref: Fields-Footnote-1204580 -Node: Nonconstant Fields204666 -Ref: Nonconstant Fields-Footnote-1206902 -Node: Changing Fields207106 -Node: Field Separators213036 -Node: Default Field Splitting215734 -Node: Regexp Field Splitting216852 -Node: Single Character Fields220205 -Node: Command Line Field Separator221265 -Node: Full Line Fields224483 -Ref: Full Line Fields-Footnote-1226005 -Ref: Full Line Fields-Footnote-2226051 -Node: Field Splitting Summary226152 -Node: Constant Size228226 -Node: Splitting By Content232805 -Ref: Splitting By Content-Footnote-1236776 -Node: Multiple Line236939 -Ref: Multiple Line-Footnote-1242822 -Node: Getline243001 -Node: Plain Getline245468 -Node: Getline/Variable248107 -Node: Getline/File249256 -Node: Getline/Variable/File250642 -Ref: Getline/Variable/File-Footnote-1252246 -Node: Getline/Pipe252334 -Node: Getline/Variable/Pipe255039 -Node: Getline/Coprocess256172 -Node: Getline/Variable/Coprocess257437 -Node: Getline Notes258177 -Node: Getline Summary260972 -Ref: table-getline-variants261394 -Node: Read Timeout262142 -Ref: Read Timeout-Footnote-1266049 -Node: Retrying Input266107 -Node: Command-line directories267306 -Node: Input Summary268213 -Node: Input Exercises271385 -Node: Printing272113 -Node: Print273948 -Node: Print Examples275405 -Node: Output Separators278185 -Node: OFMT280202 -Node: Printf281558 -Node: Basic Printf282343 -Node: Control Letters283917 -Node: Format Modifiers287905 -Node: Printf Examples293920 -Node: Redirection296406 -Node: Special FD303249 -Ref: Special FD-Footnote-1306417 -Node: Special Files306491 -Node: Other Inherited Files307108 -Node: Special Network308109 -Node: Special Caveats308969 -Node: Close Files And Pipes309918 -Ref: Close Files And Pipes-Footnote-1317105 -Ref: Close Files And Pipes-Footnote-2317253 -Node: Nonfatal317404 -Node: Output Summary319729 -Node: Output Exercises320951 -Node: Expressions321630 -Node: Values322818 -Node: Constants323496 -Node: Scalar Constants324187 -Ref: Scalar Constants-Footnote-1325051 -Node: Nondecimal-numbers325301 -Node: Regexp Constants328315 -Node: Using Constant Regexps328841 -Node: Variables332004 -Node: Using Variables332661 -Node: Assignment Options334572 -Node: Conversion336446 -Node: Strings And Numbers336970 -Ref: Strings And Numbers-Footnote-1340034 -Node: Locale influences conversions340143 -Ref: table-locale-affects342901 -Node: All Operators343519 -Node: Arithmetic Ops344148 -Node: Concatenation346654 -Ref: Concatenation-Footnote-1349501 -Node: Assignment Ops349608 -Ref: table-assign-ops354600 -Node: Increment Ops355913 -Node: Truth Values and Conditions359373 -Node: Truth Values360447 -Node: Typing and Comparison361495 -Node: Variable Typing362315 -Node: Comparison Operators365939 -Ref: table-relational-ops366358 -Node: POSIX String Comparison369853 -Ref: POSIX String Comparison-Footnote-1370927 -Node: Boolean Ops371066 -Ref: Boolean Ops-Footnote-1375548 -Node: Conditional Exp375640 -Node: Function Calls377376 -Node: Precedence381256 -Node: Locales384915 -Node: Expressions Summary386547 -Node: Patterns and Actions389120 -Node: Pattern Overview390240 -Node: Regexp Patterns391917 -Node: Expression Patterns392459 -Node: Ranges396240 -Node: BEGIN/END399348 -Node: Using BEGIN/END400109 -Ref: Using BEGIN/END-Footnote-1402846 -Node: I/O And BEGIN/END402952 -Node: BEGINFILE/ENDFILE405268 -Node: Empty408175 -Node: Using Shell Variables408492 -Node: Action Overview410766 -Node: Statements413091 -Node: If Statement414939 -Node: While Statement416434 -Node: Do Statement418462 -Node: For Statement419610 -Node: Switch Statement422769 -Node: Break Statement425155 -Node: Continue Statement427247 -Node: Next Statement429074 -Node: Nextfile Statement431457 -Node: Exit Statement434109 -Node: Built-in Variables436514 -Node: User-modified437647 -Ref: User-modified-Footnote-1445274 -Node: Auto-set445336 -Ref: Auto-set-Footnote-1459585 -Ref: Auto-set-Footnote-2459791 -Node: ARGC and ARGV459847 -Node: Pattern Action Summary464066 -Node: Arrays466496 -Node: Array Basics467825 -Node: Array Intro468669 -Ref: figure-array-elements470644 -Ref: Array Intro-Footnote-1473348 -Node: Reference to Elements473476 -Node: Assigning Elements475940 -Node: Array Example476431 -Node: Scanning an Array478190 -Node: Controlling Scanning481214 -Ref: Controlling Scanning-Footnote-1486613 -Node: Numeric Array Subscripts486929 -Node: Uninitialized Subscripts489113 -Node: Delete490732 -Ref: Delete-Footnote-1493484 -Node: Multidimensional493541 -Node: Multiscanning496636 -Node: Arrays of Arrays498227 -Node: Arrays Summary502995 -Node: Functions505088 -Node: Built-in506126 -Node: Calling Built-in507204 -Node: Numeric Functions509200 -Ref: Numeric Functions-Footnote-1514033 -Ref: Numeric Functions-Footnote-2514390 -Ref: Numeric Functions-Footnote-3514438 -Node: String Functions514710 -Ref: String Functions-Footnote-1538218 -Ref: String Functions-Footnote-2538347 -Ref: String Functions-Footnote-3538595 -Node: Gory Details538682 -Ref: table-sub-escapes540473 -Ref: table-sub-proposed541992 -Ref: table-posix-sub543355 -Ref: table-gensub-escapes544896 -Ref: Gory Details-Footnote-1545719 -Node: I/O Functions545870 -Ref: I/O Functions-Footnote-1553091 -Node: Time Functions553239 -Ref: Time Functions-Footnote-1563744 -Ref: Time Functions-Footnote-2563812 -Ref: Time Functions-Footnote-3563970 -Ref: Time Functions-Footnote-4564081 -Ref: Time Functions-Footnote-5564193 -Ref: Time Functions-Footnote-6564420 -Node: Bitwise Functions564686 -Ref: table-bitwise-ops565280 -Ref: Bitwise Functions-Footnote-1569588 -Node: Type Functions569761 -Node: I18N Functions570917 -Node: User-defined572568 -Node: Definition Syntax573373 -Ref: Definition Syntax-Footnote-1579060 -Node: Function Example579131 -Ref: Function Example-Footnote-1582053 -Node: Function Caveats582075 -Node: Calling A Function582593 -Node: Variable Scope583551 -Node: Pass By Value/Reference586545 -Node: Return Statement590044 -Node: Dynamic Typing593023 -Node: Indirect Calls593953 -Ref: Indirect Calls-Footnote-1604204 -Node: Functions Summary604332 -Node: Library Functions607037 -Ref: Library Functions-Footnote-1610646 -Ref: Library Functions-Footnote-2610789 -Node: Library Names610960 -Ref: Library Names-Footnote-1614421 -Ref: Library Names-Footnote-2614644 -Node: General Functions614730 -Node: Strtonum Function615833 -Node: Assert Function618855 -Node: Round Function622181 -Node: Cliff Random Function623722 -Node: Ordinal Functions624738 -Ref: Ordinal Functions-Footnote-1627801 -Ref: Ordinal Functions-Footnote-2628053 -Node: Join Function628263 -Ref: Join Function-Footnote-1630033 -Node: Getlocaltime Function630233 -Node: Readfile Function633977 -Node: Shell Quoting635951 -Node: Data File Management637352 -Node: Filetrans Function637984 -Node: Rewind Function642081 -Node: File Checking643467 -Ref: File Checking-Footnote-1644801 -Node: Empty Files645002 -Node: Ignoring Assigns646981 -Node: Getopt Function648531 -Ref: Getopt Function-Footnote-1660001 -Node: Passwd Functions660201 -Ref: Passwd Functions-Footnote-1669042 -Node: Group Functions669130 -Ref: Group Functions-Footnote-1677029 -Node: Walking Arrays677236 -Node: Library Functions Summary680246 -Node: Library Exercises681652 -Node: Sample Programs682931 -Node: Running Examples683701 -Node: Clones684429 -Node: Cut Program685653 -Node: Egrep Program695374 -Ref: Egrep Program-Footnote-1702886 -Node: Id Program702996 -Node: Split Program706676 -Ref: Split Program-Footnote-1710135 -Node: Tee Program710264 -Node: Uniq Program713054 -Node: Wc Program720480 -Ref: Wc Program-Footnote-1724735 -Node: Miscellaneous Programs724829 -Node: Dupword Program726042 -Node: Alarm Program728072 -Node: Translate Program732927 -Ref: Translate Program-Footnote-1737492 -Node: Labels Program737762 -Ref: Labels Program-Footnote-1741113 -Node: Word Sorting741197 -Node: History Sorting745269 -Node: Extract Program747104 -Node: Simple Sed754635 -Node: Igawk Program757709 -Ref: Igawk Program-Footnote-1772040 -Ref: Igawk Program-Footnote-2772242 -Ref: Igawk Program-Footnote-3772364 -Node: Anagram Program772479 -Node: Signature Program775541 -Node: Programs Summary776788 -Node: Programs Exercises778003 -Ref: Programs Exercises-Footnote-1782132 -Node: Advanced Features782223 -Node: Nondecimal Data784213 -Node: Array Sorting785804 -Node: Controlling Array Traversal786504 -Ref: Controlling Array Traversal-Footnote-1794873 -Node: Array Sorting Functions794991 -Ref: Array Sorting Functions-Footnote-1798878 -Node: Two-way I/O799074 -Ref: Two-way I/O-Footnote-1804025 -Ref: Two-way I/O-Footnote-2804212 -Node: TCP/IP Networking804294 -Node: Profiling807201 -Node: Advanced Features Summary815472 -Node: Internationalization817408 -Node: I18N and L10N818888 -Node: Explaining gettext819575 -Ref: Explaining gettext-Footnote-1824598 -Ref: Explaining gettext-Footnote-2824783 -Node: Programmer i18n824948 -Ref: Programmer i18n-Footnote-1829804 -Node: Translator i18n829853 -Node: String Extraction830647 -Ref: String Extraction-Footnote-1831780 -Node: Printf Ordering831866 -Ref: Printf Ordering-Footnote-1834652 -Node: I18N Portability834716 -Ref: I18N Portability-Footnote-1837172 -Node: I18N Example837235 -Ref: I18N Example-Footnote-1840041 -Node: Gawk I18N840114 -Node: I18N Summary840759 -Node: Debugger842100 -Node: Debugging843122 -Node: Debugging Concepts843563 -Node: Debugging Terms845372 -Node: Awk Debugging847947 -Node: Sample Debugging Session848853 -Node: Debugger Invocation849387 -Node: Finding The Bug850773 -Node: List of Debugger Commands857251 -Node: Breakpoint Control858584 -Node: Debugger Execution Control862278 -Node: Viewing And Changing Data865640 -Node: Execution Stack869014 -Node: Debugger Info870651 -Node: Miscellaneous Debugger Commands874722 -Node: Readline Support879731 -Node: Limitations880627 -Node: Debugging Summary882736 -Node: Arbitrary Precision Arithmetic883909 -Node: Computer Arithmetic885325 -Ref: table-numeric-ranges888916 -Ref: Computer Arithmetic-Footnote-1889638 -Node: Math Definitions889695 -Ref: table-ieee-formats893009 -Ref: Math Definitions-Footnote-1893612 -Node: MPFR features893717 -Node: FP Math Caution895390 -Ref: FP Math Caution-Footnote-1896462 -Node: Inexactness of computations896831 -Node: Inexact representation897791 -Node: Comparing FP Values899151 -Node: Errors accumulate900233 -Node: Getting Accuracy901666 -Node: Try To Round904376 -Node: Setting precision905275 -Ref: table-predefined-precision-strings905972 -Node: Setting the rounding mode907802 -Ref: table-gawk-rounding-modes908176 -Ref: Setting the rounding mode-Footnote-1911584 -Node: Arbitrary Precision Integers911763 -Ref: Arbitrary Precision Integers-Footnote-1916680 -Node: POSIX Floating Point Problems916829 -Ref: POSIX Floating Point Problems-Footnote-1920711 -Node: Floating point summary920749 -Node: Dynamic Extensions922939 -Node: Extension Intro924492 -Node: Plugin License925758 -Node: Extension Mechanism Outline926555 -Ref: figure-load-extension926994 -Ref: figure-register-new-function928559 -Ref: figure-call-new-function929651 -Node: Extension API Description931714 -Node: Extension API Functions Introduction933248 -Node: General Data Types938107 -Ref: General Data Types-Footnote-1944062 -Node: Memory Allocation Functions944361 -Ref: Memory Allocation Functions-Footnote-1947206 -Node: Constructor Functions947305 -Node: Registration Functions949050 -Node: Extension Functions949735 -Node: Exit Callback Functions952034 -Node: Extension Version String953284 -Node: Input Parsers953947 -Node: Output Wrappers963832 -Node: Two-way processors968344 -Node: Printing Messages970608 -Ref: Printing Messages-Footnote-1971684 -Node: Updating 'ERRNO'971837 -Node: Requesting Values972578 -Ref: table-value-types-returned973317 -Node: Accessing Parameters974200 -Node: Symbol Table Access975436 -Node: Symbol table by name975948 -Node: Symbol table by cookie977969 -Ref: Symbol table by cookie-Footnote-1982118 -Node: Cached values982182 -Ref: Cached values-Footnote-1985683 -Node: Array Manipulation985774 -Ref: Array Manipulation-Footnote-1986865 -Node: Array Data Types986902 -Ref: Array Data Types-Footnote-1989560 -Node: Array Functions989652 -Node: Flattening Arrays993511 -Node: Creating Arrays1000419 -Node: Redirection API1005191 -Node: Extension API Variables1008022 -Node: Extension Versioning1008655 -Node: Extension API Informational Variables1010546 -Node: Extension API Boilerplate1011610 -Node: Finding Extensions1015424 -Node: Extension Example1015984 -Node: Internal File Description1016782 -Node: Internal File Ops1020862 -Ref: Internal File Ops-Footnote-11032624 -Node: Using Internal File Ops1032764 -Ref: Using Internal File Ops-Footnote-11035147 -Node: Extension Samples1035422 -Node: Extension Sample File Functions1036951 -Node: Extension Sample Fnmatch1044600 -Node: Extension Sample Fork1046087 -Node: Extension Sample Inplace1047305 -Node: Extension Sample Ord1049391 -Node: Extension Sample Readdir1050227 -Ref: table-readdir-file-types1051116 -Node: Extension Sample Revout1051921 -Node: Extension Sample Rev2way1052510 -Node: Extension Sample Read write array1053250 -Node: Extension Sample Readfile1055192 -Node: Extension Sample Time1056287 -Node: Extension Sample API Tests1057635 -Node: gawkextlib1058127 -Node: Extension summary1060574 -Node: Extension Exercises1064266 -Node: Language History1065763 -Node: V7/SVR3.11067419 -Node: SVR41069572 -Node: POSIX1071006 -Node: BTL1072386 -Node: POSIX/GNU1073116 -Node: Feature History1078955 -Node: Common Extensions1092946 -Node: Ranges and Locales1094229 -Ref: Ranges and Locales-Footnote-11098845 -Ref: Ranges and Locales-Footnote-21098872 -Ref: Ranges and Locales-Footnote-31099107 -Node: Contributors1099328 -Node: History summary1104897 -Node: Installation1106277 -Node: Gawk Distribution1107222 -Node: Getting1107706 -Node: Extracting1108529 -Node: Distribution contents1110167 -Node: Unix Installation1116263 -Node: Quick Installation1116945 -Node: Shell Startup Files1119359 -Node: Additional Configuration Options1120437 -Node: Configuration Philosophy1122242 -Node: Non-Unix Installation1124612 -Node: PC Installation1125070 -Node: PC Binary Installation1126390 -Node: PC Compiling1128242 -Ref: PC Compiling-Footnote-11131266 -Node: PC Testing1131375 -Node: PC Using1132555 -Node: Cygwin1136669 -Node: MSYS1137439 -Node: VMS Installation1137940 -Node: VMS Compilation1138731 -Ref: VMS Compilation-Footnote-11139961 -Node: VMS Dynamic Extensions1140019 -Node: VMS Installation Details1141704 -Node: VMS Running1143957 -Node: VMS GNV1146798 -Node: VMS Old Gawk1147533 -Node: Bugs1148004 -Node: Other Versions1152118 -Node: Installation summary1158592 -Node: Notes1159650 -Node: Compatibility Mode1160515 -Node: Additions1161297 -Node: Accessing The Source1162222 -Node: Adding Code1163658 -Node: New Ports1169813 -Node: Derived Files1174301 -Ref: Derived Files-Footnote-11179786 -Ref: Derived Files-Footnote-21179821 -Ref: Derived Files-Footnote-31180419 -Node: Future Extensions1180533 -Node: Implementation Limitations1181191 -Node: Extension Design1182374 -Node: Old Extension Problems1183528 -Ref: Old Extension Problems-Footnote-11185046 -Node: Extension New Mechanism Goals1185103 -Ref: Extension New Mechanism Goals-Footnote-11188467 -Node: Extension Other Design Decisions1188656 -Node: Extension Future Growth1190769 -Node: Old Extension Mechanism1191605 -Node: Notes summary1193368 -Node: Basic Concepts1194550 -Node: Basic High Level1195231 -Ref: figure-general-flow1195513 -Ref: figure-process-flow1196198 -Ref: Basic High Level-Footnote-11199499 -Node: Basic Data Typing1199684 -Node: Glossary1203012 -Node: Copying1234958 -Node: GNU Free Documentation License1272497 -Node: Index1297615 +Ref: Options-Footnote-1131988 +Ref: Options-Footnote-2132218 +Node: Other Arguments132243 +Node: Naming Standard Input135190 +Node: Environment Variables136283 +Node: AWKPATH Variable136841 +Ref: AWKPATH Variable-Footnote-1140252 +Ref: AWKPATH Variable-Footnote-2140297 +Node: AWKLIBPATH Variable140558 +Node: Other Environment Variables141815 +Node: Exit Status145453 +Node: Include Files146130 +Node: Loading Shared Libraries149725 +Node: Obsolete151153 +Node: Undocumented151845 +Node: Invoking Summary152142 +Node: Regexp153802 +Node: Regexp Usage155256 +Node: Escape Sequences157293 +Node: Regexp Operators163526 +Ref: Regexp Operators-Footnote-1170943 +Ref: Regexp Operators-Footnote-2171090 +Node: Bracket Expressions171188 +Ref: table-char-classes173211 +Node: Leftmost Longest176157 +Node: Computed Regexps177460 +Node: GNU Regexp Operators180887 +Node: Case-sensitivity184566 +Ref: Case-sensitivity-Footnote-1187453 +Ref: Case-sensitivity-Footnote-2187688 +Node: Regexp Summary187796 +Node: Reading Files189262 +Node: Records191425 +Node: awk split records192158 +Node: gawk split records197090 +Ref: gawk split records-Footnote-1201634 +Node: Fields201671 +Node: Nonconstant Fields204412 +Ref: Nonconstant Fields-Footnote-1206648 +Node: Changing Fields206852 +Node: Field Separators212782 +Node: Default Field Splitting215480 +Node: Regexp Field Splitting216598 +Node: Single Character Fields219951 +Node: Command Line Field Separator221011 +Node: Full Line Fields224229 +Ref: Full Line Fields-Footnote-1225751 +Ref: Full Line Fields-Footnote-2225797 +Node: Field Splitting Summary225898 +Node: Constant Size227972 +Node: Splitting By Content232551 +Ref: Splitting By Content-Footnote-1236522 +Node: Multiple Line236685 +Ref: Multiple Line-Footnote-1242568 +Node: Getline242747 +Node: Plain Getline245214 +Node: Getline/Variable247853 +Node: Getline/File249002 +Node: Getline/Variable/File250388 +Ref: Getline/Variable/File-Footnote-1251992 +Node: Getline/Pipe252080 +Node: Getline/Variable/Pipe254785 +Node: Getline/Coprocess255918 +Node: Getline/Variable/Coprocess257183 +Node: Getline Notes257923 +Node: Getline Summary260718 +Ref: table-getline-variants261140 +Node: Read Timeout261888 +Ref: Read Timeout-Footnote-1265795 +Node: Retrying Input265853 +Node: Command-line directories267052 +Node: Input Summary267959 +Node: Input Exercises271131 +Node: Printing271859 +Node: Print273694 +Node: Print Examples275151 +Node: Output Separators277931 +Node: OFMT279948 +Node: Printf281304 +Node: Basic Printf282089 +Node: Control Letters283663 +Node: Format Modifiers287651 +Node: Printf Examples293666 +Node: Redirection296152 +Node: Special FD302995 +Ref: Special FD-Footnote-1306163 +Node: Special Files306237 +Node: Other Inherited Files306854 +Node: Special Network307855 +Node: Special Caveats308715 +Node: Close Files And Pipes309664 +Ref: Close Files And Pipes-Footnote-1316851 +Ref: Close Files And Pipes-Footnote-2316999 +Node: Nonfatal317150 +Node: Output Summary319475 +Node: Output Exercises320697 +Node: Expressions321376 +Node: Values322564 +Node: Constants323242 +Node: Scalar Constants323933 +Ref: Scalar Constants-Footnote-1324797 +Node: Nondecimal-numbers325047 +Node: Regexp Constants328061 +Node: Using Constant Regexps328587 +Node: Variables331750 +Node: Using Variables332407 +Node: Assignment Options334318 +Node: Conversion336192 +Node: Strings And Numbers336716 +Ref: Strings And Numbers-Footnote-1339780 +Node: Locale influences conversions339889 +Ref: table-locale-affects342647 +Node: All Operators343265 +Node: Arithmetic Ops343894 +Node: Concatenation346400 +Ref: Concatenation-Footnote-1349247 +Node: Assignment Ops349354 +Ref: table-assign-ops354346 +Node: Increment Ops355659 +Node: Truth Values and Conditions359119 +Node: Truth Values360193 +Node: Typing and Comparison361241 +Node: Variable Typing362061 +Node: Comparison Operators365685 +Ref: table-relational-ops366104 +Node: POSIX String Comparison369599 +Ref: POSIX String Comparison-Footnote-1370673 +Node: Boolean Ops370812 +Ref: Boolean Ops-Footnote-1375294 +Node: Conditional Exp375386 +Node: Function Calls377122 +Node: Precedence381002 +Node: Locales384661 +Node: Expressions Summary386293 +Node: Patterns and Actions388866 +Node: Pattern Overview389986 +Node: Regexp Patterns391663 +Node: Expression Patterns392205 +Node: Ranges395986 +Node: BEGIN/END399094 +Node: Using BEGIN/END399855 +Ref: Using BEGIN/END-Footnote-1402592 +Node: I/O And BEGIN/END402698 +Node: BEGINFILE/ENDFILE405014 +Node: Empty407921 +Node: Using Shell Variables408238 +Node: Action Overview410512 +Node: Statements412837 +Node: If Statement414685 +Node: While Statement416180 +Node: Do Statement418208 +Node: For Statement419356 +Node: Switch Statement422515 +Node: Break Statement424901 +Node: Continue Statement426993 +Node: Next Statement428820 +Node: Nextfile Statement431203 +Node: Exit Statement433855 +Node: Built-in Variables436260 +Node: User-modified437393 +Node: Auto-set444981 +Ref: Auto-set-Footnote-1459230 +Ref: Auto-set-Footnote-2459436 +Node: ARGC and ARGV459492 +Node: Pattern Action Summary463711 +Node: Arrays466141 +Node: Array Basics467470 +Node: Array Intro468314 +Ref: figure-array-elements470289 +Ref: Array Intro-Footnote-1472993 +Node: Reference to Elements473121 +Node: Assigning Elements475585 +Node: Array Example476076 +Node: Scanning an Array477835 +Node: Controlling Scanning480859 +Ref: Controlling Scanning-Footnote-1486258 +Node: Numeric Array Subscripts486574 +Node: Uninitialized Subscripts488758 +Node: Delete490377 +Ref: Delete-Footnote-1493129 +Node: Multidimensional493186 +Node: Multiscanning496281 +Node: Arrays of Arrays497872 +Node: Arrays Summary502640 +Node: Functions504733 +Node: Built-in505771 +Node: Calling Built-in506849 +Node: Numeric Functions508845 +Ref: Numeric Functions-Footnote-1513678 +Ref: Numeric Functions-Footnote-2514035 +Ref: Numeric Functions-Footnote-3514083 +Node: String Functions514355 +Ref: String Functions-Footnote-1537863 +Ref: String Functions-Footnote-2537992 +Ref: String Functions-Footnote-3538240 +Node: Gory Details538327 +Ref: table-sub-escapes540118 +Ref: table-sub-proposed541637 +Ref: table-posix-sub543000 +Ref: table-gensub-escapes544541 +Ref: Gory Details-Footnote-1545364 +Node: I/O Functions545515 +Ref: I/O Functions-Footnote-1552736 +Node: Time Functions552884 +Ref: Time Functions-Footnote-1563389 +Ref: Time Functions-Footnote-2563457 +Ref: Time Functions-Footnote-3563615 +Ref: Time Functions-Footnote-4563726 +Ref: Time Functions-Footnote-5563838 +Ref: Time Functions-Footnote-6564065 +Node: Bitwise Functions564331 +Ref: table-bitwise-ops564925 +Ref: Bitwise Functions-Footnote-1569263 +Node: Type Functions569436 +Node: I18N Functions570592 +Node: User-defined572243 +Node: Definition Syntax573048 +Ref: Definition Syntax-Footnote-1578735 +Node: Function Example578806 +Ref: Function Example-Footnote-1581728 +Node: Function Caveats581750 +Node: Calling A Function582268 +Node: Variable Scope583226 +Node: Pass By Value/Reference586220 +Node: Return Statement589719 +Node: Dynamic Typing592698 +Node: Indirect Calls593628 +Ref: Indirect Calls-Footnote-1603879 +Node: Functions Summary604007 +Node: Library Functions606712 +Ref: Library Functions-Footnote-1610321 +Ref: Library Functions-Footnote-2610464 +Node: Library Names610635 +Ref: Library Names-Footnote-1614096 +Ref: Library Names-Footnote-2614319 +Node: General Functions614405 +Node: Strtonum Function615508 +Node: Assert Function618530 +Node: Round Function621856 +Node: Cliff Random Function623397 +Node: Ordinal Functions624413 +Ref: Ordinal Functions-Footnote-1627476 +Ref: Ordinal Functions-Footnote-2627728 +Node: Join Function627938 +Ref: Join Function-Footnote-1629708 +Node: Getlocaltime Function629908 +Node: Readfile Function633652 +Node: Shell Quoting635626 +Node: Data File Management637027 +Node: Filetrans Function637659 +Node: Rewind Function641756 +Node: File Checking643142 +Ref: File Checking-Footnote-1644476 +Node: Empty Files644677 +Node: Ignoring Assigns646656 +Node: Getopt Function648206 +Ref: Getopt Function-Footnote-1659676 +Node: Passwd Functions659876 +Ref: Passwd Functions-Footnote-1668717 +Node: Group Functions668805 +Ref: Group Functions-Footnote-1676704 +Node: Walking Arrays676911 +Node: Library Functions Summary679921 +Node: Library Exercises681327 +Node: Sample Programs682606 +Node: Running Examples683376 +Node: Clones684104 +Node: Cut Program685328 +Node: Egrep Program695049 +Ref: Egrep Program-Footnote-1702561 +Node: Id Program702671 +Node: Split Program706351 +Ref: Split Program-Footnote-1709810 +Node: Tee Program709939 +Node: Uniq Program712729 +Node: Wc Program720155 +Ref: Wc Program-Footnote-1724410 +Node: Miscellaneous Programs724504 +Node: Dupword Program725717 +Node: Alarm Program727747 +Node: Translate Program732602 +Ref: Translate Program-Footnote-1737167 +Node: Labels Program737437 +Ref: Labels Program-Footnote-1740788 +Node: Word Sorting740872 +Node: History Sorting744944 +Node: Extract Program746779 +Node: Simple Sed754310 +Node: Igawk Program757384 +Ref: Igawk Program-Footnote-1771715 +Ref: Igawk Program-Footnote-2771917 +Ref: Igawk Program-Footnote-3772039 +Node: Anagram Program772154 +Node: Signature Program775216 +Node: Programs Summary776463 +Node: Programs Exercises777678 +Ref: Programs Exercises-Footnote-1781807 +Node: Advanced Features781898 +Node: Nondecimal Data783888 +Node: Array Sorting785479 +Node: Controlling Array Traversal786179 +Ref: Controlling Array Traversal-Footnote-1794548 +Node: Array Sorting Functions794666 +Ref: Array Sorting Functions-Footnote-1798553 +Node: Two-way I/O798749 +Ref: Two-way I/O-Footnote-1803700 +Ref: Two-way I/O-Footnote-2803887 +Node: TCP/IP Networking803969 +Node: Profiling806876 +Node: Advanced Features Summary815147 +Node: Internationalization817083 +Node: I18N and L10N818563 +Node: Explaining gettext819250 +Ref: Explaining gettext-Footnote-1824273 +Ref: Explaining gettext-Footnote-2824458 +Node: Programmer i18n824623 +Ref: Programmer i18n-Footnote-1829479 +Node: Translator i18n829528 +Node: String Extraction830322 +Ref: String Extraction-Footnote-1831455 +Node: Printf Ordering831541 +Ref: Printf Ordering-Footnote-1834327 +Node: I18N Portability834391 +Ref: I18N Portability-Footnote-1836847 +Node: I18N Example836910 +Ref: I18N Example-Footnote-1839716 +Node: Gawk I18N839789 +Node: I18N Summary840434 +Node: Debugger841775 +Node: Debugging842797 +Node: Debugging Concepts843238 +Node: Debugging Terms845047 +Node: Awk Debugging847622 +Node: Sample Debugging Session848528 +Node: Debugger Invocation849062 +Node: Finding The Bug850448 +Node: List of Debugger Commands856926 +Node: Breakpoint Control858259 +Node: Debugger Execution Control861953 +Node: Viewing And Changing Data865315 +Node: Execution Stack868689 +Node: Debugger Info870326 +Node: Miscellaneous Debugger Commands874397 +Node: Readline Support879406 +Node: Limitations880302 +Node: Debugging Summary882411 +Node: Arbitrary Precision Arithmetic883584 +Node: Computer Arithmetic885000 +Ref: table-numeric-ranges888591 +Ref: Computer Arithmetic-Footnote-1889313 +Node: Math Definitions889370 +Ref: table-ieee-formats892684 +Ref: Math Definitions-Footnote-1893287 +Node: MPFR features893392 +Node: FP Math Caution895065 +Ref: FP Math Caution-Footnote-1896137 +Node: Inexactness of computations896506 +Node: Inexact representation897466 +Node: Comparing FP Values898826 +Node: Errors accumulate899908 +Node: Getting Accuracy901341 +Node: Try To Round904051 +Node: Setting precision904950 +Ref: table-predefined-precision-strings905647 +Node: Setting the rounding mode907477 +Ref: table-gawk-rounding-modes907851 +Ref: Setting the rounding mode-Footnote-1911259 +Node: Arbitrary Precision Integers911438 +Ref: Arbitrary Precision Integers-Footnote-1916355 +Node: POSIX Floating Point Problems916504 +Ref: POSIX Floating Point Problems-Footnote-1920386 +Node: Floating point summary920424 +Node: Dynamic Extensions922614 +Node: Extension Intro924167 +Node: Plugin License925433 +Node: Extension Mechanism Outline926230 +Ref: figure-load-extension926669 +Ref: figure-register-new-function928234 +Ref: figure-call-new-function929326 +Node: Extension API Description931389 +Node: Extension API Functions Introduction932923 +Node: General Data Types937782 +Ref: General Data Types-Footnote-1943737 +Node: Memory Allocation Functions944036 +Ref: Memory Allocation Functions-Footnote-1946881 +Node: Constructor Functions946980 +Node: Registration Functions948725 +Node: Extension Functions949410 +Node: Exit Callback Functions951709 +Node: Extension Version String952959 +Node: Input Parsers953622 +Node: Output Wrappers963507 +Node: Two-way processors968019 +Node: Printing Messages970283 +Ref: Printing Messages-Footnote-1971359 +Node: Updating 'ERRNO'971512 +Node: Requesting Values972253 +Ref: table-value-types-returned972992 +Node: Accessing Parameters973875 +Node: Symbol Table Access975111 +Node: Symbol table by name975623 +Node: Symbol table by cookie977644 +Ref: Symbol table by cookie-Footnote-1981793 +Node: Cached values981857 +Ref: Cached values-Footnote-1985358 +Node: Array Manipulation985449 +Ref: Array Manipulation-Footnote-1986540 +Node: Array Data Types986577 +Ref: Array Data Types-Footnote-1989235 +Node: Array Functions989327 +Node: Flattening Arrays993186 +Node: Creating Arrays1000094 +Node: Redirection API1004866 +Node: Extension API Variables1007697 +Node: Extension Versioning1008330 +Node: Extension API Informational Variables1010221 +Node: Extension API Boilerplate1011285 +Node: Finding Extensions1015099 +Node: Extension Example1015659 +Node: Internal File Description1016457 +Node: Internal File Ops1020537 +Ref: Internal File Ops-Footnote-11032299 +Node: Using Internal File Ops1032439 +Ref: Using Internal File Ops-Footnote-11034822 +Node: Extension Samples1035097 +Node: Extension Sample File Functions1036626 +Node: Extension Sample Fnmatch1044275 +Node: Extension Sample Fork1045762 +Node: Extension Sample Inplace1046980 +Node: Extension Sample Ord1049066 +Node: Extension Sample Readdir1049902 +Ref: table-readdir-file-types1050791 +Node: Extension Sample Revout1051596 +Node: Extension Sample Rev2way1052185 +Node: Extension Sample Read write array1052925 +Node: Extension Sample Readfile1054867 +Node: Extension Sample Time1055962 +Node: Extension Sample API Tests1057310 +Node: gawkextlib1057802 +Node: Extension summary1060249 +Node: Extension Exercises1063941 +Node: Language History1065438 +Node: V7/SVR3.11067094 +Node: SVR41069247 +Node: POSIX1070681 +Node: BTL1072061 +Node: POSIX/GNU1072791 +Node: Feature History1078630 +Node: Common Extensions1092949 +Node: Ranges and Locales1094232 +Ref: Ranges and Locales-Footnote-11098848 +Ref: Ranges and Locales-Footnote-21098875 +Ref: Ranges and Locales-Footnote-31099110 +Node: Contributors1099331 +Node: History summary1104900 +Node: Installation1106280 +Node: Gawk Distribution1107225 +Node: Getting1107709 +Node: Extracting1108532 +Node: Distribution contents1110170 +Node: Unix Installation1116266 +Node: Quick Installation1116948 +Node: Shell Startup Files1119362 +Node: Additional Configuration Options1120440 +Node: Configuration Philosophy1122245 +Node: Non-Unix Installation1124615 +Node: PC Installation1125073 +Node: PC Binary Installation1126393 +Node: PC Compiling1128245 +Ref: PC Compiling-Footnote-11131269 +Node: PC Testing1131378 +Node: PC Using1132558 +Node: Cygwin1136672 +Node: MSYS1137442 +Node: VMS Installation1137943 +Node: VMS Compilation1138734 +Ref: VMS Compilation-Footnote-11139964 +Node: VMS Dynamic Extensions1140022 +Node: VMS Installation Details1141707 +Node: VMS Running1143960 +Node: VMS GNV1146801 +Node: VMS Old Gawk1147536 +Node: Bugs1148007 +Node: Other Versions1152121 +Node: Installation summary1158595 +Node: Notes1159653 +Node: Compatibility Mode1160518 +Node: Additions1161300 +Node: Accessing The Source1162225 +Node: Adding Code1163661 +Node: New Ports1169816 +Node: Derived Files1174304 +Ref: Derived Files-Footnote-11179789 +Ref: Derived Files-Footnote-21179824 +Ref: Derived Files-Footnote-31180422 +Node: Future Extensions1180536 +Node: Implementation Limitations1181194 +Node: Extension Design1182377 +Node: Old Extension Problems1183531 +Ref: Old Extension Problems-Footnote-11185049 +Node: Extension New Mechanism Goals1185106 +Ref: Extension New Mechanism Goals-Footnote-11188470 +Node: Extension Other Design Decisions1188659 +Node: Extension Future Growth1190772 +Node: Old Extension Mechanism1191608 +Node: Notes summary1193371 +Node: Basic Concepts1194553 +Node: Basic High Level1195234 +Ref: figure-general-flow1195516 +Ref: figure-process-flow1196201 +Ref: Basic High Level-Footnote-11199502 +Node: Basic Data Typing1199687 +Node: Glossary1203015 +Node: Copying1234961 +Node: GNU Free Documentation License1272500 +Node: Index1297618 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 9d1d88f6..c2c1f469 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4133,11 +4133,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}). @@ -6730,16 +6725,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}. @@ -7184,7 +7175,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 @@ -14720,12 +14710,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: @@ -19363,7 +19352,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 @@ -36849,6 +36838,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 c55557a2..639f13ef 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4044,11 +4044,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}). @@ -6457,16 +6452,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}. @@ -6880,7 +6871,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 @@ -14048,12 +14038,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: @@ -18484,7 +18473,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 @@ -35940,6 +35929,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 47a6ed01..b80398e8 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 +} |