mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-30 20:40:28 -04:00 
			
		
		
		
	Removed ran1 and gasdev; replaced igray, sort, and indexx.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@34 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									6b851ce524
								
							
						
					
					
						commit
						7b55b784a1
					
				| @ -18,4 +18,3 @@ | |||||||
| 	include 'interleave63.f' | 	include 'interleave63.f' | ||||||
| 	include 'graycode.f' | 	include 'graycode.f' | ||||||
| 	include 'set.f' | 	include 'set.f' | ||||||
| 	include 'igray.f' |  | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								fsubs.f
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								fsubs.f
									
									
									
									
									
								
							| @ -3,6 +3,7 @@ | |||||||
|       include 'db.f' |       include 'db.f' | ||||||
|       include 'pctile.f' |       include 'pctile.f' | ||||||
|       include 'sort.f' |       include 'sort.f' | ||||||
|  |       include 'ssort.f' | ||||||
|       include 'ps.f' |       include 'ps.f' | ||||||
|       include 'smooth.f' |       include 'smooth.f' | ||||||
|       include 'ping.f' |       include 'ping.f' | ||||||
| @ -32,7 +33,6 @@ | |||||||
|       include 'getsnr.f' |       include 'getsnr.f' | ||||||
|       include 'graycode.f' |       include 'graycode.f' | ||||||
|       include 'grid2k.f' |       include 'grid2k.f' | ||||||
|       include 'igray.f' |  | ||||||
|       include 'interleave63.f' |       include 'interleave63.f' | ||||||
|       include 'k2grid.f' |       include 'k2grid.f' | ||||||
|       include 'limit.f' |       include 'limit.f' | ||||||
| @ -57,5 +57,3 @@ | |||||||
|       include 'xfft.f'  |       include 'xfft.f'  | ||||||
|       include 'wsjt65.f' |       include 'wsjt65.f' | ||||||
| 
 | 
 | ||||||
|       include 'gasdev.f' |  | ||||||
|       include 'ran1.f' |  | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								g1
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								g1
									
									
									
									
									
								
							| @ -1 +1 @@ | |||||||
| python f2py.py -c --quiet --opt="-O -cpp -DLinux -fno-second-underscore" init_rs.o encode_rs.o decode_rs.o -m Audio --"f77exec=/home/joe/bin/g95" --f90exec="/home/joe/bin/g95" -L//usr/lib/gcc-lib/i386-redhat-linux/3.2.2/ -lpthread -lg2c only: ftn_init ftn_quit audio_init spec getfile azdist0 astro0 : a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 wsjtgen.f90 runqqq.f90 wsjt1.f fsubs1.f fsubs.f astro.f astropak.f jtaudio.c ptt_linux.c wrapkarn.c start_threads.c cutil.c fivehz.f90 | python f2py.py -c --quiet --opt="-O -cpp -DLinux -fno-second-underscore" init_rs.o encode_rs.o decode_rs.o -m Audio --"f77exec=/home/joe/bin/g95" --f90exec="/home/joe/bin/g95" -L//usr/lib/gcc-lib/i386-redhat-linux/3.2.2/ -lpthread -lg2c only: ftn_init ftn_quit audio_init spec getfile azdist0 astro0 : a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 wsjtgen.f90 runqqq.f90 wsjt1.f fsubs1.f fsubs.f astro.f astropak.f jtaudio.c ptt_linux.c igray.c wrapkarn.c start_threads.c cutil.c fivehz.f90 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								g1.bat
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								g1.bat
									
									
									
									
									
								
							| @ -1,2 +1,2 @@ | |||||||
