diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 187 |
1 files changed, 98 insertions, 89 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 90ae5848..3e12596d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -25838,11 +25838,16 @@ performs "in-place" editing of each input file. It uses the bundled # Please set INPLACE_SUFFIX to make a backup copy. For example, you may # want to set INPLACE_SUFFIX to .bak on the command line or in a BEGIN rule. + # N.B. We call inplace_end() in the BEGINFILE and END rules so that any + # actions in an ENDFILE rule will be redirected as expected. + BEGINFILE { - inplace_begin(FILENAME, INPLACE_SUFFIX) + if (_inplace_filename != "") + inplace_end(_inplace_filename, INPLACE_SUFFIX) + inplace_begin(_inplace_filename = FILENAME, INPLACE_SUFFIX) } - ENDFILE { + END { inplace_end(FILENAME, INPLACE_SUFFIX) } @@ -25854,6 +25859,10 @@ the extension restores standard output to its original destination. If a backup file name created by appending that suffix. Finally, the temporary file is renamed to the original file name. + The `_inplace_filename' variable serves to keep track of the current +filename so as to not invoke `inplace_end()' before processing the +first file. + If any error occurs, the extension issues a fatal error to terminate processing immediately without damaging the original file. @@ -35207,92 +35216,92 @@ Node: Extension Sample File Functions1030280 Node: Extension Sample Fnmatch1037961 Node: Extension Sample Fork1039449 Node: Extension Sample Inplace1040664 -Node: Extension Sample Ord1042340 -Node: Extension Sample Readdir1043176 -Ref: table-readdir-file-types1044053 -Node: Extension Sample Revout1044864 -Node: Extension Sample Rev2way1045453 -Node: Extension Sample Read write array1046193 -Node: Extension Sample Readfile1048133 -Node: Extension Sample Time1049228 -Node: Extension Sample API Tests1050576 -Node: gawkextlib1051067 -Node: Extension summary1053745 -Node: Extension Exercises1057434 -Node: Language History1058156 -Node: V7/SVR3.11059812 -Node: SVR41061965 -Node: POSIX1063399 -Node: BTL1064780 -Node: POSIX/GNU1065511 -Node: Feature History1071347 -Node: Common Extensions1085141 -Node: Ranges and Locales1086513 -Ref: Ranges and Locales-Footnote-11091132 -Ref: Ranges and Locales-Footnote-21091159 -Ref: Ranges and Locales-Footnote-31091394 -Node: Contributors1091615 -Node: History summary1097155 -Node: Installation1098534 -Node: Gawk Distribution1099480 -Node: Getting1099964 -Node: Extracting1100787 -Node: Distribution contents1102424 -Node: Unix Installation1108526 -Node: Quick Installation1109209 -Node: Shell Startup Files1111620 -Node: Additional Configuration Options1112699 -Node: Configuration Philosophy1114503 -Node: Non-Unix Installation1116872 -Node: PC Installation1117330 -Node: PC Binary Installation1118650 -Node: PC Compiling1120498 -Ref: PC Compiling-Footnote-11123519 -Node: PC Testing1123628 -Node: PC Using1124804 -Node: Cygwin1128919 -Node: MSYS1129689 -Node: VMS Installation1130190 -Node: VMS Compilation1130982 -Ref: VMS Compilation-Footnote-11132211 -Node: VMS Dynamic Extensions1132269 -Node: VMS Installation Details1133953 -Node: VMS Running1136204 -Node: VMS GNV1139044 -Node: VMS Old Gawk1139779 -Node: Bugs1140249 -Node: Other Versions1144138 -Node: Installation summary1150572 -Node: Notes1151631 -Node: Compatibility Mode1152496 -Node: Additions1153278 -Node: Accessing The Source1154203 -Node: Adding Code1155638 -Node: New Ports1161795 -Node: Derived Files1166277 -Ref: Derived Files-Footnote-11171752 -Ref: Derived Files-Footnote-21171786 -Ref: Derived Files-Footnote-31172382 -Node: Future Extensions1172496 -Node: Implementation Limitations1173102 -Node: Extension Design1174350 -Node: Old Extension Problems1175504 -Ref: Old Extension Problems-Footnote-11177021 -Node: Extension New Mechanism Goals1177078 -Ref: Extension New Mechanism Goals-Footnote-11180438 -Node: Extension Other Design Decisions1180627 -Node: Extension Future Growth1182735 -Node: Old Extension Mechanism1183571 -Node: Notes summary1185333 -Node: Basic Concepts1186519 -Node: Basic High Level1187200 -Ref: figure-general-flow1187472 -Ref: figure-process-flow1188071 -Ref: Basic High Level-Footnote-11191300 -Node: Basic Data Typing1191485 -Node: Glossary1194813 -Node: Copying1226742 -Node: GNU Free Documentation License1264298 -Node: Index1289434 +Node: Extension Sample Ord1042750 +Node: Extension Sample Readdir1043586 +Ref: table-readdir-file-types1044463 +Node: Extension Sample Revout1045274 +Node: Extension Sample Rev2way1045863 +Node: Extension Sample Read write array1046603 +Node: Extension Sample Readfile1048543 +Node: Extension Sample Time1049638 +Node: Extension Sample API Tests1050986 +Node: gawkextlib1051477 +Node: Extension summary1054155 +Node: Extension Exercises1057844 +Node: Language History1058566 +Node: V7/SVR3.11060222 +Node: SVR41062375 +Node: POSIX1063809 +Node: BTL1065190 +Node: POSIX/GNU1065921 +Node: Feature History1071757 +Node: Common Extensions1085551 +Node: Ranges and Locales1086923 +Ref: Ranges and Locales-Footnote-11091542 +Ref: Ranges and Locales-Footnote-21091569 +Ref: Ranges and Locales-Footnote-31091804 +Node: Contributors1092025 +Node: History summary1097565 +Node: Installation1098944 +Node: Gawk Distribution1099890 +Node: Getting1100374 +Node: Extracting1101197 +Node: Distribution contents1102834 +Node: Unix Installation1108936 +Node: Quick Installation1109619 +Node: Shell Startup Files1112030 +Node: Additional Configuration Options1113109 +Node: Configuration Philosophy1114913 +Node: Non-Unix Installation1117282 +Node: PC Installation1117740 +Node: PC Binary Installation1119060 +Node: PC Compiling1120908 +Ref: PC Compiling-Footnote-11123929 +Node: PC Testing1124038 +Node: PC Using1125214 +Node: Cygwin1129329 +Node: MSYS1130099 +Node: VMS Installation1130600 +Node: VMS Compilation1131392 +Ref: VMS Compilation-Footnote-11132621 +Node: VMS Dynamic Extensions1132679 +Node: VMS Installation Details1134363 +Node: VMS Running1136614 +Node: VMS GNV1139454 +Node: VMS Old Gawk1140189 +Node: Bugs1140659 +Node: Other Versions1144548 +Node: Installation summary1150982 +Node: Notes1152041 +Node: Compatibility Mode1152906 +Node: Additions1153688 +Node: Accessing The Source1154613 +Node: Adding Code1156048 +Node: New Ports1162205 +Node: Derived Files1166687 +Ref: Derived Files-Footnote-11172162 +Ref: Derived Files-Footnote-21172196 +Ref: Derived Files-Footnote-31172792 +Node: Future Extensions1172906 +Node: Implementation Limitations1173512 +Node: Extension Design1174760 +Node: Old Extension Problems1175914 +Ref: Old Extension Problems-Footnote-11177431 +Node: Extension New Mechanism Goals1177488 +Ref: Extension New Mechanism Goals-Footnote-11180848 +Node: Extension Other Design Decisions1181037 +Node: Extension Future Growth1183145 +Node: Old Extension Mechanism1183981 +Node: Notes summary1185743 +Node: Basic Concepts1186929 +Node: Basic High Level1187610 +Ref: figure-general-flow1187882 +Ref: figure-process-flow1188481 +Ref: Basic High Level-Footnote-11191710 +Node: Basic Data Typing1191895 +Node: Glossary1195223 +Node: Copying1227152 +Node: GNU Free Documentation License1264708 +Node: Index1289844 End Tag Table |