C-----------------------------------------------------------------------
C atio.f: Input/output routines for RPFITS under linux.
C-----------------------------------------------------------------------
C 1) Cloned from the sun4sol version with tape handling stripped
C $Id: atio.f,v 1.6 2007/07/16 01:11:50 cal103 Exp $
C-----------------------------------------------------------------------
integer function AT_CREATE (fname, async, initsz, lun)
C-----------------------------------------------------------------------
integer initsz, irec(10:99), lenrec(10:99), lun, lunsav
common /atio/ lenrec, irec, reread, lunsav, bufsav
C-----------------------------------------------------------------------
if (fname(1:5).eq.'/dev/') then
open (lun, file=fname, status='new', access='direct',
+ form='unformatted', recl=lenrec(lun), iostat=AT_CREATE)
integer function AT_REOPEN_WRITE (fname, lun)
C-----------------------------------------------------------------------
C REOPEN file - on disk only.
C-----------------------------------------------------------------------
integer irec(10:99), lenrec(10:99), lun, lunsav
common /atio/ lenrec, irec, reread, lunsav, bufsav
C-----------------------------------------------------------------------
open (lun, file=fname, status='old', access='direct',
+ form='unformatted', recl=lenrec(lun),
+ iostat=AT_REOPEN_WRITE)
integer function AT_OPEN_READ (fname, async, lun)
C-----------------------------------------------------------------------
C "READONLY" is non-standard. Had to remove it.
C-----------------------------------------------------------------------
integer irec(10:99), lenrec(10:99), lun, lunsav
common /atio/ lenrec, irec, reread, lunsav, bufsav
C-----------------------------------------------------------------------
if (fname(1:5).eq.'/dev/') then
open (lun, file=fname, status='old', access='direct',
+ form='unformatted', recl=lenrec(lun), iostat=AT_OPEN_READ)
if (AT_OPEN_READ.ne.0) then
open (lun, file=fname, status='old', access='direct',
+ form='unformatted', recl=lenrec(lun),