| cl /c /DWin32 /Fojtaudio.o jtaudio.c | cl /c /DWin32 /Fojtaudio.o jtaudio.c | ||||||
| f2py.py -c --quiet --opt="/traceback /fast /fpp /define:Win32" init_rs.o encode_rs.o decode_rs.o jtaudio.o -lwinmm -lpa -llibsamplerate -m Audio --"fcompiler=compaqv" only: ftn_init ftn_quit audio_init spec getfile azdist0 astro0 : a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 wsjtgen.f90 runqqq.f90 wsjt1.f fsubs1.f fsubs.f astro.f astropak.f resample.c ptt.c wrapkarn.c fivehz.f90 | f2py.py -c --quiet --opt="/traceback /fast /fpp /define:Win32" init_rs.o encode_rs.o decode_rs.o jtaudio.o -lwinmm -lpa -llibsamplerate -m Audio --"fcompiler=compaqv" only: ftn_init ftn_quit audio_init spec getfile azdist0 astro0 : a2d.f90 abc441.f90 astro0.f90 audio_init.f90 azdist0.f90 blanker.f90 decode1.f90 decode2.f90 decode3.f90 ftn_init.f90 ftn_quit.f90 get_fname.f90 getfile.f90 horizspec.f90 hscroll.f90 i1tor4.f90 pix2d.f90 pix2d65.f90 rfile.f90 savedata.f90 spec.f90 wsjtgen.f90 runqqq.f90 wsjt1.f fsubs1.f fsubs.f astro.f astropak.f resample.c ptt.c igray.c wrapkarn.c fivehz.f90 | ||||||
|  | |||||||
							
								
								
									
										24
									
								
								gasdev.f
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								gasdev.f
									
									
									
									
									
								
							| @ -1,24 +0,0 @@ | |||||||
