BSD 4_3_Net_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 21 Jul 1985 07:56:34 +0000 (23:56 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 21 Jul 1985 07:56:34 +0000 (23:56 -0800)
Work on file usr/src/usr.bin/pascal/tstpx/src/t15.p
Work on file usr/src/usr.bin/pascal/tstpx/src/permute.p
Work on file usr/src/usr.bin/pascal/tstpx/src/transpose.p
Work on file usr/src/usr.bin/pascal/tstpx/src/shoemake.p
Work on file usr/src/usr.bin/pascal/tstpx/src/sort.p
Work on file usr/src/usr.bin/pascal/tstpx/src/quicksort.p
Work on file usr/src/usr.bin/pascal/tstpx/src/size.p
Work on file usr/src/usr.bin/pascal/tstpx/src/peter.p
Work on file usr/src/usr.bin/pascal/tstpx/src/pvs2.p
Work on file usr/src/usr.bin/pascal/tstpx/src/rdpal.p
Work on file usr/src/usr.bin/pascal/tstpx/src/wnj.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t12.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t14.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t6.6.3.4-2.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t11.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t08.p
Work on file usr/src/usr.bin/pascal/tstpx/src/testio.p
Work on file usr/src/usr.bin/pascal/tstpx/src/reset.p
Work on file usr/src/usr.bin/pascal/tstpx/src/sequin.p
Work on file usr/src/usr.bin/pascal/tstpx/src/setret.p
Work on file usr/src/usr.bin/pascal/tstpx/src/pvs3.p
Work on file usr/src/usr.bin/pascal/tstpx/src/realout.p
Work on file usr/src/usr.bin/pascal/tstpx/src/random.p
Work on file usr/src/usr.bin/pascal/tstpx/src/pvs1.p
Work on file usr/src/usr.bin/pascal/tstpx/src/procs.p
Work on file usr/src/usr.bin/pascal/tstpx/src/pretty.p
Work on file usr/src/usr.bin/pascal/tstpx/src/primes.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t10.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t06.p
Work on file usr/src/usr.bin/pascal/tstpx/src/piextn.p
Work on file usr/src/usr.bin/pascal/tstpx/src/powersoftwo.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t05.p
Work on file usr/src/usr.bin/pascal/tstpx/src/scaltst.p
Work on file usr/src/usr.bin/pascal/tstpx/src/real.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t6.6.3.1-5.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t19.p
Work on file usr/src/usr.bin/pascal/tstpx/src/testeoln.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t16.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t18.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t17.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t01.p
Work on file usr/src/usr.bin/pascal/tstpx/src/rdwt.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t04.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t09.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t03.p
Work on file usr/src/usr.bin/pascal/tstpx/src/strngs.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t07.p
Work on file usr/src/usr.bin/pascal/tstpx/src/setest.p
Work on file usr/src/usr.bin/pascal/tstpx/src/t13.p
Work on file usr/src/usr.bin/pascal/tstpx/src/align.p
Work on file usr/src/usr.bin/pascal/tstpx/src/ancestor.p
Work on file usr/src/usr.bin/pascal/tstpx/src/ancestor2.p
Work on file usr/src/usr.bin/pascal/tstpx/src/backtracerr.p
Work on file usr/src/usr.bin/pascal/tstpx/src/binrdwt.p
Work on file usr/src/usr.bin/pascal/tstpx/src/bench.p
Work on file usr/src/usr.bin/pascal/tstpx/src/basic.p
Work on file usr/src/usr.bin/pascal/tstpx/src/cfor.p
Work on file usr/src/usr.bin/pascal/tstpx/src/cntchars.p
Work on file usr/src/usr.bin/pascal/tstpx/src/clock.p
Work on file usr/src/usr.bin/pascal/tstpx/src/cutter.p
Work on file usr/src/usr.bin/pascal/tstpx/src/eightqueens.p
Work on file usr/src/usr.bin/pascal/tstpx/src/expotst.p
Work on file usr/src/usr.bin/pascal/tstpx/src/fay.p
Work on file usr/src/usr.bin/pascal/tstpx/src/form.p
Work on file usr/src/usr.bin/pascal/tstpx/src/ffunc.p
Work on file usr/src/usr.bin/pascal/tstpx/src/fproc.p
Work on file usr/src/usr.bin/pascal/tstpx/src/fnested.p
Work on file usr/src/usr.bin/pascal/tstpx/src/gencard.p
Work on file usr/src/usr.bin/pascal/tstpx/src/gordon.p
Work on file usr/src/usr.bin/pascal/tstpx/src/hamachi.p
Work on file usr/src/usr.bin/pascal/tstpx/src/hanoi.p
Work on file usr/src/usr.bin/pascal/tstpx/src/index.p
Work on file usr/src/usr.bin/pascal/tstpx/src/hugereal.p
Work on file usr/src/usr.bin/pascal/tstpx/src/math.p
Work on file usr/src/usr.bin/pascal/tstpx/src/insan.p
Work on file usr/src/usr.bin/pascal/tstpx/src/nonlocgoto.p
Work on file usr/src/usr.bin/pascal/tstpx/src/numericio.p
Work on file usr/src/usr.bin/pascal/tstpx/src/nmaze.p
Work on file usr/src/usr.bin/pascal/tstpx/src/palindromes.p
Work on file usr/src/usr.bin/pascal/tstpx/src/pcerror.p
Work on file usr/src/usr.bin/pascal/tstpx/in/t16.in
Work on file usr/src/usr.bin/pascal/tstpx/src/pcextn.p
Work on file usr/src/usr.bin/pascal/tstpx/in/size.in
Work on file usr/src/usr.bin/pascal/tstpx/in/setest.in
Work on file usr/src/usr.bin/pascal/tstpx/in/rdwt.in
Work on file usr/src/usr.bin/pascal/tstpx/in/rdpal.in
Work on file usr/src/usr.bin/pascal/tstpx/in/basic.in
Work on file usr/src/usr.bin/pascal/tstpx/in/pretty.in
Work on file usr/src/usr.bin/pascal/tstpx/in/procs.in
Work on file usr/src/usr.bin/pascal/tstpx/in/pcerror.in
Work on file usr/src/usr.bin/pascal/tstpx/in/peter.in
Work on file usr/src/usr.bin/pascal/tstpx/in/insan.in
Work on file usr/src/usr.bin/pascal/tstpx/in/index.in
Work on file usr/src/usr.bin/pascal/tstpx/in/nmaze.in
Work on file usr/src/usr.bin/pascal/tstpx/in/hugereal.in
Work on file usr/src/usr.bin/pascal/tstpx/in/hanoi.in
Work on file usr/src/usr.bin/pascal/tstpx/in/expotst.in
Work on file usr/src/usr.bin/pascal/tstpx/in/cntchars.in
Work on file usr/src/usr.bin/pascal/tstpx/in/cfor.in
Work on file usr/src/usr.bin/pascal/tstpx/out/fproc.out
Work on file usr/src/usr.bin/pascal/tstpx/out/form.out
Work on file usr/src/usr.bin/pascal/tstpx/out/fnested.out
Work on file usr/src/usr.bin/pascal/tstpx/out/gencard.out
Work on file usr/src/usr.bin/pascal/tstpx/out/gordon.out
Work on file usr/src/usr.bin/pascal/tstpx/out/funcs.out
Work on file usr/src/usr.bin/pascal/tstpx/out/hamachi.out
Work on file usr/src/usr.bin/pascal/tstpx/out/nonlocgoto.out
Work on file usr/src/usr.bin/pascal/tstpx/out/palindromes.ou
Work on file usr/src/usr.bin/pascal/tstpx/out/math.out
Work on file usr/src/usr.bin/pascal/tstpx/out/numericio.out
Work on file usr/src/usr.bin/pascal/tstpx/out/powersoftwo.ou
Work on file usr/src/usr.bin/pascal/tstpx/out/piextn.out
Work on file usr/src/usr.bin/pascal/tstpx/out/permute.out
Work on file usr/src/usr.bin/pascal/tstpx/out/primes.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pvs1.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pvs2.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pvs3.out
Work on file usr/src/usr.bin/pascal/tstpx/out/random.out
Work on file usr/src/usr.bin/pascal/tstpx/out/quicksort.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t09.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t08.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t04.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t07.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t05.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t06.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t03.out
Work on file usr/src/usr.bin/pascal/tstpx/out/strngs.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t01.out
Work on file usr/src/usr.bin/pascal/tstpx/out/sort.out
Work on file usr/src/usr.bin/pascal/tstpx/out/sequin.out
Work on file usr/src/usr.bin/pascal/tstpx/out/reset.out
Work on file usr/src/usr.bin/pascal/tstpx/out/scaltst.out
Work on file usr/src/usr.bin/pascal/tstpx/out/shoemake.out
Work on file usr/src/usr.bin/pascal/tstpx/out/setret.out
Work on file usr/src/usr.bin/pascal/tstpx/out/ancestor2.out
Work on file usr/src/usr.bin/pascal/tstpx/out/backtracerr.ou
Work on file usr/src/usr.bin/pascal/tstpx/out/ancestor.out
Work on file usr/src/usr.bin/pascal/tstpx/out/align.out
Work on file usr/src/usr.bin/pascal/tstpx/out/bench.out
Work on file usr/src/usr.bin/pascal/tstpx/out/eightqueens.ou
Work on file usr/src/usr.bin/pascal/tstpx/out/cutter.out
Work on file usr/src/usr.bin/pascal/tstpx/out/clock.out
Work on file usr/src/usr.bin/pascal/tstpx/out/binrdwt.out
Work on file usr/src/usr.bin/pascal/tstpx/out/fay.out
Work on file usr/src/usr.bin/pascal/tstpx/out/ffunc.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pcextn.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t16.out
Work on file usr/src/usr.bin/pascal/tstpx/out/size.out
Work on file usr/src/usr.bin/pascal/tstpx/out/wnj.out
Work on file usr/src/usr.bin/pascal/tstpx/out/setest.out
Work on file usr/src/usr.bin/pascal/tstpx/out/rdpal.out
Work on file usr/src/usr.bin/pascal/tstpx/out/procs.out
Work on file usr/src/usr.bin/pascal/tstpx/out/rdwt.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pretty.out
Work on file usr/src/usr.bin/pascal/tstpx/out/pcerror.out
Work on file usr/src/usr.bin/pascal/tstpx/out/peter.out
Work on file usr/src/usr.bin/pascal/tstpx/out/nmaze.out
Work on file usr/src/usr.bin/pascal/tstpx/out/hugereal.out
Work on file usr/src/usr.bin/pascal/tstpx/out/hanoi.out
Work on file usr/src/usr.bin/pascal/tstpx/out/expotst.out
Work on file usr/src/usr.bin/pascal/tstpx/out/index.out
Work on file usr/src/usr.bin/pascal/tstpx/out/insan.out
Work on file usr/src/usr.bin/pascal/tstpx/out/cntchars.out
Work on file usr/src/usr.bin/pascal/tstpx/out/cfor.out
Work on file usr/src/usr.bin/pascal/tstpx/out/transpose.out
Work on file usr/src/usr.bin/pascal/tstpx/out/testio.out
Work on file usr/src/usr.bin/pascal/tstpx/out/basic.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t6.6.3.4-2.out
Work on file usr/src/usr.bin/pascal/tstpx/out/testeoln.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t19.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t6.6.3.1-5.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t15.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t17.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t18.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t14.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t11.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t12.out
Work on file usr/src/usr.bin/pascal/tstpx/out/realout.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t13.out
Work on file usr/src/usr.bin/pascal/tstpx/out/t10.out
Work on file usr/src/usr.bin/pascal/tstpx/out/real.out
Work on file usr/src/usr.bin/pascal/tstpx/pi/Makefile
Work on file usr/src/usr.bin/pascal/tstpx/pc/makefile

Synthesized-from: CSRG/cd2/net.2

183 files changed:
usr/src/usr.bin/pascal/tstpx/in/basic.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/cfor.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/cntchars.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/expotst.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/hanoi.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/hugereal.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/index.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/insan.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/nmaze.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/pcerror.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/peter.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/pretty.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/procs.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/rdpal.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/rdwt.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/setest.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/size.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/in/t16.in [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/align.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/ancestor.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/ancestor2.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/backtracerr.ou [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/basic.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/bench.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/binrdwt.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/cfor.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/clock.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/cntchars.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/cutter.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/eightqueens.ou [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/expotst.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/fay.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/ffunc.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/fnested.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/form.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/fproc.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/funcs.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/gencard.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/gordon.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/hamachi.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/hanoi.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/hugereal.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/index.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/insan.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/math.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/nmaze.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/nonlocgoto.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/numericio.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/palindromes.ou [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pcerror.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pcextn.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/permute.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/peter.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/piextn.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/powersoftwo.ou [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pretty.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/primes.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/procs.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pvs1.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pvs2.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/pvs3.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/quicksort.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/random.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/rdpal.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/rdwt.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/real.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/realout.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/reset.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/scaltst.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/sequin.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/setest.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/setret.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/shoemake.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/size.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/sort.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/strngs.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t01.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t03.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t04.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t05.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t06.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t07.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t08.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t09.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t10.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t11.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t12.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t13.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t14.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t15.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t16.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t17.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t18.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t19.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t6.6.3.1-5.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/t6.6.3.4-2.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/testeoln.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/testio.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/transpose.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/out/wnj.out [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/pc/makefile [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/pi/Makefile [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/align.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/ancestor.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/ancestor2.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/backtracerr.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/basic.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/bench.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/binrdwt.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/cfor.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/clock.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/cntchars.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/cutter.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/eightqueens.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/expotst.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/fay.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/ffunc.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/fnested.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/form.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/fproc.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/gencard.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/gordon.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/hamachi.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/hanoi.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/hugereal.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/index.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/insan.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/math.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/nmaze.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/nonlocgoto.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/numericio.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/palindromes.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pcerror.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pcextn.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/permute.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/peter.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/piextn.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/powersoftwo.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pretty.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/primes.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/procs.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pvs1.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pvs2.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/pvs3.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/quicksort.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/random.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/rdpal.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/rdwt.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/real.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/realout.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/reset.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/scaltst.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/sequin.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/setest.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/setret.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/shoemake.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/size.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/sort.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/strngs.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t01.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t03.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t04.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t05.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t06.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t07.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t08.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t09.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t10.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t11.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t12.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t13.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t14.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t15.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t16.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t17.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t18.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t19.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t6.6.3.1-5.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/t6.6.3.4-2.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/testeoln.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/testio.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/transpose.p [new file with mode: 0644]
usr/src/usr.bin/pascal/tstpx/src/wnj.p [new file with mode: 0644]

diff --git a/usr/src/usr.bin/pascal/tstpx/in/basic.in b/usr/src/usr.bin/pascal/tstpx/in/basic.in
new file mode 100644 (file)
index 0000000..fa3f561
--- /dev/null
@@ -0,0 +1 @@
+17 23
diff --git a/usr/src/usr.bin/pascal/tstpx/in/cfor.in b/usr/src/usr.bin/pascal/tstpx/in/cfor.in
new file mode 100644 (file)
index 0000000..fa25ee6
--- /dev/null
@@ -0,0 +1 @@
+10 1000 100000 1.0e+10
diff --git a/usr/src/usr.bin/pascal/tstpx/in/cntchars.in b/usr/src/usr.bin/pascal/tstpx/in/cntchars.in
new file mode 100644 (file)
index 0000000..928c687
--- /dev/null
@@ -0,0 +1,23 @@
+program countcharacters(input,output);
+  var ch: char;
+    c0,c1,c2,c3,c4: integer;  {counters}
+begin writeln(wallclock); { linelimit(output, -1); }
+  c0 := 0; c1 := 0; c2 := 0; c3 := 0; c4 := 0;
+  while not eof(input) do
+  begin write(' '); c0 := c0+1;
+    while not eoln(input) do
+    begin read(ch); write(ch);
+      if ch = ' ' then c1 := c1+1 else
+      if ch in ['a'..'z'] then c2 := c2+1 else
+      if ch in ['0'..'9'] then c3 := c3+1 else c4 := c4+1
+    end ;
+    readln; writeln
+  end ;
+  writeln(wallclock);
+  writeln(c0,' lines');
+  writeln(c1,' blanks');
+  writeln(c2,' letters');
+  writeln(c3,' digits');
+  writeln(c4,' special characters');
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/in/expotst.in b/usr/src/usr.bin/pascal/tstpx/in/expotst.in
new file mode 100644 (file)
index 0000000..2c9ca9c
--- /dev/null
@@ -0,0 +1,7 @@
+1.0e-23
+1.0e-17
+0.1
+0.0
+10.0
+1.0e+17
+1.0e+23
diff --git a/usr/src/usr.bin/pascal/tstpx/in/hanoi.in b/usr/src/usr.bin/pascal/tstpx/in/hanoi.in
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10
diff --git a/usr/src/usr.bin/pascal/tstpx/in/hugereal.in b/usr/src/usr.bin/pascal/tstpx/in/hugereal.in
new file mode 100644 (file)
index 0000000..0a70f31
--- /dev/null
@@ -0,0 +1 @@
+123456789.987654321
diff --git a/usr/src/usr.bin/pascal/tstpx/in/index.in b/usr/src/usr.bin/pascal/tstpx/in/index.in
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/usr/src/usr.bin/pascal/tstpx/in/insan.in b/usr/src/usr.bin/pascal/tstpx/in/insan.in
new file mode 100644 (file)
index 0000000..1540e28
--- /dev/null
@@ -0,0 +1,4 @@
+wbggrb
+wbrgrr
+wbgwrg
+wrgwbr
diff --git a/usr/src/usr.bin/pascal/tstpx/in/nmaze.in b/usr/src/usr.bin/pascal/tstpx/in/nmaze.in
new file mode 100644 (file)
index 0000000..df99752
--- /dev/null
@@ -0,0 +1,8 @@
+10
+10
+17
+y
+12
+12
+23
+n
diff --git a/usr/src/usr.bin/pascal/tstpx/in/pcerror.in b/usr/src/usr.bin/pascal/tstpx/in/pcerror.in
new file mode 100644 (file)
index 0000000..c080b1e
--- /dev/null
@@ -0,0 +1,2 @@
+y
+ENILPTR
diff --git a/usr/src/usr.bin/pascal/tstpx/in/peter.in b/usr/src/usr.bin/pascal/tstpx/in/peter.in
new file mode 100644 (file)
index 0000000..dad0194
--- /dev/null
@@ -0,0 +1 @@
++,- *;/ %
diff --git a/usr/src/usr.bin/pascal/tstpx/in/pretty.in b/usr/src/usr.bin/pascal/tstpx/in/pretty.in
new file mode 100644 (file)
index 0000000..a0d7dfb
--- /dev/null
@@ -0,0 +1,20 @@
+program bench3(input, output);
+    const max=100;
+    var i,len: integer; inline: packed array[1..max] of char; palind: Boolean;
+begin
+    while not eof do begin
+       len := 0;
+       while not eoln do
+           begin len := len+1; inline[len] := input^; get(input) end;
+       readln;
+       while (len > 1) and (inline[len] = ' ') do
+           len := len - 1;
+        palind := true;
+       for i := len downto len div 2 do
+           if inline[i] <> inline[len-i+1] then
+               palind := false;
+       for i := 1 to len do write(inline[i]);
+       write(' is'); if not palind then write(' not');
+       writeln(' a palindrome');
+    end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/in/procs.in b/usr/src/usr.bin/pascal/tstpx/in/procs.in
new file mode 100644 (file)
index 0000000..0763d70
--- /dev/null
@@ -0,0 +1,3 @@
+abc
+def
+
diff --git a/usr/src/usr.bin/pascal/tstpx/in/rdpal.in b/usr/src/usr.bin/pascal/tstpx/in/rdpal.in
new file mode 100644 (file)
index 0000000..b9a2f37
--- /dev/null
@@ -0,0 +1,5 @@
+hi there
+abcdefgfedcba
+able was i ere i saw elba
+madam im adam
+the quick brown fox jumps over the lazy dog
diff --git a/usr/src/usr.bin/pascal/tstpx/in/rdwt.in b/usr/src/usr.bin/pascal/tstpx/in/rdwt.in
new file mode 100644 (file)
index 0000000..d7b1c44
--- /dev/null
@@ -0,0 +1 @@
+1024
diff --git a/usr/src/usr.bin/pascal/tstpx/in/setest.in b/usr/src/usr.bin/pascal/tstpx/in/setest.in
new file mode 100644 (file)
index 0000000..4099407
--- /dev/null
@@ -0,0 +1 @@
+23
diff --git a/usr/src/usr.bin/pascal/tstpx/in/size.in b/usr/src/usr.bin/pascal/tstpx/in/size.in
new file mode 100644 (file)
index 0000000..59621fa
--- /dev/null
@@ -0,0 +1 @@
+17 orange
diff --git a/usr/src/usr.bin/pascal/tstpx/in/t16.in b/usr/src/usr.bin/pascal/tstpx/in/t16.in
new file mode 100644 (file)
index 0000000..af6d4ea
--- /dev/null
@@ -0,0 +1,21 @@
+program Main(input, output);
+procedure copy(var inp, out: text);
+       var
+               c: char;
+       begin
+               while not eof(inp) do
+               begin
+                       while not eoln(inp) do
+                       begin
+                               c := inp^;
+                               out^ := c;
+                               put(out);
+                               get(inp);
+                       end;
+                       writeln;
+                       get(inp);
+               end;
+       end;
+begin
+       copy(input, output);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/align.out b/usr/src/usr.bin/pascal/tstpx/out/align.out
new file mode 100644 (file)
index 0000000..15dcb25
--- /dev/null
@@ -0,0 +1,4 @@
+foo =n   <- bar =n   <- nm =n   <-
+cmp works
+
+8 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/ancestor.out b/usr/src/usr.bin/pascal/tstpx/out/ancestor.out
new file mode 100644 (file)
index 0000000..5f83c32
--- /dev/null
@@ -0,0 +1,25 @@
+ 415145035
+ 415145036
+ 01111111110000000000
+ 00111111110000000000
+ 00011111110000000000
+ 00001111110000000000
+ 00000111110000000000
+ 00000011110000000000
+ 00000001110000000000
+ 00000000110000000000
+ 00000000010000000000
+ 00000000000000000000
+ 00000000000111111111
+ 00000000000011111111
+ 00000000000001111111
+ 00000000000000111111
+ 00000000000000011111
+ 00000000000000001111
+ 00000000000000000111
+ 00000000000000000011
+ 00000000000000000001
+ 00000000000000000000
+ 415145036
+
+6387 statements executed in 0.88 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/ancestor2.out b/usr/src/usr.bin/pascal/tstpx/out/ancestor2.out
new file mode 100644 (file)
index 0000000..e48323d
--- /dev/null
@@ -0,0 +1,25 @@
+ 415145040
+ 415145041
+ .111111111..........
+ ..11111111..........
+ ...1111111..........
+ ....111111..........
+ .....11111..........
+ ......1111..........
+ .......111..........
+ ........11..........
+ .........1..........
+ ....................
+ ...........111111111
+ ............11111111
+ .............1111111
+ ..............111111
+ ...............11111
+ ................1111
+ .................111
+ ..................11
+ ...................1
+ ....................
+ 415145041
+
+2276 statements executed in 0.33 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/backtracerr.ou b/usr/src/usr.bin/pascal/tstpx/out/backtracerr.ou
new file mode 100644 (file)
index 0000000..7f7b646
--- /dev/null
@@ -0,0 +1,73 @@
+program: about to      b( d )
+        b: about to    b(c)
+            b: about to        b(c)
+                b: about to    b(c)
+                    b: about to        b(c)
+                        b: about to    b(c)
+                            b: about to        b(c)
+                                b: about to    b(c)
+                                    b: about to        b(c)
+                                        b: about to    b(c)
+                                            b: about to        b(c)
+                                        b: about to    b(c)
+                                        b: about to    yy
+                                        c: about to    a(yy)
+                                    a: about to        xx()
+                                    c: about to        a(yy)
+                                a: about to    xx()
+                                c: about to    a(yy)
+                            a: about to        xx()
+                            c: about to        a(yy)
+                        a: about to    xx()
+                        c: about to    a(yy)
+                    a: about to        xx()
+                    c: about to        a(yy)
+                a: about to    xx()
+                c: about to    a(yy)
+            a: about to        xx()
+            c: about to        a(yy)
+        a: about to    xx()
+        c: about to    a(yy)
+    a: about to        xx()
+    c: about to        a(yy)
+    a: about to        xx()
+    c: about to        a(yy)
+    a: about to        xx()
+d:
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    a: back from       xx()
+    c: back from       a(yy)
+    b: back from       yy
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+    b: back from       b(c)
+program: back from     b( d )
+
+327 statements executed in 0.15 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/basic.out b/usr/src/usr.bin/pascal/tstpx/out/basic.out
new file mode 100644 (file)
index 0000000..cc15426
--- /dev/null
@@ -0,0 +1,3 @@
+        1723
+
+3 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/bench.out b/usr/src/usr.bin/pascal/tstpx/out/bench.out
new file mode 100644 (file)
index 0000000..3f4bf7e
--- /dev/null
@@ -0,0 +1,4 @@
+ 415145052
+ 415145151
+
+202003 statements executed in 17.93 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/binrdwt.out b/usr/src/usr.bin/pascal/tstpx/out/binrdwt.out
new file mode 100644 (file)
index 0000000..26043dd
--- /dev/null
@@ -0,0 +1,2 @@
+
+8 statements executed in 0.12 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/cfor.out b/usr/src/usr.bin/pascal/tstpx/out/cfor.out
new file mode 100644 (file)
index 0000000..fd5f332
--- /dev/null
@@ -0,0 +1,11 @@
+Enter -> 10, 1000, 100000, 1.0e+10
+Data echo ->        10      1000    100000 1.00000000000000e+10
+This loop works
+Case checks
+Success is assurred
+i =          5         4         3
+j =       1000       999       998
+k =     100001    100000     99999
+   case and for work !!
+Enter a character here -> <- there it is
+60 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/clock.out b/usr/src/usr.bin/pascal/tstpx/out/clock.out
new file mode 100644 (file)
index 0000000..362ba55
--- /dev/null
@@ -0,0 +1,6 @@
+ 415145163
+26 Feb 83 
+ 14:06:03 
+ 415145163
+
+6 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/cntchars.out b/usr/src/usr.bin/pascal/tstpx/out/cntchars.out
new file mode 100644 (file)
index 0000000..c0183da
--- /dev/null
@@ -0,0 +1,33 @@
+ 415145824
+ program countcharacters(input,output);
+   var ch: char;
+     c0,c1,c2,c3,c4: integer;  {counters}
+ begin writeln(wallclock); { linelimit(output, -1); }
+   c0 := 0; c1 := 0; c2 := 0; c3 := 0; c4 := 0;
+   while not eof(input) do
+   begin write(' '); c0 := c0+1;
+     while not eoln(input) do
+     begin read(ch); write(ch);
+       if ch = ' ' then c1 := c1+1 else
+       if ch in ['a'..'z'] then c2 := c2+1 else
+       if ch in ['0'..'9'] then c3 := c3+1 else c4 := c4+1
+     end ;
+     readln; writeln
+   end ;
+   writeln(wallclock);
+   writeln(c0,' lines');
+   writeln(c1,' blanks');
+   writeln(c2,' letters');
+   writeln(c3,' digits');
+   writeln(c4,' special characters');
+   writeln(wallclock)
+ end .
+ 415145825
+        23 lines
+       138 blanks
+       355 letters
+        38 digits
+       128 special characters
+ 415145825
+
+4134 statements executed in 0.62 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/cutter.out b/usr/src/usr.bin/pascal/tstpx/out/cutter.out
new file mode 100644 (file)
index 0000000..13e5446
--- /dev/null
@@ -0,0 +1,2 @@
+
+1 statements executed in 0.00 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/eightqueens.ou b/usr/src/usr.bin/pascal/tstpx/out/eightqueens.ou
new file mode 100644 (file)
index 0000000..0d8e6da
--- /dev/null
@@ -0,0 +1,95 @@
+  0 0 0 0 0 0 0 0
+  1 5 8 6 3 7 2 4
+  1 6 8 3 7 4 2 5
+  1 7 4 6 8 2 5 3
+  1 7 5 8 2 4 6 3
+  2 4 6 8 3 1 7 5
+  2 5 7 1 3 8 6 4
+  2 5 7 4 1 8 6 3
+  2 6 1 7 4 8 3 5
+  2 6 8 3 1 4 7 5
+  2 7 3 6 8 5 1 4
+  2 7 5 8 1 4 6 3
+  2 8 6 1 3 5 7 4
+  3 1 7 5 8 2 4 6
+  3 5 2 8 1 7 4 6
+  3 5 2 8 6 4 7 1
+  3 5 7 1 4 2 8 6
+  3 5 8 4 1 7 2 6
+  3 6 2 5 8 1 7 4
+  3 6 2 7 1 4 8 5
+  3 6 2 7 5 1 8 4
+  3 6 4 1 8 5 7 2
+  3 6 4 2 8 5 7 1
+  3 6 8 1 4 7 5 2
+  3 6 8 1 5 7 2 4
+  3 6 8 2 4 1 7 5
+  3 7 2 8 5 1 4 6
+  3 7 2 8 6 4 1 5
+  3 8 4 7 1 6 2 5
+  4 1 5 8 2 7 3 6
+  4 1 5 8 6 3 7 2
+  4 2 5 8 6 1 3 7
+  4 2 7 3 6 8 1 5
+  4 2 7 3 6 8 5 1
+  4 2 7 5 1 8 6 3
+  4 2 8 5 7 1 3 6
+  4 2 8 6 1 3 5 7
+  4 6 1 5 2 8 3 7
+  4 6 8 2 7 1 3 5
+  4 6 8 3 1 7 5 2
+  4 7 1 8 5 2 6 3
+  4 7 3 8 2 5 1 6
+  4 7 5 2 6 1 3 8
+  4 7 5 3 1 6 8 2
+  4 8 1 3 6 2 7 5
+  4 8 1 5 7 2 6 3
+  4 8 5 3 1 7 2 6
+  5 1 4 6 8 2 7 3
+  5 1 8 4 2 7 3 6
+  5 1 8 6 3 7 2 4
+  5 2 4 6 8 3 1 7
+  5 2 4 7 3 8 6 1
+  5 2 6 1 7 4 8 3
+  5 2 8 1 4 7 3 6
+  5 3 1 6 8 2 4 7
+  5 3 1 7 2 8 6 4
+  5 3 8 4 7 1 6 2
+  5 7 1 3 8 6 4 2
+  5 7 1 4 2 8 6 3
+  5 7 2 4 8 1 3 6
+  5 7 2 6 3 1 4 8
+  5 7 2 6 3 1 8 4
+  5 7 4 1 3 8 6 2
+  5 8 4 1 3 6 2 7
+  5 8 4 1 7 2 6 3
+  6 1 5 2 8 3 7 4
+  6 2 7 1 3 5 8 4
+  6 2 7 1 4 8 5 3
+  6 3 1 7 5 8 2 4
+  6 3 1 8 4 2 7 5
+  6 3 1 8 5 2 4 7
+  6 3 5 7 1 4 2 8
+  6 3 5 8 1 4 2 7
+  6 3 7 2 4 8 1 5
+  6 3 7 2 8 5 1 4
+  6 3 7 4 1 8 2 5
+  6 4 1 5 8 2 7 3
+  6 4 2 8 5 7 1 3
+  6 4 7 1 3 5 2 8
+  6 4 7 1 8 2 5 3
+  6 8 2 4 1 7 5 3
+  7 1 3 8 6 4 2 5
+  7 2 4 1 8 5 3 6
+  7 2 6 3 1 4 8 5
+  7 3 1 6 8 5 2 4
+  7 3 8 2 5 1 6 4
+  7 4 2 5 8 1 3 6
+  7 4 2 8 6 1 3 5
+  7 5 3 1 6 8 2 4
+  8 2 4 1 7 5 3 6
+  8 2 5 3 1 7 4 6
+  8 3 1 6 2 5 7 4
+  8 4 1 3 6 2 7 5
+
+73682 statements executed in 13.15 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/expotst.out b/usr/src/usr.bin/pascal/tstpx/out/expotst.out
new file mode 100644 (file)
index 0000000..7ac4849
--- /dev/null
@@ -0,0 +1,9 @@
+       -23
+       -17
+        -1
+         0
+         1
+        17
+        23
+
+22 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/fay.out b/usr/src/usr.bin/pascal/tstpx/out/fay.out
new file mode 100644 (file)
index 0000000..da9099c
--- /dev/null
@@ -0,0 +1,14 @@
+stacking          1
+Doing successors of          1
+stacking          2
+Doing successors of          2
+Now checking if          2 is an SCC root
+Now checking if          1 is an SCC root
+         1 is an SCC root; SP=         2 T=         1
+Yield SCC should pass          1 out to TakeUSCC
+YieldUSCC passes         1 to TakeUSCC
+TakeUSCC receives V=         1 from YieldUSCC
+The SCC's constituents are:
+         2         1
+
+79 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/ffunc.out b/usr/src/usr.bin/pascal/tstpx/out/ffunc.out
new file mode 100644 (file)
index 0000000..f40134d
--- /dev/null
@@ -0,0 +1,4 @@
+in bar x = 2
+in forfunc bar = 3
+
+9 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/fnested.out b/usr/src/usr.bin/pascal/tstpx/out/fnested.out
new file mode 100644 (file)
index 0000000..bbac3fe
--- /dev/null
@@ -0,0 +1,4 @@
+I should print->f4 4 0.25 0.25 4 pr1 0.25 true<-
+f4 4 0.25 0.25 4 pr1 0.25 true
+
+10 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/form.out b/usr/src/usr.bin/pascal/tstpx/out/form.out
new file mode 100644 (file)
index 0000000..3ccacad
--- /dev/null
@@ -0,0 +1,5 @@
+I take no parameters
+My argument is 12
+success
+
+7 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/fproc.out b/usr/src/usr.bin/pascal/tstpx/out/fproc.out
new file mode 100644 (file)
index 0000000..9cb3a1b
--- /dev/null
@@ -0,0 +1,13 @@
+This should print levels 0-3, with formal values of 4.
+Level 4 should jump to level 8.
+Finally levels 8-10 should print with formal values of -1.
+Stack frame:  0   formal print =  4   formal routine =  4
+Stack frame:  1   formal print =  4   formal routine =  4
+Stack frame:  2   formal print =  4   formal routine =  4
+Stack frame:  3   formal print =  4   formal routine =  4
+Stack frame:  4   formal print = non-local jump
+Stack frame:  8   formal print = -1   formal routine = -1
+Stack frame:  9   formal print = -1   formal routine = -1
+Stack frame: 10   formal print = -1   formal routine = -1
+
+113 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/funcs.out b/usr/src/usr.bin/pascal/tstpx/out/funcs.out
new file mode 100644 (file)
index 0000000..47a5dfb
--- /dev/null
@@ -0,0 +1,2 @@
+
+37 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/gencard.out b/usr/src/usr.bin/pascal/tstpx/out/gencard.out
new file mode 100644 (file)
index 0000000..9da0482
--- /dev/null
@@ -0,0 +1,18 @@
+0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 
+1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 
+
+1041 statements executed in 0.25 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/gordon.out b/usr/src/usr.bin/pascal/tstpx/out/gordon.out
new file mode 100644 (file)
index 0000000..7b098a6
--- /dev/null
@@ -0,0 +1,3 @@
+false
+
+6 statements executed in 0.00 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/hamachi.out b/usr/src/usr.bin/pascal/tstpx/out/hamachi.out
new file mode 100644 (file)
index 0000000..1787720
--- /dev/null
@@ -0,0 +1,5 @@
+Answer is 1
+Function b returns Answer is 2
+         5
+
+7 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/hanoi.out b/usr/src/usr.bin/pascal/tstpx/out/hanoi.out
new file mode 100644 (file)
index 0000000..3acc8e9
--- /dev/null
@@ -0,0 +1,4 @@
+Number: 
+For  10       1023 steps, time         1
+
+7679 statements executed in 1.10 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/hugereal.out b/usr/src/usr.bin/pascal/tstpx/out/hugereal.out
new file mode 100644 (file)
index 0000000..6147e3f
--- /dev/null
@@ -0,0 +1,5 @@
+errno =          0
+gimme a real that was a really satisfying 1.23456789987654e+08
+errno =          0
+
+5 statements executed in 0.00 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/index.out b/usr/src/usr.bin/pascal/tstpx/out/index.out
new file mode 100644 (file)
index 0000000..5f38051
--- /dev/null
@@ -0,0 +1,6 @@
+enter repeat count
+main:        10        20        30        40
+lvl1:       110       120       130       140
+lvl2:       210       220       230       240
+
+48 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/insan.out b/usr/src/usr.bin/pascal/tstpx/out/insan.out
new file mode 100644 (file)
index 0000000..b26aaa2
--- /dev/null
@@ -0,0 +1,7 @@
+solution to instant insanity
+         1   white     blue      red       blue      
+         2   red       green     blue      white     
+         3   green     white     green     red       
+         4   blue      red       white     green     
+
+3010 statements executed in 0.95 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/math.out b/usr/src/usr.bin/pascal/tstpx/out/math.out
new file mode 100644 (file)
index 0000000..5c6faae
--- /dev/null
@@ -0,0 +1,5 @@
+oh boy it works !!!
+hex k = 186a0   octal k =      303240
+octal j = 1750   hex j =      3e8
+
+71 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/nmaze.out b/usr/src/usr.bin/pascal/tstpx/out/nmaze.out
new file mode 100644 (file)
index 0000000..2069a0a
--- /dev/null
@@ -0,0 +1,52 @@
+width=height=randomizing seed= XXXXXXXXXXXXXXXXXXXXXXX
+ X           X   X     X
+ XXX X XXXXX X X X XXX X
+ X   X X   X   X   X X X
+ X XXXXX X XXXXXXXXX X X
+ X       X     X     X X
+ XXXXXXXXXXXXX X XXX X X
+ X       X X   X X X   X
+ XXX XXX X X XXX X XXXXX
+ X   X     X   X X     X
+ X XXXXXXXXXXX X X XXX X
+     X       X X X   X X
+ X X X XXX XXX X X X X X
+ X X   X X X   X X X X X
+ X XXXXX X XXXXX XXX X X
+ X X     X     X   X X X
+ X XXX X X XXX XXX X XXX
+ X   X X X X     X X   X
+ XXX X XXX XXXXXXX X X X
+ X X X X   X     X X X X
+ X X X X XXX XXX X XXX X
+ X     X       X        
+ XXXXXXXXXXXXXXXXXXXXXXX
+want another? (y or n)width=height=randomizing seed= XXXXXXXXXXXXXXXXXXXXXXXXXXX
+ X X             X         X
+ X X XXXXXXXXX X X XXX XXX X
+ X X X X       X X X   X   X
+ X X X X XXXXXXX X X XXXXXXX
+ X X X X   X     X X       X
+ X X X XXX XXXXXXX XXXXXXX X
+ X X     X       X X X   X X
+ X XXXXX XXXXXXX X X X X X X
+ X     X X     X X   X X   X
+ X X XXX XXXXX X XXX X XXX X
+ X X           X     X   X X
+ X XXXXXXXXXXX XXXXX XXX X X
+ X X       X   X   X X   X X
+ XXX XXXXX XXXXX X XXX XXXXX
+ X   X   X   X   X     X   X
+ X XXXXX XXX X XXXXXXX X X X
+ X X   X   X   X X   X X X X
+ X X X X XXXXX X X X XXX X X
+ X X X X       X X X     X  
+ X X X X XXXXXXX X XXXXXXX X
+ X   X X     X   X X   X   X
+ X XXX XXXXX X XXX X XXX XXX
+ X   X     X X     X     X X
+ XXX XXXXX XXXXXXXXX XXXXX X
+         X                 X
+ XXXXXXXXXXXXXXXXXXXXXXXXXXX
+want another? (y or n)
+16991 statements executed in 4.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/nonlocgoto.out b/usr/src/usr.bin/pascal/tstpx/out/nonlocgoto.out
new file mode 100644 (file)
index 0000000..6106cd7
--- /dev/null
@@ -0,0 +1,5 @@
+lvl0 called
+lvl2 called
+it worked
+
+8 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/numericio.out b/usr/src/usr.bin/pascal/tstpx/out/numericio.out
new file mode 100644 (file)
index 0000000..051d0dc
--- /dev/null
@@ -0,0 +1,5 @@
+ 415145263
+ 415145263 1.59003875000000e+04
+ 415145264 1.59003875000000e+04
+
+3510 statements executed in 0.72 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/palindromes.ou b/usr/src/usr.bin/pascal/tstpx/out/palindromes.ou
new file mode 100644 (file)
index 0000000..050aee6
--- /dev/null
@@ -0,0 +1,13 @@
+ 415145269
+         1         1
+         2         4
+         3         9
+        11       121
+        22       484
+        26       676
+       101     10201
+       111     12321
+       121     14641
+ 415145271
+
+5286 statements executed in 0.60 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pcerror.out b/usr/src/usr.bin/pascal/tstpx/out/pcerror.out
new file mode 100644 (file)
index 0000000..fc7d295
--- /dev/null
@@ -0,0 +1,16 @@
+Want a list of error names?
+           ECHR          EHALT        ENILPTR          ECASE      EOUTOFMEM
+         ECTSNG         ESTLIM          EARGV          EPACK        EUNPACK
+          EASRT        ELLIMIT     ETRASHHEAP       EPASTEOF       EREFINAF
+        ENOFILE      ENAMESIZE       EBADINUM       EBADFNUM       ENUMNTFD
+        ENAMRNG       EFMTSIZE          ESEEK        ECREATE        EREMOVE
+          EOPEN        EREADIT       EWRITEIT          ESQRT            ELN
+         ERANGE         ESUBSC          EGOTO         ECLOSE         EWRITE
+         ECTLWR         ECTUPR
+enter an error name
+
+Pointer value out of legal range
+
+       Error in "errs"+20 near line 50.
+
+128 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pcextn.out b/usr/src/usr.bin/pascal/tstpx/out/pcextn.out
new file mode 100644 (file)
index 0000000..1fd317d
--- /dev/null
@@ -0,0 +1,8 @@
+abc 
+abc def 
+abc
+at TELL foo at ->d<-
+after get foo at ->e<-
+after seek foo at ->d<-
+after reset foo at ->a<-
+after seek foo at ->d<-
diff --git a/usr/src/usr.bin/pascal/tstpx/out/permute.out b/usr/src/usr.bin/pascal/tstpx/out/permute.out
new file mode 100644 (file)
index 0000000..a34aff9
--- /dev/null
@@ -0,0 +1,26 @@
+         1         2         3         4
+         1         2         4         3
+         1         3         2         4
+         1         3         4         2
+         1         4         2         3
+         1         4         3         2
+         2         1         3         4
+         2         1         4         3
+         2         3         1         4
+         2         3         4         1
+         2         4         1         3
+         2         4         3         1
+         3         1         2         4
+         3         1         4         2
+         3         2         1         4
+         3         2         4         1
+         3         4         1         2
+         3         4         2         1
+         4         1         2         3
+         4         1         3         2
+         4         2         1         3
+         4         2         3         1
+         4         3         1         2
+         4         3         2         1
+
+697 statements executed in 0.25 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/peter.out b/usr/src/usr.bin/pascal/tstpx/out/peter.out
new file mode 100644 (file)
index 0000000..1c157e0
--- /dev/null
@@ -0,0 +1,11 @@
+plus
+random char
+minus
+random char
+star
+random char
+slash
+random char
+percent
+
+45 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/piextn.out b/usr/src/usr.bin/pascal/tstpx/out/piextn.out
new file mode 100644 (file)
index 0000000..c4c4598
--- /dev/null
@@ -0,0 +1,10 @@
+abc 
+abc def 
+abc
+at TELL foo at ->d<-
+after get foo at ->e<-
+after seek foo at ->d<-
+after reset foo at ->a<-
+after seek foo at ->d<-
+
+180 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/powersoftwo.ou b/usr/src/usr.bin/pascal/tstpx/out/powersoftwo.ou
new file mode 100644 (file)
index 0000000..405b002
--- /dev/null
@@ -0,0 +1,94 @@
+ 415145290
+                               2    1  .5
+                               4    2  .25
+                               8    3  .125
+                              16    4  .0625
+                              32    5  .03125
+                              64    6  .015625
+                             128    7  .0078125
+                             256    8  .00390625
+                             512    9  .001953125
+                            1024   10  .0009765625
+                            2048   11  .00048828125
+                            4096   12  .000244140625
+                            8192   13  .0001220703125
+                           16384   14  .00006103515625
+                           32768   15  .000030517578125
+                           65536   16  .0000152587890625
+                          131072   17  .00000762939453125
+                          262144   18  .000003814697265625
+                          524288   19  .0000019073486328125
+                         1048576   20  .00000095367431640625
+                         2097152   21  .000000476837158203125
+                         4194304   22  .0000002384185791015625
+                         8388608   23  .00000011920928955078125
+                        16777216   24  .000000059604644775390625
+                        33554432   25  .0000000298023223876953125
+                        67108864   26  .00000001490116119384765625
+                       134217728   27  .000000007450580596923828125
+                       268435456   28  .0000000037252902984619140625
+                       536870912   29  .00000000186264514923095703125
+                      1073741824   30  .000000000931322574615478515625
+                      2147483648   31  .0000000004656612873077392578125
+                      4294967296   32  .00000000023283064365386962890625
+                      8589934592   33  .000000000116415321826934814453125
+                     17179869184   34  .0000000000582076609134674072265625
+                     34359738368   35  .00000000002910383045673370361328125
+                     68719476736   36  .000000000014551915228366851806640625
+                    137438953472   37  .0000000000072759576141834259033203125
+                    274877906944   38  .00000000000363797880709171295166015625
+                    549755813888   39  .000000000001818989403545856475830078125
+                   1099511627776   40  .0000000000009094947017729282379150390625
+                   2199023255552   41  .00000000000045474735088646411895751953125
+                   4398046511104   42  .000000000000227373675443232059478759765625
+                   8796093022208   43  .0000000000001136868377216160297393798828125
+                  17592186044416   44  .00000000000005684341886080801486968994140625
+                  35184372088832   45  .000000000000028421709430404007434844970703125
+                  70368744177664   46  .0000000000000142108547152020037174224853515625
+                 140737488355328   47  .00000000000000710542735760100185871124267578125
+                 281474976710656   48  .000000000000003552713678800500929355621337890625
+                 562949953421312   49  .0000000000000017763568394002504646778106689453125
+                1125899906842624   50  .00000000000000088817841970012523233890533447265625
+                2251799813685248   51  .000000000000000444089209850062616169452667236328125
+                4503599627370496   52  .0000000000000002220446049250313080847263336181640625
+                9007199254740992   53  .00000000000000011102230246251565404236316680908203125
+               18014398509481984   54  .000000000000000055511151231257827021181583404541015625
+               36028797018963968   55  .0000000000000000277555756156289135105907917022705078125
+               72057594037927936   56  .00000000000000001387778780781445675529539585113525390625
+              144115188075855872   57  .000000000000000006938893903907228377647697925567626953125
+              288230376151711744   58  .0000000000000000034694469519536141888238489627838134765625
+              576460752303423488   59  .00000000000000000173472347597680709441192448139190673828125
+             1152921504606846976   60  .000000000000000000867361737988403547205962240695953369140625
+             2305843009213693952   61  .0000000000000000004336808689942017736029811203479766845703125
+             4611686018427387904   62  .00000000000000000021684043449710088680149056017398834228515625
+             9223372036854775808   63  .000000000000000000108420217248550443400745280086994171142578125
+            18446744073709551616   64  .0000000000000000000542101086242752217003726400434970855712890625
+            36893488147419103232   65  .00000000000000000002710505431213761085018632002174854278564453125
+            73786976294838206464   66  .000000000000000000013552527156068805425093160010874271392822265625
+           147573952589676412928   67  .0000000000000000000067762635780344027125465800054371356964111328125
+           295147905179352825856   68  .00000000000000000000338813178901720135627329000271856784820556640625
+           590295810358705651712   69  .000000000000000000001694065894508600678136645001359283924102783203125
+          1180591620717411303424   70  .0000000000000000000008470329472543003390683225006796419620513916015625
+          2361183241434822606848   71  .00000000000000000000042351647362715016953416125033982098102569580078125
+          4722366482869645213696   72  .000000000000000000000211758236813575084767080625169910490512847900390625
+          9444732965739290427392   73  .0000000000000000000001058791184067875423835403125849552452564239501953125
+         18889465931478580854784   74  .00000000000000000000005293955920339377119177015629247762262821197509765625
+         37778931862957161709568   75  .000000000000000000000026469779601696885595885078146238811314105987548828125
+         75557863725914323419136   76  .0000000000000000000000132348898008484427979425390731194056570529937744140625
+        151115727451828646838272   77  .00000000000000000000000661744490042422139897126953655970282852649688720703125
+        302231454903657293676544   78  .000000000000000000000003308722450212110699485634768279851414263248443603515625
+        604462909807314587353088   79  .0000000000000000000000016543612251060553497428173841399257071316242218017578125
+       1208925819614629174706176   80  .00000000000000000000000082718061255302767487140869206996285356581211090087890625
+       2417851639229258349412352   81  .000000000000000000000000413590306276513837435704346034981426782906055450439453125
+       4835703278458516698824704   82  .0000000000000000000000002067951531382569187178521730174907133914530277252197265625
+       9671406556917033397649408   83  .00000000000000000000000010339757656912845935892608650874535669572651386260986328125
+      19342813113834066795298816   84  .000000000000000000000000051698788284564229679463043254372678347863256931304931640625
+      38685626227668133590597632   85  .0000000000000000000000000258493941422821148397315216271863391739316284656524658203125
+      77371252455336267181195264   86  .00000000000000000000000001292469707114105741986576081359316958696581423282623291015625
+     154742504910672534362390528   87  .000000000000000000000000006462348535570528709932880406796584793482907116413116455078125
+     309485009821345068724781056   88  .0000000000000000000000000032311742677852643549664402033982923967414535582065582275390625
+     618970019642690137449562112   89  .00000000000000000000000000161558713389263217748322010169914619837072677910327911376953125
+    1237940039285380274899124224   90  .000000000000000000000000000807793566946316088741610050849573099185363389551639556884765625
+ 415145305
+
+33090 statements executed in 6.55 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pretty.out b/usr/src/usr.bin/pascal/tstpx/out/pretty.out
new file mode 100644 (file)
index 0000000..1b4e38c
--- /dev/null
@@ -0,0 +1,27 @@
+ program bench3 ( input , output ) ;
+
+ const max = 100 ;
+
+ var i , len : integer ;
+ inline : packed array [ 1 .. max ] of char ;
+ palind : Boolean ;
+ begin
+    while not eof do begin
+       len := 0 ;
+       while not eoln do begin
+          len := len + 1 ;
+          inline [ len ] := input ^ ;
+          get ( input )
+       end ;
+       readln ;
+       while ( len > 1 ) and ( inline [ len ] =' ' ) do len := len - 1 ;
+       palind := true ;
+       for i := len downto len div 2 do if inline [ i ] <> inline [ len - i + 1 ] then palind := false ;
+       for i := 1 to len do write ( inline [ i ] ) ;
+       write (' is' ) ;
+       if not palind then write (' not' ) ;
+       writeln (' a palindrome' ) ;
+    end
+ end .
+
+19711 statements executed in 3.90 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/primes.out b/usr/src/usr.bin/pascal/tstpx/out/primes.out
new file mode 100644 (file)
index 0000000..11fd9aa
--- /dev/null
@@ -0,0 +1,105 @@
+ 415145310
+     2     3     5     7    11    13    17    19    23    29
+    31    37    41    43    47    53    59    61    67    71
+    73    79    83    89    97   101   103   107   109   113
+   127   131   137   139   149   151   157   163   167   173
+   179   181   191   193   197   199   211   223   227   229
+   233   239   241   251   257   263   269   271   277   281
+   283   293   307   311   313   317   331   337   347   349
+   353   359   367   373   379   383   389   397   401   409
+   419   421   431   433   439   443   449   457   461   463
+   467   479   487   491   499   503   509   521   523   541
+   547   557   563   569   571   577   587   593   599   601
+   607   613   617   619   631   641   643   647   653   659
+   661   673   677   683   691   701   709   719   727   733
+   739   743   751   757   761   769   773   787   797   809
+   811   821   823   827   829   839   853   857   859   863
+   877   881   883   887   907   911   919   929   937   941
+   947   953   967   971   977   983   991   997  1009  1013
+  1019  1021  1031  1033  1039  1049  1051  1061  1063  1069
+  1087  1091  1093  1097  1103  1109  1117  1123  1129  1151
+  1153  1163  1171  1181  1187  1193  1201  1213  1217  1223
+  1229  1231  1237  1249  1259  1277  1279  1283  1289  1291
+  1297  1301  1303  1307  1319  1321  1327  1361  1367  1373
+  1381  1399  1409  1423  1427  1429  1433  1439  1447  1451
+  1453  1459  1471  1481  1483  1487  1489  1493  1499  1511
+  1523  1531  1543  1549  1553  1559  1567  1571  1579  1583
+  1597  1601  1607  1609  1613  1619  1621  1627  1637  1657
+  1663  1667  1669  1693  1697  1699  1709  1721  1723  1733
+  1741  1747  1753  1759  1777  1783  1787  1789  1801  1811
+  1823  1831  1847  1861  1867  1871  1873  1877  1879  1889
+  1901  1907  1913  1931  1933  1949  1951  1973  1979  1987
+  1993  1997  1999  2003  2011  2017  2027  2029  2039  2053
+  2063  2069  2081  2083  2087  2089  2099  2111  2113  2129
+  2131  2137  2141  2143  2153  2161  2179  2203  2207  2213
+  2221  2237  2239  2243  2251  2267  2269  2273  2281  2287
+  2293  2297  2309  2311  2333  2339  2341  2347  2351  2357
+  2371  2377  2381  2383  2389  2393  2399  2411  2417  2423
+  2437  2441  2447  2459  2467  2473  2477  2503  2521  2531
+  2539  2543  2549  2551  2557  2579  2591  2593  2609  2617
+  2621  2633  2647  2657  2659  2663  2671  2677  2683  2687
+  2689  2693  2699  2707  2711  2713  2719  2729  2731  2741
+  2749  2753  2767  2777  2789  2791  2797  2801  2803  2819
+  2833  2837  2843  2851  2857  2861  2879  2887  2897  2903
+  2909  2917  2927  2939  2953  2957  2963  2969  2971  2999
+  3001  3011  3019  3023  3037  3041  3049  3061  3067  3079
+  3083  3089  3109  3119  3121  3137  3163  3167  3169  3181
+  3187  3191  3203  3209  3217  3221  3229  3251  3253  3257
+  3259  3271  3299  3301  3307  3313  3319  3323  3329  3331
+  3343  3347  3359  3361  3371  3373  3389  3391  3407  3413
+  3433  3449  3457  3461  3463  3467  3469  3491  3499  3511
+  3517  3527  3529  3533  3539  3541  3547  3557  3559  3571
+  3581  3583  3593  3607  3613  3617  3623  3631  3637  3643
+  3659  3671  3673  3677  3691  3697  3701  3709  3719  3727
+  3733  3739  3761  3767  3769  3779  3793  3797  3803  3821
+  3823  3833  3847  3851  3853  3863  3877  3881  3889  3907
+  3911  3917  3919  3923  3929  3931  3943  3947  3967  3989
+  4001  4003  4007  4013  4019  4021  4027  4049  4051  4057
+  4073  4079  4091  4093  4099  4111  4127  4129  4133  4139
+  4153  4157  4159  4177  4201  4211  4217  4219  4229  4231
+  4241  4243  4253  4259  4261  4271  4273  4283  4289  4297
+  4327  4337  4339  4349  4357  4363  4373  4391  4397  4409
+  4421  4423  4441  4447  4451  4457  4463  4481  4483  4493
+  4507  4513  4517  4519  4523  4547  4549  4561  4567  4583
+  4591  4597  4603  4621  4637  4639  4643  4649  4651  4657
+  4663  4673  4679  4691  4703  4721  4723  4729  4733  4751
+  4759  4783  4787  4789  4793  4799  4801  4813  4817  4831
+  4861  4871  4877  4889  4903  4909  4919  4931  4933  4937
+  4943  4951  4957  4967  4969  4973  4987  4993  4999  5003
+  5009  5011  5021  5023  5039  5051  5059  5077  5081  5087
+  5099  5101  5107  5113  5119  5147  5153  5167  5171  5179
+  5189  5197  5209  5227  5231  5233  5237  5261  5273  5279
+  5281  5297  5303  5309  5323  5333  5347  5351  5381  5387
+  5393  5399  5407  5413  5417  5419  5431  5437  5441  5443
+  5449  5471  5477  5479  5483  5501  5503  5507  5519  5521
+  5527  5531  5557  5563  5569  5573  5581  5591  5623  5639
+  5641  5647  5651  5653  5657  5659  5669  5683  5689  5693
+  5701  5711  5717  5737  5741  5743  5749  5779  5783  5791
+  5801  5807  5813  5821  5827  5839  5843  5849  5851  5857
+  5861  5867  5869  5879  5881  5897  5903  5923  5927  5939
+  5953  5981  5987  6007  6011  6029  6037  6043  6047  6053
+  6067  6073  6079  6089  6091  6101  6113  6121  6131  6133
+  6143  6151  6163  6173  6197  6199  6203  6211  6217  6221
+  6229  6247  6257  6263  6269  6271  6277  6287  6299  6301
+  6311  6317  6323  6329  6337  6343  6353  6359  6361  6367
+  6373  6379  6389  6397  6421  6427  6449  6451  6469  6473
+  6481  6491  6521  6529  6547  6551  6553  6563  6569  6571
+  6577  6581  6599  6607  6619  6637  6653  6659  6661  6673
+  6679  6689  6691  6701  6703  6709  6719  6733  6737  6761
+  6763  6779  6781  6791  6793  6803  6823  6827  6829  6833
+  6841  6857  6863  6869  6871  6883  6899  6907  6911  6917
+  6947  6949  6959  6961  6967  6971  6977  6983  6991  6997
+  7001  7013  7019  7027  7039  7043  7057  7069  7079  7103
+  7109  7121  7127  7129  7151  7159  7177  7187  7193  7207
+  7211  7213  7219  7229  7237  7243  7247  7253  7283  7297
+  7307  7309  7321  7331  7333  7349  7351  7369  7393  7411
+  7417  7433  7451  7457  7459  7477  7481  7487  7489  7499
+  7507  7517  7523  7529  7537  7541  7547  7549  7559  7561
+  7573  7577  7583  7589  7591  7603  7607  7621  7639  7643
+  7649  7669  7673  7681  7687  7691  7699  7703  7717  7723
+  7727  7741  7753  7757  7759  7789  7793  7817  7823  7829
+  7841  7853  7867  7873  7877  7879  7883  7901  7907  7919
+
+ 415145345
+
+109170 statements executed in 13.68 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/procs.out b/usr/src/usr.bin/pascal/tstpx/out/procs.out
new file mode 100644 (file)
index 0000000..7850283
--- /dev/null
@@ -0,0 +1,9 @@
+Enter two lines
+abc
+i = 0   arg = px        
+i = 1   arg = ./procs   
+Jan '70 plus 415145934 secondsToday is 26 Feb 83  at  14:18:54 
+This process has used 283 + 50 milliseconds
+
+42 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pvs1.out b/usr/src/usr.bin/pascal/tstpx/out/pvs1.out
new file mode 100644 (file)
index 0000000..0a61f91
--- /dev/null
@@ -0,0 +1,4 @@
+unone[5] = 'A' =         65
+ PASS...6.6.5.4-1
+
+23 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pvs2.out b/usr/src/usr.bin/pascal/tstpx/out/pvs2.out
new file mode 100644 (file)
index 0000000..54c9c86
--- /dev/null
@@ -0,0 +1,6 @@
+
+Could not open #tmp.D4527: No such file or directory
+
+       Error in "t6p6p5p2d3"+1 near line 10.
+
+1 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/pvs3.out b/usr/src/usr.bin/pascal/tstpx/out/pvs3.out
new file mode 100644 (file)
index 0000000..5a1863f
--- /dev/null
@@ -0,0 +1,6 @@
+
+#tmp.D4534: Tried to read past end of file
+
+       Error in "t6p6p5p2d2"+8 near line 18.
+
+8 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/quicksort.out b/usr/src/usr.bin/pascal/tstpx/out/quicksort.out
new file mode 100644 (file)
index 0000000..270b750
--- /dev/null
@@ -0,0 +1,4 @@
+ 415145374
+ 415145374
+
+4067 statements executed in 0.45 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/random.out b/usr/src/usr.bin/pascal/tstpx/out/random.out
new file mode 100644 (file)
index 0000000..1f640fe
--- /dev/null
@@ -0,0 +1,13 @@
+     43     80    100    108    108     98     87    102     90     88
+    102     84     98    110    114     93    106     77     99     91
+    101     99     96    101     88     94    106     84    100    105
+    104     99     93     81    101    106    103    109     88     87
+     94    100    122     98    107     86    112    105    111    109
+    107    101    102     91    102     78    103    103    111    106
+    122     76    109    118    117    125    106     99     99    110
+    106    128     95     81    112    100    111     79     87     90
+    104     92    110    101    102    105     92    119     90    103
+    108     95     92    105    113    101     87    107     95     95
+     43      0      0      0      0      0      0      0      0      0
+
+30478 statements executed in 5.30 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/rdpal.out b/usr/src/usr.bin/pascal/tstpx/out/rdpal.out
new file mode 100644 (file)
index 0000000..2ee43f3
--- /dev/null
@@ -0,0 +1,7 @@
+hi there is not a palindrome
+abcdefgfedcba is a palindrome
+able was i ere i saw elba is a palindrome
+madam im adam is not a palindrome
+the quick brown fox jumps over the lazy dog is not a palindrome
+
+816 statements executed in 0.18 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/rdwt.out b/usr/src/usr.bin/pascal/tstpx/out/rdwt.out
new file mode 100644 (file)
index 0000000..2ead3b5
--- /dev/null
@@ -0,0 +1,2 @@
+Number: 
+5129 statements executed in 1.67 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/real.out b/usr/src/usr.bin/pascal/tstpx/out/real.out
new file mode 100644 (file)
index 0000000..3b5a4ef
--- /dev/null
@@ -0,0 +1,9 @@
+ 415145428
+ 4.79425538604203e-01
+ 7.07106781186548e-01
+-6.93147180559945e-01
+ 1.64872127070013e+00
+ 8.77582561890373e-01
+ 415145428
+
+7 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/realout.out b/usr/src/usr.bin/pascal/tstpx/out/realout.out
new file mode 100644 (file)
index 0000000..6333846
--- /dev/null
@@ -0,0 +1,10 @@
+i =         10   j25
+r =  3.14159000000000e+01   2 * r =  6.28318000000000e+01
+also r = 3.1e+01   and r =  3.142e+01   finally r =  31.416
+and r =             31.4159000000
+This program works? true
+This progr      true
+     This program works? true
+This true
+
+15 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/reset.out b/usr/src/usr.bin/pascal/tstpx/out/reset.out
new file mode 100644 (file)
index 0000000..99ea8a3
--- /dev/null
@@ -0,0 +1,6 @@
+
+Could not open #tmp.D4595: No such file or directory
+
+       Error in "test"+1 near line 4.
+
+1 statements executed in 0.00 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/scaltst.out b/usr/src/usr.bin/pascal/tstpx/out/scaltst.out
new file mode 100644 (file)
index 0000000..3d0a7ea
--- /dev/null
@@ -0,0 +1,7 @@
+  1.00
+pink
+orange
+false
+true
+
+8 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/sequin.out b/usr/src/usr.bin/pascal/tstpx/out/sequin.out
new file mode 100644 (file)
index 0000000..7d59371
--- /dev/null
@@ -0,0 +1,26 @@
+table[1] =          1         2         3         4
+table[2] =          1         2         4         3
+table[3] =          1         3         2         4
+table[4] =          1         3         4         2
+table[5] =          1         4         2         3
+table[6] =          1         4         3         2
+table[7] =          2         1         3         4
+table[8] =          2         1         4         3
+table[9] =          2         3         1         4
+table[10] =          2         3         4         1
+table[11] =          2         4         1         3
+table[12] =          2         4         3         1
+table[13] =          3         1         2         4
+table[14] =          3         1         4         2
+table[15] =          3         2         1         4
+table[16] =          3         2         4         1
+table[17] =          3         4         1         2
+table[18] =          3         4         2         1
+table[19] =          4         1         2         3
+table[20] =          4         1         3         2
+table[21] =          4         2         1         3
+table[22] =          4         2         3         1
+table[23] =          4         3         1         2
+table[24] =          4         3         2         1
+
+966 statements executed in 0.22 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/setest.out b/usr/src/usr.bin/pascal/tstpx/out/setest.out
new file mode 100644 (file)
index 0000000..d39a4cb
--- /dev/null
@@ -0,0 +1,6 @@
+Enter a number between 2 and 41.
+Numbers 2, 10..12, 17, and 37 print "false" all others "true".
+i =23
+The set opcodes work : [] mul plus minus in and rel or rel
+
+25 statements executed in 0.00 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/setret.out b/usr/src/usr.bin/pascal/tstpx/out/setret.out
new file mode 100644 (file)
index 0000000..21b0ed2
--- /dev/null
@@ -0,0 +1,4 @@
+before         36
+after         19
+
+4 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/shoemake.out b/usr/src/usr.bin/pascal/tstpx/out/shoemake.out
new file mode 100644 (file)
index 0000000..6418d3f
--- /dev/null
@@ -0,0 +1,2 @@
+
+3 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/size.out b/usr/src/usr.bin/pascal/tstpx/out/size.out
new file mode 100644 (file)
index 0000000..f3b8c33
--- /dev/null
@@ -0,0 +1,7 @@
+Enter an integer
+17 is the value       
+this is a test      
+enter a color
+The next color is yellow
+
+10 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/sort.out b/usr/src/usr.bin/pascal/tstpx/out/sort.out
new file mode 100644 (file)
index 0000000..01e3241
--- /dev/null
@@ -0,0 +1,2 @@
+
+225450 statements executed in 33.53 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/strngs.out b/usr/src/usr.bin/pascal/tstpx/out/strngs.out
new file mode 100644 (file)
index 0000000..5a6b16f
--- /dev/null
@@ -0,0 +1,14 @@
+= succeeds
+<> succeeds
+> succeeds
+< succeeds
+>= succeeds
+<= succeeds
+= succeeds
+<> succeeds
+> succeeds
+< succeeds
+>= succeeds
+<= succeeds
+
+30029 statements executed in 6.42 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t01.out b/usr/src/usr.bin/pascal/tstpx/out/t01.out
new file mode 100644 (file)
index 0000000..be6c877
--- /dev/null
@@ -0,0 +1,34 @@
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+                                  *
+
+2337 statements executed in 0.33 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t03.out b/usr/src/usr.bin/pascal/tstpx/out/t03.out
new file mode 100644 (file)
index 0000000..bc05d5e
--- /dev/null
@@ -0,0 +1,35 @@
+                                 *
+                                 :           *
+                                 :                   *
+                                 :                        *
+                                 :                        *
+                                 :                     *
+                                 :               *
+                                 :       *
+                                 *
+                          *      :
+                     *           :
+                  *              :
+                  *              :
+                    *            :
+                        *        :
+                            *    :
+                                 *
+                                 :   *
+                                 :      *
+                                 :        *
+                                 :        *
+                                 :       *
+                                 :     *
+                                 :  *
+                                 *
+                              *  :
+                             *   :
+                            *    :
+                           *     :
+                            *    :
+                              *  :
+                               * :
+                                 *
+
+3093 statements executed in 0.52 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t04.out b/usr/src/usr.bin/pascal/tstpx/out/t04.out
new file mode 100644 (file)
index 0000000..709c90f
--- /dev/null
@@ -0,0 +1,15 @@
+         1 i
+         2 ii
+         4 iiii
+         8 viii
+        16 xvi
+        32 xxxii
+        64 lxiiii
+       128 cxxviii
+       256 cclvi
+       512 dxii
+      1024 mxxiiii
+      2048 mmxxxxviii
+      4096 mmmmlxxxxvi
+
+342 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t05.out b/usr/src/usr.bin/pascal/tstpx/out/t05.out
new file mode 100644 (file)
index 0000000..52ededd
--- /dev/null
@@ -0,0 +1,3 @@
+        10 2.92896825396825e+00
+
+35 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t06.out b/usr/src/usr.bin/pascal/tstpx/out/t06.out
new file mode 100644 (file)
index 0000000..29c7307
--- /dev/null
@@ -0,0 +1,3 @@
+        10 2.92896825396825e+00
+
+24 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t07.out b/usr/src/usr.bin/pascal/tstpx/out/t07.out
new file mode 100644 (file)
index 0000000..0a0b6e2
--- /dev/null
@@ -0,0 +1,3 @@
+        10 2.92896825396825e+00
+
+25 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t08.out b/usr/src/usr.bin/pascal/tstpx/out/t08.out
new file mode 100644 (file)
index 0000000..723608b
--- /dev/null
@@ -0,0 +1,4 @@
+ 6.92647430559820e-01 6.92647430559820e-01
+ 5.55496913580901e-06 5.55496913581116e-06
+
+5509 statements executed in 0.73 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t09.out b/usr/src/usr.bin/pascal/tstpx/out/t09.out
new file mode 100644 (file)
index 0000000..604b27d
--- /dev/null
@@ -0,0 +1,5 @@
+       100         0
+         0         0
+     10000       -10
+
+19 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t10.out b/usr/src/usr.bin/pascal/tstpx/out/t10.out
new file mode 100644 (file)
index 0000000..6981af2
--- /dev/null
@@ -0,0 +1,6 @@
+ 2.00000000000000e+00         7 1.28000000000000e+02
+ 3.14159000000000e+00         2 9.86958772810000e+00
+ 9.86958772810000e+00         2 9.74087619226621e+01
+ 3.14159000000000e+00         4 9.74087619226621e+01
+
+60 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t11.out b/usr/src/usr.bin/pascal/tstpx/out/t11.out
new file mode 100644 (file)
index 0000000..b368f34
--- /dev/null
@@ -0,0 +1,6 @@
+        18        27         9
+       312      2142         6
+        61        53         1
+        98       868        14
+
+54 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t12.out b/usr/src/usr.bin/pascal/tstpx/out/t12.out
new file mode 100644 (file)
index 0000000..d74087d
--- /dev/null
@@ -0,0 +1,3 @@
+ 4.00000000000000e+00+ 6.00000000000000e+00i
+
+9 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t13.out b/usr/src/usr.bin/pascal/tstpx/out/t13.out
new file mode 100644 (file)
index 0000000..e9f68f5
--- /dev/null
@@ -0,0 +1,3 @@
+true
+
+23 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t14.out b/usr/src/usr.bin/pascal/tstpx/out/t14.out
new file mode 100644 (file)
index 0000000..a2215e3
--- /dev/null
@@ -0,0 +1,2 @@
+
+11 statements executed in 0.05 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t15.out b/usr/src/usr.bin/pascal/tstpx/out/t15.out
new file mode 100644 (file)
index 0000000..85e51a4
--- /dev/null
@@ -0,0 +1,57 @@
+         1         1
+         2         1
+         2         2
+         3         1
+         3         2
+         3         3
+         4         1
+         4         2
+         4         3
+         4         4
+         5         1
+         5         2
+         5         3
+         5         4
+         5         5
+         6         1
+         6         2
+         6         3
+         6         4
+         6         5
+         6         6
+         7         1
+         7         2
+         7         3
+         7         4
+         7         5
+         7         6
+         7         7
+         8         1
+         8         2
+         8         3
+         8         4
+         8         5
+         8         6
+         8         7
+         8         8
+         9         1
+         9         2
+         9         3
+         9         4
+         9         5
+         9         6
+         9         7
+         9         8
+         9         9
+        10         1
+        10         2
+        10         3
+        10         4
+        10         5
+        10         6
+        10         7
+        10         8
+        10         9
+        10        10
+
+287 statements executed in 0.10 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t16.out b/usr/src/usr.bin/pascal/tstpx/out/t16.out
new file mode 100644 (file)
index 0000000..13f7845
--- /dev/null
@@ -0,0 +1,23 @@
+program Main(input, output);
+procedure copy(var inp, out: text);
+       var
+               c: char;
+       begin
+               while not eof(inp) do
+               begin
+                       while not eoln(inp) do
+                       begin
+                               c := inp^;
+                               out^ := c;
+                               put(out);
+                               get(inp);
+                       end;
+                       writeln;
+                       get(inp);
+               end;
+       end;
+begin
+       copy(input, output);
+end.
+
+1441 statements executed in 0.30 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t17.out b/usr/src/usr.bin/pascal/tstpx/out/t17.out
new file mode 100644 (file)
index 0000000..52524c0
--- /dev/null
@@ -0,0 +1,35 @@
+                                 *
+                                             *
+                                                     *
+                                                          *
+                                                          *
+                                                       *
+                                                 *
+                                         *
+                                 *
+                          *
+                     *
+                  *
+                  *
+                    *
+                        *
+                            *
+                                 *
+                                     *
+                                        *
+                                          *
+                                          *
+                                         *
+                                       *
+                                    *
+                                 *
+                              *
+                             *
+                            *
+                           *
+                            *
+                              *
+                               *
+                                 *
+
+166 statements executed in 0.12 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t18.out b/usr/src/usr.bin/pascal/tstpx/out/t18.out
new file mode 100644 (file)
index 0000000..1d91a57
--- /dev/null
@@ -0,0 +1,3 @@
+ 1.00000000000000e+00         1
+
+4 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t19.out b/usr/src/usr.bin/pascal/tstpx/out/t19.out
new file mode 100644 (file)
index 0000000..257abe0
--- /dev/null
@@ -0,0 +1,14 @@
+o <> z
+o >= z
+o > z
+z < o
+z <= o
+z <> o
+o <= o
+o = o
+o >= o
+z <= z
+z = z
+z >= z
+
+38 statements executed in 0.08 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t6.6.3.1-5.out b/usr/src/usr.bin/pascal/tstpx/out/t6.6.3.1-5.out
new file mode 100644 (file)
index 0000000..2dd6e58
--- /dev/null
@@ -0,0 +1,3 @@
+ PASS...6.6.3.1-5
+
+5 statements executed in 0.02 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/t6.6.3.4-2.out b/usr/src/usr.bin/pascal/tstpx/out/t6.6.3.4-2.out
new file mode 100644 (file)
index 0000000..888e724
--- /dev/null
@@ -0,0 +1,3 @@
+ PASS...6.6.3.4-2
+
+21 statements executed in 0.03 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/testeoln.out b/usr/src/usr.bin/pascal/tstpx/out/testeoln.out
new file mode 100644 (file)
index 0000000..161f1cf
--- /dev/null
@@ -0,0 +1,11 @@
+in main: eoln = false   eof = false   ch = a
+in main: eoln = false   eof = false   ch = b
+in main: eoln = true   eof = false   ch = c
+in eolncode: eoln = false   eof = false   ch =  
+in main: eoln = true   eof = false   ch =      
+in eolncode: eoln = 
+#tmp.D4910: eoln is undefined when eof is true
+
+       Error in "test"+10 near line 17.
+
+20 statements executed in 0.07 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/testio.out b/usr/src/usr.bin/pascal/tstpx/out/testio.out
new file mode 100644 (file)
index 0000000..61f4f3c
--- /dev/null
@@ -0,0 +1,51 @@
+ 10.0e+000.00.0e+000.01.0 1
+ 21.0e-010.10-1.0e-01-0.102.00  2
+ 33.0e-010.300-3.0e-01-0.3003.000   3
+ 47.0e-010.7000-7.0e-01-0.70004.0000    4
+ 51.5e+001.50000-1.5e+00-1.500005.00000     5
+ 63.1e+003.100000-3.1e+00-3.1000006.000000      6
+ 76.3e+006.3000000-6.3e+00-6.30000007.0000000       7
+ 8 1.3e+0112.70000000-1.3e+01-12.700000008.00000000        8
+ 9 2.55e+0125.500000000-2.55e+01-25.5000000009.000000000         9
+10 5.110e+0151.1000000000-5.110e+01-51.100000000010.0000000000         10
+11 1.0230e+02102.30000000000-1.0230e+02-102.3000000000011.00000000000          11
+12 2.04700e+02204.700000000000-2.04700e+02-204.70000000000012.000000000000           12
+13 4.095000e+02409.5000000000000-4.095000e+02-409.500000000000013.0000000000000            13
+14 8.1910000e+02819.10000000000001-8.1910000e+02-819.1000000000000114.00000000000000             14
+15 1.63830000e+031638.300000000000000-1.63830000e+03-1638.30000000000000015.000000000000000              15
+ 10.0e+000.00.0e+000.01.0 1
+ 21.0e-010.10-1.0e-01-0.102.00  2
+ 33.0e-010.300-3.0e-01-0.3003.000   3
+ 47.0e-010.7000-7.0e-01-0.70004.0000    4
+ 51.5e+001.50000-1.5e+00-1.500005.00000     5
+ 63.1e+003.100000-3.1e+00-3.1000006.000000      6
+ 76.3e+006.3000000-6.3e+00-6.30000007.0000000       7
+ 8 1.3e+0112.70000000-1.3e+01-12.700000008.00000000        8
+ 9 2.55e+0125.500000000-2.55e+01-25.5000000009.000000000         9
+10 5.110e+0151.1000000000-5.110e+01-51.100000000010.0000000000         10
+11 1.0230e+02102.30000000000-1.0230e+02-102.3000000000011.00000000000          11
+12 2.04700e+02204.700000000000-2.04700e+02-204.70000000000012.000000000000           12
+13 4.095000e+02409.5000000000000-4.095000e+02-409.500000000000013.0000000000000            13
+14 8.1910000e+02819.10000000000001-8.1910000e+02-819.1000000000000114.00000000000000             14
+15 1.63830000e+031638.300000000000000-1.63830000e+03-1638.30000000000000015.000000000000000              15
+red
+green
+blue
+yellow
+orange
+violet
+purple
+foobar cc         13        13        11 1.30000000000000e+01        13       d         15        143
+->12345<-
+->123456<-
+->1234567<-
+->12345678<-
+->123456789<-
+->1234567890<-
+-> 1234567890<-
+->  1234567890<-
+->   1234567890<-
+->    1234567890<-
+->     1234567890<-
+
+133 statements executed in 0.42 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/transpose.out b/usr/src/usr.bin/pascal/tstpx/out/transpose.out
new file mode 100644 (file)
index 0000000..18e4db6
--- /dev/null
@@ -0,0 +1,23 @@
+bcdefghijk
+defghijklm
+fghijklmno
+hijklmnopq
+jklmnopqrs
+lmnopqrstu
+nopqrstuvw
+pqrstuvwxy
+rstuvwxyz{
+tuvwxyz{|}
+
+bdfhjlnprt
+cegikmoqsu
+dfhjlnprtv
+egikmoqsuw
+fhjlnprtvx
+gikmoqsuwy
+hjlnprtvxz
+ikmoqsuwy{
+jlnprtvxz|
+kmoqsuwy{}
+
+887 statements executed in 0.18 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/out/wnj.out b/usr/src/usr.bin/pascal/tstpx/out/wnj.out
new file mode 100644 (file)
index 0000000..c44d866
--- /dev/null
@@ -0,0 +1,22 @@
+
+in elements
+
+in elements
+member:        23
+member:        45
+ok
+
+in elements
+member:        -1
+member:        23
+member:        45
+
+in elements
+member:        -1
+member:        23
+member:        45
+member:        80
+
+in elements
+
+856 statements executed in 0.13 seconds cpu time.
diff --git a/usr/src/usr.bin/pascal/tstpx/pc/makefile b/usr/src/usr.bin/pascal/tstpx/pc/makefile
new file mode 100644 (file)
index 0000000..1eaa5dc
--- /dev/null
@@ -0,0 +1,50 @@
+SRCDIR = ../src
+INDIR = ../in
+OUTDIR = ../out
+
+NO_INPUT = align ancestor ancestor2 \
+       backtracerr bench binrdwt \
+       clock cutter \
+       eightqueens \
+       fay ffunc fnested form fproc funcs \
+       gencard gordon \
+       hamachi \
+       math \
+       nonlocgoto numericio \
+       palindromes permute \
+       pcextn powersoftwo \
+       primes pvs1 pvs2 pvs3 \
+       quicksort \
+       random real realout reset \
+       scaltst sequin setret shoemake \
+       sort strngs \
+       t01 t03 t04 t05 \
+       t06 t07 t08 t09 t10 \
+       t11 t12 t13 t14 t15 \
+       t17 t18 t19 \
+       t6.6.3.1-5 t6.6.3.4-2 \
+       testeoln testio transpose \
+       wnj
+
+HAS_INPUT = basic cfor cntchars expotst hanoi hugereal index insan \
+       nmaze pcerror peter pretty procs rdpal rdwt setest size t16
+
+all: ${NO_INPUT} ${HAS_INPUT}
+
+clean:
+       rm -f ${NO_INPUT} ${HAS_INPUT}
+       rm -f \#* a.out core out f file foo *.list
+
+${NO_INPUT}:
+       @echo ""
+       pc ${PFLAGS} -o $@ ${SRCDIR}/$@.p
+       ./$@ > out 2>&1 
+       -diff ${OUTDIR}/$@.out out
+       cp /dev/null $@
+
+${HAS_INPUT}:
+       @echo ""
+       pc ${PFLAGS} -o $@ ${SRCDIR}/$@.p
+       ./$@ <${INDIR}/$@.in > out 2>&1
+       -diff ${OUTDIR}/$@.out out
+       cp /dev/null $@
diff --git a/usr/src/usr.bin/pascal/tstpx/pi/Makefile b/usr/src/usr.bin/pascal/tstpx/pi/Makefile
new file mode 100644 (file)
index 0000000..83f4168
--- /dev/null
@@ -0,0 +1,60 @@
+TRANSLATE = pi
+EXECUTE = -px
+
+SRCDIR = ../src
+INDIR = ../in
+OUTDIR = ../out
+
+NO_INPUT = align ancestor ancestor2 \
+       backtracerr bench binrdwt \
+       clock cutter \
+       eightqueens \
+       fay ffunc fnested form fproc funcs \
+       gencard gordon \
+       hamachi \
+       math \
+       nonlocgoto numericio \
+       palindromes permute \
+       piextn powersoftwo \
+       primes pvs1 pvs2 pvs3 \
+       quicksort \
+       random real realout reset \
+       scaltst sequin setret shoemake \
+       sort strngs \
+       t01 t03 t04 t05 \
+       t06 t07 t08 t09 t10 \
+       t11 t12 t13 t14 t15 \
+       t17 t18 t19 \
+       t6.6.3.1-5 t6.6.3.4-2 \
+       testeoln testio transpose \
+       wnj
+
+HAS_INPUT = basic cfor cntchars expotst hanoi hugereal index insan \
+       nmaze pcerror peter pretty procs rdpal rdwt setest size t16
+
+all: notice ${NO_INPUT} ${HAS_INPUT}
+
+notice:
+       @echo ""
+       @echo "the following programs should fail during execution:"
+       @echo " pvs2, pvs3, reset, testeoln, pcerror"
+
+clean:
+       rm -f ${NO_INPUT} ${HAS_INPUT}
+       rm -f \#* f file foo obj out all.list
+
+${NO_INPUT}:
+       @echo ""
+       ${TRANSLATE} ${SRCDIR}/$@.p
+       mv obj $@
+       ${EXECUTE} ./$@ > out 2>&1
+       -diff ${OUTDIR}/$@.out out
+       cp /dev/null $@
+
+${HAS_INPUT}:
+       @echo ""
+       ${TRANSLATE} ${SRCDIR}/$@.p
+       mv obj $@
+       ${EXECUTE} ./$@ < ${INDIR}/$@.in > out 2>&1
+       -diff ${OUTDIR}/$@.out out
+       cp /dev/null $@
diff --git a/usr/src/usr.bin/pascal/tstpx/src/align.p b/usr/src/usr.bin/pascal/tstpx/src/align.p
new file mode 100644 (file)
index 0000000..b438ab8
--- /dev/null
@@ -0,0 +1,22 @@
+program test(output);
+type
+name = array[1..4] of char;
+rec = record
+       x :boolean;
+       y :name;
+       end;
+var
+foo, bar :rec;
+nm :name;
+begin
+foo.y := '    ';
+foo.y[1] := 'n';
+bar := foo;
+nm := '    ';
+nm[1] := 'n';
+writeln('foo =', foo.y, '<- bar =', bar.y, '<- nm =', nm, '<-');
+if (foo.y = nm) then
+       writeln('cmp works')
+else
+       writeln('cmp fails');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/ancestor.p b/usr/src/usr.bin/pascal/tstpx/src/ancestor.p
new file mode 100644 (file)
index 0000000..b791d6c
--- /dev/null
@@ -0,0 +1,24 @@
+program ancestor(output);
+{R.W.Floyd: 'Ancestor', Comm.ACM 6-62 and 3-63, Alg.96}
+  const n = 20;
+  var i,j,k: integer;
+      r: array [1..n, 1..n] of boolean;
+begin { r[i,j] = "i is a parent of j"}
+  for i := 1 to n do
+    for j := 1 to n do r[i,j] := false;
+  for i := 1 to n do
+    if i mod 10 <> 0 then r[i,i+1] := true;
+  writeln(wallclock);
+  for i := 1 to n do
+    for j := 1 to n do
+      if r[j,i] then
+        for k := 1 to n do
+          if r[i,k] then r[j,k] := true;
+  writeln(wallclock);
+  for i := 1 to n do
+  begin write(' ');
+    for j := 1 to n do write(chr(ord(r[i,j])+ord('0')));
+    writeln
+  end ;
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/ancestor2.p b/usr/src/usr.bin/pascal/tstpx/src/ancestor2.p
new file mode 100644 (file)
index 0000000..f8ebb45
--- /dev/null
@@ -0,0 +1,22 @@
+program ancestor2(output);
+{ancestor algorithm using sets instead of boolean matrix}
+  const n = 20;
+  var i,j: integer;
+      r: array [1..n] of set of 1..n;
+begin { j in r[i] = "i is a parent of j"}
+  for i := 1 to n do
+    if i mod 10 <> 0 then r[i] := [i+1] else r[i] := [];
+  writeln(wallclock);
+  for i := 1 to n do
+    for j := 1 to n do
+      if i in r[j] then
+               r[j] := r[i]+r[j];
+  writeln(wallclock);
+  for i := 1 to n do
+  begin write(' ');
+    for j := 1 to n do
+      if j in r[i] then write('1') else write('.');
+    writeln
+  end ;
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/backtracerr.p b/usr/src/usr.bin/pascal/tstpx/src/backtracerr.p
new file mode 100644 (file)
index 0000000..1d7c351
--- /dev/null
@@ -0,0 +1,55 @@
+program frecur( output );
+    var
+       time : integer;
+       direction : integer;
+    function pad( j : integer ) : integer;
+       const
+           indent = 4;
+       begin
+           {}
+           if ( j <= 0 ) then begin
+               j := 1;
+           end;
+           {}
+           pad := j * indent;
+       end;
+    procedure a( procedure xx );
+       begin
+           writeln( ' ':pad(time) , 'a: about to       xx()' );
+           xx;
+           writeln( ' ':pad(time) , 'a: back from      xx()' );
+       end;
+    procedure b( procedure yy );
+       procedure c;
+           begin
+               writeln( ' ':pad(time) , 'c: about to   a(yy)' );
+               time := time + direction;
+               a( yy );
+               writeln( ' ':pad(time) , 'c: back from  a(yy)' );
+           end;
+       begin
+           if ( direction = 1 ) then begin
+               if ( time > 10 ) then begin
+                   direction := -direction;
+               end;
+               time := time + direction;
+               writeln( ' ':pad(time) , 'b: about to   b(c)' );
+               b( c );
+               writeln( ' ':pad(time) , 'b: back from  b(c)' );
+           end else begin
+               writeln( ' ':pad(time) , 'b: about to   yy' );
+               yy;
+               writeln( ' ':pad(time) , 'b: back from  yy' );
+           end;
+       end;
+       procedure d;
+           begin
+               writeln( 'd:' );
+           end;
+    begin
+       time := 1;
+       direction := 1;
+       writeln( 'program: about to     b( d )' );
+       b( d );
+       writeln( 'program: back from    b( d )' );
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/basic.p b/usr/src/usr.bin/pascal/tstpx/src/basic.p
new file mode 100644 (file)
index 0000000..cd2196e
--- /dev/null
@@ -0,0 +1,18 @@
+program test(input,output);
+
+var
+i, j :integer;
+
+procedure print(
+{value}        num1 :integer;
+ var   num2 :integer);
+
+begin
+writeln(num1,num2:1);
+end;
+
+
+begin
+read(i,j);
+print(i,j);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/bench.p b/usr/src/usr.bin/pascal/tstpx/src/bench.p
new file mode 100644 (file)
index 0000000..eb5770d
--- /dev/null
@@ -0,0 +1,10 @@
+program bench(output);
+var a:alfa;
+    i,j,k: integer;
+begin
+ writeln(wallclock);
+ for i := 1 to 1000 do
+    for j := 1 to 100 do
+       k := 0;
+ writeln(wallclock)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/binrdwt.p b/usr/src/usr.bin/pascal/tstpx/src/binrdwt.p
new file mode 100644 (file)
index 0000000..5360d2f
--- /dev/null
@@ -0,0 +1,21 @@
+program binrdwt(input, output);
+
+const
+LAST=1;
+
+type
+this=array[1..1024] of char;
+
+var
+binfil :file of this;
+i :integer;
+x :this;
+
+begin
+rewrite(binfil);
+for i := 1 to LAST do
+       write(binfil, x);
+reset(binfil);
+for i := 1 to LAST do
+       read(binfil, x);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/cfor.p b/usr/src/usr.bin/pascal/tstpx/src/cfor.p
new file mode 100644 (file)
index 0000000..58d89b6
--- /dev/null
@@ -0,0 +1,58 @@
+{$t- No runtime tests}
+
+program cfor(input,output);
+
+type
+chrint=-120..120;
+sint=-1000..1000;
+base=array[1..2] of record
+       i :chrint;
+       j :sint;
+       k :integer;
+       l :real;
+       end;
+
+var
+i :chrint;
+j :sint;
+k :integer;
+rec :base;
+
+begin
+writeln('Enter -> 10, 1000, 100000, 1.0e+10');
+with rec[1] do begin
+       read(i,j,k,l);
+       writeln('Data echo ->',i,j,k,l);
+       end;
+for i:=-1 to 1 do
+       case i of
+       0: write(' loop');
+       1: writeln(' works');
+       -1: write('This');
+       end;
+for j:=500 to 501 do
+       case j of
+       500: write('Case');
+       501: writeln(' checks');
+       end;
+for k:=54000 to 54002 do
+       case k of
+       54000: write('Success');
+       54002: writeln(' assurred');
+       54001:write(' is');
+       end;
+write('i = ');
+for i:=5 downto 3 do
+       write(i);
+writeln;
+write('j = ');
+for j:=1000 downto 998 do
+       write(j);
+writeln;
+write('k = ');
+for k:=100001 downto 99999 do
+       write(k);
+writeln;
+writeln('case and for work':20,'!':2,'!');
+write('Enter a character here ->',input^,'<- there it is');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/clock.p b/usr/src/usr.bin/pascal/tstpx/src/clock.p
new file mode 100644 (file)
index 0000000..f613ca5
--- /dev/null
@@ -0,0 +1,8 @@
+program writec(output);
+var a:alfa;
+begin
+ writeln(wallclock);
+ date(a); writeln(a);
+ time(a); writeln(a);
+ writeln(wallclock)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/cntchars.p b/usr/src/usr.bin/pascal/tstpx/src/cntchars.p
new file mode 100644 (file)
index 0000000..928c687
--- /dev/null
@@ -0,0 +1,23 @@
+program countcharacters(input,output);
+  var ch: char;
+    c0,c1,c2,c3,c4: integer;  {counters}
+begin writeln(wallclock); { linelimit(output, -1); }
+  c0 := 0; c1 := 0; c2 := 0; c3 := 0; c4 := 0;
+  while not eof(input) do
+  begin write(' '); c0 := c0+1;
+    while not eoln(input) do
+    begin read(ch); write(ch);
+      if ch = ' ' then c1 := c1+1 else
+      if ch in ['a'..'z'] then c2 := c2+1 else
+      if ch in ['0'..'9'] then c3 := c3+1 else c4 := c4+1
+    end ;
+    readln; writeln
+  end ;
+  writeln(wallclock);
+  writeln(c0,' lines');
+  writeln(c1,' blanks');
+  writeln(c2,' letters');
+  writeln(c3,' digits');
+  writeln(c4,' special characters');
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/cutter.p b/usr/src/usr.bin/pascal/tstpx/src/cutter.p
new file mode 100644 (file)
index 0000000..5df9eb6
--- /dev/null
@@ -0,0 +1,8 @@
+program test(output);
+
+procedure foo(x :real);
+begin end;
+
+begin
+foo(0);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/eightqueens.p b/usr/src/usr.bin/pascal/tstpx/src/eightqueens.p
new file mode 100644 (file)
index 0000000..d87086c
--- /dev/null
@@ -0,0 +1,46 @@
+program eightqueens(output);
+const doprint = 1;
+var i : integer;
+    a : array [ 1..8 ] of boolean;
+    b : array [ 2..16] of boolean;
+    c : array [-7..7 ] of boolean;
+    x : array [ 1..8 ] of integer;
+    safe : boolean;
+
+   procedure print;
+      var k: integer;
+   begin
+       if doprint = 1 then begin
+               write(' ');
+             for k := 1 to 8 do write(x[k]:2);
+             writeln;
+             end
+   end ;
+
+procedure trycol(j : integer);
+   var i : integer;
+
+   procedure setqueen;
+   begin a[i] := false; b[i+j] := false; c[i-j] := false;
+   end ;
+
+   procedure removequeen;
+   begin a[i] := true; b[i+j] := true; c[i-j] := true;
+   end ;
+
+    begin
+      i := 0;
+      repeat i := i+1; safe := a[i] and b[i+j] and c[i-j];
+         if safe then
+         begin setqueen; x[j] := i;
+            if j < 8 then trycol(j+1) else print;
+            removequeen
+         end
+      until i = 8
+end;
+
+begin print; for i := 1 to 8 do a[i] := true;
+      for i := 2 to 16 do b[i] := true;
+      for i := -7 to 7 do c[i] := true;
+   trycol(1);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/expotst.p b/usr/src/usr.bin/pascal/tstpx/src/expotst.p
new file mode 100644 (file)
index 0000000..3342610
--- /dev/null
@@ -0,0 +1,9 @@
+program test(output);
+var
+x :real;
+begin
+while not eof do begin
+       readln(x);
+       writeln(expo(x))
+       end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/fay.p b/usr/src/usr.bin/pascal/tstpx/src/fay.p
new file mode 100644 (file)
index 0000000..9ae36a8
--- /dev/null
@@ -0,0 +1,217 @@
+{ AN OPEN CHALLENGE TO ALL PASCAL COMPILERS:  Compile this program
+   correctly and produce the correct output. 
+
+  Send responses, counter-challenges, etc., to:
+   Tom Pennello
+   Computer and Information Sciences
+   University of California
+   Santa Cruz, CA.  95064
+}
+
+program p(output);
+type integer = -32767..32768; node = 0..4500;
+var Debug: boolean;
+
+procedure EachUSCC( { of relation R }
+      { Pass in an iterator to generate the nodes to be searched,
+        the relation on the nodes, a procedure to do information
+        propagation when V R W is discovered, a procedure
+        to take each SCC found, and a procedure to yield each
+        node in the graph. 
+        We require that the nodes be of a scalar type so that
+        an array may be indexed by them.  Also passed in is the
+        upper bound of the node type. }
+      procedure EachUnode(procedure P(T:node)); { Yields each node in graph }
+      procedure EachUnodeUtoUsearch(procedure SearchU(V:node));
+      procedure R(V:node; procedure DoUsuccessor(W:node));
+      procedure Propagate(V,W:node); { called when V R W is discovered }
+      procedure TakeUSCC(Root:node; procedure Each(procedure P(T:node)));
+      LastUnode: integer
+      ); 
+
+   type
+      A = array[node] of integer; { range 0..Infinity (below) }
+   var N: ^A;  SP: integer;
+      Stack: array[node {1..LastUnode}] of node;
+      Infinity: integer; { LastUnode+1 }
+
+   procedure P(T:node); begin N^[T] := 0; end;
+   
+   procedure Search(V:node);
+      var I,T:integer;
+      procedure DoUsuccessor(W:node);
+         begin
+         Search(W);
+         if N^[W] < N^[V] then N^[V] := N^[W];
+         Propagate(V,W);
+         end;
+
+      { EachUmember is yielded by EachUSCC when an SCC has been found. }
+      procedure EachUmember(procedure P(TU:node));
+         var I:integer;
+         begin { yield each member of current SCC }
+         for I := SP downto T do P(Stack[I]);
+         end;
+
+      procedure YieldUSCC; 
+         begin
+if Debug then writeln('YieldUSCC passes',V,' to TakeUSCC');
+         TakeUSCC(V,EachUmember);
+         end; 
+
+      begin
+      if N^[V] = 0 then begin { stack the node }
+if Debug then writeln('stacking ',V);
+         SP := SP+1;
+         Stack[SP] := V;  N^[V] := SP;
+if Debug then writeln('Doing successors of ',V);
+         R(V,DoUsuccessor);
+if Debug then writeln('Now checking if ',V,' is an SCC root');
+         if V = Stack[N^[V]] then begin { V is root of an SCC }
+            T := N^[V];
+if Debug then writeln(V,' is an SCC root; SP=',SP,' T=',T);
+            for I := SP downto T do N^[Stack[I]] := Infinity;
+            if SP <> T then begin
+if Debug then writeln('Yield SCC should pass ',V,' out to TakeUSCC');
+               YieldUSCC;
+               end;
+            SP := T-1;
+            end;
+         end;
+      end; 
+   begin
+   Infinity := LastUnode+1;
+   new(N); EachUnode(P);
+   SP := 0;
+   EachUnodeUtoUsearch(Search);
+   dispose(N);
+   end;
+
+procedure Outer; { needed to produce bug in Berkeley Pascal compiler }
+   procedure q;
+      procedure EachUnodeUtoUsearch(procedure Search(T:node));
+         begin 
+         Search(1);
+         end;
+      procedure EachUnode(procedure P(T:node));
+         begin P(1); P(2);
+         end;
+      procedure R(V:node; procedure P(W:node));
+         begin 
+         { Defines graph with edges 1->2 and 2->1 }
+         { Thus, the graph contains one SCC:  [1,2] }
+         case V of
+            1: P(2); 
+            2: P(1);
+            end;
+         end;
+      procedure Propagate(V,W:node); begin end;
+      procedure TakeUSCC(Root:node; procedure Each(procedure P(T:node)));
+         procedure P(T:node); begin write(T); end;
+         begin
+         writeln('TakeUSCC receives V=',Root,' from YieldUSCC');
+         writeln('The SCC''s constituents are:');
+         Each(P); writeln;
+         end;
+      begin
+      EachUSCC(EachUnode,EachUnodeUtoUsearch,R,Propagate,TakeUSCC,2);
+      end;
+
+procedure Doit;
+   begin
+   q;
+   end;
+
+begin
+Doit;
+end;
+
+begin
+Debug := true;
+Outer;
+end.
+
+{----------------------------------------------------------------
+  An alternate version of this program, written in a language 
+  supporting iterators, iterators as parameters, iterators
+  as yielded results of iterators, and the ability to yield more
+  than one thing, might be as follows:
+ ----------------------------------------------------------------
+
+iterator EachUSCC(
+   iterator EachUnode:node;
+   iterator EachUnodeUtoUsearch:node;
+   iterator R(V:node):node;
+   procedure Propagate(V,W:node);
+   LastUnode:node
+                 ):
+   (Root:node; iterator EachUnodeUinUSCC:node);
+   # EachUSCC yields two results:  the Root of the SCC,
+   # and an iterator that yields each member of that SCC.
+
+   type A = aray[node] of integer;
+   var N: ^A; SP: integer;
+       Stack: array[node] of node;
+       Infinity: integer;
+   procedure Search(V);
+      var T: integer;
+      iterator EachUmember:node;
+         begin
+         for I := SP downto T do P(Stack[I]);
+         end;
+      begin
+      if N^[V] = 0 then begin
+         SP := SP+1;  Stack[SP] := V;  N^[V] := SP;
+         for W in R(V) do begin   # Search successors of V.
+            Search(W);
+            if N^[W] < N^[V] then N^[V] := N^[W];
+            Propagate(V,W);
+            end;
+         if V = Stack[N^[V]] then begin 
+            T := N^[V];           # V is an SCC root.
+            for I := SP downto T do N^[Stack[I]] := Infinity;
+            if SP <> T then       # Non-trivial SCC.
+               yield(V,EachUmember);
+            SP := T-1;
+            end;
+         end;
+      end;
+
+   begin
+   Infinity := LastUnode+1;
+   new(N);
+   for T in EachUnode() do N^[T] := 0;  # for loops declare their
+   SP := 0;                             # control variable as a constant.
+   for V in EachUnodeUtoUsearch() do Search(V);
+   dispose(N);
+   end;
+
+# Sample use of EachUSCC:
+
+iterator EachUnodeUtoUsearch:node;
+   begin 
+   yield(1);
+   end;
+iterator EachUnode:node;
+   begin
+   yield(1); yield(2);
+   end;
+iterator R(V:node):node;
+   begin
+   if V = 1 then yield(2) else yield(1);
+   end;
+procedure Propagate(V,W:node); begin end;
+
+procedure UseUEachUSCC;
+   begin
+   for (Root,EachUmember) in 
+       EachUSCC(EachUnode,EachUnodeUtoUsearch,R,Propagate,TakeUSCC,2) do
+      begin
+      writeln('Root of received SCC is ',Root);
+      writeln('Constituents of the SCC are:');
+      for I in EachUmember() do write(I);
+      writeln;
+      end;
+   end;
+}
diff --git a/usr/src/usr.bin/pascal/tstpx/src/ffunc.p b/usr/src/usr.bin/pascal/tstpx/src/ffunc.p
new file mode 100644 (file)
index 0000000..92a727a
--- /dev/null
@@ -0,0 +1,22 @@
+program forfunc( output );
+    
+    var
+       x, z : integer;
+
+    function foo : integer;
+       begin
+           z := z + 1;
+           foo := z;
+       end;
+
+    function bar( function y : integer ; x : integer ) : integer;
+       begin
+           bar := y;
+           writeln('in bar x = ', x:1);
+       end;
+
+    begin
+       z := 1;
+       x := bar (foo, foo);
+        writeln('in forfunc bar = ', x:1);
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/fnested.p b/usr/src/usr.bin/pascal/tstpx/src/fnested.p
new file mode 100644 (file)
index 0000000..7e8b321
--- /dev/null
@@ -0,0 +1,26 @@
+program test(output);
+var
+i :integer;
+    function f4( var i :integer;
+               r : real;
+               function f1(r : real): real;
+               procedure p1(var i:integer; function bol(r :real): real)
+       ) :boolean;
+       begin
+       write('f4', i:2, r:5:2, f1(i):5:2, f1(r):2:0);
+       p1(i, f1);
+       f4 := true;
+       end;
+    procedure pr1(var i:integer; function bol(r : real): real);
+       begin
+       write(' pr1', bol(i):5:2);
+       end;
+    function oneover(r : real) : real;
+       begin
+       oneover := 1 / r;
+       end;
+    begin
+       i := 4;
+       writeln('I should print->f4 4 0.25 0.25 4 pr1 0.25 true<-');
+       writeln(f4(i, 0.25, oneover, pr1):5);
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/form.p b/usr/src/usr.bin/pascal/tstpx/src/form.p
new file mode 100644 (file)
index 0000000..8545000
--- /dev/null
@@ -0,0 +1,27 @@
+program test(output);
+
+       procedure foo0(procedure bar);
+               begin
+               bar
+               end;
+
+       procedure foo1(x :integer; procedure bar(i :integer));
+               begin
+               bar(x)
+               end;
+
+       procedure zero;
+               begin
+               writeln('I take no parameters');
+               end;
+
+       procedure one(z :integer);
+               begin
+               writeln('My argument is ',z:1);
+               end;
+
+       begin
+       foo0(zero);
+       foo1(12, one);
+       writeln('success');
+       end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/fproc.p b/usr/src/usr.bin/pascal/tstpx/src/fproc.p
new file mode 100644 (file)
index 0000000..eef484d
--- /dev/null
@@ -0,0 +1,47 @@
+program fproc(output);
+    var
+    i :integer;
+
+    procedure print(function frtn :integer);
+       begin
+           write(frtn:3,'   formal routine =');
+       end;
+
+    procedure lvl1(function form: integer);
+       label   1;
+       var
+       loc :integer;
+
+       function eval :integer;
+           begin
+               if loc = 8 then begin
+                       writeln(' non-local jump');
+                       goto 1;
+               end;
+               eval := loc;
+           end;
+
+    begin
+       loc := i;
+       i := i - 1;
+       if (loc = 4) or (loc = 8) then
+               lvl1(eval)
+       else if loc > 0 then
+               lvl1(form);
+1:     write('Stack frame:',loc:3,'   formal print =');
+       print(form);
+       writeln(form:3);
+    end;
+
+    function geval :integer;
+       begin
+           geval := i;
+       end;
+
+    begin
+       writeln('This should print levels 0-3, with formal values of 4.');
+       writeln('Level 4 should jump to level 8.');
+       writeln('Finally levels 8-10 should print with formal values of -1.');
+       i := 10;
+       lvl1(geval);
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/gencard.p b/usr/src/usr.bin/pascal/tstpx/src/gencard.p
new file mode 100644 (file)
index 0000000..e3a71f6
--- /dev/null
@@ -0,0 +1,17 @@
+program gencard(output);
+var
+cvt :record
+       case boolean of
+       true:(int :0..255);
+       false:(st :set of 0..15);
+       end;
+i :integer;
+
+begin
+for i:=0 to 255 do begin
+       cvt.int:=i;
+       write((card(cvt.st)):1,', ');
+       if (i+1) mod 16 = 0 then
+               writeln;
+       end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/gordon.p b/usr/src/usr.bin/pascal/tstpx/src/gordon.p
new file mode 100644 (file)
index 0000000..7ca4a56
--- /dev/null
@@ -0,0 +1,26 @@
+program ffunc( output );
+    type
+       comparisons = ( less , equal , greater );
+    function insert(
+           function comparitor( this , that : integer ) : comparisons;
+           here , there : integer ) : boolean;
+       function equality : boolean;
+           begin
+               if comparitor( here , there ) = equal then begin
+                   equality := true
+               end else begin
+                   equality := false
+               end
+           end;
+       begin
+           insert := equality;
+       end;
+    function compare( this , that : integer ) : comparisons;
+       begin
+                if this < that then compare := less
+           else if this = that then compare := equal
+           else compare := greater
+       end;
+    begin
+       writeln( insert( compare , 17 , 23 ) );
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/hamachi.p b/usr/src/usr.bin/pascal/tstpx/src/hamachi.p
new file mode 100644 (file)
index 0000000..a8584e9
--- /dev/null
@@ -0,0 +1,23 @@
+program test(input, output);
+
+procedure x(procedure y(a:  integer));
+   function b:  integer;
+   begin
+      y(2);
+      b:=5;
+   end;
+
+begin
+   y(1);
+   writeln(output, 'Function b returns ', b);
+end;
+
+procedure z(a:  integer);
+begin
+   writeln(output, 'Answer is ', a:0);
+end;
+
+
+begin
+   x(z);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/hanoi.p b/usr/src/usr.bin/pascal/tstpx/src/hanoi.p
new file mode 100644 (file)
index 0000000..7be6c86
--- /dev/null
@@ -0,0 +1,35 @@
+program hanoi(input,output);
+const print = 0;
+       DISK = 14;
+var num: array[1..3] of integer;
+       ow: integer;
+    cnt: integer;
+    disk: integer;
+procedure mov(n,f,t : integer);
+var o: integer;
+begin
+       if n = 1 then begin
+               num[f] := num[f] - 1;
+               num[t] := num[t] - 1;
+               if print = 1 then writeln('Move ',f, ' to ', t);
+               cnt := cnt + 1;
+               end
+       else begin
+               o := 6 - (f+t);
+               mov(n-1,f,o);
+               mov(1,f,t);
+               mov(n-1,o,t);
+               end
+end;
+
+begin
+       disk := DISK;
+       writeln('Number: ');
+       read(disk);
+       num[1] := disk;
+       cnt := 0;
+       if print = 1 then writeln('start ',disk);
+       ow := wallclock;
+       mov(disk,1,3);
+       writeln('For ',disk:3,' ',cnt:10,' steps, time',wallclock-ow);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/hugereal.p b/usr/src/usr.bin/pascal/tstpx/src/hugereal.p
new file mode 100644 (file)
index 0000000..9604343
--- /dev/null
@@ -0,0 +1,11 @@
+program hugereal(input,output);
+    var
+       r : real;
+       errno : integer;
+    begin
+       writeln('errno = ', errno);
+       write('gimme a real ');
+       readln(r);
+       writeln('that was a really satisfying',r);
+       writeln('errno = ', errno);
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/index.p b/usr/src/usr.bin/pascal/tstpx/src/index.p
new file mode 100644 (file)
index 0000000..181ac44
--- /dev/null
@@ -0,0 +1,43 @@
+program t(output);
+var
+a :array[1..10, 1..10] of integer;
+i :1..10;
+j, count :integer;
+procedure foo;
+var
+a :array[1..10, 1..10] of integer;
+i :1..10;
+procedure bar;
+begin
+a[1,i] := 210;
+a[2,i] := 220;
+a[i,1] := 230;
+a[i,2] := 240;
+       if j = count then
+               writeln('lvl2:', a[1,5], a[2,5], a[5,1], a[5,2]);
+end;
+begin
+i := 4;
+a[1,i] := 110;
+a[2,i] := 120;
+a[i,1] := 130;
+a[i,2] := 140;
+       if j = count then
+               writeln('lvl1:', a[1,4], a[2,4], a[4,1], a[4,2]);
+i := 5;
+bar;
+end;
+begin
+writeln('enter repeat count');
+readln(count);
+for j := 1 to count do begin
+       i := 3;
+       a[1,i] := 10;
+       a[2,i] := 20;
+       a[i,1] := 30;
+       a[i,2] := 40;
+       if j = count then
+               writeln('main:', a[1,3], a[2,3], a[3,1], a[3,2]);
+       foo;
+end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/insan.p b/usr/src/usr.bin/pascal/tstpx/src/insan.p
new file mode 100644 (file)
index 0000000..700c9a4
--- /dev/null
@@ -0,0 +1,349 @@
+program insane(input, output);
+label
+       1;
+type
+       alfa = packed array[1..10] of char;
+       metaface = (notaface, front, back, top, bottom, left, right);
+       face = front .. right;
+       metapair = (notapair, one2, three4, five6);
+       pair = one2 .. five6;
+       metacolor = (notacolor, red, blue, green, white);
+       color = red .. white;
+       blockno = 1..4;
+var
+       nosolutions: Boolean;
+       index, halfindex: integer;
+       pointr: integer;
+       datas: array[blockno, face] of alfa;
+       sum: array[blockno, pair, color] of integer;
+       halfsolution: array[blockno, 1..30] of pair;
+
+function word(alf: alfa): color;
+begin
+       if alf = 'red' then
+               word := red else
+       if alf = 'blue' then
+               word := blue else
+       if alf = 'green' then
+               word := green else
+               word := white;
+end;
+
+procedure readin;
+var
+       hue: alfa;
+       ch: char;
+       cube: blockno;
+       position: face;
+
+procedure tone;
+begin
+       case ch of
+       'r': hue := 'red';
+       'w': hue := 'white';
+       'g': hue := 'green';
+       'b': hue := 'blue';
+       end;
+end;
+
+begin
+       for cube := 1 to 4 do
+       begin
+               for position := front to right do
+               begin
+                       read(ch);
+                       tone;
+                       datas[cube, position] := hue;
+               end;
+               readln;
+       end;
+end;
+
+procedure sumcolors;
+var
+       cube: blockno;
+       side: face;
+function facepair(aface: face): pair;
+begin
+       case aface of
+       front, back: facepair := one2;
+       top, bottom: facepair := three4;
+       left, right: facepair := five6
+       end;
+end;
+
+procedure initializesum;
+var
+       cube: blockno;
+       side: face;
+       technicolor: color;
+begin
+       for cube := 1 to 4 do
+               for side :=  front to right do
+                       for technicolor := red to white do
+                               sum[cube, facepair(side), technicolor] := 0;
+end;
+
+begin
+       initializesum;
+       for cube := 1 to 4 do
+               for side := front to right do
+                       sum[cube, facepair(side), word(datas[cube,side])] :=
+                       sum[cube, facepair(side), word(datas[cube,side])] + 1;
+end;
+
+procedure find2222;
+var
+       subtotals: array[red..white] of integer;
+       pair1, pair2, pair3, pair4: pair;
+
+function two222(pair1, pair2, pair3, pair4: pair): Boolean;
+var
+       hue: color;
+begin
+       for hue := red to white do
+               subtotals[hue] :=
+                       sum[1, pair1, hue]+
+                       sum[2, pair2, hue]+
+                       sum[3, pair3, hue]+
+                       sum[4, pair4, hue];
+       if (subtotals[red]=2) and
+          (subtotals[blue]=2) and
+          (subtotals[green]=2) and
+          (subtotals[white]=2) then
+               two222 := true else
+               two222 := false;
+end;
+
+procedure listsolution;
+begin
+       halfsolution[1, halfindex] := pair1;
+       halfsolution[2, halfindex] := pair2;
+       halfsolution[3, halfindex] := pair3;
+       halfsolution[4, halfindex] := pair4;
+       halfindex := halfindex + 1;
+end;
+
+begin
+       halfindex := 1;
+       for pair1 := one2 to five6 do
+       for pair2 := one2 to five6 do
+       for pair3 := one2 to five6 do
+       for pair4 := one2 to five6 do
+               if two222(pair1, pair2, pair3, pair4) then
+                       listsolution;
+       if halfindex <= 2 then
+       begin
+               nosolutions := true;
+               goto 1;
+       end;
+end;
+
+procedure simultaneous;
+var
+       done: Boolean;
+begin
+       nosolutions := false;
+       pointr := 0;
+       done := false;
+       repeat
+               pointr := pointr + 1;
+               repeat
+                       index := succ(pointr);
+                       if (halfsolution[1, pointr]<>halfsolution[1,index]) and
+                          (halfsolution[2, pointr]<>halfsolution[2,index]) and
+                          (halfsolution[3, pointr]<>halfsolution[3,index]) and
+                          (halfsolution[4, pointr]<>halfsolution[4,index]) then
+                               done := true else
+                               index := index + 1;
+               until done or (index = pred(halfindex));
+       until done or (pointr = halfindex);
+       if pointr = halfindex then
+       begin
+               nosolutions := true;
+               goto 1;
+       end;
+end;
+
+procedure rearrange;
+var
+       box: blockno;
+       a, b: pair;
+
+procedure put(a, b: pair);
+var
+       old1, new1, old2, new2: face;
+       save1, save2: alfa;
+
+procedure oldpair(c: pair);
+begin
+       case c of
+       one2:
+               begin
+                       old1 := front;
+                       old2 := back;
+               end;
+       three4:
+               begin
+                       old1 := top;
+                       old2 := bottom;
+               end;
+       five6:
+               begin
+                       old1 := left;
+                       old2 := right;
+               end
+       end;
+end;
+procedure newpair(d: pair);
+begin
+       oldpair(b);
+       new1 := old1;
+       new2 := old2;
+end;
+
+begin
+       newpair(b);
+       oldpair(a);
+       save1 := datas[box, new1];
+       datas[box, new1] := datas[box, old1];
+       datas[box, old1] := save1;
+       save2 := datas[box, new2];
+       datas[box, new2] := datas[box, old2];
+       datas[box, old2] := save2;
+end;
+
+begin
+       for box := 1 to 4 do
+       begin
+               a := halfsolution[box, pointr];
+               b := halfsolution[box, index];
+               if (a=one2) and (b=five6) then
+                       put(five6, three4) else
+               begin
+                       if a = three4 then
+                       begin
+                               if b = one2 then
+                               begin
+                                       put(one2, five6);
+                                       put(three4, one2);
+                                       put(five6, three4);
+                               end else
+                               begin
+                                       put(three4, one2);
+                                       put(five6, three4);
+                               end
+                       end else
+                       if b = one2 then
+                       begin
+                               put(one2, three4);
+                               put(five6, one2);
+                       end else
+                               put(five6, one2);
+               end;
+       end;
+end;
+
+procedure correct;
+var
+       list: array[1..8] of integer;
+       done: Boolean;
+       side: face;
+       counter: integer;
+
+procedure check;
+var
+       delux: array[red..white] of integer;
+       kolor: color;
+       counter: integer;
+begin
+       done := true;
+       for kolor := red to white do
+               for counter := 1 to 4 do
+                       delux[kolor] := 0;
+       for counter := 1 to 4 do
+       begin
+               delux[word(datas[counter,side])] :=
+               delux[word(datas[counter,side])] + 1;
+               if delux[word(datas[counter,side])] >= 2 then
+                       done := false;
+       end;
+end;
+
+procedure rotate;
+var
+       save: alfa;
+       opposite: face;
+begin
+       if side = back then
+               opposite := front else
+       if side = front then
+               opposite := back else
+       if side = top then
+               opposite := bottom else
+       if side = bottom then
+               opposite := top;
+       save := datas[list[counter], side];
+       datas[list[counter], side] := datas[list[counter], opposite];
+       datas[list[counter], opposite] := save;
+end;
+
+begin
+       list[1] := 4;
+       list[2] := 3;
+       list[3] := 4;
+       list[4] := 2;
+       list[5] := 4;
+       list[6] := 3;
+       list[7] := 4;
+       list[8] := 3;
+       for side := back to top do
+       begin
+               counter := 0;
+               check;
+               while not done do
+               begin
+                       counter := counter + 1;
+                       rotate;
+                       check;
+               end;
+       end
+end;
+
+procedure printout;
+var
+       space: integer;
+       cube: integer;
+       side: face;
+begin
+       if nosolutions then
+               writeln('no solutions') else
+       begin
+               writeln('solution to instant insanity');
+               for cube := 1 to 4 do
+               begin
+                       write(cube, '   ');
+                       for side := front to bottom do
+                               write(datas[cube, side]);
+                       writeln;
+               end;
+       end;
+end;
+
+begin
+       reset(input);
+       readin;
+       sumcolors;
+       find2222;
+       simultaneous;
+       rearrange;
+       correct;
+1:
+       printout;
+end.
+{
+wbggrb
+wbrgrr
+wbgwrg
+wrgwbr
+}
diff --git a/usr/src/usr.bin/pascal/tstpx/src/math.p b/usr/src/usr.bin/pascal/tstpx/src/math.p
new file mode 100644 (file)
index 0000000..b101d02
--- /dev/null
@@ -0,0 +1,108 @@
+program math(input,output);
+
+label  1;
+
+type
+chrint=-120..120;
+sint=-1000..1000;
+ray=array[1..2] of record
+  first :real;
+  second :alfa;
+  end;
+
+var
+i :chrint;
+j :sint;
+k :integer;
+l, m :real;
+ary :ray;
+
+procedure skip;
+
+begin
+goto 1;
+end;
+
+
+begin
+j:=5;
+k:=10;
+l:=15.0;
+i:=j;
+i:=k;
+j:=k;
+k:=j;
+l:=j;
+l:=k;
+i:=10;
+j:=1000;
+k:=100000;
+l:=1.24e+16;
+ary[1].first:=50.2;
+ary[1].second:='oh boy';
+m:=j+j;
+m:=k+k;
+m:=l+l;
+m:=j+k;
+m:=k+j;
+m:=j+l;
+m:=l+j;
+m:=l+k;
+m:=k+l;
+m:=j-j;
+m:=k-k;
+m:=l-l;
+m:=j-k;
+m:=k-j;
+m:=j-l;
+m:=l-j;
+m:=l-k;
+m:=k-l;
+m:=j*j;
+m:=k/k*k;
+m:=l*l;
+m:=j*k;
+m:=k*j;
+m:=j*l;
+m:=l*j;
+m:=l*k;
+m:=k*l;
+m:=j/j;
+m:=ary[1].first/l;
+m:=j/k;
+m:=k/j;
+m:=j/l;
+m:=l/j;
+m:=l/k;
+m:=k/l;
+m:=j div j;
+m:=k div k;
+m:=j div k;
+m:=k div j;
+m:=j mod j;
+m:=k mod k;
+m:=j mod k;
+m:=k mod j;
+m:=-j;
+m:=-k;
+m:=-l;
+m:=abs(-j)+abs(k)+abs(-l);
+m:=abs(j)+abs(-k)+abs(l);
+if (k=k) and
+   (j<k) and
+   (k>=j) and
+   (l=l) and
+   (j<=l) and
+   (k<>l) and
+   (l>j) and
+   (l>k) and
+   (ary[1].second=ary[1].second) then
+writeln((ary[1].second):7,'it works !!!');
+skip;
+writeln('error');
+1:
+ary[2]:=ary[i-9];
+writeln('hex k = ',k:1 hex,'   octal k = ',k oct);
+writeln('octal j = ',j:1 oct,'   hex j = ',j hex);
+i:=1;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/nmaze.p b/usr/src/usr.bin/pascal/tstpx/src/nmaze.p
new file mode 100644 (file)
index 0000000..010fdff
--- /dev/null
@@ -0,0 +1,111 @@
+
+program randpath(input,output);
+const maxwidth=122;maxheight=52;{lpt page size}
+    n=4;nfact=24;
+type row=array[1..n]of 1..n;
+  mtype=(border,path,wall);
+var maze:array[-2..maxwidth,-2..maxheight] of mtype;
+  table:array[1..24]of row;
+ xdir,ydir:array[1..4] of -2..2;
+ width:1 .. maxwidth; height: 1..maxheight; startx,starty:integer;
+  touchl,touchr:boolean {touched left and right edges};
+  wannamaze:char;
+{Generation of permutations in lexicographic order,
+adapted from CACM Algorithm 202 (Mok-Kong Shen)}
+procedure perle (var s:row); {s is a row consisting of the nth permutation,
+                            and will be changed to contain the n+1 st}
+label 1;
+var j,u,w:integer;
+begin
+       w:=n; {permuting integers 1..n}
+       while s[w]<s[w-1] do w:=w-1;
+       u:=s[w-1];
+       for j:= n downto w do
+       begin
+               if s[j]>u then begin s[w-1]:=s[j];
+                                    s[j]:=u;
+                                    goto 1
+                              end
+       end;
+1:     for j:=0 to round((n-w-1)/2 +0.1) do
+         begin u:= s[n-j];
+               s[n-j]:=s[w+j];
+               s[w+j]:= u
+         end
+end; {of perle}
+procedure initable;
+var i:integer;
+begin 
+for i:=1 to n do table[1][i]:=i; {initialize first row}
+for i:=2 to nfact do begin
+       table[i]:=table[i-1] {copy row};
+       perle(table[i])
+       end;
+end;
+procedure init; {initialize maze}
+var pip, i,j:integer;
+begin
+write('width=');readln(width);write('height=');readln(height);
+write('randomizing seed=');readln(pip);
+pip:=seed(pip);
+for i:=-1 to 2*width+1 do for j:=-1 to 2*height+1 do maze[i,j]:=wall;
+for i:=-2 to 2*width+2 do begin maze[i,-2]:=border;
+  maze[i,2*height+2]:=border end;
+for j:= -2 to 2*height+2 do begin maze[-2,j]:=border;
+   maze[2*width+2,j]:=border end;
+end;
+procedure growtree(x,y,px,py:integer);
+var i,m,t:integer; choice:row;
+procedure fillin;
+       begin
+       maze[(x+px)div 2,(y+py)div 2]:=path;
+       maze[x,y]:=path
+       end;
+
+begin {growtree}
+if  maze[x,y] = wall 
+  then begin fillin;
+         m:=round(random(1.0)*23.0)+1;  {random number between 1 and 24}
+         for i:=1 to 4 do 
+       begin
+               choice:=table[m]; {determine row in table}
+               t:=choice[i]; {choice is 1, 2, 3, 4 ;; e s w n}
+               growtree(x+xdir[t],y+ydir[t],x,y);
+       end {of for} 
+end {of then};
+if (x=-2) and (touchl=false) then begin touchl:=true {touched left border};
+                                       fillin
+                                 end;
+if (x=2*width+2) and (touchr=false) then begin touchr:=true;
+                                       fillin end
+
+{otherwise, just return}
+end; {of growtree}
+
+procedure printmaze;
+var i,j:integer;
+begin for j:= 2*height+1 downto -1 do begin
+       write(' ');
+       for i:=-1 to 2*width+1 do case maze[i,j] of
+       path:write(' ');
+       border,wall:write('X'); {for lineprinter}
+       end; writeln
+       end end;
+begin {main}
+xdir[1]:=2;xdir[2]:=0;xdir[3]:=-2;xdir[4]:=0;
+ydir[1]:=0;ydir[2]:=-2;ydir[3]:=0;ydir[4]:=2;
+wannamaze:= 'y';
+initable;
+while wannamaze='y' do
+begin
+init; 
+touchl:=false;touchr:=false;
+startx:= 2*(round((1.5+random(1.0))*width) div 4);
+starty:= 2*(round((1.5+random(1.0))*height)div 4);
+{ start near but not at middle }
+growtree(startx,starty,startx,starty);
+printmaze;
+write('want another? (y or n)') ; readln(wannamaze);
+end {wannamaze}
+end.
+
diff --git a/usr/src/usr.bin/pascal/tstpx/src/nonlocgoto.p b/usr/src/usr.bin/pascal/tstpx/src/nonlocgoto.p
new file mode 100644 (file)
index 0000000..ca98f6e
--- /dev/null
@@ -0,0 +1,29 @@
+program test(output);
+label  1;
+
+procedure lvl1;
+
+var
+f :file of char;
+
+procedure lvl2;
+
+begin
+writeln('lvl2 called');
+goto 1;
+halt;
+end;
+
+begin
+rewrite(f,'file');
+writeln(f,'lvl1 called');
+lvl2;
+halt;
+end;
+
+begin
+writeln('lvl0 called');
+lvl1;
+halt;
+1:writeln('it worked');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/numericio.p b/usr/src/usr.bin/pascal/tstpx/src/numericio.p
new file mode 100644 (file)
index 0000000..890222d
--- /dev/null
@@ -0,0 +1,16 @@
+program numericIO(f,output);
+  const n = 500; d = 0.12345;
+  var i: integer; x,s: real;
+      f: file of real;
+begin writeln(wallclock);
+  x := 1.0; s := 0; rewrite(f);
+  for i := 1 to n do
+    begin write(f,x); s := s+x; x := x+d
+    end ;
+  writeln(wallclock, s);
+  reset(f); s := 0;
+  while not eof(f) do
+    begin read(f,x); s := s+x
+    end ;
+  writeln(wallclock, s)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/palindromes.p b/usr/src/usr.bin/pascal/tstpx/src/palindromes.p
new file mode 100644 (file)
index 0000000..113e404
--- /dev/null
@@ -0,0 +1,17 @@
+program palindromes(output);
+  var i,j,l,n,r,s: integer;
+      p: boolean;
+      d: array [1..10] of integer;
+begin n := 0; writeln(wallclock);
+  repeat n := n+1; s := n*n; l := 0;
+    repeat l := l+1; r := s div 10;
+      d[l] := s - 10*r; s := r
+    until s = 0;
+    i := 1; j := l;
+    repeat p := d[i]=d[j];
+      i := i+1; j := j-1
+    until (i>=j) or not p;
+    if p then writeln(n,n*n)
+  until n = 200;
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pcerror.p b/usr/src/usr.bin/pascal/tstpx/src/pcerror.p
new file mode 100644 (file)
index 0000000..2b6ad56
--- /dev/null
@@ -0,0 +1,127 @@
+program errs(input,output,junk,locked);
+
+label  99;
+
+type
+etype = (ECHR, EHALT, ENILPTR, ECASE, EOUTOFMEM, ECTSNG,
+ESTLIM, EARGV, EPACK, EUNPACK, EASRT, ELLIMIT, ETRASHHEAP, EPASTEOF, 
+EREFINAF, ENOFILE, ENAMESIZE, EBADINUM, EBADFNUM, ENUMNTFD, ENAMRNG,
+EFMTSIZE, ESEEK, ECREATE, EREMOVE, EOPEN, EREADIT, EWRITEIT, ESQRT,
+ELN, ERANGE, ESUBSC, EGOTO, ECLOSE, EWRITE, ECTLWR, ECTUPR, xxx);
+biggie = array[1..15000] of integer;
+
+var
+ch :char;
+chs :alfa;
+ch1 :array[1..10] of char;
+ptr, ptr1 :^char;
+ptr2 :^biggie;
+junk, locked, other :file of char;
+variant :record
+       case boolean of
+       true:(val :1..100);
+       false:(name :etype)
+       end;
+s :set of 1..4;
+i :integer;
+r :real;
+err :etype;
+
+begin
+writeln('Want a list of error names?');
+readln(ch);
+if ch = 'y' then begin
+       for err:=ECHR to pred(xxx) do begin
+               write(err:15);
+               if ord(err) mod 5 = 4 then
+                       writeln;
+               end;
+       writeln;
+       end;
+writeln('enter an error name');
+readln(err);
+if err in [ESEEK, EGOTO, ECLOSE, EWRITE] then begin
+       writeln(err, ': error cannot be simulated');
+       goto 99;
+       end;
+case err of
+ECHR: ch:=chr(128);
+EHALT: halt;
+ENILPTR: ch:=ptr^;
+ECASE: case 4 of 1:; end;
+EOUTOFMEM: while true do begin
+               new(ptr2);
+               writeln('alloc successful');
+               end;
+ECTLWR: begin
+       i:=0;
+       s:=[i..2];
+       end;
+ECTUPR: begin
+       i:=5;
+       s:=[1..i];
+       end;
+ECTSNG: begin
+       i:=0;
+       s:=[i];
+       end;
+ESTLIM: stlimit(0);
+EARGV: argv(100,chs);
+EPACK: pack(ch1,2,chs);
+EUNPACK: unpack(chs,ch1,2);
+EASRT: assert(false);
+ELLIMIT: begin
+        linelimit(output,1);
+        writeln('This only should print');
+        writeln;
+        writeln('ERROR');
+        end;
+ETRASHHEAP: begin
+           new(ptr);
+           ptr1:=ptr;
+           dispose(ptr1);
+           dispose(ptr);
+           end;
+EPASTEOF: begin
+         rewrite(junk);
+         reset(junk);
+         get(junk);
+         get(junk);
+         write(junk^);
+         end;
+EREFINAF: ch:=junk^;
+ENOFILE: ch:=other^;
+ENAMESIZE: rewrite(junk,
+'thisisaverylongandconvolutedfilenamewhichexceedsalllimitsofreasonablenessandgoodtaste');
+EBADINUM: begin
+         writeln('Enter a letter');
+         read(i);
+         end;
+EBADFNUM: begin
+         writeln('Enter a letter');
+         read(r);
+         end;
+ENUMNTFD: begin
+         writeln('Enter your name');
+         read(err);
+         end;
+ENAMRNG:  begin
+         variant.val:=100;
+         writeln(variant.name);
+         end;
+EFMTSIZE: begin
+         i:=-1;
+         writeln(1.0:i);
+         end;
+ECREATE: rewrite(locked);
+EREMOVE: remove('none');
+EOPEN: reset(locked);
+EREADIT: read(output,ch);
+EWRITEIT: write(input,ch);
+ESQRT: r:=sqrt(-1.0);
+ELN: r:=ln(0);
+ERANGE: ch:=succ(chr(127));
+ESUBSC: ch:=ch1[127 + 1];
+end;
+writeln('*** ERROR NOT DETECTED ***');
+99:end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pcextn.p b/usr/src/usr.bin/pascal/tstpx/src/pcextn.p
new file mode 100644 (file)
index 0000000..95ff500
--- /dev/null
@@ -0,0 +1,43 @@
+program t(output, foo);
+
+#include "unixio.h"
+
+var
+foo :text;
+at :fileptr;
+
+begin
+rewrite(foo);
+writeln(foo, 'abc');
+reset(foo);
+while not eof(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+APPEND(foo);
+writeln(foo, 'def');
+reset(foo);
+while not eof(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+reset(foo);
+while not eoln(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+get(foo);
+writeln('at TELL foo at ->', foo^, '<-');
+at := TELL(foo);
+get(foo);
+writeln('after get foo at ->', foo^, '<-');
+SEEK(foo, at);
+writeln('after seek foo at ->', foo^, '<-');
+reset(foo);
+writeln('after reset foo at ->', foo^, '<-');
+SEEK(foo,at);
+writeln('after seek foo at ->', foo^, '<-');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/permute.p b/usr/src/usr.bin/pascal/tstpx/src/permute.p
new file mode 100644 (file)
index 0000000..901166f
--- /dev/null
@@ -0,0 +1,38 @@
+program perm(input,output);
+const n=4; nfact=24; {make a table of permutations of 1..4}
+type row=array[1..n] of 1..n;
+var table:array[1..nfact] of row; i,j:integer;
+
+{Generation of permutations in lexicographic order,
+adapted from CACM Algorithm 202 (Mok-Kong Shen)}
+procedure perle (var s:row); {s is a row consisting of the nth permutation,
+                            and will be changed to contain the n+1 st}
+label 1;
+var j,u,w:integer;
+begin
+       w:=n; {permuting integers 1..n}
+       while s[w]<s[w-1] do w:=w-1;
+       u:=s[w-1];
+       for j:= n downto w do
+       begin
+               if s[j]>u then begin s[w-1]:=s[j];
+                                    s[j]:=u;
+                                    goto 1
+                              end
+       end;
+1:     for j:=0 to round((n-w-1)/2 +0.1) do
+         begin u:= s[n-j];
+               s[n-j]:=s[w+j];
+               s[w+j]:= u
+         end
+end; {of perle}
+begin {main program}
+for i:=1 to n do table[1][i]:=i; {initialize first row}
+for i:=2 to nfact do begin
+       table[i]:=table[i-1] {copy row};
+       perle(table[i])
+       end;
+for i:=1 to nfact do begin for j:=1 to n do write(table[i][j]); writeln end;
+end.
+       
+
diff --git a/usr/src/usr.bin/pascal/tstpx/src/peter.p b/usr/src/usr.bin/pascal/tstpx/src/peter.p
new file mode 100644 (file)
index 0000000..b51c6f5
--- /dev/null
@@ -0,0 +1,19 @@
+program t( output , input );
+    begin
+       while not eof do begin
+           while not eoln do begin
+               if input^ in [ '+' , '-' , '*' , '/' , '%' ] then
+                   case input ^ of
+                       '+':    writeln( 'plus' );
+                       '-':    writeln( 'minus' );
+                       '*':    writeln( 'star' );
+                       '/':    writeln( 'slash' );
+                       '%':    writeln( 'percent' );
+                   end
+               else
+                   writeln( 'random char' );
+               get(input);
+           end;
+           get(input);
+       end;
+    end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/piextn.p b/usr/src/usr.bin/pascal/tstpx/src/piextn.p
new file mode 100644 (file)
index 0000000..4a499a7
--- /dev/null
@@ -0,0 +1,43 @@
+program t(output, foo);
+
+#include "unixio.i"
+
+var
+foo :text;
+at :fileptr;
+
+begin
+rewrite(foo);
+writeln(foo, 'abc');
+reset(foo);
+while not eof(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+APPEND(foo);
+writeln(foo, 'def');
+reset(foo);
+while not eof(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+reset(foo);
+while not eoln(foo) do begin
+       write(foo^);
+       get(foo)
+       end;
+writeln;
+get(foo);
+writeln('at TELL foo at ->', foo^, '<-');
+at := TELL(foo);
+get(foo);
+writeln('after get foo at ->', foo^, '<-');
+SEEK(foo, at);
+writeln('after seek foo at ->', foo^, '<-');
+reset(foo);
+writeln('after reset foo at ->', foo^, '<-');
+SEEK(foo,at);
+writeln('after seek foo at ->', foo^, '<-');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/powersoftwo.p b/usr/src/usr.bin/pascal/tstpx/src/powersoftwo.p
new file mode 100644 (file)
index 0000000..45aead8
--- /dev/null
@@ -0,0 +1,34 @@
+program powersoftwo(output);
+const m = 30; n = 90;  { m >= n*log(2) }
+var exp,i,j,l: integer;
+    c,r,t: integer;
+    d: array [0..m] of integer;  {positive powers}
+    f: array [1..n] of integer;  {negative powers}
+begin l := 0; r := 1; d[0] := 1;
+  writeln(wallclock);
+  for exp := 1 to n do
+  begin {compute and print 2**exp }  c := 0;
+    for i := 0 to l do
+    begin t := 2*d[i] + c;
+      if t >= 10 then
+        begin d[i] := t-10; c := 1;
+        end
+      else
+        begin d[i] := t; c:= 0;
+        end
+    end ;
+    if c > 0 then
+      begin l := l+1; d[l] := 1
+      end ;
+    for i := m downto l do write(' ');
+    for i := l downto 0 do write(d[i]:1);
+    write(exp:5, '  .');
+    {compute and print 2**(-exp) }
+    for j := 1 to exp-1 do
+    begin r := 10*r + f[j];
+      f[j] := r div 2; r := r - 2*f[j]; write(f[j]:1)
+    end ;
+    f[exp] := 5; writeln('5'); r := 0
+  end ;
+  writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pretty.p b/usr/src/usr.bin/pascal/tstpx/src/pretty.p
new file mode 100644 (file)
index 0000000..66dd2d8
--- /dev/null
@@ -0,0 +1,265 @@
+program pretty(input,output);
+const  SYMLENGTH = 15;
+type
+       kinds = (ident, number, op, endfile);
+       symb = array[1..SYMLENGTH] of char;
+       scanres = record
+                       symbol:symb;
+                       kind:kinds;
+                 end;
+var
+       i,j,k:integer;
+       ch:     char;
+       tabs:   integer;
+       a:      scanres;
+       working, space, indentflag: boolean;
+       procflag, inparam, caseflag: boolean;
+
+procedure indent;
+var    i:integer;
+begin
+       space := false;
+       indentflag := false;
+       writeln;
+       for i := 1 to tabs do write('   ');
+end;
+
+procedure writesym(a:scanres);
+var
+       i:integer;
+begin
+       if indentflag then indent;
+       {
+       if (a.kind = ident) and space then write(' ');
+       if (a.kind = op) and (a.symbol[1] in ['(','+','-','*']) then write(' ');
+       }
+       write(' ');
+       i := 1;
+       while (a.symbol[i] <> ' ') do
+       begin
+               write(a.symbol[i]);
+               i := i + 1;
+       end;
+       {
+       if a.kind <> ident then space := false else space := true;
+       if (a.kind = op) and (a.symbol[1] in [')','+','-','*']) then write(' ');
+       }
+end;
+
+function scanner:scanres;
+var
+       i:integer;
+       comment: boolean;
+       Scanner: scanres;
+begin
+       for i := 1 to SYMLENGTH do Scanner.symbol[i] := ' ';
+
+       repeat
+               comment := false;
+               comment := comment;
+               comment := comment;
+               comment := comment;
+               while (ch in [' ', ' '])  and (not eof(input)) do
+               begin
+                       ch := input^;
+                       get(input);
+               end;
+               if ch = '{' then
+               begin
+                       comment := true;
+                       while ch <> '}' do
+                       begin
+                               ch := input^;
+                               get(input);
+                       end;
+                       ch := ' ';
+               end;
+       until not comment;
+
+       if eof(input) then Scanner.kind := endfile
+       else
+       begin
+               if ch in ['a'..'z', 'A'..'Z'] then      { identifiers   }
+               begin
+                       i := 1;
+                       while ch in ['a'..'z', 'A'..'Z', '0'..'9'] do
+                       begin
+                               Scanner.symbol[i] := ch;
+                               i := i + 1;
+                               ch := input^;
+                               get(input);
+                       end;
+                       Scanner.kind := ident;
+               end
+               else if ch in ['0'..'9'] then           { numbers       }
+               begin
+                       i := 1;
+                       while ch in ['0'..'9'] do
+                       begin
+                               Scanner.symbol[i] := ch;
+                               i := i + 1;
+                               ch := input^;
+                               get(input);
+                       end;
+                       Scanner.kind := number;
+               end
+               else begin                              { operators     }
+                       Scanner.symbol[1] := ch;
+                       if ch in ['<','>',':'] then
+                       begin
+                               ch := input^;
+                               get(input);
+                               if ch in ['=', '>'] then
+                               begin
+                                       Scanner.symbol[2] := ch;
+                                       ch := input^;
+                                       get(input);
+                               end;
+                       end
+                       else if ch = '.' then
+                       begin
+                               ch := input^;
+                               get(input);
+                               if ch = '.' then
+                               begin
+                                       ch := input^;
+                                       get(input);
+                                       Scanner.symbol := '..';
+                               end;
+                       end
+                       else
+                       begin
+                               ch := input^;
+                               get(input);
+                       end;
+                       Scanner.kind := op;
+               end;
+       end;
+       scanner := Scanner;
+end;
+
+function compar(s1:symb; s2:symb):boolean;
+var
+       i:integer;
+       comp: boolean;
+begin
+       comp := true; i := 1;
+       while (comp and (i <= SYMLENGTH)) do
+       begin
+               comp := comp & (s1[i] = s2[i]);
+               i := i + 1;
+       end;
+       compar := comp;
+end;
+
+begin
+       working := true;
+       ch := ' ';
+       procflag := false;
+       caseflag := false;
+       inparam := false;
+       tabs := 0;
+       while working do
+       begin
+               a := scanner;
+               case a.kind of
+               endfile: begin
+                               working := false;
+                               writeln;
+                       end;
+
+               ident:  begin
+                               if compar(a.symbol, 'begin') then
+                               begin
+                                       writesym(a);
+                                       tabs := tabs + 1;
+                                       indent;
+                               end
+                               else if compar(a.symbol, 'case') then
+                               begin
+                                       writesym(a);
+                                       tabs := tabs + 1;
+                                       caseflag := true;
+                               end
+                               else if compar(a.symbol, 'procedure')  or
+                                       compar(a.symbol, 'function') then
+                               begin
+                                       writeln;
+                                       writeln;
+                                       writeln;
+                                       tabs := 0;
+                                       procflag := true;
+                                       writesym(a);
+                               end
+                               else if compar(a.symbol, 'var') or
+                                       compar(a.symbol, 'type') or
+                                       compar(a.symbol, 'const') or
+                                       compar(a.symbol, 'label') then
+                               begin
+                                       writeln;
+                                       tabs := 0;
+                                       writesym(a);
+                               end
+                               else if compar(a.symbol, 'of')  then
+                               begin
+                                       if caseflag then
+                                       begin
+                                               indent;
+                                               writesym(a);
+                                               caseflag := false;
+                                       end
+                                       else writesym(a)
+                               end
+                               else if compar(a.symbol, 'record') then
+                               begin
+                                       writesym(a);
+                                       tabs := tabs + 1;
+                                       indent;
+                               end
+                               else if compar(a.symbol, 'end') then
+                               begin
+                                       tabs := tabs - 1;
+                                       indent;
+                                       writesym(a);
+                               end
+                               else writesym(a);
+                       end;
+
+               number: writesym(a);
+
+               op:     begin
+                               if a.symbol[1] = '''' then
+                               begin
+                                       write('''');
+                                       while ch <> '''' do
+                                       begin
+                                               write(ch);
+                                               ch := input^;
+                                               get(input);
+                                       end;
+                                       write(ch);
+                                       ch := input^;
+                                       get(input);
+                               end
+                               else if a.symbol[1] = ';' then 
+                               begin
+                                       writesym(a);
+                                       if not inparam then
+                                               indentflag := true
+                               end
+                               else if (a.symbol[1] = '(') & procflag then
+                               begin
+                                       inparam := true;
+                                       writesym(a);
+                               end
+                               else if a.symbol[1] = ')' then
+                               begin
+                                       writesym(a);
+                                       inparam := false;
+                                       procflag := false;
+                               end
+                               else writesym(a);
+                       end
+               end
+       end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/primes.p b/usr/src/usr.bin/pascal/tstpx/src/primes.p
new file mode 100644 (file)
index 0000000..ba71d93
--- /dev/null
@@ -0,0 +1,30 @@
+program primes(output);
+const n = 1000; n1 = 33;   (*n1 = sqrt(n)*)
+var i,k,x,inc,lim,square,l: integer;
+    prim: boolean;
+    p,v: array[1..n1] of integer;
+begin writeln(wallclock);
+   write(2:6, 3:6); l := 2;
+   x := 1; inc := 4; lim := 1; square := 9;
+   for i := 3 to n do
+   begin (*find next prime*)
+      repeat x := x + inc; inc := 6-inc;
+         if square <= x then
+            begin lim := lim+1;
+               v[lim] := square; square := sqr(p[lim+1])
+            end ;
+         k := 2; prim := true;
+         while prim and (k<lim) do
+         begin k := k+1;
+            if v[k] < x then v[k] := v[k] + 2*p[k];
+            prim := x <> v[k]
+         end
+      until prim;
+      if i <= n1 then p[i] := x;
+      write(x:6); l := l+1;
+      if l = 10 then
+         begin writeln; l := 0
+         end
+   end ;
+   writeln; writeln(wallclock)
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/procs.p b/usr/src/usr.bin/pascal/tstpx/src/procs.p
new file mode 100644 (file)
index 0000000..dff0f20
--- /dev/null
@@ -0,0 +1,47 @@
+program procs(output,input,file3);
+
+type
+aray = array[1..20] of char;
+
+var
+a, d :alfa;
+c :aray;
+b :char;
+i :integer;
+file3 :file of char;
+
+begin
+writeln('Enter two lines');
+while not eoln(input) do begin
+       write(input^);
+       get(input);
+       end;
+if input^ = ' ' then
+       writeln;
+readln(b);
+if not eoln(input) then 
+       halt
+else
+       writeln(b);
+for i:=0 to argc-1 do begin
+       argv(i,a);
+       writeln('i = ',i:1,'   arg = ',a);
+       end;
+write('Jan ''70 plus ',wallclock:1,' seconds');
+flush(output);
+rewrite(file3);
+write(file3,'test');
+page(file3);
+reset(file3);
+linelimit(file3,20);
+stlimit(5000);
+date(a);   unpack(a,c,1);
+time(a);   unpack(a,c,11);
+pack(c,11,d);
+pack(c,1,a);
+writeln('Today is ',a,' at ',d);
+assert(not undefined(1.0));
+remove('file3');
+message('This process has used ',sysclock:1,' + ',clock:1,' milliseconds');
+i:=1;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pvs1.p b/usr/src/usr.bin/pascal/tstpx/src/pvs1.p
new file mode 100644 (file)
index 0000000..91db2ef
--- /dev/null
@@ -0,0 +1,33 @@
+{TEST 6.6.5.4-1, CLASS=CONFORMANCE}
+
+{ This program tests that pack and unpack are
+  implemented in this compiler as according to the
+  Standard.
+  The compiler fails if the program does not compile. }
+
+program t6p6p5p4d1(output);
+type
+   colourtype = (red,pink,orange,yellow,green,blue);
+var
+   unone    : array[3..24] of char;
+   pacone   : packed array[1..4] of char;
+   untwo    : array[4..8] of colourtype;
+   pactwo   : packed array[6..7] of colourtype;
+   i        : integer;
+   colour   : colourtype;
+begin
+   pacone:='ABCD';
+   unpack(pacone,unone,5);
+   colour:=red;
+   for i:=4 to 8 do
+   begin
+      untwo[i]:=colour;
+      colour:=succ(colour)
+   end;
+   pack(untwo,5,pactwo);
+   writeln('unone[5] = ''', unone[5], ''' = ', ord(unone[5]));
+   if unone[5]='A' then
+      writeln(' PASS...6.6.5.4-1')
+   else
+      writeln(' FAIL...6.6.5.4-1')
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pvs2.p b/usr/src/usr.bin/pascal/tstpx/src/pvs2.p
new file mode 100644 (file)
index 0000000..aa3e33c
--- /dev/null
@@ -0,0 +1,15 @@
+{TEST 6.6.5.2-3, CLASS=CONFORMANCE}
+
+{ This program tests if true is assigned to eof if the file f
+  is empty when reset. }
+
+program t6p6p5p2d3(output);
+var
+   fyle : text;
+begin
+   reset(fyle);
+   if eof(fyle) then
+      writeln(' PASS...6.6.5.2-3')
+   else
+      writeln(' FAIL...6.6.5.2-3')
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/pvs3.p b/usr/src/usr.bin/pascal/tstpx/src/pvs3.p
new file mode 100644 (file)
index 0000000..7099eaf
--- /dev/null
@@ -0,0 +1,20 @@
+{TEST 6.6.5.2-2, CLASS=ERRORHANDLING}
+
+{ This program causes an error to occur as eof(f) does
+  not yield false prior to execution of a get on the file f.
+  The error should be detected at compile-time or run-time. }
+
+program t6p6p5p2d2(output);
+var
+   fyle : text;
+begin
+   rewrite(fyle);
+   writeln(fyle,'ABC');
+   reset(fyle);
+   get(fyle);            { fyle^='A' }
+   get(fyle);           { fyle^='B' }
+   get(fyle);           { fyle^='C' }
+   get(fyle);           { fyle^ undefined...eof is true }
+   get(fyle);           { error since eof is true }
+   writeln(' ERROR NOT DETECTED...6.6.5.2-2')
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/quicksort.p b/usr/src/usr.bin/pascal/tstpx/src/quicksort.p
new file mode 100644 (file)
index 0000000..116aab5
--- /dev/null
@@ -0,0 +1,30 @@
+program quicksort(output);
+  const n = 100;
+  var i,z: integer;
+      a: array[1..n] of integer;
+
+  procedure sort(l,r: integer);
+    var i,j,x,w: integer;
+  begin {quicksort with recursion on both partitions}
+    i := l; j := r; x := a[(i+j) div 2];
+    repeat
+      while a[i] < x do i := i+1;
+      while x < a[j] do j := j-1;
+      if i <= j then
+        begin w := a[i]; a[i] := a[j]; a[j] := w;
+          i := i+1; j := j-1
+        end
+    until i > j;
+    if l < j then sort(l,j);
+    if l < r then sort(i,r);
+  end { sort } ;
+
+begin z := 1729;  {generate random sequence}
+  for i := 1 to n do
+    a[i] := round(1000 * random(1.0));
+  writeln(wallclock);
+  sort(1,n);
+  writeln(wallclock);
+  for i := 1 to n-1 do
+   if a[i] > a[i+1] then writeln(i,a[i],a[i+1]);
+end .
diff --git a/usr/src/usr.bin/pascal/tstpx/src/random.p b/usr/src/usr.bin/pascal/tstpx/src/random.p
new file mode 100644 (file)
index 0000000..21c1ac6
--- /dev/null
@@ -0,0 +1,27 @@
+program random(output);
+
+const
+size = 110;
+tries = 10000;
+
+type
+density=array[0..size] of integer;
+
+var
+den :density;
+count :integer;
+loc :integer;
+
+begin
+for count:=0 to size do
+       den[count] := 0;
+for count:=1 to tries do begin
+       loc := round(random(1.0) * (size - 10));
+       den[loc] := den[loc] + 1;
+       end;
+for count:=0 to size div 10 - 1 do begin
+       for loc:=10 * count to 10 * count + 9 do
+               write(den[loc]:7);
+       writeln;
+       end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/rdpal.p b/usr/src/usr.bin/pascal/tstpx/src/rdpal.p
new file mode 100644 (file)
index 0000000..a0d7dfb
--- /dev/null
@@ -0,0 +1,20 @@
+program bench3(input, output);
+    const max=100;
+    var i,len: integer; inline: packed array[1..max] of char; palind: Boolean;
+begin
+    while not eof do begin
+       len := 0;
+       while not eoln do
+           begin len := len+1; inline[len] := input^; get(input) end;
+       readln;
+       while (len > 1) and (inline[len] = ' ') do
+           len := len - 1;
+        palind := true;
+       for i := len downto len div 2 do
+           if inline[i] <> inline[len-i+1] then
+               palind := false;
+       for i := 1 to len do write(inline[i]);
+       write(' is'); if not palind then write(' not');
+       writeln(' a palindrome');
+    end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/rdwt.p b/usr/src/usr.bin/pascal/tstpx/src/rdwt.p
new file mode 100644 (file)
index 0000000..1e3847e
--- /dev/null
@@ -0,0 +1,21 @@
+program test(input, output, testfile);
+var
+   testfile:  text;
+   i, j, repetitions:  integer;
+begin
+   rewrite(testfile);
+   write(output, 'Number: ');
+   readln(repetitions);
+   for i:=1 to repetitions do
+      writeln(testfile, i);
+   reset(testfile);
+   for i:=1 to repetitions do begin
+      read(testfile, j);
+      if j <> i then
+        writeln('read/write error');
+      end;
+   readln(testfile);
+   if not eof(testfile) then
+      writeln('eof not reached');
+   remove('testfile');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/real.p b/usr/src/usr.bin/pascal/tstpx/src/real.p
new file mode 100644 (file)
index 0000000..bb88e91
--- /dev/null
@@ -0,0 +1,11 @@
+program writer(output);
+var a:alfa;
+begin
+ writeln(wallclock);
+ writeln(sin(1/2));
+ writeln(sqrt(1/2));
+ writeln(ln(1/2));
+ writeln(exp(1/2));
+ writeln(cos(1/2));
+ writeln(wallclock)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/realout.p b/usr/src/usr.bin/pascal/tstpx/src/realout.p
new file mode 100644 (file)
index 0000000..feeb967
--- /dev/null
@@ -0,0 +1,25 @@
+program testio(input, output);
+
+var
+work :array[1..20] of char;
+doesit :boolean;
+i, j :integer;
+r :real;
+
+begin
+work := 'This program works? ';
+doesit := true;
+r := 31.4159;
+i := 10;
+j := 25;
+writeln('i = ',i,' ':3,'j = ':1,j:1);
+writeln('r = ',r,'   2 * r = ',2*r);
+write('also r = ',r:1,'   and r = ',r:10);
+writeln('   finally r = ',r:7:3);
+writeln('and r = ',r:j:i);
+writeln(work,doesit);
+writeln(work:i,doesit:i);
+writeln(work:j,doesit:1);
+j:=2;
+writeln(work:5,doesit:j);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/reset.p b/usr/src/usr.bin/pascal/tstpx/src/reset.p
new file mode 100644 (file)
index 0000000..8e09cdc
--- /dev/null
@@ -0,0 +1,6 @@
+program test(input, output);
+var f:  text;
+begin
+   reset(f);
+   reset(f, '.  ');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/scaltst.p b/usr/src/usr.bin/pascal/tstpx/src/scaltst.p
new file mode 100644 (file)
index 0000000..168a007
--- /dev/null
@@ -0,0 +1,18 @@
+{$s+}
+program test(output);
+
+var
+e :(red, pink, green, orange);
+i :integer;
+j :boolean;
+
+begin
+i := 1;
+writeln(i:6:2);
+e := pink;
+writeln(e);
+writeln(orange);
+j := TRUE;
+writeln(false);
+writeln(j);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/sequin.p b/usr/src/usr.bin/pascal/tstpx/src/sequin.p
new file mode 100644 (file)
index 0000000..12b6f38
--- /dev/null
@@ -0,0 +1,32 @@
+{$p+}
+program initable(input,output);
+type  counter=0..4;
+      object=1..4;
+      container=set of object;
+      row=array[1..4]of 1..4;
+var   sol:row; i,j,k:integer;
+      table:array[1..24]of row;
+
+    procedure select(bag:container; sample,drawn:counter);
+    {Generation of permutations in lexicographic order,
+    adapted from Grogono, page 134.}
+    var  ball:object;
+    begin
+    if drawn<sample then
+       for ball:=1 to 4 do
+           if ball in bag then begin sol[drawn+1]:=ball;
+                               select(bag-[ball],sample,drawn+1)
+                               end;
+    if drawn=sample then begin table[k]:=sol; k:=k+1 end
+    end; {of select}
+    
+begin {of initable}
+    k:=1;
+    select([1..4],4,0);
+    for i := 1 to k-1 do begin
+       write('table[', i:1, '] = ');
+       for j := 1 to 4 do
+           write(table[i][j]);
+       writeln;
+       end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/setest.p b/usr/src/usr.bin/pascal/tstpx/src/setest.p
new file mode 100644 (file)
index 0000000..6cfa8db
--- /dev/null
@@ -0,0 +1,63 @@
+program setest(input,output);
+
+type
+aset = set of 1..41;
+sint = 0 .. 30000;
+
+var
+set1, set2 :aset;
+ptr :^aset;
+i :sint;
+
+begin
+writeln('Enter a number between 2 and 41.');
+writeln('Numbers 2, 10..12, 17, and 37 print "false" all others "true".');
+i := ord(input^);
+read(i);
+writeln('i =',i:2);
+write('The set opcodes work :');
+set1 := [5..15];
+set2 := [10];
+if set1 * [23] = [] then 
+write(' []')
+else
+write(false:6);
+if set1-set2 <> [5..9,11..15] then
+   write(false:6);
+new(ptr);
+ptr^ := [2,10,37,i];
+set1 := ptr^ - [1..3];
+set2 := ptr^ + [10..12,17];
+if ptr^ * set1 = set1 then
+   write(' mul plus minus')
+else
+   write(false:6);
+if (17 in [10..13,15..20,25..30]) and
+   (not (22 in [1..17,36..41])) then
+   write(' in')
+else
+   write(false:6);
+if (set1 <> set2) and
+   (set1 <  set2) and
+   (set2 >  set1) and
+   (set2 >= ptr^) and
+   (set1 <= set2) and
+   (set1 >= set1) and
+   (set1 <= set1) and
+   (card(set2) = 7) then
+   write(' and rel')
+else
+   write(false:6);
+if (set1 <> set1) or
+   (set2 <  set1) or
+   (set1 >  set2) or
+   (ptr^ >= set2) or
+   (set2 <= set1) or
+   (set1 =  set2) or
+   (17 in set2) then
+   writeln(' or rel')
+else
+   writeln(false:6);
+i := pred(i);
+i := (i + i) div i;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/setret.p b/usr/src/usr.bin/pascal/tstpx/src/setret.p
new file mode 100644 (file)
index 0000000..30a306f
--- /dev/null
@@ -0,0 +1,18 @@
+program setret(output);
+
+type
+bigset = set of char;
+
+var
+old :bigset;
+
+function bigit(inp : bigset) :bigset;
+begin
+bigit := inp - ['a'..'z'];
+end;
+
+begin
+old := ['g'..'w', 'A'..'S'];
+writeln('before ', card(old));
+writeln('after ',card(bigit(old)));
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/shoemake.p b/usr/src/usr.bin/pascal/tstpx/src/shoemake.p
new file mode 100644 (file)
index 0000000..3b34e5a
--- /dev/null
@@ -0,0 +1,29 @@
+program test(input, output);
+type
+   alpha    = array[1..10] of char;
+   lineType = array[1..80] of char;
+
+procedure test1(name : alpha);         {If this parameter is integer, the pro-
+                                        gram will not bomb }
+   var                                 {If any of these local variables are
+                                        deleted, the program will run OK}
+      linenum : integer;
+      line   : lineType;               {If this is a simple type, the program
+                                        will not bomb.}
+      index  : integer;
+      chars  : integer;
+      infile : text;
+
+   begin                               {If other statements are put before this
+                                        reset, they are executed, and the pro-
+                                        gram doesn't bomb until the reset is
+                                        executed.}
+
+      reset(infile, '/dev/null');
+   end;
+      
+begin
+   rewrite(output,'/dev/null');                {If this rewrite statement is not here,
+                                        the program will not bomb}
+   test1('/dev/null');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/size.p b/usr/src/usr.bin/pascal/tstpx/src/size.p
new file mode 100644 (file)
index 0000000..d768262
--- /dev/null
@@ -0,0 +1,34 @@
+program size(input,output);
+
+type
+str = array[1..20] of char;
+bigary = array[1..10000] of integer;
+{huge = array[1..20000] of integer;}
+color = (black, purple, violet, red, pink, green,
+        blue, orange, yellow, white, none);
+
+var
+nums :bigary;
+{mnums :huge;}
+paint :color;
+
+function bar( value :integer) :str;
+begin
+write(value:1);
+bar := ' is the value';
+end;
+
+function foo :str;
+begin
+foo := 'this is a test';
+end;
+
+begin
+writeln('Enter an integer');
+read(nums[5]);
+writeln(bar(nums[5]));
+writeln(foo);
+writeln('enter a color');
+read(paint);
+writeln('The next color is ',succ(paint));
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/sort.p b/usr/src/usr.bin/pascal/tstpx/src/sort.p
new file mode 100644 (file)
index 0000000..6b10e7d
--- /dev/null
@@ -0,0 +1,10 @@
+program bench1(output);
+    const size = 300;
+    var i,j,t: integer; a: array[1..size] of integer;
+begin for i := 1 to size do a[i] := size + 1 - i;
+    for i := size-1 downto 1 do
+       for j := i to size-1 do
+           if a[j] > a[j+1] then
+               begin t := a[j]; a[j] := a[j+1]; a[j+1] := t end;
+    { for i := 1 to size do writeln(a[i]) }
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/strngs.p b/usr/src/usr.bin/pascal/tstpx/src/strngs.p
new file mode 100644 (file)
index 0000000..6098c3e
--- /dev/null
@@ -0,0 +1,72 @@
+program strngs(output);
+
+const
+STRSZE = 10000;
+CHKPT1 = 6800;
+CHKPT2 = 3000;
+
+type
+longstr = array[1..STRSZE] of char;
+
+var
+str1, str2 :longstr;
+i :integer;
+
+begin
+for i := 1 to STRSZE do begin
+       str1[i] := chr((i mod 127) + 1);
+       str2[i] := chr((i mod 127) + 1);
+       end;
+str1[CHKPT1] := 'a';
+str2[CHKPT1] := 'b';
+if str1 = str2 then
+       writeln('= fails')
+else
+       writeln('= succeeds');
+if str1 <> str2 then
+       writeln('<> succeeds')
+else
+       writeln('<> fails');
+if str1 > str2 then
+       writeln('> fails')
+else
+       writeln('> succeeds');
+if str1 < str2 then
+       writeln('< succeeds')
+else
+       writeln('< fails');
+if str1 >= str2 then
+       writeln('>= fails')
+else
+       writeln('>= succeeds');
+if str1 <= str2 then
+       writeln('<= succeeds')
+else
+       writeln('<= fails');
+str1[CHKPT2] := 'a';
+str2[CHKPT2] := 'b';
+if str1 = str2 then
+       writeln('= fails')
+else
+       writeln('= succeeds');
+if str1 <> str2 then
+       writeln('<> succeeds')
+else
+       writeln('<> fails');
+if str1 > str2 then
+       writeln('> fails')
+else
+       writeln('> succeeds');
+if str1 < str2 then
+       writeln('< succeeds')
+else
+       writeln('< fails');
+if str1 >= str2 then
+       writeln('>= fails')
+else
+       writeln('>= succeeds');
+if str1 <= str2 then
+       writeln('<= succeeds')
+else
+       writeln('<= fails');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t01.p b/usr/src/usr.bin/pascal/tstpx/src/t01.p
new file mode 100644 (file)
index 0000000..0f73cc9
--- /dev/null
@@ -0,0 +1,24 @@
+program graph1(output);
+const
+       d = 0.0625;
+       s = 32;
+       h = 34;
+       c = 6.28318;
+       lim = 32;
+var
+       x,y: real;
+       i,n: integer;
+
+begin
+       for i := 1 to lim do
+       begin
+               x := x/i;
+               y := exp(-x)*sin(c*x);
+               n := round(s*y) + h;
+               repeat
+                       write(' ');
+                       n := n-1;
+               until n=0;
+               writeln('*')
+       end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t03.p b/usr/src/usr.bin/pascal/tstpx/src/t03.p
new file mode 100644 (file)
index 0000000..7e6acab
--- /dev/null
@@ -0,0 +1,31 @@
+program graph2(output);
+const
+       d = 0.0625;
+       s = 32;
+       h1 = 34;
+       h2 = 68;
+       c = 6.28318;
+       lim = 32;
+var
+       i,j,k,n: integer;
+       x,y: real;
+       a: array[1..h2] of char;
+begin
+       for j := 1 to h2 do
+               a[j] := ' ';
+       for i := 0 to lim do
+       begin
+               x := d*i;
+               y := exp(-x)*sin(c*x);
+               a[h1] := ':';
+               n := round(s*y) + h1;
+               a[n] := '*';
+               if n < h1 then
+                       k := h1 else
+                       k := n;
+               for j := 1 to k do
+                       write(a[j]);
+               writeln;
+               a[n] := ' ';
+       end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t04.p b/usr/src/usr.bin/pascal/tstpx/src/t04.p
new file mode 100644 (file)
index 0000000..114ed6a
--- /dev/null
@@ -0,0 +1,47 @@
+program roman(output);
+var
+       x,y: integer;
+begin
+       y := 1;
+       repeat
+               x := y;
+               write(y, ' ');
+               while x >= 1000 do
+               begin
+                       write('m');
+                       x := x-1000
+               end;
+               while x >= 500 do
+               begin
+                       write('d');
+                       x := x-500
+               end;
+               while x >= 100 do
+               begin
+                       write('c');
+                       x := x-100
+               end;
+               if x >= 50 then
+               begin
+                       write('l');
+                       x := x-50
+               end;
+               while x >= 10 do
+               begin
+                       write('x');
+                       x := x-10
+               end;
+               if x >= 5 then
+               begin
+                       write('v');
+                       x := x-5
+               end;
+               while x >= 1 do
+               begin
+                       write('i');
+                       x := x-1
+               end;
+               writeln;
+               y := 2*y;
+       until y > 5000
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t05.p b/usr/src/usr.bin/pascal/tstpx/src/t05.p
new file mode 100644 (file)
index 0000000..b273721
--- /dev/null
@@ -0,0 +1,15 @@
+program egwhile(output);
+var
+       n: integer;
+       h: real;
+begin
+       n := 10;
+       write(n);
+       h := 0;
+       while n > 0 do
+       begin
+               h := h + 1/n;
+               n := n-1;
+       end;
+       writeln(h)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t06.p b/usr/src/usr.bin/pascal/tstpx/src/t06.p
new file mode 100644 (file)
index 0000000..194cd9e
--- /dev/null
@@ -0,0 +1,14 @@
+program egwhile(output);
+var
+       n: integer;
+       h: real;
+begin
+       n := 10;
+       write(n);
+       h := 0;
+       repeat
+               h := h + 1/n;
+               n := n-1;
+       until n = 0;
+       writeln(h)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t07.p b/usr/src/usr.bin/pascal/tstpx/src/t07.p
new file mode 100644 (file)
index 0000000..d70a9ef
--- /dev/null
@@ -0,0 +1,12 @@
+program egwhile(output);
+var
+       i,n: integer;
+       h: real;
+begin
+       n := 10;
+       write(n);
+       h := 0;
+       for i := n downto 1 do
+               h := h + 1/i;
+       writeln(h)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t08.p b/usr/src/usr.bin/pascal/tstpx/src/t08.p
new file mode 100644 (file)
index 0000000..9b6f493
--- /dev/null
@@ -0,0 +1,28 @@
+program summing(output);
+var
+       s1, s2p, s2n, s3, s4p, s4n,
+       lrp, lrn, rlp, rln: real;
+       i: integer;
+begin
+       s1 := 0;
+       s2p := 0;
+       s2n := 0;
+       s3 := 0;
+       s4p := 0;
+       s4n := 0;
+       for i := 1 to 500 do
+       begin
+               lrp := 1/(2*i-1);
+               lrn := 1/(2*i);
+               rlp := 1/(10001-2*i);
+               rln := 1/(10002-2*i);
+               s1 := s1 + lrp - lrn;
+               s2p := s2p + lrp;
+               s2n := s2n + lrn;
+               s3 := s3 + rlp - rln;
+               s4p := s4p + rlp;
+               s4n := s4n + rln;
+       end;
+       writeln(s1, s2p-s2n);
+       writeln(s3, s4p-s4n);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t09.p b/usr/src/usr.bin/pascal/tstpx/src/t09.p
new file mode 100644 (file)
index 0000000..c6543cf
--- /dev/null
@@ -0,0 +1,19 @@
+program sideffect(output);
+var
+       a, z: integer;
+function sneaky(x: integer): integer;
+       begin
+               z := z-x;
+               sneaky := sqr(x);
+       end;
+begin
+       z := 10;
+       a := sneaky(z);
+       writeln(a, z);
+       z := 10;
+       a := sneaky(10) * sneaky(z);
+       writeln(a, z);
+       z := 10;
+       a := sneaky(z) * sneaky(10);
+       writeln(a, z);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t10.p b/usr/src/usr.bin/pascal/tstpx/src/t10.p
new file mode 100644 (file)
index 0000000..5948701
--- /dev/null
@@ -0,0 +1,29 @@
+program expon2(output);
+var
+       pi, spi: real;
+
+function power(x: real; y: integer): real;
+       var
+               z: real;
+       begin
+               z := 1;
+               while y>0 do
+               begin
+                       while not odd(y) do
+                       begin
+                               y := y div 2;
+                               x := sqr(x);
+                       end;
+                       y := y-1;
+                       z := x*z;
+               end;
+               power := z;
+       end;
+begin
+       pi := 3.14159;
+       writeln(2.0, 7, power(2.0, 7));
+       spi := power(pi, 2);
+       writeln(pi, 2, spi);
+       writeln(spi, 2, power(spi, 2));
+       writeln(pi, 4, power(pi, 4));
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t11.p b/usr/src/usr.bin/pascal/tstpx/src/t11.p
new file mode 100644 (file)
index 0000000..0ebecec
--- /dev/null
@@ -0,0 +1,19 @@
+program recursivegcd(output);
+var
+       x, y, n: integer;
+function gcd(m,n: integer): integer;
+       begin
+               if n=0 then
+                       gcd := m else
+                       gcd := gcd(n, m mod n);
+       end;
+procedure try(a, b: integer);
+       begin
+               writeln(a, b, gcd(a, b));
+       end;
+begin
+       try(18, 27);
+       try(312, 2142);
+       try(61, 53);
+       try(98, 868);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t12.p b/usr/src/usr.bin/pascal/tstpx/src/t12.p
new file mode 100644 (file)
index 0000000..0131832
--- /dev/null
@@ -0,0 +1,26 @@
+program records(output);
+type
+       cmplx = record
+               rp: real;
+               ip: real;
+       end;
+var
+       x, y: cmplx;
+function cadd(a,b: cmplx): cmplx;
+       var result: cmplx;
+       begin
+               result.rp := a.rp + b.rp;
+               result.ip := a.ip + b.ip;
+               cadd := result;
+       end;
+procedure cprint(a: cmplx);
+       begin
+               writeln(a.rp, '+', a.ip, 'i');
+       end;
+begin
+       x.rp := 1;
+       x.ip := 2;
+       y.rp := 3;
+       y.ip := 4;
+       cprint(cadd(x, y));
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t13.p b/usr/src/usr.bin/pascal/tstpx/src/t13.p
new file mode 100644 (file)
index 0000000..31682d1
--- /dev/null
@@ -0,0 +1,56 @@
+program rec(output);
+type
+       alfa = packed array[1..10] of char;
+       status = (married, widowed, divorced, single);
+       date = record
+               mo: (jan, feb, mar, apr, may, jun,
+                       july, aug, sept, Oct, nov, dec);
+               day: 1..31;
+               year: integer
+               end;
+       person = record
+               name: record
+                       first, last: alfa
+                       end;
+               ss: integer;
+               sex: (male, female);
+               birth: date;
+               depdts: integer;
+               case ms: status of
+                       married, widowed: (
+                               mdate: date);
+                       divorced: (
+                               ddate: date;
+                               firstd: boolean);
+                       single: (
+                               indepdt: boolean)
+               end;
+var
+       pp: person;
+       p: ^person;
+begin
+       pp.name.last := 'woodyard';
+       pp.name.first := 'edward';
+       pp.ss := 845680539;
+       pp.sex := male;
+       pp.birth.mo := aug;
+       pp.birth.day := 30;
+       pp.birth.year := 1941;
+       pp.depdts := 1;
+       pp.ms := single;
+       pp.indepdt := true;
+
+       new(p);
+       p^.name.last := 'woodyard';
+       p^.name.first := 'edward';
+       p^.ss := 845680539;
+       p^.sex := male;
+       p^.birth.mo := aug;
+       p^.birth.day := 30;
+       p^.birth.year := 1941;
+       p^.depdts := 1;
+       p^.ms := single;
+       p^.indepdt := true;
+       if pp = p^ then
+               writeln(true);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t14.p b/usr/src/usr.bin/pascal/tstpx/src/t14.p
new file mode 100644 (file)
index 0000000..45ccb0e
--- /dev/null
@@ -0,0 +1,42 @@
+program rec(output);
+type
+       alfa = packed array[1..10] of char;
+       status = (married, widowed, divorced, single);
+       date = record
+               mo: (jan, feb, mar, apr, may, jun,
+                       july, aug, sept, Oct, nov, dec);
+               day: 1..31;
+               year: integer
+               end;
+       person = record
+               name: record
+                       first, last: alfa
+                       end;
+               ss: integer;
+               sex: (male, female);
+               birth: date;
+               depdts: integer;
+               case ms: status of
+                       married, widowed: (
+                               mdate: date);
+                       divorced: (
+                               ddate: date;
+                               firstd: boolean);
+                       single: (
+                               indepdt: boolean)
+               end;
+var
+       p: ^person;
+begin
+       new(p);
+       p^.name.last := 'woodyard';
+       p^.name.first := 'edward';
+       p^.ss := 845680539;
+       p^.sex := male;
+       p^.birth.mo := aug;
+       p^.birth.day := 30;
+       p^.birth.year := 1941;
+       p^.depdts := 1;
+       p^.ms := single;
+       p^.indepdt := true;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t15.p b/usr/src/usr.bin/pascal/tstpx/src/t15.p
new file mode 100644 (file)
index 0000000..9cdd3cb
--- /dev/null
@@ -0,0 +1,16 @@
+program main(output);
+const
+       size = 10;
+var
+       aset: set of 1..size;
+       i, j: integer;
+begin
+       aset := [];
+       for i := 1 to size do
+       begin
+               aset := [i]+aset;
+               for j := 1 to size do
+                       if j in aset then
+                               writeln(i,j);
+       end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t16.p b/usr/src/usr.bin/pascal/tstpx/src/t16.p
new file mode 100644 (file)
index 0000000..af6d4ea
--- /dev/null
@@ -0,0 +1,21 @@
+program Main(input, output);
+procedure copy(var inp, out: text);
+       var
+               c: char;
+       begin
+               while not eof(inp) do
+               begin
+                       while not eoln(inp) do
+                       begin
+                               c := inp^;
+                               out^ := c;
+                               put(out);
+                               get(inp);
+                       end;
+                       writeln;
+                       get(inp);
+               end;
+       end;
+begin
+       copy(input, output);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t17.p b/usr/src/usr.bin/pascal/tstpx/src/t17.p
new file mode 100644 (file)
index 0000000..3a2b777
--- /dev/null
@@ -0,0 +1,20 @@
+program graph1(output);
+const
+       d = 0.0625;
+       s = 32;
+       h = 34;
+       c = 6.28318;
+       lim = 32;
+var
+       x,y: real;
+       i,n: integer;
+
+begin
+       for i := 0 to lim do
+       begin
+               x := d*i;
+               y := exp(-x)*sin(c*x);
+               n := round(s*y) + h;
+               writeln('*':n);
+       end
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t18.p b/usr/src/usr.bin/pascal/tstpx/src/t18.p
new file mode 100644 (file)
index 0000000..ca53ca5
--- /dev/null
@@ -0,0 +1,12 @@
+program Main(output);
+type
+       t = record
+               a: real;
+               b: integer;
+       end;
+var
+       x: t;
+begin
+       with x do begin a:=1.0; b:=1; end;
+       writeln(x.a, x.b);
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t19.p b/usr/src/usr.bin/pascal/tstpx/src/t19.p
new file mode 100644 (file)
index 0000000..c18b603
--- /dev/null
@@ -0,0 +1,55 @@
+program main(input,output);
+var
+       o, z: set of 1..15;
+begin
+       o := [1];
+       z := [];
+       if o < z then
+               writeln('o < z');
+       if o <= z then
+               writeln('o <= z');
+       if o = z then
+               writeln('o = z');
+       if o <> z then
+               writeln('o <> z');
+       if o >= z then
+               writeln('o >= z');
+       if o > z then
+               writeln('o > z');
+       if z < o then
+               writeln('z < o');
+       if z <= o then
+               writeln('z <= o');
+       if z = o then
+               writeln('z = o');
+       if z <> o then
+               writeln('z <> o');
+       if z >= o then
+               writeln('z >= o');
+       if z > o then
+               writeln('z > o');
+       if o < o then
+               writeln('o < o');
+       if o <= o then
+               writeln('o <= o');
+       if o = o then
+               writeln('o = o');
+       if o <> o then
+               writeln('o <> o');
+       if o >= o then
+               writeln('o >= o');
+       if o > o then
+               writeln('o > o');
+       if z < z then
+               writeln('z < z');
+       if z <= z then
+               writeln('z <= z');
+       if z = z then
+               writeln('z = z');
+       if z <> z then
+               writeln('z <> z');
+       if z >= z then
+               writeln('z >= z');
+       if z > z then
+               writeln('z > z');
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t6.6.3.1-5.p b/usr/src/usr.bin/pascal/tstpx/src/t6.6.3.1-5.p
new file mode 100644 (file)
index 0000000..d676ac7
--- /dev/null
@@ -0,0 +1,29 @@
+{TEST 6.6.3.1-5, CLASS=CONFORMANCE}
+
+{ When a procedure (or function) with a parameter list is
+  included in the formal parameter list of another procedure
+  (or function), the identifiers in the parameter list of the
+  procedure parameter have defining occurences for that list
+  and the corresponding block for the procedure only, and not
+  for the block of the procedure to which it is passed.
+  The example in this program should be passed by the compiler. }
+
+program t6p6p3p1d5(output);
+var
+   i : integer;
+procedure alsoconforms(x : integer);
+begin
+   writeln(' PASS...6.6.3.1-5')
+end;
+
+procedure conforms(procedure alsoconforms(x : integer));
+   var x : boolean;
+begin
+   x:=true;
+   alsoconforms(1)
+end;
+
+begin
+   i:=2;
+   conforms(alsoconforms)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/t6.6.3.4-2.p b/usr/src/usr.bin/pascal/tstpx/src/t6.6.3.4-2.p
new file mode 100644 (file)
index 0000000..71039bb
--- /dev/null
@@ -0,0 +1,55 @@
+{TEST 6.6.3.4-2, CLASS=CONFORMANCE}
+
+{ This program tests that the environment of procedure
+  parameters is as stated in the Pascal Standard.
+  The compiler fails if the program does not compile, or
+  the program states that this is so. }
+
+program t6p6p3p4d2(output);
+var
+   globalone, globaltwo : integer;
+procedure p(procedure f(procedure a; procedure b);procedure g);
+   var
+      localtop : integer;
+   procedure r;
+      begin
+         if globalone=1 then
+         begin
+            if (globaltwo<>2) or (localtop<>1) then
+               writeln(' FAIL1...6.6.3.4-2')
+         end
+         else
+            if globalone=2 then
+            begin
+               if (globaltwo<>2) or (localtop<>2) then
+                  writeln(' FAIL2...6.6.3.4-2')
+               else
+                  writeln(' PASS...6.6.3.4-2')
+            end
+            else
+               writeln(' FAIL3...6.6.3.4-2');
+         globalone:=globalone+1;
+      end;     { of r }
+   begin    { of p }
+      globaltwo:=globaltwo+1;
+      localtop:=globaltwo;
+      if globaltwo=1 then
+         p(f,r)
+      else
+         f(g,r)
+   end;     { of p }
+procedure q(procedure f; procedure g);
+   begin
+      f;
+      g
+   end;
+procedure dummy;
+begin
+   writeln(' FAIL4...6.6.3.4-2')
+end;
+
+begin
+   globalone:=1;
+   globaltwo:=0;
+   p(q,dummy)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/testeoln.p b/usr/src/usr.bin/pascal/tstpx/src/testeoln.p
new file mode 100644 (file)
index 0000000..42f326c
--- /dev/null
@@ -0,0 +1,20 @@
+program test(output);
+
+var
+ch :char;
+f :file of char;
+
+begin
+rewrite(f);
+writeln(f,'abc');
+write(f,'      ');
+reset(f);
+repeat
+  read(f,ch);
+  writeln('in main: eoln = ',eoln(f),'   eof = ',eof(f),'   ch = ',ch);
+  if eoln(f) and not eof(f) then begin
+    read(f,ch);
+    writeln('in eolncode: eoln = ',eoln(f),'   eof = ',eof(f),'   ch = ',ch);
+    end
+  until eof(f)
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/testio.p b/usr/src/usr.bin/pascal/tstpx/src/testio.p
new file mode 100644 (file)
index 0000000..9288e17
--- /dev/null
@@ -0,0 +1,63 @@
+program testio(output);
+
+const
+str = 'foobar';
+ch = 'c';
+c13 = 13;
+o13 = 13b;
+r13 = 13.0;
+
+type
+color = (red, green, blue, yellow, orange, violet, purple);
+
+var
+hue :color;
+r :real;
+i :integer;
+strg :alfa;
+
+begin
+r := 0;
+for i := 1 to 15 do begin
+       writeln(i:2,r:i,r:i:i,-r:i,-r:i:i,i:i:i,' ',i:i);
+       r := 2*r+0.1;
+       end;
+i := 1;   r := 0;
+writeln(i:2,r:1,r:1:1,-r:1,-r:1:1,i:1:1,' ',i:1);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:2,r:2:2,-r:2,-r:2:2,i:2:2,' ',i:2);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:3,r:3:3,-r:3,-r:3:3,i:3:3,' ',i:3);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:4,r:4:4,-r:4,-r:4:4,i:4:4,' ',i:4);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:5,r:5:5,-r:5,-r:5:5,i:5:5,' ',i:5);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:6,r:6:6,-r:6,-r:6:6,i:6:6,' ',i:6);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:7,r:7:7,-r:7,-r:7:7,i:7:7,' ',i:7);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:8,r:8:8,-r:8,-r:8:8,i:8:8,' ',i:8);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:9,r:9:9,-r:9,-r:9:9,i:9:9,' ',i:9);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:10,r:10:10,-r:10,-r:10:10,i:10:10,' ',i:10);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:11,r:11:11,-r:11,-r:11:11,i:11:11,' ',i:11);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:12,r:12:12,-r:12,-r:12:12,i:12:12,' ',i:12);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:13,r:13:13,-r:13,-r:13:13,i:13:13,' ',i:13);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:14,r:14:14,-r:14,-r:14:14,i:14:14,' ',i:14);
+i := i+1;   r := 2*r+0.1;
+writeln(i:2,r:15,r:15:15,-r:15,-r:15:15,i:15:15,' ',i:15);
+for hue := red to purple do
+       writeln(hue);
+i := 13;
+writeln(str,ch:2,ch,' ',13,c13,o13,r13,i,i hex,i oct,ch oct);
+strg:='1234567890';
+for i:=5 to 15 do begin
+       writeln('->',strg:i,'<-');
+       end;
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/transpose.p b/usr/src/usr.bin/pascal/tstpx/src/transpose.p
new file mode 100644 (file)
index 0000000..cdbbe4e
--- /dev/null
@@ -0,0 +1,23 @@
+program bench2(output);
+    const size = 10;
+    var i, j: integer; a: array[1..size,1..size] of char; ch: char;
+
+procedure print;
+begin
+    for i := 1 to size do begin
+       for j := 1 to size do
+           write(a[i,j]);
+       writeln
+    end
+end;
+
+begin
+    for i := 1 to size do
+       for j := 1 to size do
+            a[i,j] := chr(ord('a')+2*i+j-2);
+    print;
+    for i := 1 to size do
+       for j := i+1 to size do
+            begin ch := a[i,j]; a[i,j] := a[j,i]; a[j,i] := ch end;
+    writeln; print
+end.
diff --git a/usr/src/usr.bin/pascal/tstpx/src/wnj.p b/usr/src/usr.bin/pascal/tstpx/src/wnj.p
new file mode 100644 (file)
index 0000000..f8b9c56
--- /dev/null
@@ -0,0 +1,35 @@
+program testset (output);
+
+{ try to figure out why sets don't work }
+
+const
+       firstel = -1; lastel = 80;
+type
+       eltype = firstel..lastel;
+       settype = set of eltype;
+var
+       tset: settype;
+
+procedure elements (someset: settype);
+       { print the elements of a set}
+       var i: eltype;
+
+       begin
+               writeln;
+               writeln ('in elements');
+               for i := firstel to lastel do
+                       if i in someset then writeln ('member:',i)
+       end; {elements}
+
+begin
+       tset := [];             elements (tset);
+       tset := [23,45];        elements (tset);
+
+       if 23 in tset then writeln ('ok'); {to eliminate the possibility that
+                                               the problem arises from passing
+                                               a set as a parameter}
+
+       tset := tset + [firstel]; elements (tset);
+       tset := tset + [lastel];elements (tset);
+       tset := [];             elements (tset)
+       end.