Adjustments to allow "addpfx" (temporary add-on DXCC prefix) to have

up to 8 characters.  Augmented callsign (e.g., VU4AN/VU3RYF) must have 
no more than 12 characters.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@177 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-04-21 14:02:46 +00:00
parent 3a60765801
commit 08574917cf
5 changed files with 20 additions and 14 deletions

View File

@ -1,6 +1,6 @@
! Variable Purpose Set in Thread ! Variable Purpose Set in Thread
!------------------------------------------------------------------------- !-------------------------------------------------------------------------
character addpfx*4 !Add-on prefix, as in ZA/PA2CHR GUI character addpfx*8 !Add-on prefix, as in ZA/PA2CHR GUI
integer*2 d2c !Rx data recovered from recorded file GUI integer*2 d2c !Rx data recovered from recorded file GUI
integer jzc !Length of data available in d2c GUI integer jzc !Length of data available in d2c GUI
character filename*24 !Name of wave file read from disk GUI character filename*24 !Name of wave file read from disk GUI

View File

@ -1,15 +1,18 @@
subroutine getpfx1(callsign,k) subroutine getpfx1(callsign,k)
character callsign*12 character callsign*12
character*4 c character*8 c
character addpfx*8
common/gcom4/addpfx !Can't 'include' *.f90 in *.f
include 'pfx.f' include 'pfx.f'
iz=index(callsign,' ') - 1 iz=index(callsign,' ') - 1
if(iz.lt.0) iz=12
islash=index(callsign(1:iz),'/') islash=index(callsign(1:iz),'/')
k=0 k=0
c=' ' c=' '
if(islash.gt.0 .and. (islash.le.4 .or. (islash.eq.5 .and. if(islash.gt.0 .and. islash.le.(iz-4)) then
+ iz.ge.8))) then ! Add-on prefix
c=callsign(1:islash-1) c=callsign(1:islash-1)
callsign=callsign(islash+1:iz) callsign=callsign(islash+1:iz)
do i=1,NZ do i=1,NZ
@ -18,8 +21,13 @@
go to 10 go to 10
endif endif
enddo enddo
if(addpfx.eq.c) then
k=449
go to 10
endif
else if(islash.gt.5 .or. (islash.eq.5 .and. iz.eq.6)) then else if(islash.eq.(iz-1)) then
! Add-on suffix
c=callsign(islash+1:iz) c=callsign(islash+1:iz)
callsign=callsign(1:islash-1) callsign=callsign(1:islash-1)
do i=1,NZ2 do i=1,NZ2
@ -30,10 +38,7 @@
enddo enddo
endif endif
10 continue 10 if(islash.ne.0 .and.k.eq.0) k=-1
if(islash.ne.0 .and.k.eq.0) k=-1
c print*,iz,islash,k,' ',c
return return
end end

View File

@ -2,7 +2,7 @@
character callsign*12 character callsign*12
include 'pfx.f' include 'pfx.f'
character addpfx*4 character addpfx*8
common/gcom4/addpfx common/gcom4/addpfx
k=k0 k=k0
@ -15,7 +15,7 @@
callsign=callsign(1:iz)//'/'//sfx(k-400) callsign=callsign(1:iz)//'/'//sfx(k-400)
else if(k.eq.449) then else if(k.eq.449) then
iz=index(addpfx,' ') - 1 iz=index(addpfx,' ') - 1
if(iz.lt.1) iz=4 if(iz.lt.1) iz=8
callsign=addpfx(1:iz)//'/'//callsign callsign=addpfx(1:iz)//'/'//callsign
endif endif

View File

@ -73,6 +73,7 @@
msg(j:j)=c2(i:i) msg(j:j)=c2(i:i)
if(c2(i:i).eq.' ') go to 20 if(c2(i:i).eq.' ') go to 20
enddo enddo
j=j+1
msg(j:j)=' ' msg(j:j)=' '
20 if(k.eq.0) then 20 if(k.eq.0) then

View File

@ -791,7 +791,7 @@ def prefixes(event=NONE):
n=0 n=0
t1=t1+"\n" t1=t1+"\n"
if options.addpfx.get().lstrip(): if options.addpfx.get().lstrip():
t1=t1+"\nOptional prefix: "+(options.addpfx.get().lstrip()+' ')[:4] t1=t1+"\nOptional prefix: "+(options.addpfx.get().lstrip()+' ')[:8]
t2=t2+"\n"+t1 t2=t2+"\n"+t1
Label(pfx,text=t2,justify=LEFT).pack(padx=20) Label(pfx,text=t2,justify=LEFT).pack(padx=20)
pfx.focus_set() pfx.focus_set()
@ -1482,7 +1482,7 @@ def update():
Audio.gcom2.mycall=(options.MyCall.get()+' ')[:12] Audio.gcom2.mycall=(options.MyCall.get()+' ')[:12]
Audio.gcom2.hiscall=(ToRadio.get()+' ')[:12] Audio.gcom2.hiscall=(ToRadio.get()+' ')[:12]
Audio.gcom2.hisgrid=(HisGrid.get()+' ')[:6] Audio.gcom2.hisgrid=(HisGrid.get()+' ')[:6]
Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:4] Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8]
Audio.gcom2.ntxreq=ntx.get() Audio.gcom2.ntxreq=ntx.get()
tx=(tx1,tx2,tx3,tx4,tx5,tx6) tx=(tx1,tx2,tx3,tx4,tx5,tx6)
Audio.gcom2.txmsg=(tx[ntx.get()-1].get()+' ')[:28] Audio.gcom2.txmsg=(tx[ntx.get()-1].get()+' ')[:28]
@ -2086,7 +2086,7 @@ Audio.gcom2.appdir=(appdir+'
Audio.gcom2.ndepth=ndepth.get() Audio.gcom2.ndepth=ndepth.get()
Audio.ftn_init() Audio.ftn_init()
GenStdMsgs() GenStdMsgs()
Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:4] Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8]
stopmon() stopmon()
first=1 first=1
if g.Win32: root.iconbitmap("wsjt.ico") if g.Win32: root.iconbitmap("wsjt.ico")