WSJT-X/rfile2.f
Joe Taylor 03bddc6c9f Many fixes to make it work on Linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@388 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2007-06-13 17:05:57 +00:00

27 lines
586 B
Fortran

subroutine rfile2(fname,buf,n,nr)
C Read data from disk.
integer RMODE
parameter(RMODE=0)
integer*1 buf(n)
integer open,read,close
integer fd
character fname*(*)
data iz/0/ !Silence g77 warning
do i=80,1,-1
if(fname(i:i).ne.' ') then
iz=i
go to 10
endif
enddo
10 fname=fname(1:iz)//char(0)
fd=open(fname,RMODE) !Open file for reading
nr=read(fd,buf,n)
i=close(fd)
return
end