Initial commit
This commit is contained in:
3
unix/tru64/CVS/Entries
Normal file
3
unix/tru64/CVS/Entries
Normal file
@ -0,0 +1,3 @@
|
||||
/sys_open.f/1.1.1.1/Tue Nov 2 15:54:57 2004//
|
||||
/zm_fit/1.1.1.1/Tue Nov 2 15:54:57 2004//
|
||||
D
|
1
unix/tru64/CVS/Repository
Normal file
1
unix/tru64/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
analysis/fit/unix/tru64
|
1
unix/tru64/CVS/Root
Normal file
1
unix/tru64/CVS/Root
Normal file
@ -0,0 +1 @@
|
||||
/afs/psi.ch/project/sinq/cvs
|
54
unix/tru64/sys_open.f
Normal file
54
unix/tru64/sys_open.f
Normal file
@ -0,0 +1,54 @@
|
||||
!!-----------------------------------------------------------------------------
|
||||
!!
|
||||
subroutine SYS_OPEN(LUN, FILE, ACCESS, IOSTAT) !!
|
||||
!! ==============================================
|
||||
!!
|
||||
!! ACCESS='r': open file for read
|
||||
!! ACCESS='w': open or create file for write (on vms: new version, on unix: overwrite)
|
||||
!! ACCESS='wo': overwrite existing file (do not make a new version)
|
||||
!! ACCESS='wn': keep old file (on unix systems, a tilde '~' is appended to the name)
|
||||
!! ACCESS='a': open or create file for append
|
||||
|
||||
integer LUN !! (in) logical unit number
|
||||
character FILE*(*) !! (in) filename
|
||||
character ACCESS*(*) !! (in) access mode
|
||||
integer IOSTAT !! (out) status
|
||||
|
||||
character acc*2
|
||||
character amnt*128
|
||||
integer i,j,l,ios
|
||||
|
||||
call str_upcase(acc, access)
|
||||
|
||||
if (acc .eq. 'R') then
|
||||
open(lun, name=file, iostat=iostat, status='old', readonly)
|
||||
if (iostat .eq. 0) RETURN
|
||||
l=0
|
||||
i=1
|
||||
do while (i .ne. 0)
|
||||
l=l+i
|
||||
i=index(file(l+1:),'/')
|
||||
enddo
|
||||
if (l .eq. 1) RETURN ! no directory given
|
||||
open(lun, name=file(1:l-1), iostat=ios, status='old')
|
||||
if (ios .eq. 0) then
|
||||
close(lun)
|
||||
RETURN ! directory exists -> already mounted
|
||||
endif
|
||||
call sys_getenv('dat_automount', amnt)
|
||||
if (amnt .eq. ' ') RETURN
|
||||
call sys_cmd(amnt) !try to mount
|
||||
open(lun, name=file, iostat=iostat, status='old', readonly)
|
||||
else if (acc .eq. 'W' .or. acc .eq. 'WO') then
|
||||
open(lun, name=file, iostat=iostat, status='unknown')
|
||||
else if (acc .eq. 'WN') then
|
||||
! rename to be done
|
||||
open(lun, name=file, iostat=iostat, status='unknown')
|
||||
else if (acc .eq. 'A') then
|
||||
open(lun, name=file, iostat=iostat, status='unknown'
|
||||
1, access='append')
|
||||
else
|
||||
print *,'unknown access mode: ',acc
|
||||
stop 'error in SYS_OPEN'
|
||||
endif
|
||||
end
|
1
unix/tru64/zm_fit
Normal file
1
unix/tru64/zm_fit
Normal file
@ -0,0 +1 @@
|
||||
this file is used by config
|
Reference in New Issue
Block a user