2005-12-22 11:40:53 -05:00
|
|
|
subroutine getpfx1(callsign,k)
|
|
|
|
|
|
|
|
character callsign*12
|
2006-04-21 10:02:46 -04:00
|
|
|
character*8 c
|
|
|
|
character addpfx*8
|
|
|
|
common/gcom4/addpfx !Can't 'include' *.f90 in *.f
|
2005-12-22 11:40:53 -05:00
|
|
|
include 'pfx.f'
|
|
|
|
|
|
|
|
iz=index(callsign,' ') - 1
|
2006-04-21 10:02:46 -04:00
|
|
|
if(iz.lt.0) iz=12
|
2005-12-22 11:40:53 -05:00
|
|
|
islash=index(callsign(1:iz),'/')
|
|
|
|
k=0
|
|
|
|
c=' '
|
2006-04-21 10:02:46 -04:00
|
|
|
if(islash.gt.0 .and. islash.le.(iz-4)) then
|
|
|
|
! Add-on prefix
|
2005-12-22 11:40:53 -05:00
|
|
|
c=callsign(1:islash-1)
|
|
|
|
callsign=callsign(islash+1:iz)
|
|
|
|
do i=1,NZ
|
|
|
|
if(pfx(i)(1:4).eq.c) then
|
|
|
|
k=i
|
|
|
|
go to 10
|
|
|
|
endif
|
|
|
|
enddo
|
2006-04-21 10:02:46 -04:00
|
|
|
if(addpfx.eq.c) then
|
|
|
|
k=449
|
|
|
|
go to 10
|
|
|
|
endif
|
2005-12-22 11:40:53 -05:00
|
|
|
|
2006-04-21 10:02:46 -04:00
|
|
|
else if(islash.eq.(iz-1)) then
|
|
|
|
! Add-on suffix
|
2005-12-22 11:40:53 -05:00
|
|
|
c=callsign(islash+1:iz)
|
|
|
|
callsign=callsign(1:islash-1)
|
|
|
|
do i=1,NZ2
|
|
|
|
if(sfx(i).eq.c(1:1)) then
|
|
|
|
k=400+i
|
|
|
|
go to 10
|
|
|
|
endif
|
|
|
|
enddo
|
|
|
|
endif
|
|
|
|
|
2006-04-21 10:02:46 -04:00
|
|
|
10 if(islash.ne.0 .and.k.eq.0) k=-1
|
2005-12-22 11:40:53 -05:00
|
|
|
return
|
|
|
|
end
|
|
|
|
|