C---------------------------------------------------------------------- subroutine ftmbyt(iunit,bytno,igneof,status) C move i/o pointer so that it is pointing to the byte number BYTNUM C in the FITS file. Subsequent read or write operations will begin C at this point. C iunit i fortran unit number C bytno i number of the byte to point to. C igneof l ignore end-of-file (107) error? C status i output error status C C written by Wm Pence, HEASARC/GSFC, June, 1991 C rewritten Feb, 1995 integer iunit,bytno,status logical igneof C COMMON BLOCK DEFINITIONS:-------------------------------------------- integer nb,ne,pb parameter (nb = 20) parameter (ne = 512) parameter (pb = 20) 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 integer buflun,currnt,reclen,bytnum,maxrec common/ftlbuf/buflun(nb),currnt(nb),reclen(nb), & bytnum(nb),maxrec(nb) integer maxbuf,logbuf,recnum,pindex logical modify common/ftpbuf/maxbuf,logbuf(pb),recnum(pb),modify(pb), & pindex(pb) C END OF COMMON BLOCK DEFINITIONS----------------------------------- integer lbuff,record,byten if (status .gt. 0)then return else if (bytno .lt. 0)then C error: negative byte number status=304 else lbuff=bufnum(iunit) C calculate the record number and byte offset to move to record=bytno/reclen(lbuff)+1 byten=mod(bytno,reclen(lbuff)) if (record .ne. recnum(currnt(lbuff)))then C not the current record, so load the new record; call ftldrc(iunit,record,igneof,status) end if bytnum(lbuff)=byten end if end