aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibf/dsfree.f
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/boot/spp/rpp/ratlibf/dsfree.f
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'unix/boot/spp/rpp/ratlibf/dsfree.f')
-rw-r--r--unix/boot/spp/rpp/ratlibf/dsfree.f44
1 files changed, 44 insertions, 0 deletions
diff --git a/unix/boot/spp/rpp/ratlibf/dsfree.f b/unix/boot/spp/rpp/ratlibf/dsfree.f
new file mode 100644
index 00000000..8ab2f2a0
--- /dev/null
+++ b/unix/boot/spp/rpp/ratlibf/dsfree.f
@@ -0,0 +1,44 @@
+ subroutine dsfree (block)
+ integer block
+ integer mem( 1)
+ common/cdsmem/mem
+ integer p0, p, q
+ integer n, junk
+ integer con (10)
+ p0 = block - 2
+ n = mem (p0 + 0)
+ q = 2
+23000 continue
+ p = mem (q + 1)
+ if (.not.(p .eq. 0 .or. p .gt. p0))goto 23003
+ goto 23002
+23003 continue
+ q = p
+23001 goto 23000
+23002 continue
+ if (.not.(q + mem (q + 0) .gt. p0))goto 23005
+ call remark (45Hin dsfree: attempt to free unallocated block.)
+ call remark (21Htype 'c' to continue.)
+ junk = getlin (con, 0)
+ if (.not.(con (1) .ne. 99 .and. con (1) .ne. 67))goto 23007
+ call endst
+23007 continue
+ return
+23005 continue
+ if (.not.(p0 + n .eq. p .and. p .ne. 0))goto 23009
+ n = n + mem (p + 0)
+ mem (p0 + 1) = mem (p + 1)
+ goto 23010
+23009 continue
+ mem (p0 + 1) = p
+23010 continue
+ if (.not.(q + mem (q + 0) .eq. p0))goto 23011
+ mem (q + 0) = mem (q + 0) + n
+ mem (q + 1) = mem (p0 + 1)
+ goto 23012
+23011 continue
+ mem (q + 1) = p0
+ mem (p0 + 0) = n
+23012 continue
+ return
+ end