diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-12-01 08:00:35 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-12-01 08:00:35 +0200 |
commit | a4f7d089fd1bab11a63627df6ad3a55e541662fd (patch) | |
tree | 3af1077b556bd383455f61eb8ba6da75ca106db6 | |
parent | 8d4f59338f4ac35dedcd2a6201d96f3efac3a3c8 (diff) | |
download | egawk-a4f7d089fd1bab11a63627df6ad3a55e541662fd.tar.gz egawk-a4f7d089fd1bab11a63627df6ad3a55e541662fd.tar.bz2 egawk-a4f7d089fd1bab11a63627df6ad3a55e541662fd.zip |
Remove more old code. More doc work.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | doc/gawk.info | 452 | ||||
-rw-r--r-- | doc/gawk.texi | 43 | ||||
-rw-r--r-- | io.c | 2 | ||||
-rw-r--r-- | main.c | 15 | ||||
-rw-r--r-- | test/ChangeLog | 4 | ||||
-rw-r--r-- | test/badargs.ok | 1 |
7 files changed, 259 insertions, 265 deletions
@@ -1,3 +1,10 @@ +Tue Nov 30 13:48:34 2010 Arnold D. Robbins <arnold@skeeve.com> + + * main.c (MRL): Removed variable, not used since Tandem code nuked. + (main): Fix argument parsing for -m. + (usage): Make -m undocumented (already is the doc/* files). + * io.c (MRL): Remove declaration. + Mon Nov 29 21:59:21 2010 Arnold D. Robbins <arnold@skeeve.com> * re.c (check_bracket_exp): Add check and warning for ranges. diff --git a/doc/gawk.info b/doc/gawk.info index 67e5f0f1..4c2d6639 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10070,11 +10070,12 @@ with a pound sign (`#'): The value returned by this call to `split()' is three. As with input field-splitting, when the value of FIELDSEP is - `" "', leading and trailing whitespace is ignored in ARRAY but not - in SEPS, and the elements are separated by runs of whitespace. - Also as with input field-splitting, if FIELDSEP is the null - string, each individual character in the string is split into its - own array element. (This is a `gawk'-specific extension.) + `" "', leading and trailing whitespace is ignored in values + assigned to the elements of ARRAY but not in SEPS, and the elements + are separated by runs of whitespace. Also as with input + field-splitting, if FIELDSEP is the null string, each individual + character in the string is split into its own array element. + (This latter is a `gawk'-specific extension.) Note, however, that `RS' has no effect on the way `split()' works. Even though `RS = ""' causes newline to also be an input field @@ -10191,22 +10192,21 @@ with a pound sign (`#'): case, `sub()' still searches for the pattern and returns zero or one, but the result of the substitution (if any) is thrown away because there is no place to put it. Such versions of `awk' - accept expressions such as the following: + accept expressions like the following: sub(/USA/, "United States", "the USA and Canada") - For historical compatibility, `gawk' accepts erroneous code, such - as in the previous example. However, using any other nonchangeable - object as the third parameter causes a fatal error and your program - will not run. + For historical compatibility, `gawk' accepts such erroneous code. + However, using any other nonchangeable object as the third + parameter causes a fatal error and your program will not run. Finally, if the REGEXP is not a regexp constant, it is converted into a string, and then the value of that string is treated as the regexp to match. `gsub(REGEXP, REPLACEMENT [, TARGET])' - This is similar to the `sub()' function, except `gsub()' replaces - _all_ of the longest, leftmost, _nonoverlapping_ matching + This is similar to the `sub()' function, except that `gsub()' + replaces _all_ of the longest, leftmost, _nonoverlapping_ matching substrings it can find. The `g' in `gsub()' stands for "global," which means replace everywhere. For example: @@ -25003,7 +25003,7 @@ Index (line 148) * dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps. (line 43) -* dark corner, split() function: String Functions. (line 260) +* dark corner, split() function: String Functions. (line 261) * dark corner, strings, storing: Records. (line 188) * dark corner, value of ARGV[0]: Auto-set. (line 35) * data, fixed-width: Constant Size. (line 9) @@ -25195,7 +25195,7 @@ Index * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: Records. (line 184) * differences in awk and gawk, strtonum() function (gawk): String Functions. - (line 287) + (line 288) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 153) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -25684,7 +25684,7 @@ Index * gsub() function <1>: String Functions. (line 385) * gsub() function: Using Constant Regexps. (line 43) -* gsub() function, arguments of: String Functions. (line 365) +* gsub() function, arguments of: String Functions. (line 366) * gsub() function, escape processing: Gory Details. (line 6) * h debugger command (alias for help): Miscellaneous Dgawk Commands. (line 71) @@ -26560,7 +26560,7 @@ Index * split() function: String Functions. (line 216) * split() function, array elements, deleting: Delete. (line 56) * split.awk program: Split Program. (line 30) -* sprintf() function <1>: String Functions. (line 279) +* sprintf() function <1>: String Functions. (line 280) * sprintf() function: OFMT. (line 15) * sprintf() function, OFMT variable and: User-modified. (line 124) * sprintf() function, print/printf statements and: Round Function. @@ -26609,13 +26609,13 @@ Index (line 43) * strings, numeric: Variable Typing. (line 6) * strings, splitting: String Functions. (line 235) -* strtonum() function (gawk): String Functions. (line 287) +* strtonum() function (gawk): String Functions. (line 288) * strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data. (line 36) -* sub() function <1>: String Functions. (line 308) +* sub() function <1>: String Functions. (line 309) * sub() function: Using Constant Regexps. (line 43) -* sub() function, arguments of: String Functions. (line 365) +* sub() function, arguments of: String Functions. (line 366) * sub() function, escape processing: Gory Details. (line 6) * subscript separators: User-modified. (line 147) * subscripts in arrays, multidimensional: Multi-dimensional. (line 10) @@ -26706,7 +26706,7 @@ Index * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in. (line 16) * troubleshooting, getline function: File Checking. (line 24) -* troubleshooting, gsub()/sub() functions: String Functions. (line 375) +* troubleshooting, gsub()/sub() functions: String Functions. (line 376) * troubleshooting, match() function: String Functions. (line 190) * troubleshooting, print statement, omitting commas: Print Examples. (line 31) @@ -27071,211 +27071,211 @@ Ref: Numeric Functions-Footnote-1412135 Ref: Numeric Functions-Footnote-2412471 Ref: Numeric Functions-Footnote-3412519 Node: String Functions412788 -Ref: String Functions-Footnote-1434670 -Ref: String Functions-Footnote-2434799 -Ref: String Functions-Footnote-3435047 -Node: Gory Details435134 -Ref: table-sub-escapes436791 -Ref: table-sub-posix-92438137 -Ref: table-sub-proposed439480 -Ref: table-posix-2001-sub440840 -Ref: table-gensub-escapes442115 -Ref: Gory Details-Footnote-1443318 -Node: I/O Functions443369 -Ref: I/O Functions-Footnote-1450157 -Node: Time Functions450248 -Ref: Time Functions-Footnote-1461060 -Ref: Time Functions-Footnote-2461128 -Ref: Time Functions-Footnote-3461286 -Ref: Time Functions-Footnote-4461397 -Ref: Time Functions-Footnote-5461524 -Ref: Time Functions-Footnote-6461751 -Node: Bitwise Functions462017 -Ref: table-bitwise-ops462595 -Ref: Bitwise Functions-Footnote-1466835 -Node: I18N Functions467019 -Node: User-defined468742 -Node: Definition Syntax469546 -Node: Function Example474244 -Node: Function Caveats476826 -Node: Return Statement480751 -Node: Dynamic Typing483408 -Node: Indirect Calls484145 -Node: Internationalization493780 -Node: I18N and L10N495199 -Node: Explaining gettext495883 -Ref: Explaining gettext-Footnote-1500794 -Ref: Explaining gettext-Footnote-2501033 -Node: Programmer i18n501202 -Node: Translator i18n505437 -Node: String Extraction506228 -Ref: String Extraction-Footnote-1507185 -Node: Printf Ordering507311 -Ref: Printf Ordering-Footnote-1510091 -Node: I18N Portability510155 -Ref: I18N Portability-Footnote-1512600 -Node: I18N Example512663 -Ref: I18N Example-Footnote-1515283 -Node: Gawk I18N515355 -Node: Advanced Features515933 -Node: Nondecimal Data517248 -Node: Two-way I/O518809 -Ref: Two-way I/O-Footnote-1524292 -Node: TCP/IP Networking524369 -Node: Profiling527159 -Node: Invoking Gawk534620 -Node: Command Line535927 -Node: Options536712 -Ref: Options-Footnote-1549800 -Node: Other Arguments549825 -Node: AWKPATH Variable552506 -Ref: AWKPATH Variable-Footnote-1555281 -Node: Exit Status555541 -Node: Include Files556213 -Node: Obsolete559814 -Node: Undocumented560615 -Node: Known Bugs560877 -Node: Library Functions561479 -Ref: Library Functions-Footnote-1564460 -Node: Library Names564631 -Ref: Library Names-Footnote-1568104 -Ref: Library Names-Footnote-2568323 -Node: General Functions568409 -Node: Nextfile Function569472 -Node: Strtonum Function573836 -Node: Assert Function576777 -Node: Round Function580081 -Node: Cliff Random Function581621 -Node: Ordinal Functions582636 -Ref: Ordinal Functions-Footnote-1585696 -Node: Join Function585912 -Ref: Join Function-Footnote-1587674 -Node: Gettimeofday Function587874 -Node: Data File Management591585 -Node: Filetrans Function592217 -Node: Rewind Function595643 -Node: File Checking597089 -Node: Empty Files598119 -Node: Ignoring Assigns600344 -Node: Getopt Function601892 -Ref: Getopt Function-Footnote-1613174 -Node: Passwd Functions613377 -Ref: Passwd Functions-Footnote-1622355 -Node: Group Functions622443 -Node: Sample Programs630540 -Node: Running Examples631209 -Node: Clones631937 -Node: Cut Program633069 -Node: Egrep Program642828 -Ref: Egrep Program-Footnote-1650578 -Node: Id Program650688 -Node: Split Program654295 -Node: Tee Program657763 -Node: Uniq Program660506 -Node: Wc Program667873 -Ref: Wc Program-Footnote-1672117 -Node: Miscellaneous Programs672313 -Node: Dupword Program673433 -Node: Alarm Program675464 -Node: Translate Program680006 -Ref: Translate Program-Footnote-1684385 -Ref: Translate Program-Footnote-2684622 -Node: Labels Program684756 -Ref: Labels Program-Footnote-1688047 -Node: Word Sorting688131 -Node: History Sorting692478 -Node: Extract Program694316 -Node: Simple Sed701674 -Node: Igawk Program704731 -Ref: Igawk Program-Footnote-1719462 -Ref: Igawk Program-Footnote-2719663 -Node: Signature Program719801 -Node: Debugger720881 -Node: Debugging721757 -Node: Debugging Concepts722071 -Node: Debugging Terms723924 -Node: Awk Debugging726472 -Node: Sample dgawk session727364 -Node: dgawk invocation727856 -Node: Finding The Bug729040 -Node: List of Debugger Commands735555 -Node: Breakpoint Control736870 -Node: Dgawk Execution Control740080 -Node: Viewing And Changing Data743429 -Node: Dgawk Stack746725 -Node: Dgawk Info748186 -Node: Miscellaneous Dgawk Commands752124 -Node: Readline Support757840 -Node: Dgawk Limitations758656 -Node: Language History760828 -Node: V7/SVR3.1762205 -Node: SVR4764500 -Node: POSIX765945 -Node: BTL767657 -Node: POSIX/GNU769347 -Node: Contributors779011 -Node: Installation782616 -Node: Gawk Distribution783587 -Node: Getting784071 -Node: Extracting784897 -Node: Distribution contents786285 -Node: Unix Installation791358 -Node: Quick Installation791949 -Node: Additional Configuration Options793651 -Node: Configuration Philosophy795414 -Node: Non-Unix Installation797778 -Node: PC Installation798243 -Node: PC Binary Installation799549 -Node: PC Compiling801392 -Node: PC Dynamic805897 -Node: PC Using808260 -Node: Cygwin812808 -Node: MSYS813792 -Node: VMS Installation814298 -Node: VMS Compilation814902 -Node: VMS Installation Details816479 -Node: VMS Running818109 -Node: VMS POSIX819706 -Node: VMS Old Gawk821004 -Node: Unsupported821473 -Node: Atari Installation821935 -Node: Atari Compiling823222 -Node: Atari Using825111 -Node: BeOS Installation827958 -Node: Tandem Installation829103 -Node: Bugs830782 -Node: Other Versions834614 -Node: Notes839836 -Node: Compatibility Mode840528 -Node: Additions841311 -Node: Adding Code842061 -Node: New Ports848113 -Node: Dynamic Extensions852245 -Node: Internals853626 -Node: Plugin License864031 -Node: Sample Library864665 -Node: Internal File Description865329 -Node: Internal File Ops869024 -Ref: Internal File Ops-Footnote-1873900 -Node: Using Internal File Ops874048 -Node: Future Extensions876073 -Node: Basic Concepts880110 -Node: Basic High Level880867 -Ref: Basic High Level-Footnote-1884983 -Node: Basic Data Typing885177 -Node: Floating Point Issues889614 -Node: String Conversion Precision890697 -Ref: String Conversion Precision-Footnote-1892391 -Node: Unexpected Results892500 -Node: POSIX Floating Point Problems894326 -Ref: POSIX Floating Point Problems-Footnote-1898025 -Node: Glossary898063 -Node: Copying921831 -Node: GNU Free Documentation License959388 -Node: next-edition984532 -Node: unresolved984884 -Node: revision985384 -Node: consistency985807 -Node: Index989160 +Ref: String Functions-Footnote-1434686 +Ref: String Functions-Footnote-2434815 +Ref: String Functions-Footnote-3435063 +Node: Gory Details435150 +Ref: table-sub-escapes436807 +Ref: table-sub-posix-92438153 +Ref: table-sub-proposed439496 +Ref: table-posix-2001-sub440856 +Ref: table-gensub-escapes442131 +Ref: Gory Details-Footnote-1443334 +Node: I/O Functions443385 +Ref: I/O Functions-Footnote-1450173 +Node: Time Functions450264 +Ref: Time Functions-Footnote-1461076 +Ref: Time Functions-Footnote-2461144 +Ref: Time Functions-Footnote-3461302 +Ref: Time Functions-Footnote-4461413 +Ref: Time Functions-Footnote-5461540 +Ref: Time Functions-Footnote-6461767 +Node: Bitwise Functions462033 +Ref: table-bitwise-ops462611 +Ref: Bitwise Functions-Footnote-1466851 +Node: I18N Functions467035 +Node: User-defined468758 +Node: Definition Syntax469562 +Node: Function Example474260 +Node: Function Caveats476842 +Node: Return Statement480767 +Node: Dynamic Typing483424 +Node: Indirect Calls484161 +Node: Internationalization493796 +Node: I18N and L10N495215 +Node: Explaining gettext495899 +Ref: Explaining gettext-Footnote-1500810 +Ref: Explaining gettext-Footnote-2501049 +Node: Programmer i18n501218 +Node: Translator i18n505453 +Node: String Extraction506244 +Ref: String Extraction-Footnote-1507201 +Node: Printf Ordering507327 +Ref: Printf Ordering-Footnote-1510107 +Node: I18N Portability510171 +Ref: I18N Portability-Footnote-1512616 +Node: I18N Example512679 +Ref: I18N Example-Footnote-1515299 +Node: Gawk I18N515371 +Node: Advanced Features515949 +Node: Nondecimal Data517264 +Node: Two-way I/O518825 +Ref: Two-way I/O-Footnote-1524308 +Node: TCP/IP Networking524385 +Node: Profiling527175 +Node: Invoking Gawk534636 +Node: Command Line535943 +Node: Options536728 +Ref: Options-Footnote-1549816 +Node: Other Arguments549841 +Node: AWKPATH Variable552522 +Ref: AWKPATH Variable-Footnote-1555297 +Node: Exit Status555557 +Node: Include Files556229 +Node: Obsolete559830 +Node: Undocumented560631 +Node: Known Bugs560893 +Node: Library Functions561495 +Ref: Library Functions-Footnote-1564476 +Node: Library Names564647 +Ref: Library Names-Footnote-1568120 +Ref: Library Names-Footnote-2568339 +Node: General Functions568425 +Node: Nextfile Function569488 +Node: Strtonum Function573852 +Node: Assert Function576793 +Node: Round Function580097 +Node: Cliff Random Function581637 +Node: Ordinal Functions582652 +Ref: Ordinal Functions-Footnote-1585712 +Node: Join Function585928 +Ref: Join Function-Footnote-1587690 +Node: Gettimeofday Function587890 +Node: Data File Management591601 +Node: Filetrans Function592233 +Node: Rewind Function595659 +Node: File Checking597105 +Node: Empty Files598135 +Node: Ignoring Assigns600360 +Node: Getopt Function601908 +Ref: Getopt Function-Footnote-1613190 +Node: Passwd Functions613393 +Ref: Passwd Functions-Footnote-1622371 +Node: Group Functions622459 +Node: Sample Programs630556 +Node: Running Examples631225 +Node: Clones631953 +Node: Cut Program633085 +Node: Egrep Program642844 +Ref: Egrep Program-Footnote-1650594 +Node: Id Program650704 +Node: Split Program654311 +Node: Tee Program657779 +Node: Uniq Program660522 +Node: Wc Program667889 +Ref: Wc Program-Footnote-1672133 +Node: Miscellaneous Programs672329 +Node: Dupword Program673449 +Node: Alarm Program675480 +Node: Translate Program680022 +Ref: Translate Program-Footnote-1684401 +Ref: Translate Program-Footnote-2684638 +Node: Labels Program684772 +Ref: Labels Program-Footnote-1688063 +Node: Word Sorting688147 +Node: History Sorting692494 +Node: Extract Program694332 +Node: Simple Sed701690 +Node: Igawk Program704747 +Ref: Igawk Program-Footnote-1719478 +Ref: Igawk Program-Footnote-2719679 +Node: Signature Program719817 +Node: Debugger720897 +Node: Debugging721773 +Node: Debugging Concepts722087 +Node: Debugging Terms723940 +Node: Awk Debugging726488 +Node: Sample dgawk session727380 +Node: dgawk invocation727872 +Node: Finding The Bug729056 +Node: List of Debugger Commands735571 +Node: Breakpoint Control736886 +Node: Dgawk Execution Control740096 +Node: Viewing And Changing Data743445 +Node: Dgawk Stack746741 +Node: Dgawk Info748202 +Node: Miscellaneous Dgawk Commands752140 +Node: Readline Support757856 +Node: Dgawk Limitations758672 +Node: Language History760844 +Node: V7/SVR3.1762221 +Node: SVR4764516 +Node: POSIX765961 +Node: BTL767673 +Node: POSIX/GNU769363 +Node: Contributors779027 +Node: Installation782632 +Node: Gawk Distribution783603 +Node: Getting784087 +Node: Extracting784913 +Node: Distribution contents786301 +Node: Unix Installation791374 +Node: Quick Installation791965 +Node: Additional Configuration Options793667 +Node: Configuration Philosophy795430 +Node: Non-Unix Installation797794 +Node: PC Installation798259 +Node: PC Binary Installation799565 +Node: PC Compiling801408 +Node: PC Dynamic805913 +Node: PC Using808276 +Node: Cygwin812824 +Node: MSYS813808 +Node: VMS Installation814314 +Node: VMS Compilation814918 +Node: VMS Installation Details816495 +Node: VMS Running818125 +Node: VMS POSIX819722 +Node: VMS Old Gawk821020 +Node: Unsupported821489 +Node: Atari Installation821951 +Node: Atari Compiling823238 +Node: Atari Using825127 +Node: BeOS Installation827974 +Node: Tandem Installation829119 +Node: Bugs830798 +Node: Other Versions834630 +Node: Notes839852 +Node: Compatibility Mode840544 +Node: Additions841327 +Node: Adding Code842077 +Node: New Ports848129 +Node: Dynamic Extensions852261 +Node: Internals853642 +Node: Plugin License864047 +Node: Sample Library864681 +Node: Internal File Description865345 +Node: Internal File Ops869040 +Ref: Internal File Ops-Footnote-1873916 +Node: Using Internal File Ops874064 +Node: Future Extensions876089 +Node: Basic Concepts880126 +Node: Basic High Level880883 +Ref: Basic High Level-Footnote-1884999 +Node: Basic Data Typing885193 +Node: Floating Point Issues889630 +Node: String Conversion Precision890713 +Ref: String Conversion Precision-Footnote-1892407 +Node: Unexpected Results892516 +Node: POSIX Floating Point Problems894342 +Ref: POSIX Floating Point Problems-Footnote-1898041 +Node: Glossary898079 +Node: Copying921847 +Node: GNU Free Documentation License959404 +Node: next-edition984548 +Node: unresolved984900 +Node: revision985400 +Node: consistency985823 +Node: Index989176 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 0ebfd1b4..9318f312 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -13413,12 +13413,13 @@ The value returned by this call to @code{split()} is three. @cindex differences in @command{awk} and @command{gawk}, @code{split()} function As with input field-splitting, when the value of @var{fieldsep} is -@w{@code{" "}}, leading and trailing whitespace is ignored in +@w{@code{" "}}, leading and trailing whitespace is ignored in values assigned to +the elements of @var{array} but not in @var{seps}, and the elements are separated by runs of whitespace. Also as with input field-splitting, if @var{fieldsep} is the null string, each individual character in the string is split into its own array element. -(This is a @command{gawk}-specific extension.) +(This latter is a @command{gawk}-specific extension.) Note, however, that @code{RS} has no effect on the way @code{split()} works. Even though @samp{RS = ""} causes newline to also be an input @@ -13469,8 +13470,8 @@ is an octal number. If @var{str} begins with a leading @samp{0x} or For example: @example -$ echo 0x11 | -> gawk '@{ printf "%d\n", strtonum($1) @}' +$ @kbd{echo 0x11 |} +> @kbd{gawk '@{ printf "%d\n", strtonum($1) @}'} @print{} 17 @end example @@ -13541,11 +13542,11 @@ and his wife} on each input line. Here is another example: @example -$ awk 'BEGIN @{ -> str = "daabaaa" -> sub(/a+/, "C&C", str) -> print str -> @}' +$ @kbd{awk 'BEGIN @{} +> @kbd{str = "daabaaa"} +> @kbd{sub(/a+/, "C&C", str)} +> @kbd{print str} +> @kbd{@}'} @print{} dCaaCbaaa @end example @@ -13574,7 +13575,7 @@ be an expression that is not an lvalue. In such a case, @code{sub()} still searches for the pattern and returns zero or one, but the result of the substitution (if any) is thrown away because there is no place to put it. Such versions of @command{awk} accept expressions -such as the following: +like the following: @example sub(/USA/, "United States", "the USA and Canada") @@ -13582,8 +13583,8 @@ sub(/USA/, "United States", "the USA and Canada") @noindent @cindex troubleshooting, @code{gsub()}/@code{sub()} functions -For historical compatibility, @command{gawk} accepts erroneous code, -such as in the previous example. However, using any other nonchangeable +For historical compatibility, @command{gawk} accepts such erroneous code. +However, using any other nonchangeable object as the third parameter causes a fatal error and your program will not run. @@ -13592,7 +13593,7 @@ string, and then the value of that string is treated as the regexp to match. @item gsub(@var{regexp}, @var{replacement} @r{[}, @var{target}@r{]}) @cindex @code{gsub()} function -This is similar to the @code{sub()} function, except @code{gsub()} replaces +This is similar to the @code{sub()} function, except that @code{gsub()} replaces @emph{all} of the longest, leftmost, @emph{nonoverlapping} matching substrings it can find. The @samp{g} in @code{gsub()} stands for ``global,'' which means replace everywhere. For example: @@ -13631,12 +13632,12 @@ in the replacement text, where @var{N} is a digit from 1 to 9. For example: @example -$ gawk ' -> BEGIN @{ -> a = "abc def" -> b = gensub(/(.+) (.+)/, "\\2 \\1", "g", a) -> print b -> @}' +$ @kbd{gawk '} +> @kbd{BEGIN @{} +> @kbd{a = "abc def"} +> @kbd{b = gensub(/(.+) (.+)/, "\\2 \\1", "g", a)} +> @kbd{print b} +> @kbd{@}'} @print{} def abc @end example @@ -13650,8 +13651,8 @@ The following example shows how you can use the third argument to control which match of the regexp should be changed: @example -$ echo a b c a b c | -> gawk '@{ print gensub(/a/, "AA", 2) @}' +$ @kbd{echo a b c a b c |} +> @kbd{gawk '@{ print gensub(/a/, "AA", 2) @}'} @print{} a b c AA b c @end example @@ -98,8 +98,6 @@ #define ENFILE EMFILE #endif -extern int MRL; - #ifdef HAVE_SOCKETS #ifndef SHUT_RD @@ -88,7 +88,6 @@ char *OFS; char *ORS; char *OFMT; char *TEXTDOMAIN; -int MRL; /* See -mr option for use of this variable */ /* * CONVFMT is a convenience pointer for the current number to string format. @@ -388,19 +387,6 @@ main(int argc, char **argv) lintwarn(_("`-m[fr]' option irrelevant in gawk")); if (optarg[0] != 'r' && optarg[0] != 'f') warning(_("-m option usage: `-m[fr] nnn'")); - /* - * Set fixed length records for Tandem, - * ignored on other platforms (see io.c:get_a_record). - */ - if (optarg[0] == 'r') { - if (isdigit(optarg[1])) - MRL = atoi(optarg+1); - else { - MRL = atoi(argv[optind]); - optind++; - } - } else if (optarg[1] == '\0') - optind++; break; case 'b': @@ -771,7 +757,6 @@ usage(int exitval, FILE *fp) fputs(_("\t-F fs\t\t\t--field-separator=fs\n"), fp); fputs(_("\t-v var=val\t\t--assign=var=val\n"), fp); fputs(_("Short options:\t\tGNU long options: (extensions)\n"), fp); - fputs(_("\t-m[fr] val\n"), fp); fputs(_("\t-b\t\t\t--characters-as-bytes\n"), fp); fputs(_("\t-c\t\t\t--traditional\n"), fp); fputs(_("\t-C\t\t\t--copyright\n"), fp); diff --git a/test/ChangeLog b/test/ChangeLog index 667fc755..e5602ee1 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 30 13:51:35 2010 Arnold D. Robbins <arnold@skeeve.com> + + * badargs.ok: Updated. + Mon Nov 29 21:52:49 2010 Arnold D. Robbins <arnold@skeeve.com> * funstack.awk, gsubtst5.ok, igncfs.awk, longwrds.awk, diff --git a/test/badargs.ok b/test/badargs.ok index bbaf2a46..35c1ecbb 100644 --- a/test/badargs.ok +++ b/test/badargs.ok @@ -6,7 +6,6 @@ POSIX options: GNU long options: (standard) -F fs --field-separator=fs -v var=val --assign=var=val Short options: GNU long options: (extensions) - -m[fr] val -b --characters-as-bytes -c --traditional -C --copyright |