Fix the jt9 command line acceptance constraints

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6295 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2015-12-18 17:57:18 +00:00
parent 93b2f4164a
commit 61395e9481

View File

@ -18,8 +18,7 @@ program jt9
character wisfile*80 character wisfile*80
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, & integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, &
fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=60001,nexp_decode=0 fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=60001,nexp_decode=0
logical :: shmem = .false., read_files = .false., & logical :: read_files = .true., tx9 = .false., display_help = .false.
tx9 = .false., display_help = .false.
type (option) :: long_options(22) = [ & type (option) :: long_options(22) = [ &
option ('help', .false., 'h', 'Display this help message', ''), & option ('help', .false., 'h', 'Display this help message', ''), &
option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), & option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), &
@ -77,7 +76,7 @@ program jt9
case ('h') case ('h')
display_help = .true. display_help = .true.
case ('s') case ('s')
shmem = .true. read_files = .false.
shm_key = optarg(:arglen) shm_key = optarg(:arglen)
case ('e') case ('e')
exe_dir = optarg(:arglen) exe_dir = optarg(:arglen)
@ -88,59 +87,43 @@ program jt9
case ('m') case ('m')
read (optarg(:arglen), *) nthreads read (optarg(:arglen), *) nthreads
case ('p') case ('p')
read_files = .true.
read (optarg(:arglen), *) ntrperiod read (optarg(:arglen), *) ntrperiod
case ('d') case ('d')
read_files = .true.
read (optarg(:arglen), *) ndepth read (optarg(:arglen), *) ndepth
case ('f') case ('f')
read_files = .true.
read (optarg(:arglen), *) nrxfreq read (optarg(:arglen), *) nrxfreq
case ('L') case ('L')
read_files = .true.
read (optarg(:arglen), *) flow read (optarg(:arglen), *) flow
case ('S') case ('S')
read_files = .true.
read (optarg(:arglen), *) fsplit read (optarg(:arglen), *) fsplit
case ('H') case ('H')
read_files = .true.
read (optarg(:arglen), *) fhigh read (optarg(:arglen), *) fhigh
case ('4') case ('4')
read_files = .true.
mode = 4 mode = 4
case ('6') case ('6')
read_files = .true.
if (mode.lt.65) mode = mode + 65 if (mode.lt.65) mode = mode + 65
case ('9') case ('9')
read_files = .true.
if (mode.lt.9.or.mode.eq.65) mode = mode + 9 if (mode.lt.9.or.mode.eq.65) mode = mode + 9
case ('T') case ('T')
read_files = .true.
tx9 = .true. tx9 = .true.
case ('w') case ('w')
read (optarg(:arglen), *) npatience read (optarg(:arglen), *) npatience
case ('c') case ('c')
read_files = .true.
read (optarg(:arglen), *) mycall read (optarg(:arglen), *) mycall
case ('G') case ('G')
read_files = .true.
read (optarg(:arglen), *) mygrid read (optarg(:arglen), *) mygrid
case ('x') case ('x')
read_files = .true.
read (optarg(:arglen), *) hiscall read (optarg(:arglen), *) hiscall
case ('g') case ('g')
read_files = .true.
read (optarg(:arglen), *) hisgrid read (optarg(:arglen), *) hisgrid
case ('X') case ('X')
read_files = .true.
read (optarg(:arglen), *) nexp_decode read (optarg(:arglen), *) nexp_decode
end select end select
end do end do
if (display_help .or. stat .lt. 0 & if (display_help .or. stat .lt. 0 &
.or. (shmem .and. remain .gt. 0) & .or. (.not. read_files .and. remain .gt. 0) &
.or. (read_files .and. remain .lt. 1) & .or. (read_files .and. remain .lt. 1)) then
.or. (shmem .and. read_files)) then
print *, 'Usage: jt9 [OPTIONS] file1 [file2 ...]' print *, 'Usage: jt9 [OPTIONS] file1 [file2 ...]'
print *, ' Reads data from *.wav files.' print *, ' Reads data from *.wav files.'
@ -172,7 +155,7 @@ program jt9
num9=0 num9=0
numfano=0 numfano=0
if (shmem) then if (.not. read_files) then
call jt9a() !We're running under control of WSJT-X call jt9a() !We're running under control of WSJT-X
go to 999 go to 999
endif endif