|       FUNCTION gasdev(idum) |  | ||||||
|       INTEGER idum |  | ||||||
|       REAL gasdev |  | ||||||
| CU    USES ran1 |  | ||||||
|       INTEGER iset |  | ||||||
|       REAL fac,gset,rsq,v1,v2,ran1 |  | ||||||
|       SAVE iset,gset |  | ||||||
|       DATA iset/0/ |  | ||||||
|       if (iset.eq.0) then |  | ||||||
| 1       v1=2.*ran1(idum)-1. |  | ||||||
|         v2=2.*ran1(idum)-1. |  | ||||||
|         rsq=v1**2+v2**2 |  | ||||||
|         if(rsq.ge.1..or.rsq.eq.0.)goto 1 |  | ||||||
|         fac=sqrt(-2.*log(rsq)/rsq) |  | ||||||
|         gset=v1*fac |  | ||||||
|         gasdev=v2*fac |  | ||||||
|         iset=1 |  | ||||||
|       else |  | ||||||
|         gasdev=gset |  | ||||||
|         iset=0 |  | ||||||
|       endif |  | ||||||
|       return |  | ||||||
|       END |  | ||||||
| C  (C) Copr. 1986-92 Numerical Recipes Software *(t9,12. |  | ||||||
							
								
								
									
										3
									
								
								go
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								go
									
									
									
									
									
								
							| @ -1,2 +1,3 @@ | |||||||
| gcc -c wrapkarn.c | gcc -c wrapkarn.c | ||||||
| g95 -o JT65code -fno-second-underscore JT65code_all.f wrapkarn.o init_rs.o encode_rs.o decode_rs.o | gcc -c igray.c | ||||||
|  | g95 -o JT65code -fno-second-underscore JT65code_all.f igray.o wrapkarn.o init_rs.o encode_rs.o decode_rs.o | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								igray.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								igray.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | |||||||
|  | int igray_(int *n0, int *idir) | ||||||
|  | { | ||||||
|  |   int n; | ||||||
|  |   unsigned long sh; | ||||||
|  |   unsigned long nn; | ||||||
|  |   n=*n0; | ||||||
|  | 
 | ||||||
|  |   if(*idir>0) return (n ^ (n >> 1)); | ||||||
|  | 
 | ||||||
|  |   sh = 1; | ||||||
|  |   nn = (n >> sh); | ||||||
|  |   while (nn > 0) { | ||||||
|  |     n ^= nn; | ||||||
|  |     sh <<= 1; | ||||||
|  |     nn = (n >> sh); | ||||||
|  |   } | ||||||
|  |   return (n); | ||||||
|  | } | ||||||
							
								
								
									
										18
									
								
								igray.f
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								igray.f
									
									
									
									
									
								
							| @ -1,18 +0,0 @@ | |||||||
|       FUNCTION igray(n,is) |  | ||||||
|       INTEGER igray,is,n |  | ||||||
|       INTEGER idiv,ish |  | ||||||
|       if (is.ge.0) then |  | ||||||
|         igray=ieor(n,n/2) |  | ||||||
|       else |  | ||||||
|         ish=-1 |  | ||||||
|         igray=n |  | ||||||
| 1       continue |  | ||||||
|           idiv=ishft(igray,ish) |  | ||||||
|           igray=ieor(igray,idiv) |  | ||||||
|           if(idiv.le.1.or.ish.eq.-16)return |  | ||||||
|           ish=ish+ish |  | ||||||
|         goto 1 |  | ||||||
|       endif |  | ||||||
|       return |  | ||||||
|       END |  | ||||||
| C  (C) Copr. 1986-92 Numerical Recipes Software *(t9,12. |  | ||||||
							
								
								
									
										79
									
								
								indexx.f
									
									
									
									
									
								
							
							
						
						
									
										79
									
								
								indexx.f
									
									
									
									
									
								
							| @ -1,79 +0,0 @@ | |||||||
|       SUBROUTINE indexx(n,arr,indx) |  | ||||||
|       INTEGER n,indx(n),M,NSTACK |  | ||||||
|       REAL arr(n) |  | ||||||
|       PARAMETER (M=7,NSTACK=50) |  | ||||||
|       INTEGER i,indxt,ir,itemp,j,jstack,k,l,istack(NSTACK) |  | ||||||
|       REAL a |  | ||||||
|       do 11 j=1,n |  | ||||||
|         indx(j)=j |  | ||||||
| 11    continue |  | ||||||
|       jstack=0 |  | ||||||
|       l=1 |  | ||||||
|       ir=n |  | ||||||
| 1     if(ir-l.lt.M)then |  | ||||||
|         do 13 j=l+1,ir |  | ||||||
|           indxt=indx(j) |  | ||||||
|           a=arr(indxt) |  | ||||||
|           do 12 i=j-1,1,-1 |  | ||||||
|             if(arr(indx(i)).le.a)goto 2 |  | ||||||
|             indx(i+1)=indx(i) |  | ||||||
| 12        continue |  | ||||||
|           i=0 |  | ||||||
| 2         indx(i+1)=indxt |  | ||||||
| 13      continue |  | ||||||
|         if(jstack.eq.0)return |  | ||||||
|         ir=istack(jstack) |  | ||||||
|         l=istack(jstack-1) |  | ||||||
|         jstack=jstack-2 |  | ||||||
|       else |  | ||||||
|         k=(l+ir)/2 |  | ||||||
|         itemp=indx(k) |  | ||||||
|         indx(k)=indx(l+1) |  | ||||||
|         indx(l+1)=itemp |  | ||||||
|         if(arr(indx(l+1)).gt.arr(indx(ir)))then |  | ||||||
|           itemp=indx(l+1) |  | ||||||
|           indx(l+1)=indx(ir) |  | ||||||
|           indx(ir)=itemp |  | ||||||
|         endif |  | ||||||
|         if(arr(indx(l)).gt.arr(indx(ir)))then |  | ||||||
|           itemp=indx(l) |  | ||||||
|           indx(l)=indx(ir) |  | ||||||
|           indx(ir)=itemp |  | ||||||
|         endif |  | ||||||
|         if(arr(indx(l+1)).gt.arr(indx(l)))then |  | ||||||
|           itemp=indx(l+1) |  | ||||||
|           indx(l+1)=indx(l) |  | ||||||
|           indx(l)=itemp |  | ||||||
|         endif |  | ||||||
|         i=l+1 |  | ||||||
|         j=ir |  | ||||||
|         indxt=indx(l) |  | ||||||
|         a=arr(indxt) |  | ||||||
| 3       continue |  | ||||||
|           i=i+1 |  | ||||||
|         if(arr(indx(i)).lt.a)goto 3 |  | ||||||
| 4       continue |  | ||||||
|           j=j-1 |  | ||||||
|         if(arr(indx(j)).gt.a)goto 4 |  | ||||||
|         if(j.lt.i)goto 5 |  | ||||||
|         itemp=indx(i) |  | ||||||
|         indx(i)=indx(j) |  | ||||||
|         indx(j)=itemp |  | ||||||
|         goto 3 |  | ||||||
| 5       indx(l)=indx(j) |  | ||||||
|         indx(j)=indxt |  | ||||||
|         jstack=jstack+2 |  | ||||||
|         if(jstack.gt.NSTACK)pause 'NSTACK too small in indexx' |  | ||||||
|         if(ir-i+1.ge.j-l)then |  | ||||||
|           istack(jstack)=ir |  | ||||||
|           istack(jstack-1)=i |  | ||||||
|           ir=j-1 |  | ||||||
|         else |  | ||||||
|           istack(jstack)=j-1 |  | ||||||
|           istack(jstack-1)=l |  | ||||||
|           l=i |  | ||||||
|         endif |  | ||||||
|       endif |  | ||||||
|       goto 1 |  | ||||||
|       END |  | ||||||
| C  (C) Copr. 1986-92 Numerical Recipes Software *(t9,12. |  | ||||||
							
								
								
									
										28
									
								
								ran1.f
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								ran1.f
									
									
									
									
									
								
							| @ -1,28 +0,0 @@ | |||||||
|       FUNCTION ran1(idum) |  | ||||||
|       INTEGER idum,IA,IM,IQ,IR,NTAB,NDIV |  | ||||||
|       REAL ran1,AM,EPS,RNMX |  | ||||||
|       PARAMETER (IA=16807,IM=2147483647,AM=1./IM,IQ=127773,IR=2836, |  | ||||||
|      *NTAB=32,NDIV=1+(IM-1)/NTAB,EPS=1.2e-7,RNMX=1.-EPS) |  | ||||||
|       INTEGER j,k,iv(NTAB),iy |  | ||||||
|       SAVE iv,iy |  | ||||||
|       DATA iv /NTAB*0/, iy /0/ |  | ||||||
|       if (idum.le.0.or.iy.eq.0) then |  | ||||||
|         idum=max(-idum,1) |  | ||||||
|         do 11 j=NTAB+8,1,-1 |  | ||||||
|           k=idum/IQ |  | ||||||
|           idum=IA*(idum-k*IQ)-IR*k |  | ||||||
|           if (idum.lt.0) idum=idum+IM |  | ||||||
|           if (j.le.NTAB) iv(j)=idum |  | ||||||
| 11      continue |  | ||||||
|         iy=iv(1) |  | ||||||
|       endif |  | ||||||
|       k=idum/IQ |  | ||||||
|       idum=IA*(idum-k*IQ)-IR*k |  | ||||||
|       if (idum.lt.0) idum=idum+IM |  | ||||||
|       j=1+iy/NDIV |  | ||||||
|       iy=iv(j) |  | ||||||
|       iv(j)=idum |  | ||||||
|       ran1=min(AM*iy,RNMX) |  | ||||||
|       return |  | ||||||
|       END |  | ||||||
| C  (C) Copr. 1986-92 Numerical Recipes Software *(t9,12. |  | ||||||
							
								
								
									
										74
									
								
								sort.f
									
									
									
									
									
								
							
							
						
						
									
										74
									
								
								sort.f
									
									
									
									
									
								
							| @ -1,74 +0,0 @@ | |||||||
|       SUBROUTINE sort(n,arr) |  | ||||||
|       INTEGER n,M,NSTACK |  | ||||||
|       REAL arr(n) |  | ||||||
|       PARAMETER (M=7,NSTACK=50) |  | ||||||
|       INTEGER i,ir,j,jstack,k,l,istack(NSTACK) |  | ||||||
|       REAL a,temp |  | ||||||
|       jstack=0 |  | ||||||
|       l=1 |  | ||||||
|       ir=n |  | ||||||
| 1     if(ir-l.lt.M)then |  | ||||||
|         do 12 j=l+1,ir |  | ||||||
|           a=arr(j) |  | ||||||
|           do 11 i=j-1,1,-1 |  | ||||||
|             if(arr(i).le.a)goto 2 |  | ||||||
|             arr(i+1)=arr(i) |  | ||||||
| 11        continue |  | ||||||
|           i=0 |  | ||||||
| 2         arr(i+1)=a |  | ||||||
| 12      continue |  | ||||||
|         if(jstack.eq.0)return |  | ||||||
|         ir=istack(jstack) |  | ||||||
|         l=istack(jstack-1) |  | ||||||
|         jstack=jstack-2 |  | ||||||
|       else |  | ||||||
|         k=(l+ir)/2 |  | ||||||
|         temp=arr(k) |  | ||||||
|         arr(k)=arr(l+1) |  | ||||||
|         arr(l+1)=temp |  | ||||||
|         if(arr(l+1).gt.arr(ir))then |  | ||||||
|           temp=arr(l+1) |  | ||||||
|           arr(l+1)=arr(ir) |  | ||||||
|           arr(ir)=temp |  | ||||||
|         endif |  | ||||||
|         if(arr(l).gt.arr(ir))then |  | ||||||
|           temp=arr(l) |  | ||||||
|           arr(l)=arr(ir) |  | ||||||
|           arr(ir)=temp |  | ||||||
|         endif |  | ||||||
|         if(arr(l+1).gt.arr(l))then |  | ||||||
|           temp=arr(l+1) |  | ||||||
|           arr(l+1)=arr(l) |  | ||||||
|           arr(l)=temp |  | ||||||
|         endif |  | ||||||
|         i=l+1 |  | ||||||
|         j=ir |  | ||||||
|         a=arr(l) |  | ||||||
| 3       continue |  | ||||||
|           i=i+1 |  | ||||||
|         if(arr(i).lt.a)goto 3 |  | ||||||
| 4       continue |  | ||||||
|           j=j-1 |  | ||||||
|         if(arr(j).gt.a)goto 4 |  | ||||||
|         if(j.lt.i)goto 5 |  | ||||||
|         temp=arr(i) |  | ||||||
|         arr(i)=arr(j) |  | ||||||
|         arr(j)=temp |  | ||||||
|         goto 3 |  | ||||||
| 5       arr(l)=arr(j) |  | ||||||
|         arr(j)=a |  | ||||||
|         jstack=jstack+2 |  | ||||||
|         if(jstack.gt.NSTACK)pause 'NSTACK too small in sort' |  | ||||||
|         if(ir-i+1.ge.j-l)then |  | ||||||
|           istack(jstack)=ir |  | ||||||
|           istack(jstack-1)=i |  | ||||||
|           ir=j-1 |  | ||||||
|         else |  | ||||||
|           istack(jstack)=j-1 |  | ||||||
|           istack(jstack-1)=l |  | ||||||
|           l=i |  | ||||||
|         endif |  | ||||||
|       endif |  | ||||||
|       goto 1 |  | ||||||
|       END |  | ||||||
| C  (C) Copr. 1986-92 Numerical Recipes Software *(t9,12. |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user