Corrected pointer overrun in recvpkt.

Compiles and runs OK on Aubrey.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@410 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-06-23 18:12:39 +00:00
parent 45019ba76f
commit a3b43326b4
6 changed files with 17 additions and 14 deletions

View File

@ -3,7 +3,7 @@
parameter (NFFT=512,NH=NFFT/2) parameter (NFFT=512,NH=NFFT/2)
real ss(4,322) real ss(4,322)
!Input: half-symbol powers, 4 pol'ns !Input: half-symbol powers, 4 pol'ns
real s(NFFT) !CCF = ss*pr real s(NFFT) !CCF = ss*pr
complex cs(0:NH) !Complex FT of s complex cs(0:NH) !Complex FT of s
real s2(NFFT) !CCF = ss*pr2 real s2(NFFT) !CCF = ss*pr2

View File

@ -27,7 +27,6 @@ C Mix sync tone to baseband, low-pass filter, and decimate by 64
dt00=dt dt00=dt
C If freq=125.0 kHz, f0=48000 Hz. C If freq=125.0 kHz, f0=48000 Hz.
f0=1000*(freq-77.0) !Freq of sync tone (0-96000 Hz) f0=1000*(freq-77.0) !Freq of sync tone (0-96000 Hz)
if(nfilt.eq.1) then if(nfilt.eq.1) then
call filbig(id,NMAX,f0,newdat,cx,cy,n5) call filbig(id,NMAX,f0,newdat,cx,cy,n5)
joff=0 joff=0

View File

@ -77,7 +77,6 @@ subroutine ftn_init
err=911) err=911)
#endif #endif
endfile 19 endfile 19
rewind 19
#ifdef Win32 #ifdef Win32
open(20,file=appdir(:iz)//'/bandmap2.txt',status='unknown', & open(20,file=appdir(:iz)//'/bandmap2.txt',status='unknown', &
@ -87,7 +86,6 @@ subroutine ftn_init
err=912) err=912)
#endif #endif
endfile 20 endfile 20
rewind 20
#ifdef Win32 #ifdef Win32
open(21,file=appdir(:iz)//'/ALL.TXT',status='unknown', & open(21,file=appdir(:iz)//'/ALL.TXT',status='unknown', &
@ -122,8 +120,6 @@ subroutine ftn_init
#else #else
open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown') open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown')
#endif #endif
end file 26
rewind 26
return return

View File

@ -1,4 +1,4 @@
#--------------------------------------------------------------------- MAP65 #-------------------------------------------------------------------- MAP65
# $Date$ $Revision$ # $Date$ $Revision$
# #
from Tkinter import * from Tkinter import *
@ -1871,6 +1871,9 @@ lsync.configure(text=slabel+str(isync))
lclip.configure(text='Clip '+str(iclip)) lclip.configure(text='Clip '+str(iclip))
Audio.gcom2.appdir=(appdir+' ')[:80] Audio.gcom2.appdir=(appdir+' ')[:80]
Audio.gcom2.ndepth=ndepth.get() Audio.gcom2.ndepth=ndepth.get()
f=open(appdir+'/tmp26.txt','w')
f.truncate(0)
f.close
Audio.ftn_init() Audio.ftn_init()
GenStdMsgs() GenStdMsgs()
Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8] Audio.gcom4.addpfx=(options.addpfx.get().lstrip()+' ')[:8]

View File

@ -8,7 +8,7 @@ subroutine recvpkt(iarg)
use dflib use dflib
#endif #endif
parameter (NSZ=60*96000) parameter (NSZ=2*60*96000)
real*8 d8(NSZ) real*8 d8(NSZ)
integer*1 userx_no,iusb integer*1 userx_no,iusb
integer*2 nblock,nblock0 integer*2 nblock,nblock0
@ -27,7 +27,6 @@ subroutine recvpkt(iarg)
call setup_rsocket call setup_rsocket
nreset=-1 nreset=-1
k=0 k=0
npkt=0
nsec0=-999 nsec0=-999
10 call recv_pkt(center_freq) 10 call recv_pkt(center_freq)
@ -51,10 +50,13 @@ subroutine recvpkt(iarg)
nreset=0 nreset=0
kb=3-kb kb=3-kb
k=0 k=0
if(kb.eq.2) k=NSZ if(kb.eq.2) k=NSMAX
nlost=0 nlost=0
endif endif
if(kb.eq.1 .and. (k+174).gt.NSMAX) go to 20
if(kb.eq.2 .and. (k+174).gt.2*NSMAX) go to 20
if(transmitting.eq.0) then if(transmitting.eq.0) then
do i=1,174 do i=1,174
k=k+1 k=k+1
@ -66,9 +68,12 @@ subroutine recvpkt(iarg)
d8(k)=0.d0 d8(k)=0.d0
enddo enddo
endif endif
if(k.lt.1 .or. k.gt.NSZ) then
print*,'Error in recvpkt: ',k,NSZ,NSMAX
stop
endif
npkt=npkt+1 20 if(nsec.ne.nsec0) then
if(nsec.ne.nsec0) then
mutch=nsec/3600 mutch=nsec/3600
mutcm=mod(nsec/60,60) mutcm=mod(nsec/60,60)
mutc=100*mutch + mutcm mutc=100*mutch + mutcm

View File

@ -28,8 +28,8 @@ c = -2 means sort x in decreasing order and carry y along.
nn = n nn = n
if (nn .lt. 1) then if (nn .lt. 1) then
print*,'ssort: The number of sort elements is not positive.' ! print*,'ssort: The number of sort elements is not positive.'
print*,'ssort: n = ',nn,' kflag = ',kflag ! print*,'ssort: n = ',nn,' kflag = ',kflag
return return
endif endif
c c