aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/fitsio/ftghad.f
blob: 5c64d01a0f0142ba5d4a49a15ae5fb17b9ef944d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
C----------------------------------------------------------------------
        subroutine ftghad(iunit,curhdu,nxthdu)

C       return the starting byte address of the CHDU and the next HDU.

C       curhdu  i  starting address of the CHDU
C       nxthdu  i  starting address of the next HDU

C       written by Wm Pence, HEASARC/GSFC, May, 1995

        integer iunit,curhdu,nxthdu

C       COMMON BLOCK DEFINITIONS:--------------------------------------------
        integer nb,ne
        parameter (nb = 20)
        parameter (ne = 200)
        integer bufnum,chdu,hdutyp,maxhdu,hdstrt,hdend,nxthdr,dtstrt
        integer nxtfld
        logical wrmode
        common/ft0001/bufnum(199),chdu(nb),hdutyp(nb),maxhdu(nb),
     &  wrmode(nb),hdstrt(nb,ne),hdend(nb),nxthdr(nb),dtstrt(nb),nxtfld
C       END OF COMMON BLOCK DEFINITIONS-----------------------------------

        integer ibuff,hdunum

        ibuff=bufnum(iunit)
        hdunum=chdu(ibuff)
        curhdu=hdstrt(ibuff,hdunum)
        nxthdu=hdstrt(ibuff,hdunum+1)
        end