diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | doc/ChangeLog | 6 | ||||
-rw-r--r-- | doc/gawk.1 | 4 | ||||
-rw-r--r-- | doc/gawk.info | 507 | ||||
-rw-r--r-- | doc/gawk.texi | 81 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | re.c | 2 |
8 files changed, 350 insertions, 259 deletions
@@ -1,3 +1,8 @@ +2011-09-24 Arnold D. Robbins <arnold@skeeve.com> + + * eval.c, io.c, re.c: Fix some spelling errors. Thanks to + Jeroen Schot <schot@A-Eskwadraat.nl>. + 2011-09-21 Arnold D. Robbins <arnold@skeeve.com> * dfa.c, mbsupport.h: Sync with GNU grep. Large amount of changes diff --git a/doc/ChangeLog b/doc/ChangeLog index 14c48aff..53ab79a9 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2011-09-24 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1: Fix some spelling errors. Thanks to + Jeroen Schot <schot@A-Eskwadraat.nl>. + * gawk.texi: Some minor fixes. + 2011-07-28 Arnold D. Robbins <arnold@skeeve.com> * gawk.texi (Gory Details): Restore text on historical behavior @@ -2491,7 +2491,7 @@ source array .I s unchanged. The optional string .I how -controls the direction and the comparsion mode. +controls the direction and the comparison mode. Valid values for .I how are @@ -3775,7 +3775,7 @@ Concatenate and line number (a variation on a theme): Run an external command for particular lines of data: .ft B - tail -f access_log | + tail \-f access_log | awk '/myhome.html/ { system("nmap " $1 ">> logdir/myhome.html") }' .ft R .fi diff --git a/doc/gawk.info b/doc/gawk.info index 70fb686b..13245683 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -8343,7 +8343,8 @@ would otherwise be difficult or impossible to perform: The `ENDFILE' rule is called when `gawk' has finished processing the last record in an input file. For the last input file, it will be -called before any `END' rules. +called before any `END' rules. The `ENDFILE' rule is executed even for +empty input files. Normally, when an error occurs when reading input in the normal input processing loop, the error is fatal. However, if an `ENDFILE' rule is @@ -13798,7 +13799,7 @@ affect the loop. -| 4 4 -| 3 3 $ gawk 'BEGIN { - > PROCINFO["sorted_in"] = "@str_ind_asc" + > PROCINFO["sorted_in"] = "@ind_str_asc" > a[4] = 4 > a[3] = 3 > for (i in a) @@ -26146,7 +26147,7 @@ Index * getline command, return values: Getline. (line 19) * getline command, variants: Getline Summary. (line 6) * getline statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. - (line 53) + (line 54) * getopt() function (C library): Getopt Function. (line 15) * getopt() user-defined function: Getopt Function. (line 108) * getpwent() function (C library): Passwd Functions. (line 16) @@ -26518,7 +26519,7 @@ Index * next statement: Boolean Ops. (line 85) * next statement, BEGIN/END patterns and: I/O And BEGIN/END. (line 37) * next statement, BEGINFILE/ENDFILE patterns and: BEGINFILE/ENDFILE. - (line 48) + (line 49) * next statement, user-defined functions and: Next Statement. (line 45) * nextfile statement: Nextfile Statement. (line 6) * nextfile statement, BEGIN/END patterns and: I/O And BEGIN/END. @@ -27613,254 +27614,254 @@ Node: Using BEGIN/END349402 Ref: Using BEGIN/END-Footnote-1352133 Node: I/O And BEGIN/END352239 Node: BEGINFILE/ENDFILE354521 -Node: Empty357354 -Node: Using Shell Variables357670 -Node: Action Overview359955 -Node: Statements362312 -Node: If Statement364166 -Node: While Statement365665 -Node: Do Statement367709 -Node: For Statement368865 -Node: Switch Statement372017 -Node: Break Statement374114 -Node: Continue Statement376104 -Node: Next Statement377891 -Node: Nextfile Statement380281 -Node: Exit Statement382826 -Node: Built-in Variables385242 -Node: User-modified386337 -Ref: User-modified-Footnote-1394363 -Node: Auto-set394425 -Ref: Auto-set-Footnote-1403716 -Node: ARGC and ARGV403921 -Node: Arrays407772 -Node: Array Basics409277 -Node: Array Intro409988 -Node: Reference to Elements414306 -Node: Assigning Elements416576 -Node: Array Example417067 -Node: Scanning an Array418799 -Node: Delete421465 -Ref: Delete-Footnote-1423900 -Node: Numeric Array Subscripts423957 -Node: Uninitialized Subscripts426140 -Node: Multi-dimensional427768 -Node: Multi-scanning430862 -Node: Arrays of Arrays432446 -Node: Functions437023 -Node: Built-in437845 -Node: Calling Built-in438923 -Node: Numeric Functions440911 -Ref: Numeric Functions-Footnote-1444676 -Ref: Numeric Functions-Footnote-2445033 -Ref: Numeric Functions-Footnote-3445081 -Node: String Functions445350 -Ref: String Functions-Footnote-1468847 -Ref: String Functions-Footnote-2468976 -Ref: String Functions-Footnote-3469224 -Node: Gory Details469311 -Ref: table-sub-escapes470990 -Ref: table-sub-posix-92472344 -Ref: table-sub-proposed473687 -Ref: table-posix-sub475037 -Ref: table-gensub-escapes476583 -Ref: Gory Details-Footnote-1477790 -Ref: Gory Details-Footnote-2477841 -Node: I/O Functions477992 -Ref: I/O Functions-Footnote-1484647 -Node: Time Functions484794 -Ref: Time Functions-Footnote-1495686 -Ref: Time Functions-Footnote-2495754 -Ref: Time Functions-Footnote-3495912 -Ref: Time Functions-Footnote-4496023 -Ref: Time Functions-Footnote-5496135 -Ref: Time Functions-Footnote-6496362 -Node: Bitwise Functions496628 -Ref: table-bitwise-ops497186 -Ref: Bitwise Functions-Footnote-1501346 -Node: Type Functions501530 -Node: I18N Functions502000 -Node: User-defined503627 -Node: Definition Syntax504431 -Ref: Definition Syntax-Footnote-1509341 -Node: Function Example509410 -Node: Function Caveats512004 -Node: Calling A Function512425 -Node: Variable Scope513540 -Node: Pass By Value/Reference515515 -Node: Return Statement518955 -Node: Dynamic Typing521936 -Node: Indirect Calls522671 -Node: Internationalization532356 -Node: I18N and L10N533782 -Node: Explaining gettext534468 -Ref: Explaining gettext-Footnote-1539534 -Ref: Explaining gettext-Footnote-2539718 -Node: Programmer i18n539883 -Node: Translator i18n544083 -Node: String Extraction544876 -Ref: String Extraction-Footnote-1545837 -Node: Printf Ordering545923 -Ref: Printf Ordering-Footnote-1548707 -Node: I18N Portability548771 -Ref: I18N Portability-Footnote-1551220 -Node: I18N Example551283 -Ref: I18N Example-Footnote-1553918 -Node: Gawk I18N553990 -Node: Advanced Features554607 -Node: Nondecimal Data556120 -Node: Array Sorting557703 -Node: Controlling Array Traversal558403 -Node: Controlling Scanning With A Function559150 -Node: Controlling Scanning566853 -Ref: Controlling Scanning-Footnote-1570654 -Node: Array Sorting Functions570970 -Ref: Array Sorting Functions-Footnote-1574486 -Ref: Array Sorting Functions-Footnote-2574579 -Node: Two-way I/O574773 -Ref: Two-way I/O-Footnote-1580205 -Node: TCP/IP Networking580275 -Node: Profiling583119 -Node: Library Functions590593 -Ref: Library Functions-Footnote-1593600 -Node: Library Names593771 -Ref: Library Names-Footnote-1597242 -Ref: Library Names-Footnote-2597462 -Node: General Functions597548 -Node: Strtonum Function598501 -Node: Assert Function601431 -Node: Round Function604757 -Node: Cliff Random Function606300 -Node: Ordinal Functions607316 -Ref: Ordinal Functions-Footnote-1610386 -Ref: Ordinal Functions-Footnote-2610638 -Node: Join Function610847 -Ref: Join Function-Footnote-1612618 -Node: Gettimeofday Function612818 -Node: Data File Management616533 -Node: Filetrans Function617165 -Node: Rewind Function621304 -Node: File Checking622691 -Node: Empty Files623785 -Node: Ignoring Assigns626015 -Node: Getopt Function627568 -Ref: Getopt Function-Footnote-1638872 -Node: Passwd Functions639075 -Ref: Passwd Functions-Footnote-1648050 -Node: Group Functions648138 -Node: Walking Arrays656222 -Node: Sample Programs657791 -Node: Running Examples658456 -Node: Clones659184 -Node: Cut Program660408 -Node: Egrep Program670253 -Ref: Egrep Program-Footnote-1678026 -Node: Id Program678136 -Node: Split Program681752 -Ref: Split Program-Footnote-1685271 -Node: Tee Program685399 -Node: Uniq Program688202 -Node: Wc Program695631 -Ref: Wc Program-Footnote-1699897 -Ref: Wc Program-Footnote-2700097 -Node: Miscellaneous Programs700189 -Node: Dupword Program701377 -Node: Alarm Program703408 -Node: Translate Program708157 -Ref: Translate Program-Footnote-1712544 -Ref: Translate Program-Footnote-2712772 -Node: Labels Program712906 -Ref: Labels Program-Footnote-1716277 -Node: Word Sorting716361 -Node: History Sorting720245 -Node: Extract Program722084 -Ref: Extract Program-Footnote-1729567 -Node: Simple Sed729695 -Node: Igawk Program732757 -Ref: Igawk Program-Footnote-1747914 -Ref: Igawk Program-Footnote-2748115 -Node: Anagram Program748253 -Node: Signature Program751321 -Node: Debugger752421 -Node: Debugging753332 -Node: Debugging Concepts753745 -Node: Debugging Terms755601 -Node: Awk Debugging758224 -Node: Sample dgawk session759116 -Node: dgawk invocation759608 -Node: Finding The Bug760790 -Node: List of Debugger Commands767276 -Node: Breakpoint Control768587 -Node: Dgawk Execution Control772223 -Node: Viewing And Changing Data775574 -Node: Dgawk Stack778911 -Node: Dgawk Info780371 -Node: Miscellaneous Dgawk Commands784319 -Node: Readline Support789747 -Node: Dgawk Limitations790585 -Node: Language History792774 -Node: V7/SVR3.1794286 -Node: SVR4796607 -Node: POSIX798049 -Node: BTL799057 -Node: POSIX/GNU799791 -Node: Common Extensions804942 -Node: Ranges and Locales806049 -Ref: Ranges and Locales-Footnote-1810656 -Node: Contributors810877 -Node: Installation815139 -Node: Gawk Distribution816033 -Node: Getting816517 -Node: Extracting817343 -Node: Distribution contents819035 -Node: Unix Installation824257 -Node: Quick Installation824874 -Node: Additional Configuration Options826836 -Node: Configuration Philosophy828313 -Node: Non-Unix Installation830655 -Node: PC Installation831113 -Node: PC Binary Installation832412 -Node: PC Compiling834260 -Node: PC Testing837204 -Node: PC Using838380 -Node: Cygwin842565 -Node: MSYS843565 -Node: VMS Installation844079 -Node: VMS Compilation844682 -Ref: VMS Compilation-Footnote-1845689 -Node: VMS Installation Details845747 -Node: VMS Running847382 -Node: VMS Old Gawk848989 -Node: Bugs849463 -Node: Other Versions853316 -Node: Notes858597 -Node: Compatibility Mode859289 -Node: Additions860072 -Node: Accessing The Source860884 -Node: Adding Code862309 -Node: New Ports868276 -Node: Dynamic Extensions872389 -Node: Internals873765 -Node: Plugin License882868 -Node: Sample Library883502 -Node: Internal File Description884188 -Node: Internal File Ops887903 -Ref: Internal File Ops-Footnote-1892684 -Node: Using Internal File Ops892824 -Node: Future Extensions895201 -Node: Basic Concepts897705 -Node: Basic High Level898462 -Ref: Basic High Level-Footnote-1902497 -Node: Basic Data Typing902682 -Node: Floating Point Issues907207 -Node: String Conversion Precision908290 -Ref: String Conversion Precision-Footnote-1909990 -Node: Unexpected Results910099 -Node: POSIX Floating Point Problems911925 -Ref: POSIX Floating Point Problems-Footnote-1915630 -Node: Glossary915668 -Node: Copying940644 -Node: GNU Free Documentation License978201 -Node: Index1003338 +Node: Empty357414 +Node: Using Shell Variables357730 +Node: Action Overview360015 +Node: Statements362372 +Node: If Statement364226 +Node: While Statement365725 +Node: Do Statement367769 +Node: For Statement368925 +Node: Switch Statement372077 +Node: Break Statement374174 +Node: Continue Statement376164 +Node: Next Statement377951 +Node: Nextfile Statement380341 +Node: Exit Statement382886 +Node: Built-in Variables385302 +Node: User-modified386397 +Ref: User-modified-Footnote-1394423 +Node: Auto-set394485 +Ref: Auto-set-Footnote-1403776 +Node: ARGC and ARGV403981 +Node: Arrays407832 +Node: Array Basics409337 +Node: Array Intro410048 +Node: Reference to Elements414366 +Node: Assigning Elements416636 +Node: Array Example417127 +Node: Scanning an Array418859 +Node: Delete421525 +Ref: Delete-Footnote-1423960 +Node: Numeric Array Subscripts424017 +Node: Uninitialized Subscripts426200 +Node: Multi-dimensional427828 +Node: Multi-scanning430922 +Node: Arrays of Arrays432506 +Node: Functions437083 +Node: Built-in437905 +Node: Calling Built-in438983 +Node: Numeric Functions440971 +Ref: Numeric Functions-Footnote-1444736 +Ref: Numeric Functions-Footnote-2445093 +Ref: Numeric Functions-Footnote-3445141 +Node: String Functions445410 +Ref: String Functions-Footnote-1468907 +Ref: String Functions-Footnote-2469036 +Ref: String Functions-Footnote-3469284 +Node: Gory Details469371 +Ref: table-sub-escapes471050 +Ref: table-sub-posix-92472404 +Ref: table-sub-proposed473747 +Ref: table-posix-sub475097 +Ref: table-gensub-escapes476643 +Ref: Gory Details-Footnote-1477850 +Ref: Gory Details-Footnote-2477901 +Node: I/O Functions478052 +Ref: I/O Functions-Footnote-1484707 +Node: Time Functions484854 +Ref: Time Functions-Footnote-1495746 +Ref: Time Functions-Footnote-2495814 +Ref: Time Functions-Footnote-3495972 +Ref: Time Functions-Footnote-4496083 +Ref: Time Functions-Footnote-5496195 +Ref: Time Functions-Footnote-6496422 +Node: Bitwise Functions496688 +Ref: table-bitwise-ops497246 +Ref: Bitwise Functions-Footnote-1501406 +Node: Type Functions501590 +Node: I18N Functions502060 +Node: User-defined503687 +Node: Definition Syntax504491 +Ref: Definition Syntax-Footnote-1509401 +Node: Function Example509470 +Node: Function Caveats512064 +Node: Calling A Function512485 +Node: Variable Scope513600 +Node: Pass By Value/Reference515575 +Node: Return Statement519015 +Node: Dynamic Typing521996 +Node: Indirect Calls522731 +Node: Internationalization532416 +Node: I18N and L10N533842 +Node: Explaining gettext534528 +Ref: Explaining gettext-Footnote-1539594 +Ref: Explaining gettext-Footnote-2539778 +Node: Programmer i18n539943 +Node: Translator i18n544143 +Node: String Extraction544936 +Ref: String Extraction-Footnote-1545897 +Node: Printf Ordering545983 +Ref: Printf Ordering-Footnote-1548767 +Node: I18N Portability548831 +Ref: I18N Portability-Footnote-1551280 +Node: I18N Example551343 +Ref: I18N Example-Footnote-1553978 +Node: Gawk I18N554050 +Node: Advanced Features554667 +Node: Nondecimal Data556180 +Node: Array Sorting557763 +Node: Controlling Array Traversal558463 +Node: Controlling Scanning With A Function559210 +Node: Controlling Scanning566913 +Ref: Controlling Scanning-Footnote-1570714 +Node: Array Sorting Functions571030 +Ref: Array Sorting Functions-Footnote-1574546 +Ref: Array Sorting Functions-Footnote-2574639 +Node: Two-way I/O574833 +Ref: Two-way I/O-Footnote-1580265 +Node: TCP/IP Networking580335 +Node: Profiling583179 +Node: Library Functions590653 +Ref: Library Functions-Footnote-1593660 +Node: Library Names593831 +Ref: Library Names-Footnote-1597302 +Ref: Library Names-Footnote-2597522 +Node: General Functions597608 +Node: Strtonum Function598561 +Node: Assert Function601491 +Node: Round Function604817 +Node: Cliff Random Function606360 +Node: Ordinal Functions607376 +Ref: Ordinal Functions-Footnote-1610446 +Ref: Ordinal Functions-Footnote-2610698 +Node: Join Function610907 +Ref: Join Function-Footnote-1612678 +Node: Gettimeofday Function612878 +Node: Data File Management616593 +Node: Filetrans Function617225 +Node: Rewind Function621364 +Node: File Checking622751 +Node: Empty Files623845 +Node: Ignoring Assigns626075 +Node: Getopt Function627628 +Ref: Getopt Function-Footnote-1638932 +Node: Passwd Functions639135 +Ref: Passwd Functions-Footnote-1648110 +Node: Group Functions648198 +Node: Walking Arrays656282 +Node: Sample Programs657851 +Node: Running Examples658516 +Node: Clones659244 +Node: Cut Program660468 +Node: Egrep Program670313 +Ref: Egrep Program-Footnote-1678086 +Node: Id Program678196 +Node: Split Program681812 +Ref: Split Program-Footnote-1685331 +Node: Tee Program685459 +Node: Uniq Program688262 +Node: Wc Program695691 +Ref: Wc Program-Footnote-1699957 +Ref: Wc Program-Footnote-2700157 +Node: Miscellaneous Programs700249 +Node: Dupword Program701437 +Node: Alarm Program703468 +Node: Translate Program708217 +Ref: Translate Program-Footnote-1712604 +Ref: Translate Program-Footnote-2712832 +Node: Labels Program712966 +Ref: Labels Program-Footnote-1716337 +Node: Word Sorting716421 +Node: History Sorting720305 +Node: Extract Program722144 +Ref: Extract Program-Footnote-1729627 +Node: Simple Sed729755 +Node: Igawk Program732817 +Ref: Igawk Program-Footnote-1747974 +Ref: Igawk Program-Footnote-2748175 +Node: Anagram Program748313 +Node: Signature Program751381 +Node: Debugger752481 +Node: Debugging753392 +Node: Debugging Concepts753805 +Node: Debugging Terms755661 +Node: Awk Debugging758284 +Node: Sample dgawk session759176 +Node: dgawk invocation759668 +Node: Finding The Bug760850 +Node: List of Debugger Commands767336 +Node: Breakpoint Control768647 +Node: Dgawk Execution Control772283 +Node: Viewing And Changing Data775634 +Node: Dgawk Stack778971 +Node: Dgawk Info780431 +Node: Miscellaneous Dgawk Commands784379 +Node: Readline Support789807 +Node: Dgawk Limitations790645 +Node: Language History792834 +Node: V7/SVR3.1794346 +Node: SVR4796667 +Node: POSIX798109 +Node: BTL799117 +Node: POSIX/GNU799851 +Node: Common Extensions805002 +Node: Ranges and Locales806109 +Ref: Ranges and Locales-Footnote-1810716 +Node: Contributors810937 +Node: Installation815199 +Node: Gawk Distribution816093 +Node: Getting816577 +Node: Extracting817403 +Node: Distribution contents819095 +Node: Unix Installation824317 +Node: Quick Installation824934 +Node: Additional Configuration Options826896 +Node: Configuration Philosophy828373 +Node: Non-Unix Installation830715 +Node: PC Installation831173 +Node: PC Binary Installation832472 +Node: PC Compiling834320 +Node: PC Testing837264 +Node: PC Using838440 +Node: Cygwin842625 +Node: MSYS843625 +Node: VMS Installation844139 +Node: VMS Compilation844742 +Ref: VMS Compilation-Footnote-1845749 +Node: VMS Installation Details845807 +Node: VMS Running847442 +Node: VMS Old Gawk849049 +Node: Bugs849523 +Node: Other Versions853376 +Node: Notes858657 +Node: Compatibility Mode859349 +Node: Additions860132 +Node: Accessing The Source860944 +Node: Adding Code862369 +Node: New Ports868336 +Node: Dynamic Extensions872449 +Node: Internals873825 +Node: Plugin License882928 +Node: Sample Library883562 +Node: Internal File Description884248 +Node: Internal File Ops887963 +Ref: Internal File Ops-Footnote-1892744 +Node: Using Internal File Ops892884 +Node: Future Extensions895261 +Node: Basic Concepts897765 +Node: Basic High Level898522 +Ref: Basic High Level-Footnote-1902557 +Node: Basic Data Typing902742 +Node: Floating Point Issues907267 +Node: String Conversion Precision908350 +Ref: String Conversion Precision-Footnote-1910050 +Node: Unexpected Results910159 +Node: POSIX Floating Point Problems911985 +Ref: POSIX Floating Point Problems-Footnote-1915690 +Node: Glossary915728 +Node: Copying940704 +Node: GNU Free Documentation License978261 +Node: Index1003398 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index d7b65a66..930f9345 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -11357,6 +11357,7 @@ currently used only by the @uref{http://xmlgawk.sourceforge.net, XMLgawk project The @code{ENDFILE} rule is called when @command{gawk} has finished processing the last record in an input file. For the last input file, it will be called before any @code{END} rules. +The @code{ENDFILE} rule is executed even for empty input files. Normally, when an error occurs when reading input in the normal input processing loop, the error is fatal. However, if an @code{ENDFILE} @@ -18544,7 +18545,7 @@ $ @kbd{gawk 'BEGIN @{} @print{} 4 4 @print{} 3 3 $ @kbd{gawk 'BEGIN @{} -> @kbd{ PROCINFO["sorted_in"] = "@@str_ind_asc"} +> @kbd{ PROCINFO["sorted_in"] = "@@ind_str_asc"} > @kbd{ a[4] = 4} > @kbd{ a[3] = 3} > @kbd{ for (i in a)} @@ -25070,6 +25071,84 @@ O+X*(o*(o+O)+O),+x+O+X*o,x*(x-o),(o+X+x)*o*o-(x-O-O),O+(X-x)*(X+O),x-O@}' We leave it to you to determine what the program does. +@ignore +To: "Arnold Robbins" <arnold@skeeve.com> +Date: Sat, 20 Aug 2011 13:50:46 -0400 +Subject: The GNU Awk User's Guide, Section 13.3.11 +From: "Chris Johansen" <johansen@main.nc.us> +Message-ID: <op.v0iw6wlv7finx3@asusodin.thrudvang.lan> + +Arnold, you don't know me, but we have a tenuous connection. My wife is +Barbara A. Field, FAIA, GIT '65 (B. Arch.). + +I have had a couple of paper copies of "Effective Awk Programming" for +years, and now I'm going through a Kindle version of "The GNU Awk User's +Guide" again. When I got to section 13.3.11, I reformatted and lightly +commented Davide Brin's signature script to understand its workings. + +It occurs to me that this might have pedagogical value as an example +(although imperfect) of the value of whitespace and comments, and a +starting point for that discussion. It certainly helped _me_ understand +what's going on. You are welcome to it, as-is or modified (subject to +Davide's constraints, of course, which I think I have met). + +If I were to include it in a future edition, I would put it at some +distance from section 13.3.11, say, as a note or an appendix, so as not to +be a "spoiler" to the puzzle. + +Best regards, +-- +Chris Johansen {johansen at main dot nc dot us} + . . . collapsing the probability wave function, sending ripples of +certainty through the space-time continuum. + + +#! /usr/bin/gawk -f + +# From "13.3.11 And Now For Something Completely Different" +# http://www.gnu.org/software/gawk/manual/html_node/Signature-Program.html#Signature-Program + +# Copyright © 2008 Davide Brini + +# Copying and distribution of the code published in this page, with +# or without modification, are permitted in any medium without +# royalty provided the copyright notice and this notice are preserved. + +BEGIN { + O = "~" ~ "~"; # 1 + o = "==" == "=="; # 1 + o += +o; # 2 + x = O "" O; # 11 + + + while ( X++ <= x + o + o ) c = c "%c"; + + # O is 1 + # o is 2 + # x is 11 + # X is 17 + # c is "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c" + + printf c, + ( x - O )*( x - O), # 100 d + x*( x - o ) - o, # 97 a + x*( x - O ) + x - O - o, # 118 v + +x*( x - O ) - x + o, # 101 e + X*( o*o + O ) + x - O, # 95 _ + X*( X - x ) - o*o, # 98 b + ( x + X )*o*o + o, # 114 r + x*( X - x ) - O - O, # 64 @ + x - O + ( O + o + X + x )*( o + O ), # 103 g + X*X - X*( x - O ) - x + O, # 109 m + O + X*( o*( o + O ) + O ), # 120 x + +x + O + X*o, # 46 . + x*( x - o), # 99 c + ( o + X + x )*o*o - ( x - O - O ), # 111 0 + O + ( X - x )*( X + O ), # 109 m + x - O # 10 \n +} +@end ignore + @c The original text for this chapter was contributed by Efraim Yawitz. @c FIXME: Add more indexing. @@ -79,7 +79,7 @@ int CONVFMTidx; #endif #define C(c) ((char)c) /* - * This table is used by the regexp routines to do case independant + * This table is used by the regexp routines to do case independent * matching. Basically, every ascii character maps to itself, except * uppercase letters map to lower case ones. This table has 256 * entries, for ISO 8859-1. Note also that if the system this @@ -2027,7 +2027,7 @@ gawk_popen(const char *cmd, struct redirect *rp) /* * used to wait for any children to synchronize input and output, * but this could cause gawk to hang when it is started in a pipeline - * and thus has a child process feeding it input (shell dependant) + * and thus has a child process feeding it input (shell dependent) */ /*(void) wait_any(0);*/ /* wait for outstanding processes */ @@ -569,7 +569,7 @@ again: && ! isdigit((unsigned char) sp[-1]) && ! isdigit((unsigned char) sp[1]) && ! (sp[-2] == '[' && sp[-1] == '^')) { range_warned = TRUE; - warning(_("range of the form `[%c-%c]' is locale dependant"), + warning(_("range of the form `[%c-%c]' is locale dependent"), sp[-1], sp[1]); } if (count == 0) { |