Fixed sort of zero-length array in wsjt1.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@39 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2005-12-30 01:40:23 +00:00
parent 5b38cdeccd
commit c23a58f2c8
3 changed files with 20 additions and 19 deletions

View File

@ -26,8 +26,7 @@ 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 *, print *,'n = ',nn,' kflag = ',kflag,' in ssort.'
+ 'the number of values to be sorted is not positive.'
return return
endif endif
c c

View File

@ -1,4 +1,4 @@
# ---------------------------------------------------------- WSJT #---------------------------------------------------------- WSJT
from Tkinter import * from Tkinter import *
from tkFileDialog import * from tkFileDialog import *
import Pmw import Pmw

34
wsjt1.f
View File

@ -264,24 +264,26 @@ C Now the multi-tone decoding
+ cfile6,ps0) + cfile6,ps0)
npkept=nline !Number of pings that were kept npkept=nline !Number of pings that were kept
call indexx(npkept,tping,indx) !Merge the ST and MT decodes
smax=0. smax=0.
stbest=.false. stbest=.false.
do i=1,npkept if(npkept.gt.0) then
j=indx(i) call indexx(npkept,tping,indx) !Merge the ST and MT decodes
if(pick .and. STFound .and. do i=1,npkept
+ line(j)(29:31).eq.' ') goto 10 j=indx(i)
write(lumsg,1050) line(j) !Write to decoded.txt if(pick .and. STFound .and.
1050 format(a79) + line(j)(29:31).eq.' ') goto 10
if(lcum) write(21,1050) line(j) !Write to decoded.cum write(lumsg,1050) line(j) !Write to decoded.txt
read(line(j),1060) sig,msg3 1050 format(a79)
1060 format(16x,f3.0,9x,a3) if(lcum) write(21,1050) line(j) !Write to decoded.cum
if(sig.gt.smax) then read(line(j),1060) sig,msg3
smax=sig 1060 format(16x,f3.0,9x,a3)
tbest=tping(j) if(sig.gt.smax) then
stbest = (msg3.ne.' ') smax=sig
endif tbest=tping(j)
10 enddo stbest = (msg3.ne.' ')
endif
10 enddo
endif
dt=1.0/11025.0 !Compute spectrum for pink curve dt=1.0/11025.0 !Compute spectrum for pink curve
if(stbest) then if(stbest) then