|Ralph Corderoy <[email protected]> wrote:
||> (For the list: mawk(1) requires a fflush("") in order to "getline <
||> NAME" a file NAME that has been written via "print >> NAME" before,
||> even though fflush("") is not standard and i cannot imagine a
||> situation where an awk(1) script would not like to see a fflush("") on
||> NAME before it starts a getline.)
Date: 2014-11-11 14:36:38 +0100
[mdocmx] mdoxmx.sh: close(mx_fo) makes mawk(1) happy (Ralph Corderoy)..
Ooh, how embarassing is that?
After upsetting mdocml@ and groff@ and Thomas Dickey himself
Ralph Corderoy pointed out
Can you not close() NAME after writing to it before re-opening
it for getline?
So that regular POSIX standardized function, which seems to be
pretty common across programming languages when performing I/O,
makes mawk(1) happy.
Huhuuu, you damn fool from Germany.
---
mdocmx.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mdocmx.sh b/mdocmx.sh
index e675b79..e5f8b2d 100755
--- a/mdocmx.sh
+++ b/mdocmx.sh
@@ -152,7 +152,7 @@ END {
# If we were forced to create referenceable anchors, dump the temporary
file
# after writing our table-of-anchors (TAO :)
if (mx_fo) {
- #fflush("") # FIXMEs a problem with mawk(1.3.4 20141027)
+ close(mx_fo)
|Thanks Ralph. (Poor Thomas Dickey, excuse me, excuse me.)
But an honest joy
Does itself destroy
For a
--steffen