From 251b2c6ce94600040c5d328753cd47a278436810 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 29 Jun 2018 20:11:24 -0400 Subject: [PATCH] Fix bugs for several more edge cases. --- lib/77bit/pack28.f90 | 1 - lib/77bit/pack77_1.f90 | 5 ++++- lib/77bit/unpack28.f90 | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/77bit/pack28.f90 b/lib/77bit/pack28.f90 index 0cca482e3..bc2b787fe 100644 --- a/lib/77bit/pack28.f90 +++ b/lib/77bit/pack28.f90 @@ -76,7 +76,6 @@ subroutine pack28(c13,n28) endif endif endif - ! Check for <...> callsign if(c13(1:1).eq.'<')then n22=ihashcall(c13,22) diff --git a/lib/77bit/pack77_1.f90 b/lib/77bit/pack77_1.f90 index 9ef8fa710..a3d9be89b 100644 --- a/lib/77bit/pack77_1.f90 +++ b/lib/77bit/pack77_1.f90 @@ -20,6 +20,8 @@ subroutine pack77_1(nwords,w,i3,n3,c77) call chkcall(w(2),bcall_2,ok2) if(w(1)(1:3).eq.'DE ' .or. w(1)(1:3).eq.'CQ_' .or. w(1)(1:3).eq.'CQ ' .or. & w(1)(1:4).eq.'QRZ ') ok1=.true. + if(w(1)(1:1).eq.'<' .and. index(w(1),'>').ge.5) ok1=.true. + if(w(2)(1:1).eq.'<' .and. index(w(2),'>').ge.5) ok2=.true. if(.not.ok1 .or. .not.ok2) return if(nwords.eq.2 .and. (.not.ok2 .or. index(w(2),'/').ge.2)) return if(nwords.eq.2) go to 10 @@ -58,9 +60,10 @@ subroutine pack77_1(nwords,w,i3,n3,c77) if(index(w(1),'/P').ge.4 .or. index(w(2),'/P').ge.4) i3=2 !Type 2, with "/P" endif c13=bcall_1//' ' - if(c13(1:3).eq.'CQ_') c13=w(1) + if(c13(1:3).eq.'CQ_' .or. w(1)(1:1).eq.'<') c13=w(1) call pack28(c13,n28a) c13=bcall_2//' ' + if(w(2)(1:1).eq.'<') c13=w(2) call pack28(c13,n28b) ipa=0 ipb=0 diff --git a/lib/77bit/unpack28.f90 b/lib/77bit/unpack28.f90 index aef0a85af..f3c0e3789 100644 --- a/lib/77bit/unpack28.f90 +++ b/lib/77bit/unpack28.f90 @@ -47,7 +47,9 @@ 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