diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | awk.h | 1 | ||||
-rw-r--r-- | builtin.c | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 5 | ||||
-rw-r--r-- | doc/gawk.info | 1028 | ||||
-rw-r--r-- | doc/gawk.texi | 43 | ||||
-rw-r--r-- | doc/gawktexi.in | 43 | ||||
-rw-r--r-- | io.c | 19 |
8 files changed, 625 insertions, 524 deletions
@@ -1,3 +1,9 @@ +2014-12-27 Arnold D. Robbins <arnold@skeeve.com> + + * awk.h (is_non_fatal_std): Declare new function. + * io.c (is_non_fatal_std): New function. + * builtin.c (efwrite): Call it. + 2014-12-24 Arnold D. Robbins <arnold@skeeve.com> * profile.c (pprint): Be sure to set ip2 in all paths @@ -1496,6 +1496,7 @@ extern NODE *do_getline(int intovar, IOBUF *iop); extern struct redirect *getredirect(const char *str, int len); extern bool inrec(IOBUF *iop, int *errcode); extern int nextfile(IOBUF **curfile, bool skipping); +extern bool is_non_fatal_std(FILE *fp); /* main.c */ extern int arg_assign(char *arg, bool initing); extern int is_std_var(const char *var); @@ -129,8 +129,10 @@ wrerror: if (fp == stdout && errno == EPIPE) gawk_exit(EXIT_FATAL); + /* otherwise die verbosely */ - if ((rp->flag & RED_NON_FATAL) != 0) { + if ( (rp != NULL && (rp->flag & RED_NON_FATAL) != 0) + || is_non_fatal_std(fp)) { update_ERRNO_int(errno); } else fatal(_("%s to \"%s\" failed (%s)"), from, diff --git a/doc/ChangeLog b/doc/ChangeLog index 82c89c4f..ba473168 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-27 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Add info that nonfatal I/O works with stdout and + stderr. Revise version info and what was added when. + 2014-12-26 Antonio Giovanni Colombo <azc100@gmail.com> * gawktexi.in (Glossary): Really sort the items. diff --git a/doc/gawk.info b/doc/gawk.info index ba16256f..08ec4452 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -3454,8 +3454,8 @@ sequences apply to both string constants and regexp constants: would continue incorporating hexadecimal digits into the value until a non-hexadecimal digit or the end of the string was encountered. However, using more than two hexadecimal - digits produced undefined results. As of version *FIXME:* - 4.3.0, only two digits are processed. + digits produced undefined results. As of version 4.2, only + two digits are processed. `\/' A literal slash (necessary for regexp constants only). This @@ -7249,6 +7249,11 @@ attempting the output. For example: Here, `gawk' did not produce a fatal error; instead it let the `awk' program code detect the problem and handle it. + This mechanism works also for standard output and standard error. +For standard output, you may use `PROCINFO["-", "nonfatal"]' or +`PROCINFO["/dev/stdout", "nonfatal"]'. For standard error, use +`PROCINFO["/dev/stderr", "nonfatal"]'. + File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Nonfatal, Up: Printing @@ -26492,6 +26497,9 @@ the current version of `gawk'. - Directories on the command line produce a warning and are skipped (*note Command-line directories::). + - Output with `print' and `printf' need not be fatal (*note + Nonfatal::). + * New keywords: - The `BEGINFILE' and `ENDFILE' special patterns (*note @@ -26543,6 +26551,9 @@ the current version of `gawk'. - The `bindtextdomain()', `dcgettext()' and `dcngettext()' functions for internationalization (*note Programmer i18n::). + - The `div()' function for doing integer division and remainder + (*note Numeric Functions::). + * Changes and/or additions in the command-line options: - The `AWKPATH' environment variable for specifying a path @@ -26597,7 +26608,10 @@ the current version of `gawk'. - Ultrix - * Support for MirBSD was removed at `gawk' version 4.2. + * Support for the following systems was removed from the code for + `gawk' version 4.2: + + - MirBSD @@ -26984,25 +26998,29 @@ in POSIX `awk', in the order they were added to `gawk'. * The dynamic extension interface was completely redone (*note Dynamic Extensions::). + * Support for Ultrix was removed. + - Version *FIXME* XXXX introduced the following changes: + Version 4.2 introduced the following changes: * Changes to `ENVIRON' are reflected into `gawk''s environment and that of programs that it runs. *Note Auto-set::. * The `--pretty-print' option no longer runs the `awk' program too. - FIXME: Add xref. + *Note Options::. * The `igawk' program and its manual page are no longer installed - when `gawk' is built. FIXME: Add xref. + when `gawk' is built. *Note Igawk Program::. - * The `div()' function. FIXME: Add xref. + * The `div()' function. *Note Numeric Functions::. * The maximum number of hexdecimal digits in `\x' escapes is now two. - FIXME: Add xref. + *Note Escape Sequences::. * Nonfatal output with `print' and `printf'. *Note Nonfatal::. + * Support for MirBSD was removed. + File: gawk.info, Node: Common Extensions, Next: Ranges and Locales, Prev: Feature History, Up: Language History @@ -34584,502 +34602,502 @@ Node: Invoking Summary151826 Node: Regexp153490 Node: Regexp Usage154944 Node: Escape Sequences156981 -Node: Regexp Operators163222 -Ref: Regexp Operators-Footnote-1170648 -Ref: Regexp Operators-Footnote-2170795 -Node: Bracket Expressions170893 -Ref: table-char-classes172908 -Node: Leftmost Longest175832 -Node: Computed Regexps177134 -Node: GNU Regexp Operators180531 -Node: Case-sensitivity184204 -Ref: Case-sensitivity-Footnote-1187089 -Ref: Case-sensitivity-Footnote-2187324 -Node: Regexp Summary187432 -Node: Reading Files188899 -Node: Records190993 -Node: awk split records191726 -Node: gawk split records196641 -Ref: gawk split records-Footnote-1201185 -Node: Fields201222 -Ref: Fields-Footnote-1203998 -Node: Nonconstant Fields204084 -Ref: Nonconstant Fields-Footnote-1206327 -Node: Changing Fields206531 -Node: Field Separators212460 -Node: Default Field Splitting215165 -Node: Regexp Field Splitting216282 -Node: Single Character Fields219632 -Node: Command Line Field Separator220691 -Node: Full Line Fields223903 -Ref: Full Line Fields-Footnote-1225420 -Ref: Full Line Fields-Footnote-2225466 -Node: Field Splitting Summary225567 -Node: Constant Size227641 -Node: Splitting By Content232230 -Ref: Splitting By Content-Footnote-1236224 -Node: Multiple Line236387 -Ref: Multiple Line-Footnote-1242273 -Node: Getline242452 -Node: Plain Getline244664 -Node: Getline/Variable247304 -Node: Getline/File248452 -Node: Getline/Variable/File249836 -Ref: Getline/Variable/File-Footnote-1251439 -Node: Getline/Pipe251526 -Node: Getline/Variable/Pipe254209 -Node: Getline/Coprocess255340 -Node: Getline/Variable/Coprocess256592 -Node: Getline Notes257331 -Node: Getline Summary260123 -Ref: table-getline-variants260535 -Node: Read Timeout261364 -Ref: Read Timeout-Footnote-1265189 -Node: Command-line directories265247 -Node: Input Summary266152 -Node: Input Exercises269453 -Node: Printing270181 -Node: Print272016 -Node: Print Examples273473 -Node: Output Separators276252 -Node: OFMT278270 -Node: Printf279624 -Node: Basic Printf280409 -Node: Control Letters281979 -Node: Format Modifiers285962 -Node: Printf Examples291971 -Node: Redirection294457 -Node: Special FD301298 -Ref: Special FD-Footnote-1304458 -Node: Special Files304532 -Node: Other Inherited Files305149 -Node: Special Network306149 -Node: Special Caveats307011 -Node: Close Files And Pipes307962 -Ref: Close Files And Pipes-Footnote-1315138 -Ref: Close Files And Pipes-Footnote-2315286 -Node: Nonfatal315436 -Node: Output Summary317122 -Node: Output Exercises318343 -Node: Expressions319023 -Node: Values320208 -Node: Constants320886 -Node: Scalar Constants321577 -Ref: Scalar Constants-Footnote-1322436 -Node: Nondecimal-numbers322686 -Node: Regexp Constants325704 -Node: Using Constant Regexps326229 -Node: Variables329372 -Node: Using Variables330027 -Node: Assignment Options331938 -Node: Conversion333813 -Node: Strings And Numbers334337 -Ref: Strings And Numbers-Footnote-1337402 -Node: Locale influences conversions337511 -Ref: table-locale-affects340258 -Node: All Operators340846 -Node: Arithmetic Ops341476 -Node: Concatenation343981 -Ref: Concatenation-Footnote-1346800 -Node: Assignment Ops346906 -Ref: table-assign-ops351885 -Node: Increment Ops353157 -Node: Truth Values and Conditions356595 -Node: Truth Values357680 -Node: Typing and Comparison358729 -Node: Variable Typing359539 -Node: Comparison Operators363192 -Ref: table-relational-ops363602 -Node: POSIX String Comparison367097 -Ref: POSIX String Comparison-Footnote-1368169 -Node: Boolean Ops368307 -Ref: Boolean Ops-Footnote-1372786 -Node: Conditional Exp372877 -Node: Function Calls374604 -Node: Precedence378484 -Node: Locales382145 -Node: Expressions Summary383777 -Node: Patterns and Actions386337 -Node: Pattern Overview387457 -Node: Regexp Patterns389136 -Node: Expression Patterns389679 -Node: Ranges393389 -Node: BEGIN/END396495 -Node: Using BEGIN/END397256 -Ref: Using BEGIN/END-Footnote-1399990 -Node: I/O And BEGIN/END400096 -Node: BEGINFILE/ENDFILE402410 -Node: Empty405311 -Node: Using Shell Variables405628 -Node: Action Overview407901 -Node: Statements410227 -Node: If Statement412075 -Node: While Statement413570 -Node: Do Statement415599 -Node: For Statement416743 -Node: Switch Statement419900 -Node: Break Statement422282 -Node: Continue Statement424323 -Node: Next Statement426150 -Node: Nextfile Statement428531 -Node: Exit Statement431161 -Node: Built-in Variables433564 -Node: User-modified434697 -Ref: User-modified-Footnote-1442378 -Node: Auto-set442440 -Ref: Auto-set-Footnote-1456132 -Ref: Auto-set-Footnote-2456337 -Node: ARGC and ARGV456393 -Node: Pattern Action Summary460611 -Node: Arrays463038 -Node: Array Basics464367 -Node: Array Intro465211 -Ref: figure-array-elements467175 -Ref: Array Intro-Footnote-1469701 -Node: Reference to Elements469829 -Node: Assigning Elements472281 -Node: Array Example472772 -Node: Scanning an Array474530 -Node: Controlling Scanning477546 -Ref: Controlling Scanning-Footnote-1482742 -Node: Numeric Array Subscripts483058 -Node: Uninitialized Subscripts485243 -Node: Delete486860 -Ref: Delete-Footnote-1489603 -Node: Multidimensional489660 -Node: Multiscanning492757 -Node: Arrays of Arrays494346 -Node: Arrays Summary499105 -Node: Functions501197 -Node: Built-in502096 -Node: Calling Built-in503174 -Node: Numeric Functions505165 -Ref: Numeric Functions-Footnote-1509984 -Ref: Numeric Functions-Footnote-2510341 -Ref: Numeric Functions-Footnote-3510389 -Node: String Functions510661 -Ref: String Functions-Footnote-1534136 -Ref: String Functions-Footnote-2534265 -Ref: String Functions-Footnote-3534513 -Node: Gory Details534600 -Ref: table-sub-escapes536381 -Ref: table-sub-proposed537901 -Ref: table-posix-sub539265 -Ref: table-gensub-escapes540801 -Ref: Gory Details-Footnote-1541633 -Node: I/O Functions541784 -Ref: I/O Functions-Footnote-1549002 -Node: Time Functions549149 -Ref: Time Functions-Footnote-1559637 -Ref: Time Functions-Footnote-2559705 -Ref: Time Functions-Footnote-3559863 -Ref: Time Functions-Footnote-4559974 -Ref: Time Functions-Footnote-5560086 -Ref: Time Functions-Footnote-6560313 -Node: Bitwise Functions560579 -Ref: table-bitwise-ops561141 -Ref: Bitwise Functions-Footnote-1565450 -Node: Type Functions565619 -Node: I18N Functions566770 -Node: User-defined568415 -Node: Definition Syntax569220 -Ref: Definition Syntax-Footnote-1574627 -Node: Function Example574698 -Ref: Function Example-Footnote-1577617 -Node: Function Caveats577639 -Node: Calling A Function578157 -Node: Variable Scope579115 -Node: Pass By Value/Reference582103 -Node: Return Statement585598 -Node: Dynamic Typing588579 -Node: Indirect Calls589508 -Ref: Indirect Calls-Footnote-1600810 -Node: Functions Summary600938 -Node: Library Functions603640 -Ref: Library Functions-Footnote-1607249 -Ref: Library Functions-Footnote-2607392 -Node: Library Names607563 -Ref: Library Names-Footnote-1611017 -Ref: Library Names-Footnote-2611240 -Node: General Functions611326 -Node: Strtonum Function612429 -Node: Assert Function615451 -Node: Round Function618775 -Node: Cliff Random Function620316 -Node: Ordinal Functions621332 -Ref: Ordinal Functions-Footnote-1624395 -Ref: Ordinal Functions-Footnote-2624647 -Node: Join Function624858 -Ref: Join Function-Footnote-1626627 -Node: Getlocaltime Function626827 -Node: Readfile Function630571 -Node: Shell Quoting632541 -Node: Data File Management633942 -Node: Filetrans Function634574 -Node: Rewind Function638630 -Node: File Checking640017 -Ref: File Checking-Footnote-1641349 -Node: Empty Files641550 -Node: Ignoring Assigns643529 -Node: Getopt Function645080 -Ref: Getopt Function-Footnote-1656542 -Node: Passwd Functions656742 -Ref: Passwd Functions-Footnote-1665579 -Node: Group Functions665667 -Ref: Group Functions-Footnote-1673561 -Node: Walking Arrays673774 -Node: Library Functions Summary675377 -Node: Library Exercises676778 -Node: Sample Programs678058 -Node: Running Examples678828 -Node: Clones679556 -Node: Cut Program680780 -Node: Egrep Program690499 -Ref: Egrep Program-Footnote-1697997 -Node: Id Program698107 -Node: Split Program701752 -Ref: Split Program-Footnote-1705200 -Node: Tee Program705328 -Node: Uniq Program708117 -Node: Wc Program715536 -Ref: Wc Program-Footnote-1719786 -Node: Miscellaneous Programs719880 -Node: Dupword Program721093 -Node: Alarm Program723124 -Node: Translate Program727928 -Ref: Translate Program-Footnote-1732493 -Node: Labels Program732763 -Ref: Labels Program-Footnote-1736114 -Node: Word Sorting736198 -Node: History Sorting740269 -Node: Extract Program742105 -Node: Simple Sed749630 -Node: Igawk Program752698 -Ref: Igawk Program-Footnote-1767022 -Ref: Igawk Program-Footnote-2767223 -Ref: Igawk Program-Footnote-3767345 -Node: Anagram Program767460 -Node: Signature Program770517 -Node: Programs Summary771764 -Node: Programs Exercises772957 -Ref: Programs Exercises-Footnote-1777088 -Node: Advanced Features777179 -Node: Nondecimal Data779127 -Node: Array Sorting780717 -Node: Controlling Array Traversal781414 -Ref: Controlling Array Traversal-Footnote-1789747 -Node: Array Sorting Functions789865 -Ref: Array Sorting Functions-Footnote-1793754 -Node: Two-way I/O793950 -Ref: Two-way I/O-Footnote-1798895 -Ref: Two-way I/O-Footnote-2799081 -Node: TCP/IP Networking799163 -Node: Profiling802036 -Node: Advanced Features Summary810313 -Node: Internationalization812246 -Node: I18N and L10N813726 -Node: Explaining gettext814412 -Ref: Explaining gettext-Footnote-1819437 -Ref: Explaining gettext-Footnote-2819621 -Node: Programmer i18n819786 -Ref: Programmer i18n-Footnote-1824652 -Node: Translator i18n824701 -Node: String Extraction825495 -Ref: String Extraction-Footnote-1826626 -Node: Printf Ordering826712 -Ref: Printf Ordering-Footnote-1829498 -Node: I18N Portability829562 -Ref: I18N Portability-Footnote-1832017 -Node: I18N Example832080 -Ref: I18N Example-Footnote-1834883 -Node: Gawk I18N834955 -Node: I18N Summary835593 -Node: Debugger836932 -Node: Debugging837954 -Node: Debugging Concepts838395 -Node: Debugging Terms840248 -Node: Awk Debugging842820 -Node: Sample Debugging Session843714 -Node: Debugger Invocation844234 -Node: Finding The Bug845618 -Node: List of Debugger Commands852093 -Node: Breakpoint Control853426 -Node: Debugger Execution Control857122 -Node: Viewing And Changing Data860486 -Node: Execution Stack863864 -Node: Debugger Info865501 -Node: Miscellaneous Debugger Commands869518 -Node: Readline Support874547 -Node: Limitations875439 -Node: Debugging Summary877553 -Node: Arbitrary Precision Arithmetic878721 -Node: Computer Arithmetic880137 -Ref: table-numeric-ranges883735 -Ref: Computer Arithmetic-Footnote-1884594 -Node: Math Definitions884651 -Ref: table-ieee-formats887939 -Ref: Math Definitions-Footnote-1888543 -Node: MPFR features888648 -Node: FP Math Caution890319 -Ref: FP Math Caution-Footnote-1891369 -Node: Inexactness of computations891738 -Node: Inexact representation892697 -Node: Comparing FP Values894054 -Node: Errors accumulate895136 -Node: Getting Accuracy896569 -Node: Try To Round899231 -Node: Setting precision900130 -Ref: table-predefined-precision-strings900814 -Node: Setting the rounding mode902603 -Ref: table-gawk-rounding-modes902967 -Ref: Setting the rounding mode-Footnote-1906422 -Node: Arbitrary Precision Integers906601 -Ref: Arbitrary Precision Integers-Footnote-1911500 -Node: POSIX Floating Point Problems911649 -Ref: POSIX Floating Point Problems-Footnote-1915522 -Node: Floating point summary915560 -Node: Dynamic Extensions917754 -Node: Extension Intro919306 -Node: Plugin License920572 -Node: Extension Mechanism Outline921369 -Ref: figure-load-extension921797 -Ref: figure-register-new-function923277 -Ref: figure-call-new-function924281 -Node: Extension API Description926267 -Node: Extension API Functions Introduction927717 -Node: General Data Types932541 -Ref: General Data Types-Footnote-1938280 -Node: Memory Allocation Functions938579 -Ref: Memory Allocation Functions-Footnote-1941418 -Node: Constructor Functions941514 -Node: Registration Functions943248 -Node: Extension Functions943933 -Node: Exit Callback Functions946230 -Node: Extension Version String947478 -Node: Input Parsers948143 -Node: Output Wrappers958022 -Node: Two-way processors962537 -Node: Printing Messages964741 -Ref: Printing Messages-Footnote-1965817 -Node: Updating `ERRNO'965969 -Node: Requesting Values966709 -Ref: table-value-types-returned967437 -Node: Accessing Parameters968394 -Node: Symbol Table Access969625 -Node: Symbol table by name970139 -Node: Symbol table by cookie972120 -Ref: Symbol table by cookie-Footnote-1976264 -Node: Cached values976327 -Ref: Cached values-Footnote-1979826 -Node: Array Manipulation979917 -Ref: Array Manipulation-Footnote-1981015 -Node: Array Data Types981052 -Ref: Array Data Types-Footnote-1983707 -Node: Array Functions983799 -Node: Flattening Arrays987653 -Node: Creating Arrays994545 -Node: Extension API Variables999316 -Node: Extension Versioning999952 -Node: Extension API Informational Variables1001853 -Node: Extension API Boilerplate1002918 -Node: Finding Extensions1006727 -Node: Extension Example1007287 -Node: Internal File Description1008059 -Node: Internal File Ops1012126 -Ref: Internal File Ops-Footnote-11023796 -Node: Using Internal File Ops1023936 -Ref: Using Internal File Ops-Footnote-11026319 -Node: Extension Samples1026592 -Node: Extension Sample File Functions1028118 -Node: Extension Sample Fnmatch1035756 -Node: Extension Sample Fork1037247 -Node: Extension Sample Inplace1038462 -Node: Extension Sample Ord1040137 -Node: Extension Sample Readdir1040973 -Ref: table-readdir-file-types1041849 -Node: Extension Sample Revout1042660 -Node: Extension Sample Rev2way1043250 -Node: Extension Sample Read write array1043990 -Node: Extension Sample Readfile1045930 -Node: Extension Sample Time1047025 -Node: Extension Sample API Tests1048374 -Node: gawkextlib1048865 -Node: Extension summary1051523 -Node: Extension Exercises1055212 -Node: Language History1055934 -Node: V7/SVR3.11057590 -Node: SVR41059771 -Node: POSIX1061216 -Node: BTL1062605 -Node: POSIX/GNU1063339 -Node: Feature History1068963 -Node: Common Extensions1082665 -Node: Ranges and Locales1083989 -Ref: Ranges and Locales-Footnote-11088607 -Ref: Ranges and Locales-Footnote-21088634 -Ref: Ranges and Locales-Footnote-31088868 -Node: Contributors1089089 -Node: History summary1094630 -Node: Installation1096000 -Node: Gawk Distribution1096946 -Node: Getting1097430 -Node: Extracting1098253 -Node: Distribution contents1099888 -Node: Unix Installation1105953 -Node: Quick Installation1106636 -Node: Shell Startup Files1109047 -Node: Additional Configuration Options1110126 -Node: Configuration Philosophy1111865 -Node: Non-Unix Installation1114234 -Node: PC Installation1114692 -Node: PC Binary Installation1116011 -Node: PC Compiling1117859 -Ref: PC Compiling-Footnote-11120880 -Node: PC Testing1120989 -Node: PC Using1122165 -Node: Cygwin1126280 -Node: MSYS1127103 -Node: VMS Installation1127603 -Node: VMS Compilation1128395 -Ref: VMS Compilation-Footnote-11129617 -Node: VMS Dynamic Extensions1129675 -Node: VMS Installation Details1131359 -Node: VMS Running1133611 -Node: VMS GNV1136447 -Node: VMS Old Gawk1137181 -Node: Bugs1137651 -Node: Other Versions1141534 -Node: Installation summary1147962 -Node: Notes1149018 -Node: Compatibility Mode1149883 -Node: Additions1150665 -Node: Accessing The Source1151590 -Node: Adding Code1153026 -Node: New Ports1159191 -Node: Derived Files1163673 -Ref: Derived Files-Footnote-11169148 -Ref: Derived Files-Footnote-21169182 -Ref: Derived Files-Footnote-31169778 -Node: Future Extensions1169892 -Node: Implementation Limitations1170498 -Node: Extension Design1171746 -Node: Old Extension Problems1172900 -Ref: Old Extension Problems-Footnote-11174417 -Node: Extension New Mechanism Goals1174474 -Ref: Extension New Mechanism Goals-Footnote-11177834 -Node: Extension Other Design Decisions1178023 -Node: Extension Future Growth1180131 -Node: Old Extension Mechanism1180967 -Node: Notes summary1182729 -Node: Basic Concepts1183915 -Node: Basic High Level1184596 -Ref: figure-general-flow1184868 -Ref: figure-process-flow1185467 -Ref: Basic High Level-Footnote-11188696 -Node: Basic Data Typing1188881 -Node: Glossary1192209 -Node: Copying1217367 -Node: GNU Free Documentation License1254923 -Node: Index1280059 +Node: Regexp Operators163211 +Ref: Regexp Operators-Footnote-1170637 +Ref: Regexp Operators-Footnote-2170784 +Node: Bracket Expressions170882 +Ref: table-char-classes172897 +Node: Leftmost Longest175821 +Node: Computed Regexps177123 +Node: GNU Regexp Operators180520 +Node: Case-sensitivity184193 +Ref: Case-sensitivity-Footnote-1187078 +Ref: Case-sensitivity-Footnote-2187313 +Node: Regexp Summary187421 +Node: Reading Files188888 +Node: Records190982 +Node: awk split records191715 +Node: gawk split records196630 +Ref: gawk split records-Footnote-1201174 +Node: Fields201211 +Ref: Fields-Footnote-1203987 +Node: Nonconstant Fields204073 +Ref: Nonconstant Fields-Footnote-1206316 +Node: Changing Fields206520 +Node: Field Separators212449 +Node: Default Field Splitting215154 +Node: Regexp Field Splitting216271 +Node: Single Character Fields219621 +Node: Command Line Field Separator220680 +Node: Full Line Fields223892 +Ref: Full Line Fields-Footnote-1225409 +Ref: Full Line Fields-Footnote-2225455 +Node: Field Splitting Summary225556 +Node: Constant Size227630 +Node: Splitting By Content232219 +Ref: Splitting By Content-Footnote-1236213 +Node: Multiple Line236376 +Ref: Multiple Line-Footnote-1242262 +Node: Getline242441 +Node: Plain Getline244653 +Node: Getline/Variable247293 +Node: Getline/File248441 +Node: Getline/Variable/File249825 +Ref: Getline/Variable/File-Footnote-1251428 +Node: Getline/Pipe251515 +Node: Getline/Variable/Pipe254198 +Node: Getline/Coprocess255329 +Node: Getline/Variable/Coprocess256581 +Node: Getline Notes257320 +Node: Getline Summary260112 +Ref: table-getline-variants260524 +Node: Read Timeout261353 +Ref: Read Timeout-Footnote-1265178 +Node: Command-line directories265236 +Node: Input Summary266141 +Node: Input Exercises269442 +Node: Printing270170 +Node: Print272005 +Node: Print Examples273462 +Node: Output Separators276241 +Node: OFMT278259 +Node: Printf279613 +Node: Basic Printf280398 +Node: Control Letters281968 +Node: Format Modifiers285951 +Node: Printf Examples291960 +Node: Redirection294446 +Node: Special FD301287 +Ref: Special FD-Footnote-1304447 +Node: Special Files304521 +Node: Other Inherited Files305138 +Node: Special Network306138 +Node: Special Caveats307000 +Node: Close Files And Pipes307951 +Ref: Close Files And Pipes-Footnote-1315127 +Ref: Close Files And Pipes-Footnote-2315275 +Node: Nonfatal315425 +Node: Output Summary317348 +Node: Output Exercises318569 +Node: Expressions319249 +Node: Values320434 +Node: Constants321112 +Node: Scalar Constants321803 +Ref: Scalar Constants-Footnote-1322662 +Node: Nondecimal-numbers322912 +Node: Regexp Constants325930 +Node: Using Constant Regexps326455 +Node: Variables329598 +Node: Using Variables330253 +Node: Assignment Options332164 +Node: Conversion334039 +Node: Strings And Numbers334563 +Ref: Strings And Numbers-Footnote-1337628 +Node: Locale influences conversions337737 +Ref: table-locale-affects340484 +Node: All Operators341072 +Node: Arithmetic Ops341702 +Node: Concatenation344207 +Ref: Concatenation-Footnote-1347026 +Node: Assignment Ops347132 +Ref: table-assign-ops352111 +Node: Increment Ops353383 +Node: Truth Values and Conditions356821 +Node: Truth Values357906 +Node: Typing and Comparison358955 +Node: Variable Typing359765 +Node: Comparison Operators363418 +Ref: table-relational-ops363828 +Node: POSIX String Comparison367323 +Ref: POSIX String Comparison-Footnote-1368395 +Node: Boolean Ops368533 +Ref: Boolean Ops-Footnote-1373012 +Node: Conditional Exp373103 +Node: Function Calls374830 +Node: Precedence378710 +Node: Locales382371 +Node: Expressions Summary384003 +Node: Patterns and Actions386563 +Node: Pattern Overview387683 +Node: Regexp Patterns389362 +Node: Expression Patterns389905 +Node: Ranges393615 +Node: BEGIN/END396721 +Node: Using BEGIN/END397482 +Ref: Using BEGIN/END-Footnote-1400216 +Node: I/O And BEGIN/END400322 +Node: BEGINFILE/ENDFILE402636 +Node: Empty405537 +Node: Using Shell Variables405854 +Node: Action Overview408127 +Node: Statements410453 +Node: If Statement412301 +Node: While Statement413796 +Node: Do Statement415825 +Node: For Statement416969 +Node: Switch Statement420126 +Node: Break Statement422508 +Node: Continue Statement424549 +Node: Next Statement426376 +Node: Nextfile Statement428757 +Node: Exit Statement431387 +Node: Built-in Variables433790 +Node: User-modified434923 +Ref: User-modified-Footnote-1442604 +Node: Auto-set442666 +Ref: Auto-set-Footnote-1456358 +Ref: Auto-set-Footnote-2456563 +Node: ARGC and ARGV456619 +Node: Pattern Action Summary460837 +Node: Arrays463264 +Node: Array Basics464593 +Node: Array Intro465437 +Ref: figure-array-elements467401 +Ref: Array Intro-Footnote-1469927 +Node: Reference to Elements470055 +Node: Assigning Elements472507 +Node: Array Example472998 +Node: Scanning an Array474756 +Node: Controlling Scanning477772 +Ref: Controlling Scanning-Footnote-1482968 +Node: Numeric Array Subscripts483284 +Node: Uninitialized Subscripts485469 +Node: Delete487086 +Ref: Delete-Footnote-1489829 +Node: Multidimensional489886 +Node: Multiscanning492983 +Node: Arrays of Arrays494572 +Node: Arrays Summary499331 +Node: Functions501423 +Node: Built-in502322 +Node: Calling Built-in503400 +Node: Numeric Functions505391 +Ref: Numeric Functions-Footnote-1510210 +Ref: Numeric Functions-Footnote-2510567 +Ref: Numeric Functions-Footnote-3510615 +Node: String Functions510887 +Ref: String Functions-Footnote-1534362 +Ref: String Functions-Footnote-2534491 +Ref: String Functions-Footnote-3534739 +Node: Gory Details534826 +Ref: table-sub-escapes536607 +Ref: table-sub-proposed538127 +Ref: table-posix-sub539491 +Ref: table-gensub-escapes541027 +Ref: Gory Details-Footnote-1541859 +Node: I/O Functions542010 +Ref: I/O Functions-Footnote-1549228 +Node: Time Functions549375 +Ref: Time Functions-Footnote-1559863 +Ref: Time Functions-Footnote-2559931 +Ref: Time Functions-Footnote-3560089 +Ref: Time Functions-Footnote-4560200 +Ref: Time Functions-Footnote-5560312 +Ref: Time Functions-Footnote-6560539 +Node: Bitwise Functions560805 +Ref: table-bitwise-ops561367 +Ref: Bitwise Functions-Footnote-1565676 +Node: Type Functions565845 +Node: I18N Functions566996 +Node: User-defined568641 +Node: Definition Syntax569446 +Ref: Definition Syntax-Footnote-1574853 +Node: Function Example574924 +Ref: Function Example-Footnote-1577843 +Node: Function Caveats577865 +Node: Calling A Function578383 +Node: Variable Scope579341 +Node: Pass By Value/Reference582329 +Node: Return Statement585824 +Node: Dynamic Typing588805 +Node: Indirect Calls589734 +Ref: Indirect Calls-Footnote-1601036 +Node: Functions Summary601164 +Node: Library Functions603866 +Ref: Library Functions-Footnote-1607475 +Ref: Library Functions-Footnote-2607618 +Node: Library Names607789 +Ref: Library Names-Footnote-1611243 +Ref: Library Names-Footnote-2611466 +Node: General Functions611552 +Node: Strtonum Function612655 +Node: Assert Function615677 +Node: Round Function619001 +Node: Cliff Random Function620542 +Node: Ordinal Functions621558 +Ref: Ordinal Functions-Footnote-1624621 +Ref: Ordinal Functions-Footnote-2624873 +Node: Join Function625084 +Ref: Join Function-Footnote-1626853 +Node: Getlocaltime Function627053 +Node: Readfile Function630797 +Node: Shell Quoting632767 +Node: Data File Management634168 +Node: Filetrans Function634800 +Node: Rewind Function638856 +Node: File Checking640243 +Ref: File Checking-Footnote-1641575 +Node: Empty Files641776 +Node: Ignoring Assigns643755 +Node: Getopt Function645306 +Ref: Getopt Function-Footnote-1656768 +Node: Passwd Functions656968 +Ref: Passwd Functions-Footnote-1665805 +Node: Group Functions665893 +Ref: Group Functions-Footnote-1673787 +Node: Walking Arrays674000 +Node: Library Functions Summary675603 +Node: Library Exercises677004 +Node: Sample Programs678284 +Node: Running Examples679054 +Node: Clones679782 +Node: Cut Program681006 +Node: Egrep Program690725 +Ref: Egrep Program-Footnote-1698223 +Node: Id Program698333 +Node: Split Program701978 +Ref: Split Program-Footnote-1705426 +Node: Tee Program705554 +Node: Uniq Program708343 +Node: Wc Program715762 +Ref: Wc Program-Footnote-1720012 +Node: Miscellaneous Programs720106 +Node: Dupword Program721319 +Node: Alarm Program723350 +Node: Translate Program728154 +Ref: Translate Program-Footnote-1732719 +Node: Labels Program732989 +Ref: Labels Program-Footnote-1736340 +Node: Word Sorting736424 +Node: History Sorting740495 +Node: Extract Program742331 +Node: Simple Sed749856 +Node: Igawk Program752924 +Ref: Igawk Program-Footnote-1767248 +Ref: Igawk Program-Footnote-2767449 +Ref: Igawk Program-Footnote-3767571 +Node: Anagram Program767686 +Node: Signature Program770743 +Node: Programs Summary771990 +Node: Programs Exercises773183 +Ref: Programs Exercises-Footnote-1777314 +Node: Advanced Features777405 +Node: Nondecimal Data779353 +Node: Array Sorting780943 +Node: Controlling Array Traversal781640 +Ref: Controlling Array Traversal-Footnote-1789973 +Node: Array Sorting Functions790091 +Ref: Array Sorting Functions-Footnote-1793980 +Node: Two-way I/O794176 +Ref: Two-way I/O-Footnote-1799121 +Ref: Two-way I/O-Footnote-2799307 +Node: TCP/IP Networking799389 +Node: Profiling802262 +Node: Advanced Features Summary810539 +Node: Internationalization812472 +Node: I18N and L10N813952 +Node: Explaining gettext814638 +Ref: Explaining gettext-Footnote-1819663 +Ref: Explaining gettext-Footnote-2819847 +Node: Programmer i18n820012 +Ref: Programmer i18n-Footnote-1824878 +Node: Translator i18n824927 +Node: String Extraction825721 +Ref: String Extraction-Footnote-1826852 +Node: Printf Ordering826938 +Ref: Printf Ordering-Footnote-1829724 +Node: I18N Portability829788 +Ref: I18N Portability-Footnote-1832243 +Node: I18N Example832306 +Ref: I18N Example-Footnote-1835109 +Node: Gawk I18N835181 +Node: I18N Summary835819 +Node: Debugger837158 +Node: Debugging838180 +Node: Debugging Concepts838621 +Node: Debugging Terms840474 +Node: Awk Debugging843046 +Node: Sample Debugging Session843940 +Node: Debugger Invocation844460 +Node: Finding The Bug845844 +Node: List of Debugger Commands852319 +Node: Breakpoint Control853652 +Node: Debugger Execution Control857348 +Node: Viewing And Changing Data860712 +Node: Execution Stack864090 +Node: Debugger Info865727 +Node: Miscellaneous Debugger Commands869744 +Node: Readline Support874773 +Node: Limitations875665 +Node: Debugging Summary877779 +Node: Arbitrary Precision Arithmetic878947 +Node: Computer Arithmetic880363 +Ref: table-numeric-ranges883961 +Ref: Computer Arithmetic-Footnote-1884820 +Node: Math Definitions884877 +Ref: table-ieee-formats888165 +Ref: Math Definitions-Footnote-1888769 +Node: MPFR features888874 +Node: FP Math Caution890545 +Ref: FP Math Caution-Footnote-1891595 +Node: Inexactness of computations891964 +Node: Inexact representation892923 +Node: Comparing FP Values894280 +Node: Errors accumulate895362 +Node: Getting Accuracy896795 +Node: Try To Round899457 +Node: Setting precision900356 +Ref: table-predefined-precision-strings901040 +Node: Setting the rounding mode902829 +Ref: table-gawk-rounding-modes903193 +Ref: Setting the rounding mode-Footnote-1906648 +Node: Arbitrary Precision Integers906827 +Ref: Arbitrary Precision Integers-Footnote-1911726 +Node: POSIX Floating Point Problems911875 +Ref: POSIX Floating Point Problems-Footnote-1915748 +Node: Floating point summary915786 +Node: Dynamic Extensions917980 +Node: Extension Intro919532 +Node: Plugin License920798 +Node: Extension Mechanism Outline921595 +Ref: figure-load-extension922023 +Ref: figure-register-new-function923503 +Ref: figure-call-new-function924507 +Node: Extension API Description926493 +Node: Extension API Functions Introduction927943 +Node: General Data Types932767 +Ref: General Data Types-Footnote-1938506 +Node: Memory Allocation Functions938805 +Ref: Memory Allocation Functions-Footnote-1941644 +Node: Constructor Functions941740 +Node: Registration Functions943474 +Node: Extension Functions944159 +Node: Exit Callback Functions946456 +Node: Extension Version String947704 +Node: Input Parsers948369 +Node: Output Wrappers958248 +Node: Two-way processors962763 +Node: Printing Messages964967 +Ref: Printing Messages-Footnote-1966043 +Node: Updating `ERRNO'966195 +Node: Requesting Values966935 +Ref: table-value-types-returned967663 +Node: Accessing Parameters968620 +Node: Symbol Table Access969851 +Node: Symbol table by name970365 +Node: Symbol table by cookie972346 +Ref: Symbol table by cookie-Footnote-1976490 +Node: Cached values976553 +Ref: Cached values-Footnote-1980052 +Node: Array Manipulation980143 +Ref: Array Manipulation-Footnote-1981241 +Node: Array Data Types981278 +Ref: Array Data Types-Footnote-1983933 +Node: Array Functions984025 +Node: Flattening Arrays987879 +Node: Creating Arrays994771 +Node: Extension API Variables999542 +Node: Extension Versioning1000178 +Node: Extension API Informational Variables1002079 +Node: Extension API Boilerplate1003144 +Node: Finding Extensions1006953 +Node: Extension Example1007513 +Node: Internal File Description1008285 +Node: Internal File Ops1012352 +Ref: Internal File Ops-Footnote-11024022 +Node: Using Internal File Ops1024162 +Ref: Using Internal File Ops-Footnote-11026545 +Node: Extension Samples1026818 +Node: Extension Sample File Functions1028344 +Node: Extension Sample Fnmatch1035982 +Node: Extension Sample Fork1037473 +Node: Extension Sample Inplace1038688 +Node: Extension Sample Ord1040363 +Node: Extension Sample Readdir1041199 +Ref: table-readdir-file-types1042075 +Node: Extension Sample Revout1042886 +Node: Extension Sample Rev2way1043476 +Node: Extension Sample Read write array1044216 +Node: Extension Sample Readfile1046156 +Node: Extension Sample Time1047251 +Node: Extension Sample API Tests1048600 +Node: gawkextlib1049091 +Node: Extension summary1051749 +Node: Extension Exercises1055438 +Node: Language History1056160 +Node: V7/SVR3.11057816 +Node: SVR41059997 +Node: POSIX1061442 +Node: BTL1062831 +Node: POSIX/GNU1063565 +Node: Feature History1069446 +Node: Common Extensions1083240 +Node: Ranges and Locales1084564 +Ref: Ranges and Locales-Footnote-11089182 +Ref: Ranges and Locales-Footnote-21089209 +Ref: Ranges and Locales-Footnote-31089443 +Node: Contributors1089664 +Node: History summary1095205 +Node: Installation1096575 +Node: Gawk Distribution1097521 +Node: Getting1098005 +Node: Extracting1098828 +Node: Distribution contents1100463 +Node: Unix Installation1106528 +Node: Quick Installation1107211 +Node: Shell Startup Files1109622 +Node: Additional Configuration Options1110701 +Node: Configuration Philosophy1112440 +Node: Non-Unix Installation1114809 +Node: PC Installation1115267 +Node: PC Binary Installation1116586 +Node: PC Compiling1118434 +Ref: PC Compiling-Footnote-11121455 +Node: PC Testing1121564 +Node: PC Using1122740 +Node: Cygwin1126855 +Node: MSYS1127678 +Node: VMS Installation1128178 +Node: VMS Compilation1128970 +Ref: VMS Compilation-Footnote-11130192 +Node: VMS Dynamic Extensions1130250 +Node: VMS Installation Details1131934 +Node: VMS Running1134186 +Node: VMS GNV1137022 +Node: VMS Old Gawk1137756 +Node: Bugs1138226 +Node: Other Versions1142109 +Node: Installation summary1148537 +Node: Notes1149593 +Node: Compatibility Mode1150458 +Node: Additions1151240 +Node: Accessing The Source1152165 +Node: Adding Code1153601 +Node: New Ports1159766 +Node: Derived Files1164248 +Ref: Derived Files-Footnote-11169723 +Ref: Derived Files-Footnote-21169757 +Ref: Derived Files-Footnote-31170353 +Node: Future Extensions1170467 +Node: Implementation Limitations1171073 +Node: Extension Design1172321 +Node: Old Extension Problems1173475 +Ref: Old Extension Problems-Footnote-11174992 +Node: Extension New Mechanism Goals1175049 +Ref: Extension New Mechanism Goals-Footnote-11178409 +Node: Extension Other Design Decisions1178598 +Node: Extension Future Growth1180706 +Node: Old Extension Mechanism1181542 +Node: Notes summary1183304 +Node: Basic Concepts1184490 +Node: Basic High Level1185171 +Ref: figure-general-flow1185443 +Ref: figure-process-flow1186042 +Ref: Basic High Level-Footnote-11189271 +Node: Basic Data Typing1189456 +Node: Glossary1192784 +Node: Copying1217942 +Node: GNU Free Documentation License1255498 +Node: Index1280634 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 376ec02b..e0023245 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -5178,13 +5178,12 @@ letters or numbers. @value{COMMONEXT} @quotation CAUTION In ISO C, the escape sequence continues until the first nonhexadecimal digit is seen. -@c FIXME: Add exact version here. For many years, @command{gawk} would continue incorporating hexadecimal digits into the value until a non-hexadecimal digit or the end of the string was encountered. However, using more than two hexadecimal digits produced undefined results. -As of @value{PVERSION} @strong{FIXME:} 4.3.0, only two digits +As of @value{PVERSION} 4.2, only two digits are processed. @end quotation @@ -10538,6 +10537,11 @@ $ @kbd{gawk '} Here, @command{gawk} did not produce a fatal error; instead it let the @command{awk} program code detect the problem and handle it. +This mechanism works also for standard output and standard error. +For standard output, you may use @code{PROCINFO["-", "nonfatal"]} +or @code{PROCINFO["/dev/stdout", "nonfatal"]}. For standard error, use +@code{PROCINFO["/dev/stderr", "nonfatal"]}. + @node Output Summary @section Summary @@ -35991,6 +35995,10 @@ Indirect function calls @item Directories on the command line produce a warning and are skipped (@pxref{Command-line directories}). + +@item +Output with @code{print} and @code{printf} need not be fatal +(@pxref{Nonfatal}). @end itemize @item @@ -36078,6 +36086,11 @@ The @code{isarray()} function to check if a variable is an array or not The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions for internationalization (@pxref{Programmer i18n}). + +@item +The @code{div()} function for doing integer +division and remainder +(@pxref{Numeric Functions}). @end itemize @item @@ -36211,8 +36224,14 @@ Ultrix @end itemize @item -@c FIXME: Verify the version here. -Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. +Support for the following systems was removed from the code +for @command{gawk} @value{PVERSION} 4.2: + +@c nested table +@itemize @value{MINUS} +@item +MirBSD +@end itemize @end itemize @@ -36829,9 +36848,12 @@ with a minimum of two The dynamic extension interface was completely redone (@pxref{Dynamic Extensions}). +@item +Support for Ultrix was removed. + @end itemize -Version @strong{FIXME} XXXX introduced the following changes: +Version 4.2 introduced the following changes: @itemize @bullet @item @@ -36842,25 +36864,28 @@ environment and that of programs that it runs. @item The @option{--pretty-print} option no longer runs the @command{awk} program too. -FIXME: Add xref. +@xref{Options}. @item The @command{igawk} program and its manual page are no longer installed when @command{gawk} is built. -FIXME: Add xref. +@xref{Igawk Program}. @item The @code{div()} function. -FIXME: Add xref. +@xref{Numeric Functions}. @item The maximum number of hexdecimal digits in @samp{\x} escapes is now two. -FIXME: Add xref. +@xref{Escape Sequences}. @item Nonfatal output with @code{print} and @code{printf}. @xref{Nonfatal}. + +@item +Support for MirBSD was removed. @end itemize @c XXX ADD MORE STUFF HERE diff --git a/doc/gawktexi.in b/doc/gawktexi.in index bdd94bff..87fa41ca 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -5089,13 +5089,12 @@ letters or numbers. @value{COMMONEXT} @quotation CAUTION In ISO C, the escape sequence continues until the first nonhexadecimal digit is seen. -@c FIXME: Add exact version here. For many years, @command{gawk} would continue incorporating hexadecimal digits into the value until a non-hexadecimal digit or the end of the string was encountered. However, using more than two hexadecimal digits produced undefined results. -As of @value{PVERSION} @strong{FIXME:} 4.3.0, only two digits +As of @value{PVERSION} 4.2, only two digits are processed. @end quotation @@ -10035,6 +10034,11 @@ $ @kbd{gawk '} Here, @command{gawk} did not produce a fatal error; instead it let the @command{awk} program code detect the problem and handle it. +This mechanism works also for standard output and standard error. +For standard output, you may use @code{PROCINFO["-", "nonfatal"]} +or @code{PROCINFO["/dev/stdout", "nonfatal"]}. For standard error, use +@code{PROCINFO["/dev/stderr", "nonfatal"]}. + @node Output Summary @section Summary @@ -35084,6 +35088,10 @@ Indirect function calls @item Directories on the command line produce a warning and are skipped (@pxref{Command-line directories}). + +@item +Output with @code{print} and @code{printf} need not be fatal +(@pxref{Nonfatal}). @end itemize @item @@ -35171,6 +35179,11 @@ The @code{isarray()} function to check if a variable is an array or not The @code{bindtextdomain()}, @code{dcgettext()} and @code{dcngettext()} functions for internationalization (@pxref{Programmer i18n}). + +@item +The @code{div()} function for doing integer +division and remainder +(@pxref{Numeric Functions}). @end itemize @item @@ -35304,8 +35317,14 @@ Ultrix @end itemize @item -@c FIXME: Verify the version here. -Support for MirBSD was removed at @command{gawk} @value{PVERSION} 4.2. +Support for the following systems was removed from the code +for @command{gawk} @value{PVERSION} 4.2: + +@c nested table +@itemize @value{MINUS} +@item +MirBSD +@end itemize @end itemize @@ -35922,9 +35941,12 @@ with a minimum of two The dynamic extension interface was completely redone (@pxref{Dynamic Extensions}). +@item +Support for Ultrix was removed. + @end itemize -Version @strong{FIXME} XXXX introduced the following changes: +Version 4.2 introduced the following changes: @itemize @bullet @item @@ -35935,25 +35957,28 @@ environment and that of programs that it runs. @item The @option{--pretty-print} option no longer runs the @command{awk} program too. -FIXME: Add xref. +@xref{Options}. @item The @command{igawk} program and its manual page are no longer installed when @command{gawk} is built. -FIXME: Add xref. +@xref{Igawk Program}. @item The @code{div()} function. -FIXME: Add xref. +@xref{Numeric Functions}. @item The maximum number of hexdecimal digits in @samp{\x} escapes is now two. -FIXME: Add xref. +@xref{Escape Sequences}. @item Nonfatal output with @code{print} and @code{printf}. @xref{Nonfatal}. + +@item +Support for MirBSD was removed. @end itemize @c XXX ADD MORE STUFF HERE @@ -1085,6 +1085,25 @@ getredirect(const char *str, int len) return NULL; } +/* is_non_fatal_std --- return true if fp is stdout/stderr and nonfatal */ + +bool +is_non_fatal_std(FILE *fp) +{ + if (in_PROCINFO("nonfatal", NULL, NULL)) + return true; + + /* yucky logic. sigh. */ + if (fp == stdout) { + return ( in_PROCINFO("-", "nonfatal", NULL) != NULL + || in_PROCINFO("/dev/stdout", "nonfatal", NULL) != NULL); + } else if (fp == stderr) { + return (in_PROCINFO("/dev/stderr", "nonfatal", NULL) != NULL); + } + + return false; +} + /* close_one --- temporarily close an open file to re-use the fd */ static void |