C------------------------------------------------------------------------ subroutine ftflsh(lbuff,status) C flush any modified buffers associated with lbuff to disk. C Make the contents of the buffers undefined. C lbuff i logical buffer assocaiated with this file C status i output error status integer lbuff,status C COMMON BLOCK DEFINITIONS:-------------------------------------------- integer nb,pb parameter (nb = 20) parameter (pb = 20) 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 ounit,rlen,i C ignore input status and flush buffers regardless of status value ounit=buflun(lbuff) rlen=reclen(lbuff) C find any buffer associated with this file do 10 i=1,maxbuf if (logbuf(i) .eq. lbuff)then if (modify(i))then C write the modified buffer to disk call ftwrit(ounit,recnum(i),rlen,i,status) modify(i)=.false. end if C erase the association of this buffer with the file logbuf(i)=0 recnum(i)=0 end if 10 continue end