diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-18 21:43:14 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-18 21:43:14 +0200 |
commit | e0c1194c4348e7adf99802461d45e3dd1bd192ff (patch) | |
tree | 6c8f968291e3a1c594758b19cbfcaace934523d7 /doc/gawktexi.in | |
parent | cffd09247c1681fbf3d5cad5253b3199704f83e7 (diff) | |
download | egawk-e0c1194c4348e7adf99802461d45e3dd1bd192ff.tar.gz egawk-e0c1194c4348e7adf99802461d45e3dd1bd192ff.tar.bz2 egawk-e0c1194c4348e7adf99802461d45e3dd1bd192ff.zip |
Bug fix to inplace extension and doc updates.
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index d4067f70..08a9f7c3 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -33686,11 +33686,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 @@ -33705,6 +33710,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. |