Simplify stdmsg.f90. (Will it still be OK for the 72-bit modes?)

This commit is contained in:
Joe Taylor 2018-09-20 14:04:48 -04:00
parent 4d013fef1b
commit b6fb6e3dd9

View File

@ -2,15 +2,6 @@ function stdmsg(msg0)
! Returns .true. if msg0 a standard "JT-style" message ! Returns .true. if msg0 a standard "JT-style" message
! itype
! 1 Standard 72-bit structured message
! 2 Type 1 prefix
! 3 Type 1 suffix
! 4 Type 2 prefix
! 5 Type 2 suffix
! 6 Free text
! 7 Hashed calls (MSK144 short format)
! i3.n3 ! i3.n3
! 0.0 Free text ! 0.0 Free text
! 0.1 DXpeditiion mode ! 0.1 DXpeditiion mode
@ -27,23 +18,26 @@ function stdmsg(msg0)
use iso_c_binding, only: c_bool use iso_c_binding, only: c_bool
use packjt use packjt
character*37 msg0,msg1,msg use packjt77
integer dat(12)
character*37 msg0,msg1
character*77 c77
logical(c_bool) :: stdmsg logical(c_bool) :: stdmsg
msg1=msg0 msg1=msg0
i0=index(msg1,' OOO ') i3=-1
if(i0.gt.10) msg1=msg0(1:i0) n3=-1
call packmsg(msg0,dat,itype) call pack77(msg1,i3,n3,c77)
call unpackmsg(dat,msg) stdmsg=(i3.gt.0 .or. n3.gt.0)
msg(23:37)=' '
stdmsg=(msg(1:22).eq.msg1(1:22)) .and. (itype.ge.0) .and. (itype.ne.6) !###
if(.not.stdmsg) then ! rewind 82
i0=index(msg1,' ') ! do i=1,nzhash
msg1(i0:)=' ' ! write(82,3082) i,nzhash,callsign(i)
call parse77(msg1,i3,n3) !3082 format(2i5,2x,a13)
if(i3.gt.0 .or. n3.gt.0) stdmsg=.true. ! enddo
endif ! flush(82)
!###
return return
end function stdmsg end function stdmsg