diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 185 |
1 files changed, 97 insertions, 88 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 2d4fd906..d6aea49f 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -25670,11 +25670,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) } @@ -25686,6 +25691,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. @@ -34955,91 +34964,91 @@ Node: Extension Sample File Functions1023254 Node: Extension Sample Fnmatch1030935 Node: Extension Sample Fork1032423 Node: Extension Sample Inplace1033638 -Node: Extension Sample Ord1035314 -Node: Extension Sample Readdir1036150 -Ref: table-readdir-file-types1037027 -Node: Extension Sample Revout1037838 -Node: Extension Sample Rev2way1038427 -Node: Extension Sample Read write array1039167 -Node: Extension Sample Readfile1041107 -Node: Extension Sample Time1042202 -Node: Extension Sample API Tests1043550 -Node: gawkextlib1044041 -Node: Extension summary1046719 -Node: Extension Exercises1050408 -Node: Language History1051130 -Node: V7/SVR3.11052786 -Node: SVR41054939 -Node: POSIX1056373 -Node: BTL1057754 -Node: POSIX/GNU1058485 -Node: Feature History1064006 -Node: Common Extensions1077104 -Node: Ranges and Locales1078476 -Ref: Ranges and Locales-Footnote-11083095 -Ref: Ranges and Locales-Footnote-21083122 -Ref: Ranges and Locales-Footnote-31083357 -Node: Contributors1083578 -Node: History summary1089118 -Node: Installation1090497 -Node: Gawk Distribution1091443 -Node: Getting1091927 -Node: Extracting1092750 -Node: Distribution contents1094387 -Node: Unix Installation1100141 -Node: Quick Installation1100758 -Node: Additional Configuration Options1103182 -Node: Configuration Philosophy1104985 -Node: Non-Unix Installation1107354 -Node: PC Installation1107812 -Node: PC Binary Installation1109132 -Node: PC Compiling1110980 -Ref: PC Compiling-Footnote-11114001 -Node: PC Testing1114110 -Node: PC Using1115286 -Node: Cygwin1119401 -Node: MSYS1120171 -Node: VMS Installation1120672 -Node: VMS Compilation1121464 -Ref: VMS Compilation-Footnote-11122693 -Node: VMS Dynamic Extensions1122751 -Node: VMS Installation Details1124435 -Node: VMS Running1126686 -Node: VMS GNV1129526 -Node: VMS Old Gawk1130261 -Node: Bugs1130731 -Node: Other Versions1134620 -Node: Installation summary1141054 -Node: Notes1142113 -Node: Compatibility Mode1142978 -Node: Additions1143760 -Node: Accessing The Source1144685 -Node: Adding Code1146120 -Node: New Ports1152277 -Node: Derived Files1156759 -Ref: Derived Files-Footnote-11162234 -Ref: Derived Files-Footnote-21162268 -Ref: Derived Files-Footnote-31162864 -Node: Future Extensions1162978 -Node: Implementation Limitations1163584 -Node: Extension Design1164832 -Node: Old Extension Problems1165986 -Ref: Old Extension Problems-Footnote-11167503 -Node: Extension New Mechanism Goals1167560 -Ref: Extension New Mechanism Goals-Footnote-11170920 -Node: Extension Other Design Decisions1171109 -Node: Extension Future Growth1173217 -Node: Old Extension Mechanism1174053 -Node: Notes summary1175815 -Node: Basic Concepts1177001 -Node: Basic High Level1177682 -Ref: figure-general-flow1177954 -Ref: figure-process-flow1178553 -Ref: Basic High Level-Footnote-11181782 -Node: Basic Data Typing1181967 -Node: Glossary1185295 -Node: Copying1217224 -Node: GNU Free Documentation License1254780 -Node: Index1279916 +Node: Extension Sample Ord1035724 +Node: Extension Sample Readdir1036560 +Ref: table-readdir-file-types1037437 +Node: Extension Sample Revout1038248 +Node: Extension Sample Rev2way1038837 +Node: Extension Sample Read write array1039577 +Node: Extension Sample Readfile1041517 +Node: Extension Sample Time1042612 +Node: Extension Sample API Tests1043960 +Node: gawkextlib1044451 +Node: Extension summary1047129 +Node: Extension Exercises1050818 +Node: Language History1051540 +Node: V7/SVR3.11053196 +Node: SVR41055349 +Node: POSIX1056783 +Node: BTL1058164 +Node: POSIX/GNU1058895 +Node: Feature History1064416 +Node: Common Extensions1077514 +Node: Ranges and Locales1078886 +Ref: Ranges and Locales-Footnote-11083505 +Ref: Ranges and Locales-Footnote-21083532 +Ref: Ranges and Locales-Footnote-31083767 +Node: Contributors1083988 +Node: History summary1089528 +Node: Installation1090907 +Node: Gawk Distribution1091853 +Node: Getting1092337 +Node: Extracting1093160 +Node: Distribution contents1094797 +Node: Unix Installation1100551 +Node: Quick Installation1101168 +Node: Additional Configuration Options1103592 +Node: Configuration Philosophy1105395 +Node: Non-Unix Installation1107764 +Node: PC Installation1108222 +Node: PC Binary Installation1109542 +Node: PC Compiling1111390 +Ref: PC Compiling-Footnote-11114411 +Node: PC Testing1114520 +Node: PC Using1115696 +Node: Cygwin1119811 +Node: MSYS1120581 +Node: VMS Installation1121082 +Node: VMS Compilation1121874 +Ref: VMS Compilation-Footnote-11123103 +Node: VMS Dynamic Extensions1123161 +Node: VMS Installation Details1124845 +Node: VMS Running1127096 +Node: VMS GNV1129936 +Node: VMS Old Gawk1130671 +Node: Bugs1131141 +Node: Other Versions1135030 +Node: Installation summary1141464 +Node: Notes1142523 +Node: Compatibility Mode1143388 +Node: Additions1144170 +Node: Accessing The Source1145095 +Node: Adding Code1146530 +Node: New Ports1152687 +Node: Derived Files1157169 +Ref: Derived Files-Footnote-11162644 +Ref: Derived Files-Footnote-21162678 +Ref: Derived Files-Footnote-31163274 +Node: Future Extensions1163388 +Node: Implementation Limitations1163994 +Node: Extension Design1165242 +Node: Old Extension Problems1166396 +Ref: Old Extension Problems-Footnote-11167913 +Node: Extension New Mechanism Goals1167970 +Ref: Extension New Mechanism Goals-Footnote-11171330 +Node: Extension Other Design Decisions1171519 +Node: Extension Future Growth1173627 +Node: Old Extension Mechanism1174463 +Node: Notes summary1176225 +Node: Basic Concepts1177411 +Node: Basic High Level1178092 +Ref: figure-general-flow1178364 +Ref: figure-process-flow1178963 +Ref: Basic High Level-Footnote-11182192 +Node: Basic Data Typing1182377 +Node: Glossary1185705 +Node: Copying1217634 +Node: GNU Free Documentation License1255190 +Node: Index1280326 End Tag Table |