commit - 1a22c43f78a9accbcfcffca1b0e3718e4d90e869
commit + 7c8e7ef4c47b40ab9996fe98d72341cde0b5ab40
blob - cb475cde69cb84d36abee249f0a20498ce4a4b01
blob + 7f7745614254530d9472e535a9a7b12039b6bde6
--- dist/isum.awk
+++ dist/isum.awk
updates = "/dev/stderr"
}
-function fflush(filename)
+function myflush(f)
{
+ # fflush is not available on sun, but system("") appears to work everywhere
system("")
}
printf("\b \b") >updates
statuslen = 0
if(!noflush)
- fflush(updates)
+ myflush(updates)
}
function status(s)
clearstatus(1)
printf(" %s ", s) >updates
statuslen = length(s)+5
- fflush(updates)
+ myflush(updates)
}
debug!=0 { print "# " $0 }
clearstatus()
if(debug) print "% mark"
print >out
- fflush(out)
+ myflush(out)
if(copy){
print >copy
- fflush(copy)
+ myflush(copy)
}
cmd = ""
printtabs = 1 # print indented lines immediately following
/^ / && printtabs!=0 {
clearstatus()
print >out
- fflush(out)
+ myflush(out)
if(copy){
print >copy
- fflush(copy)
+ myflush(copy)
}
next
}
errors = 0
if(verbose){
print >out
- fflush(out)
+ myflush(out)
if(copy){
print >copy
- fflush(copy)
+ myflush(copy)
}
}
cd = $0 "\n"
clearstatus()
if(debug) print "% errors"
printf "%s", cmd >out
- fflush(out)
+ myflush(out)
if(copy){
printf "%s", cmd >copy
- fflush(copy)
+ myflush(copy)
}
cmd = ""
next
if(debug) print "% errors1"
errors = 1
printf ">>> %s", cmd >out
- fflush(out)
+ myflush(out)
if(copy){
printf ">>> %s", cmd >copy
- fflush(copy)
+ myflush(copy)
}
cmd = ""
}