C---------------------------------------------------------------------- subroutine ftflus(iunit,status) C Flush all the data in the current FITS file to disk C iunit i fortran unit number C status i output error status C C written by Wm Pence, HEASARC/GSFC, March, 1996 integer iunit,extno,xtend,status if (status .gt. 0)return C get the current HDU number call ftghdn(iunit, extno) C close out the current HDU call ftchdu(iunit,status) if (status .gt. 0)then call ftpmsg('FTFLUS could not close the current HDU.') return end if C reopen the same HDU call ftgext(iunit,extno,xtend,status) if (status .gt. 0)then call ftpmsg('FTFLUS could not reopen the current HDU.') return end if end