diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-10-24 22:03:09 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-10-24 22:03:09 +0300 |
commit | 25520aab6144927a20d501c0396e9597f36fc871 (patch) | |
tree | 1a8b237e152873b5a789f10865c11a5ed1e0c3cc | |
parent | eb152bbe507aef92ece4a301863263818fb50a04 (diff) | |
download | egawk-25520aab6144927a20d501c0396e9597f36fc871.tar.gz egawk-25520aab6144927a20d501c0396e9597f36fc871.tar.bz2 egawk-25520aab6144927a20d501c0396e9597f36fc871.zip |
Improve handling of writes to dead pipes.
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | awk.h | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 955 | ||||
-rw-r--r-- | doc/gawk.texi | 19 | ||||
-rw-r--r-- | doc/gawktexi.in | 19 | ||||
-rw-r--r-- | io.c | 18 | ||||
-rw-r--r-- | main.c | 23 | ||||
-rw-r--r-- | msg.c | 17 | ||||
-rw-r--r-- | test/ChangeLog | 11 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/Makefile.in | 11 | ||||
-rw-r--r-- | test/Maketests | 5 |
13 files changed, 605 insertions, 506 deletions
@@ -1,3 +1,21 @@ +2013-10-22 Arnold D. Robbins <arnold@skeeve.com> + + Revise error messages when writing to standard output or standard + error to ignore EPIPE. Add the ability based on an environment + variable to get the source file and line number. + + * awk.h (r_warning): Renamed from warning. + (warning): New macro to set location and call warning. + * io.c (flush_io): Print errors only if not EPIPE. + (close_io): Ditto. + * main.c (lintfunc): Init to r_warning. + (main): Enhance explanatory comment. + (usage): Print errors only if not EPIPE. + (copyleft): Ditto. + * msg.c (err): Make printing srcfile and srcline depend upon + GAWK_MSG_SRC environment variable. + (r_warning): Renamed from warning. + 2013-10-17 Arnold D. Robbins <arnold@skeeve.com> * main.c (main): Ignore SIGPIPE. See the comment in the code. @@ -213,6 +213,8 @@ typedef void *stackoverflow_context_t; /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ #define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc)) +/* same thing for warning */ +#define warning (*(set_loc(__FILE__, __LINE__),r_warning)) #ifdef HAVE_MPFR #include <gmp.h> @@ -1577,7 +1579,7 @@ extern void final_exit(int status) ATTRIBUTE_NORETURN; extern void err(bool isfatal, const char *s, const char *emsg, va_list argp) ATTRIBUTE_PRINTF(3, 0); extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1; -extern void warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1; +extern void r_warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1; extern void set_loc (const char *file, int line); extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1; #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) diff --git a/doc/ChangeLog b/doc/ChangeLog index 2ee94503..5cef4595 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2013-10-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Other Environment Variables): Document GAWK_MSG_SRC + variable and fix documentation of *_CHAIN_MAX variables. + 2013-10-11 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Conversion, Printf Ordering): Better wording for diff --git a/doc/gawk.info b/doc/gawk.info index 5b3e4ac7..8fc3b2e9 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -2851,10 +2851,6 @@ used by regular users. the `gawk' developers for testing and tuning. They are subject to change. The variables are: -`AVG_CHAIN_MAX' - The average number of items `gawk' will maintain on a hash chain - for managing arrays. - `AWK_HASH' If this variable exists with a value of `gst', `gawk' will switch to using the hash function from GNU Smalltalk for managing arrays. @@ -2866,6 +2862,13 @@ change. The variables are: debugging problems on filesystems on non-POSIX operating systems where I/O is performed in records, not in blocks. +`GAWK_MSG_SRC' + If this variable exists, `gawk' includes the source file name and + line number from which warning and/or fatal messages are + generated. Its purpose is to help isolate the source of a + message, since there can be multiple places which produce the same + warning or error message. + `GAWK_NO_DFA' If this variable exists, `gawk' does not use the DFA regexp matcher for "does it match" kinds of tests. This can cause `gawk' to be @@ -2878,6 +2881,14 @@ change. The variables are: This specifies the amount by which `gawk' should grow its internal evaluation stack, when needed. +`INT_CHAIN_MAX' + The average number of items `gawk' will maintain on a hash chain + for managing arrays indexed by integers. + +`STR_CHAIN_MAX' + The average number of items `gawk' will maintain on a hash chain + for managing arrays indexed by strings. + `TIDYMEM' If this variable exists, `gawk' uses the `mtrace()' library calls from GNU LIBC to help track down possible memory leaks. @@ -32213,473 +32224,473 @@ Node: AWKPATH Variable130128 Ref: AWKPATH Variable-Footnote-1132886 Node: AWKLIBPATH Variable133146 Node: Other Environment Variables133864 -Node: Exit Status136359 -Node: Include Files137034 -Node: Loading Shared Libraries140603 -Node: Obsolete141967 -Node: Undocumented142664 -Node: Regexp142907 -Node: Regexp Usage144296 -Node: Escape Sequences146322 -Node: Regexp Operators151991 -Ref: Regexp Operators-Footnote-1159371 -Ref: Regexp Operators-Footnote-2159518 -Node: Bracket Expressions159616 -Ref: table-char-classes161506 -Node: GNU Regexp Operators164029 -Node: Case-sensitivity167752 -Ref: Case-sensitivity-Footnote-1170720 -Ref: Case-sensitivity-Footnote-2170955 -Node: Leftmost Longest171063 -Node: Computed Regexps172264 -Node: Reading Files175601 -Node: Records177604 -Ref: Records-Footnote-1186493 -Node: Fields186530 -Ref: Fields-Footnote-1189563 -Node: Nonconstant Fields189649 -Node: Changing Fields191851 -Node: Field Separators197810 -Node: Default Field Splitting200439 -Node: Regexp Field Splitting201556 -Node: Single Character Fields204898 -Node: Command Line Field Separator205957 -Node: Field Splitting Summary209398 -Ref: Field Splitting Summary-Footnote-1212509 -Node: Constant Size212610 -Node: Splitting By Content217194 -Ref: Splitting By Content-Footnote-1220920 -Node: Multiple Line220960 -Ref: Multiple Line-Footnote-1226807 -Node: Getline226986 -Node: Plain Getline229202 -Node: Getline/Variable231297 -Node: Getline/File232444 -Node: Getline/Variable/File233785 -Ref: Getline/Variable/File-Footnote-1235384 -Node: Getline/Pipe235471 -Node: Getline/Variable/Pipe238171 -Node: Getline/Coprocess239278 -Node: Getline/Variable/Coprocess240530 -Node: Getline Notes241267 -Node: Getline Summary244054 -Ref: table-getline-variants244462 -Node: Read Timeout245374 -Ref: Read Timeout-Footnote-1249115 -Node: Command line directories249172 -Node: Printing249802 -Node: Print251433 -Node: Print Examples252770 -Node: Output Separators255554 -Node: OFMT257314 -Node: Printf258672 -Node: Basic Printf259578 -Node: Control Letters261117 -Node: Format Modifiers264929 -Node: Printf Examples270938 -Node: Redirection273653 -Node: Special Files280618 -Node: Special FD281151 -Ref: Special FD-Footnote-1284776 -Node: Special Network284850 -Node: Special Caveats285700 -Node: Close Files And Pipes286496 -Ref: Close Files And Pipes-Footnote-1293479 -Ref: Close Files And Pipes-Footnote-2293627 -Node: Expressions293777 -Node: Values294909 -Node: Constants295585 -Node: Scalar Constants296265 -Ref: Scalar Constants-Footnote-1297124 -Node: Nondecimal-numbers297306 -Node: Regexp Constants300306 -Node: Using Constant Regexps300781 -Node: Variables303836 -Node: Using Variables304491 -Node: Assignment Options306215 -Node: Conversion308087 -Ref: table-locale-affects313588 -Ref: Conversion-Footnote-1314212 -Node: All Operators314321 -Node: Arithmetic Ops314951 -Node: Concatenation317456 -Ref: Concatenation-Footnote-1320249 -Node: Assignment Ops320369 -Ref: table-assign-ops325357 -Node: Increment Ops326688 -Node: Truth Values and Conditions330123 -Node: Truth Values331206 -Node: Typing and Comparison332255 -Node: Variable Typing333044 -Ref: Variable Typing-Footnote-1336941 -Node: Comparison Operators337063 -Ref: table-relational-ops337473 -Node: POSIX String Comparison341022 -Ref: POSIX String Comparison-Footnote-1341978 -Node: Boolean Ops342116 -Ref: Boolean Ops-Footnote-1346194 -Node: Conditional Exp346285 -Node: Function Calls348017 -Node: Precedence351611 -Node: Locales355280 -Node: Patterns and Actions356369 -Node: Pattern Overview357423 -Node: Regexp Patterns359092 -Node: Expression Patterns359635 -Node: Ranges363320 -Node: BEGIN/END366286 -Node: Using BEGIN/END367048 -Ref: Using BEGIN/END-Footnote-1369779 -Node: I/O And BEGIN/END369885 -Node: BEGINFILE/ENDFILE372167 -Node: Empty375081 -Node: Using Shell Variables375397 -Node: Action Overview377682 -Node: Statements380039 -Node: If Statement381893 -Node: While Statement383392 -Node: Do Statement385436 -Node: For Statement386592 -Node: Switch Statement389744 -Node: Break Statement391841 -Node: Continue Statement393831 -Node: Next Statement395624 -Node: Nextfile Statement398014 -Node: Exit Statement400657 -Node: Built-in Variables403073 -Node: User-modified404168 -Ref: User-modified-Footnote-1412528 -Node: Auto-set412590 -Ref: Auto-set-Footnote-1425668 -Ref: Auto-set-Footnote-2425873 -Node: ARGC and ARGV425929 -Node: Arrays429780 -Node: Array Basics431285 -Node: Array Intro432111 -Node: Reference to Elements436429 -Node: Assigning Elements438699 -Node: Array Example439190 -Node: Scanning an Array440922 -Node: Controlling Scanning443236 -Ref: Controlling Scanning-Footnote-1448159 -Node: Delete448475 -Ref: Delete-Footnote-1451240 -Node: Numeric Array Subscripts451297 -Node: Uninitialized Subscripts453480 -Node: Multi-dimensional455108 -Node: Multi-scanning458202 -Node: Arrays of Arrays459793 -Node: Functions464434 -Node: Built-in465253 -Node: Calling Built-in466331 -Node: Numeric Functions468319 -Ref: Numeric Functions-Footnote-1472151 -Ref: Numeric Functions-Footnote-2472508 -Ref: Numeric Functions-Footnote-3472556 -Node: String Functions472825 -Ref: String Functions-Footnote-1496383 -Ref: String Functions-Footnote-2496512 -Ref: String Functions-Footnote-3496760 -Node: Gory Details496847 -Ref: table-sub-escapes498526 -Ref: table-sub-posix-92499880 -Ref: table-sub-proposed501231 -Ref: table-posix-sub502585 -Ref: table-gensub-escapes504130 -Ref: Gory Details-Footnote-1505306 -Ref: Gory Details-Footnote-2505357 -Node: I/O Functions505508 -Ref: I/O Functions-Footnote-1512493 -Node: Time Functions512640 -Ref: Time Functions-Footnote-1523573 -Ref: Time Functions-Footnote-2523641 -Ref: Time Functions-Footnote-3523799 -Ref: Time Functions-Footnote-4523910 -Ref: Time Functions-Footnote-5524022 -Ref: Time Functions-Footnote-6524249 -Node: Bitwise Functions524515 -Ref: table-bitwise-ops525073 -Ref: Bitwise Functions-Footnote-1529294 -Node: Type Functions529478 -Node: I18N Functions530629 -Node: User-defined532256 -Node: Definition Syntax533060 -Ref: Definition Syntax-Footnote-1537970 -Node: Function Example538039 -Node: Function Caveats540633 -Node: Calling A Function541054 -Node: Variable Scope542169 -Node: Pass By Value/Reference545132 -Node: Return Statement548640 -Node: Dynamic Typing551621 -Node: Indirect Calls552552 -Node: Library Functions562237 -Ref: Library Functions-Footnote-1565750 -Ref: Library Functions-Footnote-2565893 -Node: Library Names566064 -Ref: Library Names-Footnote-1569535 -Ref: Library Names-Footnote-2569755 -Node: General Functions569841 -Node: Strtonum Function570869 -Node: Assert Function573799 -Node: Round Function577125 -Node: Cliff Random Function578668 -Node: Ordinal Functions579684 -Ref: Ordinal Functions-Footnote-1582754 -Ref: Ordinal Functions-Footnote-2583006 -Node: Join Function583215 -Ref: Join Function-Footnote-1584986 -Node: Getlocaltime Function585186 -Node: Readfile Function588927 -Node: Data File Management590766 -Node: Filetrans Function591398 -Node: Rewind Function595467 -Node: File Checking596854 -Node: Empty Files597948 -Node: Ignoring Assigns600178 -Node: Getopt Function601731 -Ref: Getopt Function-Footnote-1613035 -Node: Passwd Functions613238 -Ref: Passwd Functions-Footnote-1622213 -Node: Group Functions622301 -Node: Walking Arrays630385 -Node: Sample Programs632522 -Node: Running Examples633196 -Node: Clones633924 -Node: Cut Program635148 -Node: Egrep Program644993 -Ref: Egrep Program-Footnote-1652766 -Node: Id Program652876 -Node: Split Program656492 -Ref: Split Program-Footnote-1660011 -Node: Tee Program660139 -Node: Uniq Program662942 -Node: Wc Program670371 -Ref: Wc Program-Footnote-1674637 -Ref: Wc Program-Footnote-2674837 -Node: Miscellaneous Programs674929 -Node: Dupword Program676117 -Node: Alarm Program678148 -Node: Translate Program682897 -Ref: Translate Program-Footnote-1687284 -Ref: Translate Program-Footnote-2687512 -Node: Labels Program687646 -Ref: Labels Program-Footnote-1691017 -Node: Word Sorting691101 -Node: History Sorting694985 -Node: Extract Program696824 -Ref: Extract Program-Footnote-1704325 -Node: Simple Sed704453 -Node: Igawk Program707515 -Ref: Igawk Program-Footnote-1722672 -Ref: Igawk Program-Footnote-2722873 -Node: Anagram Program723011 -Node: Signature Program726079 -Node: Advanced Features727179 -Node: Nondecimal Data729061 -Node: Array Sorting730644 -Node: Controlling Array Traversal731341 -Node: Array Sorting Functions739579 -Ref: Array Sorting Functions-Footnote-1743253 -Ref: Array Sorting Functions-Footnote-2743346 -Node: Two-way I/O743540 -Ref: Two-way I/O-Footnote-1748972 -Node: TCP/IP Networking749042 -Node: Profiling751886 -Node: Internationalization759383 -Node: I18N and L10N760808 -Node: Explaining gettext761494 -Ref: Explaining gettext-Footnote-1766562 -Ref: Explaining gettext-Footnote-2766746 -Node: Programmer i18n766911 -Node: Translator i18n771113 -Node: String Extraction771906 -Ref: String Extraction-Footnote-1772867 -Node: Printf Ordering772953 -Ref: Printf Ordering-Footnote-1775737 -Node: I18N Portability775801 -Ref: I18N Portability-Footnote-1778250 -Node: I18N Example778313 -Ref: I18N Example-Footnote-1780951 -Node: Gawk I18N781023 -Node: Debugger781644 -Node: Debugging782615 -Node: Debugging Concepts783048 -Node: Debugging Terms784904 -Node: Awk Debugging787501 -Node: Sample Debugging Session788393 -Node: Debugger Invocation788913 -Node: Finding The Bug790245 -Node: List of Debugger Commands796733 -Node: Breakpoint Control798067 -Node: Debugger Execution Control801731 -Node: Viewing And Changing Data805091 -Node: Execution Stack808447 -Node: Debugger Info809914 -Node: Miscellaneous Debugger Commands813896 -Node: Readline Support819072 -Node: Limitations819903 -Node: Arbitrary Precision Arithmetic822155 -Ref: Arbitrary Precision Arithmetic-Footnote-1823806 -Node: General Arithmetic823954 -Node: Floating Point Issues825674 -Node: String Conversion Precision826555 -Ref: String Conversion Precision-Footnote-1828260 -Node: Unexpected Results828369 -Node: POSIX Floating Point Problems830522 -Ref: POSIX Floating Point Problems-Footnote-1834347 -Node: Integer Programming834385 -Node: Floating-point Programming836124 -Ref: Floating-point Programming-Footnote-1842455 -Ref: Floating-point Programming-Footnote-2842725 -Node: Floating-point Representation842989 -Node: Floating-point Context844154 -Ref: table-ieee-formats844993 -Node: Rounding Mode846377 -Ref: table-rounding-modes846856 -Ref: Rounding Mode-Footnote-1849871 -Node: Gawk and MPFR850050 -Node: Arbitrary Precision Floats851305 -Ref: Arbitrary Precision Floats-Footnote-1853748 -Node: Setting Precision854064 -Ref: table-predefined-precision-strings854750 -Node: Setting Rounding Mode856895 -Ref: table-gawk-rounding-modes857299 -Node: Floating-point Constants858486 -Node: Changing Precision859915 -Ref: Changing Precision-Footnote-1861315 -Node: Exact Arithmetic861489 -Node: Arbitrary Precision Integers864627 -Ref: Arbitrary Precision Integers-Footnote-1867645 -Node: Dynamic Extensions867792 -Node: Extension Intro869250 -Node: Plugin License870515 -Node: Extension Mechanism Outline871200 -Ref: load-extension871617 -Ref: load-new-function873095 -Ref: call-new-function874090 -Node: Extension API Description876105 -Node: Extension API Functions Introduction877318 -Node: General Data Types882184 -Ref: General Data Types-Footnote-1887786 -Node: Requesting Values888085 -Ref: table-value-types-returned888816 -Node: Constructor Functions889770 -Node: Registration Functions892790 -Node: Extension Functions893475 -Node: Exit Callback Functions895700 -Node: Extension Version String896949 -Node: Input Parsers897599 -Node: Output Wrappers907356 -Node: Two-way processors911866 -Node: Printing Messages914074 -Ref: Printing Messages-Footnote-1915151 -Node: Updating `ERRNO'915303 -Node: Accessing Parameters916042 -Node: Symbol Table Access917272 -Node: Symbol table by name917784 -Node: Symbol table by cookie919531 -Ref: Symbol table by cookie-Footnote-1923661 -Node: Cached values923724 -Ref: Cached values-Footnote-1927173 -Node: Array Manipulation927264 -Ref: Array Manipulation-Footnote-1928362 -Node: Array Data Types928401 -Ref: Array Data Types-Footnote-1931104 -Node: Array Functions931196 -Node: Flattening Arrays934962 -Node: Creating Arrays941814 -Node: Extension API Variables946539 -Node: Extension Versioning947175 -Node: Extension API Informational Variables949076 -Node: Extension API Boilerplate950162 -Node: Finding Extensions953966 -Node: Extension Example954526 -Node: Internal File Description955257 -Node: Internal File Ops959348 -Ref: Internal File Ops-Footnote-1970856 -Node: Using Internal File Ops970996 -Ref: Using Internal File Ops-Footnote-1973349 -Node: Extension Samples973615 -Node: Extension Sample File Functions975139 -Node: Extension Sample Fnmatch983626 -Node: Extension Sample Fork985352 -Node: Extension Sample Inplace986570 -Node: Extension Sample Ord988348 -Node: Extension Sample Readdir989184 -Node: Extension Sample Revout990716 -Node: Extension Sample Rev2way991309 -Node: Extension Sample Read write array991999 -Node: Extension Sample Readfile993882 -Node: Extension Sample API Tests994700 -Node: Extension Sample Time995225 -Node: gawkextlib996589 -Node: Language History999349 -Node: V7/SVR3.11000871 -Node: SVR41003192 -Node: POSIX1004634 -Node: BTL1006020 -Node: POSIX/GNU1006754 -Node: Common Extensions1012289 -Node: Ranges and Locales1013595 -Ref: Ranges and Locales-Footnote-11018213 -Ref: Ranges and Locales-Footnote-21018240 -Ref: Ranges and Locales-Footnote-31018500 -Node: Contributors1018721 -Node: Installation1023600 -Node: Gawk Distribution1024494 -Node: Getting1024978 -Node: Extracting1025804 -Node: Distribution contents1027496 -Node: Unix Installation1032757 -Node: Quick Installation1033374 -Node: Additional Configuration Options1035818 -Node: Configuration Philosophy1037295 -Node: Non-Unix Installation1039649 -Node: PC Installation1040107 -Node: PC Binary Installation1041406 -Node: PC Compiling1043254 -Node: PC Testing1046198 -Node: PC Using1047374 -Node: Cygwin1051559 -Node: MSYS1052559 -Node: VMS Installation1053073 -Node: VMS Compilation1053676 -Ref: VMS Compilation-Footnote-11054683 -Node: VMS Installation Details1054741 -Node: VMS Running1056376 -Node: VMS Old Gawk1057983 -Node: Bugs1058457 -Node: Other Versions1062309 -Node: Notes1068390 -Node: Compatibility Mode1069190 -Node: Additions1069973 -Node: Accessing The Source1070900 -Node: Adding Code1072340 -Node: New Ports1078385 -Node: Derived Files1082520 -Ref: Derived Files-Footnote-11087841 -Ref: Derived Files-Footnote-21087875 -Ref: Derived Files-Footnote-31088475 -Node: Future Extensions1088573 -Node: Implementation Limitations1089154 -Node: Extension Design1090406 -Node: Old Extension Problems1091560 -Ref: Old Extension Problems-Footnote-11093068 -Node: Extension New Mechanism Goals1093125 -Ref: Extension New Mechanism Goals-Footnote-11096491 -Node: Extension Other Design Decisions1096677 -Node: Extension Future Growth1098783 -Node: Old Extension Mechanism1099619 -Node: Basic Concepts1101359 -Node: Basic High Level1102040 -Ref: figure-general-flow1102311 -Ref: figure-process-flow1102910 -Ref: Basic High Level-Footnote-11106139 -Node: Basic Data Typing1106324 -Node: Glossary1109679 -Node: Copying1135141 -Node: GNU Free Documentation License1172698 -Node: Index1197835 +Node: Exit Status136827 +Node: Include Files137502 +Node: Loading Shared Libraries141071 +Node: Obsolete142435 +Node: Undocumented143132 +Node: Regexp143375 +Node: Regexp Usage144764 +Node: Escape Sequences146790 +Node: Regexp Operators152459 +Ref: Regexp Operators-Footnote-1159839 +Ref: Regexp Operators-Footnote-2159986 +Node: Bracket Expressions160084 +Ref: table-char-classes161974 +Node: GNU Regexp Operators164497 +Node: Case-sensitivity168220 +Ref: Case-sensitivity-Footnote-1171188 +Ref: Case-sensitivity-Footnote-2171423 +Node: Leftmost Longest171531 +Node: Computed Regexps172732 +Node: Reading Files176069 +Node: Records178072 +Ref: Records-Footnote-1186961 +Node: Fields186998 +Ref: Fields-Footnote-1190031 +Node: Nonconstant Fields190117 +Node: Changing Fields192319 +Node: Field Separators198278 +Node: Default Field Splitting200907 +Node: Regexp Field Splitting202024 +Node: Single Character Fields205366 +Node: Command Line Field Separator206425 +Node: Field Splitting Summary209866 +Ref: Field Splitting Summary-Footnote-1212977 +Node: Constant Size213078 +Node: Splitting By Content217662 +Ref: Splitting By Content-Footnote-1221388 +Node: Multiple Line221428 +Ref: Multiple Line-Footnote-1227275 +Node: Getline227454 +Node: Plain Getline229670 +Node: Getline/Variable231765 +Node: Getline/File232912 +Node: Getline/Variable/File234253 +Ref: Getline/Variable/File-Footnote-1235852 +Node: Getline/Pipe235939 +Node: Getline/Variable/Pipe238639 +Node: Getline/Coprocess239746 +Node: Getline/Variable/Coprocess240998 +Node: Getline Notes241735 +Node: Getline Summary244522 +Ref: table-getline-variants244930 +Node: Read Timeout245842 +Ref: Read Timeout-Footnote-1249583 +Node: Command line directories249640 +Node: Printing250270 +Node: Print251901 +Node: Print Examples253238 +Node: Output Separators256022 +Node: OFMT257782 +Node: Printf259140 +Node: Basic Printf260046 +Node: Control Letters261585 +Node: Format Modifiers265397 +Node: Printf Examples271406 +Node: Redirection274121 +Node: Special Files281086 +Node: Special FD281619 +Ref: Special FD-Footnote-1285244 +Node: Special Network285318 +Node: Special Caveats286168 +Node: Close Files And Pipes286964 +Ref: Close Files And Pipes-Footnote-1293947 +Ref: Close Files And Pipes-Footnote-2294095 +Node: Expressions294245 +Node: Values295377 +Node: Constants296053 +Node: Scalar Constants296733 +Ref: Scalar Constants-Footnote-1297592 +Node: Nondecimal-numbers297774 +Node: Regexp Constants300774 +Node: Using Constant Regexps301249 +Node: Variables304304 +Node: Using Variables304959 +Node: Assignment Options306683 +Node: Conversion308555 +Ref: table-locale-affects314056 +Ref: Conversion-Footnote-1314680 +Node: All Operators314789 +Node: Arithmetic Ops315419 +Node: Concatenation317924 +Ref: Concatenation-Footnote-1320717 +Node: Assignment Ops320837 +Ref: table-assign-ops325825 +Node: Increment Ops327156 +Node: Truth Values and Conditions330591 +Node: Truth Values331674 +Node: Typing and Comparison332723 +Node: Variable Typing333512 +Ref: Variable Typing-Footnote-1337409 +Node: Comparison Operators337531 +Ref: table-relational-ops337941 +Node: POSIX String Comparison341490 +Ref: POSIX String Comparison-Footnote-1342446 +Node: Boolean Ops342584 +Ref: Boolean Ops-Footnote-1346662 +Node: Conditional Exp346753 +Node: Function Calls348485 +Node: Precedence352079 +Node: Locales355748 +Node: Patterns and Actions356837 +Node: Pattern Overview357891 +Node: Regexp Patterns359560 +Node: Expression Patterns360103 +Node: Ranges363788 +Node: BEGIN/END366754 +Node: Using BEGIN/END367516 +Ref: Using BEGIN/END-Footnote-1370247 +Node: I/O And BEGIN/END370353 +Node: BEGINFILE/ENDFILE372635 +Node: Empty375549 +Node: Using Shell Variables375865 +Node: Action Overview378150 +Node: Statements380507 +Node: If Statement382361 +Node: While Statement383860 +Node: Do Statement385904 +Node: For Statement387060 +Node: Switch Statement390212 +Node: Break Statement392309 +Node: Continue Statement394299 +Node: Next Statement396092 +Node: Nextfile Statement398482 +Node: Exit Statement401125 +Node: Built-in Variables403541 +Node: User-modified404636 +Ref: User-modified-Footnote-1412996 +Node: Auto-set413058 +Ref: Auto-set-Footnote-1426136 +Ref: Auto-set-Footnote-2426341 +Node: ARGC and ARGV426397 +Node: Arrays430248 +Node: Array Basics431753 +Node: Array Intro432579 +Node: Reference to Elements436897 +Node: Assigning Elements439167 +Node: Array Example439658 +Node: Scanning an Array441390 +Node: Controlling Scanning443704 +Ref: Controlling Scanning-Footnote-1448627 +Node: Delete448943 +Ref: Delete-Footnote-1451708 +Node: Numeric Array Subscripts451765 +Node: Uninitialized Subscripts453948 +Node: Multi-dimensional455576 +Node: Multi-scanning458670 +Node: Arrays of Arrays460261 +Node: Functions464902 +Node: Built-in465721 +Node: Calling Built-in466799 +Node: Numeric Functions468787 +Ref: Numeric Functions-Footnote-1472619 +Ref: Numeric Functions-Footnote-2472976 +Ref: Numeric Functions-Footnote-3473024 +Node: String Functions473293 +Ref: String Functions-Footnote-1496851 +Ref: String Functions-Footnote-2496980 +Ref: String Functions-Footnote-3497228 +Node: Gory Details497315 +Ref: table-sub-escapes498994 +Ref: table-sub-posix-92500348 +Ref: table-sub-proposed501699 +Ref: table-posix-sub503053 +Ref: table-gensub-escapes504598 +Ref: Gory Details-Footnote-1505774 +Ref: Gory Details-Footnote-2505825 +Node: I/O Functions505976 +Ref: I/O Functions-Footnote-1512961 +Node: Time Functions513108 +Ref: Time Functions-Footnote-1524041 +Ref: Time Functions-Footnote-2524109 +Ref: Time Functions-Footnote-3524267 +Ref: Time Functions-Footnote-4524378 +Ref: Time Functions-Footnote-5524490 +Ref: Time Functions-Footnote-6524717 +Node: Bitwise Functions524983 +Ref: table-bitwise-ops525541 +Ref: Bitwise Functions-Footnote-1529762 +Node: Type Functions529946 +Node: I18N Functions531097 +Node: User-defined532724 +Node: Definition Syntax533528 +Ref: Definition Syntax-Footnote-1538438 +Node: Function Example538507 +Node: Function Caveats541101 +Node: Calling A Function541522 +Node: Variable Scope542637 +Node: Pass By Value/Reference545600 +Node: Return Statement549108 +Node: Dynamic Typing552089 +Node: Indirect Calls553020 +Node: Library Functions562705 +Ref: Library Functions-Footnote-1566218 +Ref: Library Functions-Footnote-2566361 +Node: Library Names566532 +Ref: Library Names-Footnote-1570003 +Ref: Library Names-Footnote-2570223 +Node: General Functions570309 +Node: Strtonum Function571337 +Node: Assert Function574267 +Node: Round Function577593 +Node: Cliff Random Function579136 +Node: Ordinal Functions580152 +Ref: Ordinal Functions-Footnote-1583222 +Ref: Ordinal Functions-Footnote-2583474 +Node: Join Function583683 +Ref: Join Function-Footnote-1585454 +Node: Getlocaltime Function585654 +Node: Readfile Function589395 +Node: Data File Management591234 +Node: Filetrans Function591866 +Node: Rewind Function595935 +Node: File Checking597322 +Node: Empty Files598416 +Node: Ignoring Assigns600646 +Node: Getopt Function602199 +Ref: Getopt Function-Footnote-1613503 +Node: Passwd Functions613706 +Ref: Passwd Functions-Footnote-1622681 +Node: Group Functions622769 +Node: Walking Arrays630853 +Node: Sample Programs632990 +Node: Running Examples633664 +Node: Clones634392 +Node: Cut Program635616 +Node: Egrep Program645461 +Ref: Egrep Program-Footnote-1653234 +Node: Id Program653344 +Node: Split Program656960 +Ref: Split Program-Footnote-1660479 +Node: Tee Program660607 +Node: Uniq Program663410 +Node: Wc Program670839 +Ref: Wc Program-Footnote-1675105 +Ref: Wc Program-Footnote-2675305 +Node: Miscellaneous Programs675397 +Node: Dupword Program676585 +Node: Alarm Program678616 +Node: Translate Program683365 +Ref: Translate Program-Footnote-1687752 +Ref: Translate Program-Footnote-2687980 +Node: Labels Program688114 +Ref: Labels Program-Footnote-1691485 +Node: Word Sorting691569 +Node: History Sorting695453 +Node: Extract Program697292 +Ref: Extract Program-Footnote-1704793 +Node: Simple Sed704921 +Node: Igawk Program707983 +Ref: Igawk Program-Footnote-1723140 +Ref: Igawk Program-Footnote-2723341 +Node: Anagram Program723479 +Node: Signature Program726547 +Node: Advanced Features727647 +Node: Nondecimal Data729529 +Node: Array Sorting731112 +Node: Controlling Array Traversal731809 +Node: Array Sorting Functions740047 +Ref: Array Sorting Functions-Footnote-1743721 +Ref: Array Sorting Functions-Footnote-2743814 +Node: Two-way I/O744008 +Ref: Two-way I/O-Footnote-1749440 +Node: TCP/IP Networking749510 +Node: Profiling752354 +Node: Internationalization759851 +Node: I18N and L10N761276 +Node: Explaining gettext761962 +Ref: Explaining gettext-Footnote-1767030 +Ref: Explaining gettext-Footnote-2767214 +Node: Programmer i18n767379 +Node: Translator i18n771581 +Node: String Extraction772374 +Ref: String Extraction-Footnote-1773335 +Node: Printf Ordering773421 +Ref: Printf Ordering-Footnote-1776205 +Node: I18N Portability776269 +Ref: I18N Portability-Footnote-1778718 +Node: I18N Example778781 +Ref: I18N Example-Footnote-1781419 +Node: Gawk I18N781491 +Node: Debugger782112 +Node: Debugging783083 +Node: Debugging Concepts783516 +Node: Debugging Terms785372 +Node: Awk Debugging787969 +Node: Sample Debugging Session788861 +Node: Debugger Invocation789381 +Node: Finding The Bug790713 +Node: List of Debugger Commands797201 +Node: Breakpoint Control798535 +Node: Debugger Execution Control802199 +Node: Viewing And Changing Data805559 +Node: Execution Stack808915 +Node: Debugger Info810382 +Node: Miscellaneous Debugger Commands814364 +Node: Readline Support819540 +Node: Limitations820371 +Node: Arbitrary Precision Arithmetic822623 +Ref: Arbitrary Precision Arithmetic-Footnote-1824274 +Node: General Arithmetic824422 +Node: Floating Point Issues826142 +Node: String Conversion Precision827023 +Ref: String Conversion Precision-Footnote-1828728 +Node: Unexpected Results828837 +Node: POSIX Floating Point Problems830990 +Ref: POSIX Floating Point Problems-Footnote-1834815 +Node: Integer Programming834853 +Node: Floating-point Programming836592 +Ref: Floating-point Programming-Footnote-1842923 +Ref: Floating-point Programming-Footnote-2843193 +Node: Floating-point Representation843457 +Node: Floating-point Context844622 +Ref: table-ieee-formats845461 +Node: Rounding Mode846845 +Ref: table-rounding-modes847324 +Ref: Rounding Mode-Footnote-1850339 +Node: Gawk and MPFR850518 +Node: Arbitrary Precision Floats851773 +Ref: Arbitrary Precision Floats-Footnote-1854216 +Node: Setting Precision854532 +Ref: table-predefined-precision-strings855218 +Node: Setting Rounding Mode857363 +Ref: table-gawk-rounding-modes857767 +Node: Floating-point Constants858954 +Node: Changing Precision860383 +Ref: Changing Precision-Footnote-1861783 +Node: Exact Arithmetic861957 +Node: Arbitrary Precision Integers865095 +Ref: Arbitrary Precision Integers-Footnote-1868113 +Node: Dynamic Extensions868260 +Node: Extension Intro869718 +Node: Plugin License870983 +Node: Extension Mechanism Outline871668 +Ref: load-extension872085 +Ref: load-new-function873563 +Ref: call-new-function874558 +Node: Extension API Description876573 +Node: Extension API Functions Introduction877786 +Node: General Data Types882652 +Ref: General Data Types-Footnote-1888254 +Node: Requesting Values888553 +Ref: table-value-types-returned889284 +Node: Constructor Functions890238 +Node: Registration Functions893258 +Node: Extension Functions893943 +Node: Exit Callback Functions896168 +Node: Extension Version String897417 +Node: Input Parsers898067 +Node: Output Wrappers907824 +Node: Two-way processors912334 +Node: Printing Messages914542 +Ref: Printing Messages-Footnote-1915619 +Node: Updating `ERRNO'915771 +Node: Accessing Parameters916510 +Node: Symbol Table Access917740 +Node: Symbol table by name918252 +Node: Symbol table by cookie919999 +Ref: Symbol table by cookie-Footnote-1924129 +Node: Cached values924192 +Ref: Cached values-Footnote-1927641 +Node: Array Manipulation927732 +Ref: Array Manipulation-Footnote-1928830 +Node: Array Data Types928869 +Ref: Array Data Types-Footnote-1931572 +Node: Array Functions931664 +Node: Flattening Arrays935430 +Node: Creating Arrays942282 +Node: Extension API Variables947007 +Node: Extension Versioning947643 +Node: Extension API Informational Variables949544 +Node: Extension API Boilerplate950630 +Node: Finding Extensions954434 +Node: Extension Example954994 +Node: Internal File Description955725 +Node: Internal File Ops959816 +Ref: Internal File Ops-Footnote-1971324 +Node: Using Internal File Ops971464 +Ref: Using Internal File Ops-Footnote-1973817 +Node: Extension Samples974083 +Node: Extension Sample File Functions975607 +Node: Extension Sample Fnmatch984094 +Node: Extension Sample Fork985820 +Node: Extension Sample Inplace987038 +Node: Extension Sample Ord988816 +Node: Extension Sample Readdir989652 +Node: Extension Sample Revout991184 +Node: Extension Sample Rev2way991777 +Node: Extension Sample Read write array992467 +Node: Extension Sample Readfile994350 +Node: Extension Sample API Tests995168 +Node: Extension Sample Time995693 +Node: gawkextlib997057 +Node: Language History999817 +Node: V7/SVR3.11001339 +Node: SVR41003660 +Node: POSIX1005102 +Node: BTL1006488 +Node: POSIX/GNU1007222 +Node: Common Extensions1012757 +Node: Ranges and Locales1014063 +Ref: Ranges and Locales-Footnote-11018681 +Ref: Ranges and Locales-Footnote-21018708 +Ref: Ranges and Locales-Footnote-31018968 +Node: Contributors1019189 +Node: Installation1024068 +Node: Gawk Distribution1024962 +Node: Getting1025446 +Node: Extracting1026272 +Node: Distribution contents1027964 +Node: Unix Installation1033225 +Node: Quick Installation1033842 +Node: Additional Configuration Options1036286 +Node: Configuration Philosophy1037763 +Node: Non-Unix Installation1040117 +Node: PC Installation1040575 +Node: PC Binary Installation1041874 +Node: PC Compiling1043722 +Node: PC Testing1046666 +Node: PC Using1047842 +Node: Cygwin1052027 +Node: MSYS1053027 +Node: VMS Installation1053541 +Node: VMS Compilation1054144 +Ref: VMS Compilation-Footnote-11055151 +Node: VMS Installation Details1055209 +Node: VMS Running1056844 +Node: VMS Old Gawk1058451 +Node: Bugs1058925 +Node: Other Versions1062777 +Node: Notes1068858 +Node: Compatibility Mode1069658 +Node: Additions1070441 +Node: Accessing The Source1071368 +Node: Adding Code1072808 +Node: New Ports1078853 +Node: Derived Files1082988 +Ref: Derived Files-Footnote-11088309 +Ref: Derived Files-Footnote-21088343 +Ref: Derived Files-Footnote-31088943 +Node: Future Extensions1089041 +Node: Implementation Limitations1089622 +Node: Extension Design1090874 +Node: Old Extension Problems1092028 +Ref: Old Extension Problems-Footnote-11093536 +Node: Extension New Mechanism Goals1093593 +Ref: Extension New Mechanism Goals-Footnote-11096959 +Node: Extension Other Design Decisions1097145 +Node: Extension Future Growth1099251 +Node: Old Extension Mechanism1100087 +Node: Basic Concepts1101827 +Node: Basic High Level1102508 +Ref: figure-general-flow1102779 +Ref: figure-process-flow1103378 +Ref: Basic High Level-Footnote-11106607 +Node: Basic Data Typing1106792 +Node: Glossary1110147 +Node: Copying1135609 +Node: GNU Free Documentation License1173166 +Node: Index1198303 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 13a823b9..cd7d88a9 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -3956,10 +3956,6 @@ for use by the @command{gawk} developers for testing and tuning. They are subject to change. The variables are: @table @env -@item AVG_CHAIN_MAX -The average number of items @command{gawk} will maintain on a -hash chain for managing arrays. - @item AWK_HASH If this variable exists with a value of @samp{gst}, @command{gawk} will switch to using the hash function from GNU Smalltalk for @@ -3972,6 +3968,13 @@ files one line at a time, instead of reading in blocks. This exists for debugging problems on filesystems on non-POSIX operating systems where I/O is performed in records, not in blocks. +@item GAWK_MSG_SRC +If this variable exists, @command{gawk} includes the source file +name and line number from which warning and/or fatal messages +are generated. Its purpose is to help isolate the source of a +message, since there can be multiple places which produce the +same warning or error message. + @item GAWK_NO_DFA If this variable exists, @command{gawk} does not use the DFA regexp matcher for ``does it match'' kinds of tests. This can cause @command{gawk} @@ -3984,6 +3987,14 @@ coordinate with each other.) This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. +@item INT_CHAIN_MAX +The average number of items @command{gawk} will maintain on a +hash chain for managing arrays indexed by integers. + +@item STR_CHAIN_MAX +The average number of items @command{gawk} will maintain on a +hash chain for managing arrays indexed by strings. + @item TIDYMEM If this variable exists, @command{gawk} uses the @code{mtrace()} library calls from GNU LIBC to help track down possible memory leaks. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index e1b86c75..f5e0fc06 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -3884,10 +3884,6 @@ for use by the @command{gawk} developers for testing and tuning. They are subject to change. The variables are: @table @env -@item AVG_CHAIN_MAX -The average number of items @command{gawk} will maintain on a -hash chain for managing arrays. - @item AWK_HASH If this variable exists with a value of @samp{gst}, @command{gawk} will switch to using the hash function from GNU Smalltalk for @@ -3900,6 +3896,13 @@ files one line at a time, instead of reading in blocks. This exists for debugging problems on filesystems on non-POSIX operating systems where I/O is performed in records, not in blocks. +@item GAWK_MSG_SRC +If this variable exists, @command{gawk} includes the source file +name and line number from which warning and/or fatal messages +are generated. Its purpose is to help isolate the source of a +message, since there can be multiple places which produce the +same warning or error message. + @item GAWK_NO_DFA If this variable exists, @command{gawk} does not use the DFA regexp matcher for ``does it match'' kinds of tests. This can cause @command{gawk} @@ -3912,6 +3915,14 @@ coordinate with each other.) This specifies the amount by which @command{gawk} should grow its internal evaluation stack, when needed. +@item INT_CHAIN_MAX +The average number of items @command{gawk} will maintain on a +hash chain for managing arrays indexed by integers. + +@item STR_CHAIN_MAX +The average number of items @command{gawk} will maintain on a +hash chain for managing arrays indexed by strings. + @item TIDYMEM If this variable exists, @command{gawk} uses the @code{mtrace()} library calls from GNU LIBC to help track down possible memory leaks. @@ -1261,12 +1261,15 @@ flush_io() int status = 0; errno = 0; + /* we don't warn about stdout/stderr if EPIPE, but we do error exit */ if (fflush(stdout)) { - warning(_("error writing standard output (%s)"), strerror(errno)); + if (errno != EPIPE) + warning(_("error writing standard output (%s)"), strerror(errno)); status++; } if (fflush(stderr)) { - warning(_("error writing standard error (%s)"), strerror(errno)); + if (errno != EPIPE) + warning(_("error writing standard error (%s)"), strerror(errno)); status++; } for (rp = red_head; rp != NULL; rp = rp->next) @@ -1316,13 +1319,16 @@ close_io(bool *stdio_problem) * them, we just flush them, and do that across the board. */ *stdio_problem = false; - if (fflush(stdout)) { - warning(_("error writing standard output (%s)"), strerror(errno)); + /* we don't warn about stdout/stderr if EPIPE, but we do error exit */ + if (fflush(stdout) != 0) { + if (errno != EPIPE) + warning(_("error writing standard output (%s)"), strerror(errno)); status++; *stdio_problem = true; } - if (fflush(stderr)) { - warning(_("error writing standard error (%s)"), strerror(errno)); + if (fflush(stderr) != 0) { + if (errno != EPIPE) + warning(_("error writing standard error (%s)"), strerror(errno)); status++; *stdio_problem = true; } @@ -157,7 +157,7 @@ GETGROUPS_T *groupset; /* current group set */ int ngroups; /* size of said set */ #endif -void (*lintfunc)(const char *mesg, ...) = warning; +void (*lintfunc)(const char *mesg, ...) = r_warning; static const struct option optab[] = { { "traditional", no_argument, NULL, 'c' }, @@ -289,6 +289,14 @@ main(int argc, char **argv) * Ignore SIGPIPE so that writes to pipes that fail don't * kill the process but instead return -1 and set errno. * That lets us print a fatal message instead of dieing suddenly. + * + * Note that this requires ignoring EPIPE when writing and + * flushing stdout/stderr in other parts of the program. E.g., + * + * gawk 'BEGIN { print "hi" }' | exit + * + * should not give us "broken pipe" messages --- mainly because + * it did not do so in the past and people would complain. */ signal(SIGPIPE, SIG_IGN); #endif @@ -849,8 +857,13 @@ By default it reads standard input and writes standard output.\n\n"), fp); fflush(fp); if (ferror(fp)) { - if (fp == stdout) - warning(_("error writing standard output (%s)"), strerror(errno)); + /* don't warn about stdout/stderr if EPIPE, but do error exit */ + if (errno != EPIPE) { + if (fp == stdout) + warning(_("error writing standard output (%s)"), strerror(errno)); + else if (fp == stderr) + warning(_("error writing standard error (%s)"), strerror(errno)); + } exit(EXIT_FAILURE); } @@ -887,7 +900,9 @@ along with this program. If not, see http://www.gnu.org/licenses/.\n"); fflush(stdout); if (ferror(stdout)) { - warning(_("error writing standard output (%s)"), strerror(errno)); + /* don't warn about stdout if EPIPE, but do error exit */ + if (errno != EPIPE) + warning(_("error writing standard output (%s)"), strerror(errno)); exit(EXIT_FAILURE); } @@ -44,15 +44,22 @@ err(bool isfatal, const char *s, const char *emsg, va_list argp) char *file; const char *me; + static bool first = true; + static bool add_src_info = false; + + if (first) { + first = false; + add_src_info = (getenv("GAWK_MSG_SRC") != NULL); + } + (void) fflush(output_fp); me = myname; (void) fprintf(stderr, "%s: ", me); -#ifdef GAWKDEBUG - if (srcfile != NULL) { + + if (srcfile != NULL && add_src_info) { fprintf(stderr, "%s:%d:", srcfile, srcline); srcfile = NULL; } -#endif /* GAWKDEBUG */ if (sourceline > 0) { if (source != NULL) @@ -109,10 +116,10 @@ msg(const char *mesg, ...) va_end(args); } -/* warning --- print a warning message */ +/* r_warning --- print a warning message */ void -warning(const char *mesg, ...) +r_warning(const char *mesg, ...) { va_list args; va_start(args, mesg); diff --git a/test/ChangeLog b/test/ChangeLog index 4de3d14b..beabad0d 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,14 @@ +2013-10-22 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (pipeio3): Enhance test to be more resilient to variations + in error messages produced by different Bourne shells when a command + is not found. + +2013-10-17 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (pipeio3): New test. + * pipeio3.awk, pipeio3.ok: New files. + 2013-10-10 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (backbigs1, backsmalls1): New tests. diff --git a/test/Makefile.am b/test/Makefile.am index abb3fb96..ff3db193 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1882,6 +1882,12 @@ backsmalls1: AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +pipeio3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @sed 's/sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index 9676494d..2ab56a5e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -2275,6 +2275,12 @@ backsmalls1: @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; \ AWKPATH="$(srcdir)" $(AWK) -f $@.awk "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +pipeio3: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @sed 's/sh.*cart:.*not found/sh: 1: cart: not found/' < _$@ >_x$@ ; mv _x$@ _$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @@ -3184,11 +3190,6 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -pipeio3: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index 29f9a17c..df272ce8 100644 --- a/test/Maketests +++ b/test/Maketests @@ -907,11 +907,6 @@ getlnhd: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -pipeio3: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - aadelete1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ |