touched up code for an old c++ compiler

This commit is contained in:
2009-08-31 07:19:02 +00:00
parent c31d8dc8a2
commit 8118c7477d
13 changed files with 172 additions and 70 deletions

View File

@ -0,0 +1,13 @@
BEGIN {
print "15" || "sort";
print "14" || "sort";
print "13" || "sort";
print "12" || "sort";
print "11" || "sort";
#close the input as sort emits when the input is closed
close ("sort", "r");
#close ("sort", "w");
print "-----";
while (("sort" || getline x) > 0) print "xx:", x;
}

View File

@ -1666,6 +1666,27 @@ BEGIN {
print x
}
--------------------------------------------------------------------------------
../../cmd/awk/qseawk --newline=on --rwpipe=on -o- -f lang-034.awk </dev/stdin 2>&1
--------------------------------------------------------------------------------
BEGIN {
print "15" || "sort";
print "14" || "sort";
print "13" || "sort";
print "12" || "sort";
print "11" || "sort";
close ("sort","r");
print "-----";
while ((("sort" || getline x) > 0))
print "xx:",x;
}
-----
xx: 11
xx: 12
xx: 13
xx: 14
xx: 15
--------------------------------------------------------------------------------
../../cmd/awk/qseawk -f quicksort.awk quicksort.dat </dev/stdin 2>&1
--------------------------------------------------------------------------------
0.0000000000

View File

@ -136,6 +136,7 @@ PROGS="
lang-031.awk///--newline=on -o-
lang-032.awk///--newline=on -o-
lang-033.awk///--newline=on -o-
lang-034.awk///--newline=on --rwpipe=on -o-
quicksort.awk/quicksort.dat//
quicksort2.awk/quicksort2.dat//
@ -189,7 +190,9 @@ init)
;;
test)
run_scripts > "${OUTFILE}.temp"
diff -q "${OUTFILE}" "${OUTFILE}.temp" || {
# diff -q is not supported on old platforms.
# redirect output to /dev/null instead.
diff "${OUTFILE}" "${OUTFILE}.temp" > /dev/null || {
echo_so "ERROR: ${OUTFILE} differs from ${OUTFILE}.temp."
echo_so " Check the scripts and output files for any errors."
exit 1