diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-18 21:55:17 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-18 21:55:17 +0200 |
commit | e29498dcb6a94edadf3d3ad3f631331c7ee40a33 (patch) | |
tree | 0d488b26bb3716e78fc8e6d27a73fc977dc44c3d /doc/gawk.texi | |
parent | 69b9c6bec08738933d79010ad8c9347e36d19bed (diff) | |
parent | 480aca31c7772dafeb1b97cd7a768bca2f49d3c7 (diff) | |
download | egawk-e29498dcb6a94edadf3d3ad3f631331c7ee40a33.tar.gz egawk-e29498dcb6a94edadf3d3ad3f631331c7ee40a33.tar.bz2 egawk-e29498dcb6a94edadf3d3ad3f631331c7ee40a33.zip |
Merge branch 'master' into feature/regex-type
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r-- | doc/gawk.texi | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi index 27cbcab2..8005fe3f 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -34830,11 +34830,16 @@ properly: # 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) @} @end group @@ -34849,6 +34854,10 @@ If @code{INPLACE_SUFFIX} is not an empty string, the original file is linked to a backup @value{FN} created by appending that suffix. Finally, the temporary file is renamed to the original @value{FN}. +The @code{_inplace_filename} variable serves to keep track of the +current filename so as to not invoke @code{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. |