mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
Fix several problems with the use of hash codes for compound or goofy callsigns.
This commit is contained in:
parent
4b8ea3ef45
commit
641db21672
@ -103,7 +103,6 @@ subroutine pack28(c13,n28)
|
||||
enddo
|
||||
if(iarea.lt.2 .or. iarea.gt.3 .or. nplet.eq.0 .or. &
|
||||
npdig.ge.iarea-1 .or. nslet.gt.3) then
|
||||
! print*,'a',npdig,nplet,iarea
|
||||
! Treat this as a nonstandard callsign: compute its 22-bit hash
|
||||
n22=ihashcall(c13,22)
|
||||
call hash22(n22,c13,1) !Save (key,value) in hash table
|
||||
|
@ -19,7 +19,7 @@ subroutine pack77(msg0,i3,n3,c77)
|
||||
|
||||
! Check 0.1 (DXpedition mode)
|
||||
call pack77_01(nwords,w,i3,n3,c77)
|
||||
if(i3.ge.0) go to 900
|
||||
if(i3.ge.0 .or. n3.ge.1) go to 900
|
||||
! Check 0.2 (EU VHF contest exchange)
|
||||
call pack77_02(nwords,w,i3,n3,c77)
|
||||
if(i3.ge.0) go to 900
|
||||
|
@ -9,20 +9,20 @@ subroutine pack77_01(nwords,w,i3,n3,c77)
|
||||
logical ok1,ok2
|
||||
common/hashcom/ihash10(20),chash
|
||||
|
||||
if(nwords.ne.5) return !Must have 5 words
|
||||
if(trim(w(2)).ne.'RR73;') return !2nd word must be "RR73;"
|
||||
if(w(4)(1:1).ne.'<') return !4th word must have <...>
|
||||
if(index(w(4),'>').lt.1) return
|
||||
if(nwords.ne.5) go to 900 !Must have 5 words
|
||||
if(trim(w(2)).ne.'RR73;') go to 900 !2nd word must be "RR73;"
|
||||
if(w(4)(1:1).ne.'<') go to 900 !4th word must have <...>
|
||||
if(index(w(4),'>').lt.1) go to 900
|
||||
n=-99
|
||||
read(w(5),*,err=1) n
|
||||
1 if(n.eq.-99) return !5th word must be a valid report
|
||||
1 if(n.eq.-99) go to 900 !5th word must be a valid report
|
||||
n5=(n+30)/2
|
||||
if(n5.lt.0) n5=0
|
||||
if(n5.gt.31) n5=31
|
||||
call chkcall(w(1),bcall_1,ok1)
|
||||
if(.not.ok1) return !1st word must be a valid basecall
|
||||
if(.not.ok1) go to 900 !1st word must be a valid basecall
|
||||
call chkcall(w(3),bcall_2,ok2)
|
||||
if(.not.ok2) return !3rd word must be a valid basecall
|
||||
if(.not.ok2) go to 900 !3rd word must be a valid basecall
|
||||
|
||||
! Type 0.1: K1ABC RR73; W9XYZ <KH1/KH7Z> -11 28 28 10 5 71 DXpedition Mode
|
||||
i3=0
|
||||
@ -34,5 +34,5 @@ subroutine pack77_01(nwords,w,i3,n3,c77)
|
||||
write(c77,1010) n28a,n28b,n10,n5,n3,i3
|
||||
1010 format(2b28.28,b10.10,b5.5,2b3.3)
|
||||
|
||||
return
|
||||
900 return
|
||||
end subroutine pack77_01
|
||||
|
@ -30,6 +30,10 @@ subroutine pack77_4(nwords,w,i3,n3,c77)
|
||||
iflip=0
|
||||
n12=0
|
||||
c11=adjustr(call_2(1:11))
|
||||
n10=ihashcall(w(2),10)
|
||||
call hash10(n10,w(2),0) !Save this hash10 and its callsign
|
||||
n12=ihashcall(w(2),12)
|
||||
call hash12(n12,w(2),0) !Save this hash12 and its callsign
|
||||
else if(w(1)(1:1).eq.'<') then
|
||||
iflip=0
|
||||
n12=ihashcall(w(1),12)
|
||||
|
@ -40,7 +40,6 @@ subroutine split77(msg,nwords,nw,w)
|
||||
w(2:12)=w(3:13)
|
||||
nwords=nwords-1
|
||||
endif
|
||||
! print*,'a',nwords,w(1:nwords)
|
||||
|
||||
return
|
||||
end subroutine split77
|
||||
|
@ -47,9 +47,7 @@ subroutine unpack28(n28_0,c13)
|
||||
call hash22(n22,c13,-1) !Retrieve callsign from hash table
|
||||
if(c13(1:1).ne.'<') then
|
||||
n=len(trim(c13))
|
||||
print*,'a ',n,c13
|
||||
c13='<'//c13(1:n)//'>'//' '
|
||||
print*,'b ',c13
|
||||
endif
|
||||
go to 900
|
||||
endif
|
||||
|
@ -55,8 +55,13 @@ subroutine unpack77(c77,msg)
|
||||
call unpack28(n28a,call_1)
|
||||
call unpack28(n28b,call_2)
|
||||
call hash10(n10,call_3,-1)
|
||||
msg=trim(call_1)//' RR73; '//trim(call_2)//' '//trim(call_3)//' '//crpt
|
||||
|
||||
if(call_3(1:1).eq.'<') then
|
||||
msg=trim(call_1)//' RR73; '//trim(call_2)//' '//trim(call_3)// &
|
||||
' '//crpt
|
||||
else
|
||||
msg=trim(call_1)//' RR73; '//trim(call_2)//' <'//trim(call_3)// &
|
||||
'> '//crpt
|
||||
endif
|
||||
else if(i3.eq.0 .and. n3.eq.2) then
|
||||
! 0.2 PA3XYZ/P R 590003 IO91NP 28 1 1 3 12 25 70 EU VHF contest
|
||||
read(c77,1020) n28a,ip,ir,irpt,iserial,igrid6
|
||||
|
Loading…
Reference in New Issue
Block a user