summaryrefslogtreecommitdiff
path: root/lib/entail.f90
diff options
context:
space:
mode:
authorIain R. Learmonth <irl@debian.org>2015-10-18 17:55:15 +0100
committerIain R. Learmonth <irl@debian.org>2015-10-18 17:55:15 +0100
commitc720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (patch)
treeecf89ef5fb2aa173119808e84e6d2e4cc15b962c /lib/entail.f90
Imported Upstream version 1.1.r3496upstream/1.1.r3496
Diffstat (limited to 'lib/entail.f90')
-rw-r--r--lib/entail.f9030
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/entail.f90 b/lib/entail.f90
new file mode 100644
index 00000000..1228a75c
--- /dev/null
+++ b/lib/entail.f90
@@ -0,0 +1,30 @@
+subroutine entail(dgen,data0)
+
+! Move 72-bit packed data from 6-bit to 8-bit symbols and add a zero tail.
+ integer dgen(13)
+ integer*1 data0(13)
+
+ i4=0
+ k=0
+ m=0
+ do i=1,12
+ n=dgen(i)
+ do j=1,6
+ k=k+1
+ i4=i4+i4+iand(1,ishft(n,j-6))
+ i4=iand(i4,255)
+ if(k.eq.8) then
+ m=m+1
+ if(i4.gt.127) i4=i4-256
+ data0(m)=i4
+ k=0
+ endif
+ enddo
+ enddo
+ do m=10,13
+ data0(m)=0
+ enddo
+
+ return
+end subroutine entail
+