From 00c9fb10e1025e1726b6ae8e305595b9cb09bfcf Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 19 Apr 2021 15:55:40 -0400 Subject: [PATCH] Working toward proper usage of OS-independent datadir and tempdir. --- map65/libm65/decode0.f90 | 9 +++++++-- map65/libm65/m65.f90 | 5 +++-- map65/libm65/m65a.f90 | 15 ++++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/map65/libm65/decode0.f90 b/map65/libm65/decode0.f90 index 5ddebc5e1..23bd44501 100644 --- a/map65/libm65/decode0.f90 +++ b/map65/libm65/decode0.f90 @@ -8,15 +8,20 @@ subroutine decode0(dd,ss,savg,nstandalone) integer hist(0:32768) character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 character mycall0*12,hiscall0*12,hisgrid0*6 - character*300 datadir,tempdir + character*200 datadir0,tempdir0,datadir,tempdir + common/osdir/datadir,tempdir common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime,datadir,tempdir + nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime, & + datadir0,tempdir0 common/tracer/ limtrace,lu data neme0/-99/,mcall3b/1/ save + datadir="'"//trim(datadir0)//"'" + tempdir="'"//trim(tempdir0)//"'" + call timer('decode0 ',0) if(newdat.ne.0) then nz=52*96000 diff --git a/map65/libm65/m65.f90 b/map65/libm65/m65.f90 index c8efd3e94..1aef328bd 100644 --- a/map65/libm65/m65.f90 +++ b/map65/libm65/m65.f90 @@ -13,13 +13,14 @@ program m65 common/tracer/limtrace,lu real*8 fc0,fcenter character*80 arg,infile - character*300 datadir,tempdir + character*200 datadir0,tempdir0 character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20 common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(36) common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime,datadir,tempdir + nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime, & + datadir0,tempdir0 nargs=iargc() if(nargs.ne.1 .and. nargs.lt.5) then diff --git a/map65/libm65/m65a.f90 b/map65/libm65/m65a.f90 index 259f68001..7a07c6f12 100644 --- a/map65/libm65/m65a.f90 +++ b/map65/libm65/m65a.f90 @@ -63,16 +63,17 @@ subroutine m65c(dd,ss,savg,nparams0) integer*1 detach_m65 real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768) real*8 fcenter - integer nparams0(189),nparams(189) + integer nparams0(139),nparams(139) character*12 mycall,hiscall character*6 mygrid,hisgrid character*20 datetime - character*300 datadir,tempdir + character*200 datadir0,tempdir0 character*1 c0 common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, & ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, & mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, & - nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime,datadir,tempdir + nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime, & + datadir0,tempdir0 equivalence (nparams,fcenter) nparams=nparams0 !Copy parameters into common/npar/ @@ -92,11 +93,11 @@ subroutine m65c(dd,ss,savg,nparams0) i0=index(datetime,c0) if(i0.gt.0) datetime=datetime(1:i0-1) - i0=index(datadir,c0) - if(i0.gt.0) datadir=datadir(1:i0-1) + i0=index(datadir0,c0) + if(i0.gt.0) datadir0=datadir0(1:i0-1) - i0=index(tempdir,c0) - if(i0.gt.0) tempdir=tempdir(1:i0-1) + i0=index(tempdir0,c0) + if(i0.gt.0) tempdir0=tempdir0(1:i0-1) if(iand(nrxlog,1).ne.0) then write(21,1000) datetime(:17)