mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	Many fixes to make it work on Linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@388 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									3edc0ed447
								
							
						
					
					
						commit
						03bddc6c9f
					
				
							
								
								
									
										96
									
								
								Makefile.in
									
									
									
									
									
								
							
							
						
						
									
										96
									
								
								Makefile.in
									
									
									
									
									
								
							| @ -29,71 +29,63 @@ FC=@FC@ | ||||
| COMPILER += @FC_LIB_PATH@ | ||||
| 
 | ||||
| LDFLAGS	+= -L${COMPILER} | ||||
| LIBS += /usr/lib/libfftw3f.a | ||||
| 
 | ||||
| PYTHON	?= @PYTHON@ | ||||
| RM	?= @RM@ | ||||
| F2PY	= @F2PY@ | ||||
| 
 | ||||
| ###
 | ||||
| all:    Audio.so | ||||
| 
 | ||||
| F2PYONLY = ftn_init ftn_quit audio_init spec getfile azdist0 astro0 | ||||
| OBJS2C   = init_rs.o encode_rs.o decode_rs.o | ||||
| 
 | ||||
| F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 \
 | ||||
| 	spec map65a0 | ||||
| 
 | ||||
| SRCS2F90 = astro0.F90 audio_init.F90 azdist0.f90 \
 | ||||
| 	decode1.F90 decode2.f90 decode3.F90 ftn_init.F90 \
 | ||||
| 	ftn_quit.f90 get_fname.F90 getfile.F90 \
 | ||||
| 	i1tor4.f90 pix2d65.f90 rfile.f90 savedata.F90 spec.f90 \
 | ||||
| 	wsjtgen.F90 runqqq.F90 fivehz.F90 | ||||
| OBJS2F90 = ${SRCS2F90:.f90=.o} | ||||
| 	decode1.F90 ftn_init.F90 ftn_quit.f90 wsjtgen.F90 \
 | ||||
| 	runqqq.F90 fivehz.F90 flushqqq.F90 map65a0.f90 \
 | ||||
| 	rfile.f90 rfile3a.f90 spec.f90 map65a.f90 display.F90 \
 | ||||
| 	getfile.F90 getfile2.F90 | ||||
| 
 | ||||
| SRCS2F77 = wsjt1.f astro.f azdist.f coord.f dcoord.f deg2grid.f \
 | ||||
| 	dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f moon2.f \
 | ||||
| 	MoonDop.f sun.f toxyz.f pfxdump.f \
 | ||||
|         avesp2.f bzap.f \
 | ||||
|         indexx.f flat2.f gen65.f chkmsg.f gentone.f \
 | ||||
|         set.f flatten.f db.f pctile.f sort.f ssort.f ps.f smooth.f \
 | ||||
|         peakup.f avemsg65.f decode65.f \
 | ||||
|         demod64a.f encode65.f extract.f flat1.f four2.f rfile2.f \
 | ||||
|         gencwid.f getpfx1.f getpfx2.f getsnr.f graycode.f grid2k.f \
 | ||||
|         interleave63.f k2grid.f limit.f lpf1.f morse.f \
 | ||||
|         nchar.f packcall.f packgrid.f packmsg.f packtext.f setup65.f \
 | ||||
|         short65.f slope.f spec2d65.f sync65.f unpackcall.f \
 | ||||
|         unpackgrid.f unpackmsg.f unpacktext.f xcor.f xfft.f xfft2.f wsjt65.f \
 | ||||
| 	ftpeak65.f fil651.f fil652.f fil653.f symsync65.f | ||||
| SRCS2F77 = indexx.f gen65.f chkmsg.f \
 | ||||
| 	gentone.f gencwid.f set.f db.f pctile.f sort.f ssort.f \
 | ||||
| 	avemsg65.f demod64a.f encode65.f extract.f four2a.f getpfx1.f \
 | ||||
| 	getpfx2.f graycode.f grid2k.f interleave63.f k2grid.f \
 | ||||
| 	deep65.f morse.f nchar.f packcall.f packgrid.f \
 | ||||
| 	packmsg.f packtext.f setup65.f unpackcall.f unpackgrid.f \
 | ||||
| 	unpackmsg.f unpacktext.f astro.f azdist.f coord.f dcoord.f \
 | ||||
| 	deg2grid.f dot.f ftsky.f geocentric.f GeoDist.f grid2deg.f \
 | ||||
| 	moon2.f MoonDop.f sun.f toxyz.f pfxdump.f \
 | ||||
| 	symspec.f ccf65.f trimlist.f chkhist.f decode1a.f \
 | ||||
| 	filbig.f fil659.f fil658.f fil6521.f twkfreq.f decode65b.f \
 | ||||
| 	afc65b.f fchisq.f ccf2.f rfile2.f | ||||
| 
 | ||||
| OBJS2F77 = ${SRCS2F77:.f=.o} deep65.o | ||||
| SRCS2C   = resample.c ptt.c igray.c wrapkarn.c rfile3.c wfile3.c | ||||
| 
 | ||||
| SRCS2C	= init_rs.c encode_rs.c decode_rs.c | ||||
| OBJS2C  = ${SRCS2C:.c=.o} | ||||
| OBJS2F77 = ${SRCS2F77:.f=.o} | ||||
| 
 | ||||
| # ok, so far for now
 | ||||
| # Windows @AUDIO@ will be a2d.f90 jtaudio.c since it uses portaudio
 | ||||
| #            for *nix @AUDIO@ will also be a2d.f90, jtaudio.c
 | ||||
| #               and start_portaudio.c for systems using portaudio
 | ||||
| #            for *nix @AUDIO@ will be start_alsa.c for alsa
 | ||||
| #            for *nix @AUDIO@ will be start_oss.c for oss
 | ||||
| #
 | ||||
| # ptt_unix.c vs. ptt.c I'll sort out later. 
 | ||||
| # ditto for cutil.c (only used on *nix)
 | ||||
| # --db
 | ||||
| # jtaudio.c/start_threads.c mess will have to be sorted out later
 | ||||
| # to minimise #ifdef's 
 | ||||
| # --db
 | ||||
| # and mostly sorted
 | ||||
| # --db
 | ||||
| #
 | ||||
| #  @NEEDPORTAUDIO@ will be filled in with libportaudio.a if portaudio is used
 | ||||
| #
 | ||||
| SRCS3C	= ptt_unix.c igray.c wrapkarn.c cutil.c | ||||
| OBJS3C  = ${SRCS3C:.c=.o} | ||||
| AUDIOSRCS = @AUDIO@ | ||||
| SRCS3C = ptt_unix.c igray.c wrapkarn.c cutil.c | ||||
| OBJS3C = ${SRCS3C:.c=.o} | ||||
| AUDIOSRCS = a2d.f90 jtaudio.c resample.c start_portaudio.c | ||||
| 
 | ||||
| all:	map65 | ||||
| #Audio.so: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C) 
 | ||||
| #	python f2py.py -c \
 | ||||
| #	--quiet --"fcompiler=compaqv" \
 | ||||
| #	--opt="/nologo /traceback /warn:errors /fast /fpp /define:Win32 \
 | ||||
| #	      /define:USE_PORTAUDIO" \
 | ||||
| #	$(OBJS2C) \
 | ||||
| #	-lwinmm -lpa -lfftw3single -llibsamplerate \
 | ||||
| #	-m Audio \
 | ||||
| #	only: $(F2PYONLY) : \
 | ||||
| #	$(SRCS2F90) $(SRCS2F77) $(SRCS2C)
 | ||||
| 
 | ||||
| portaudio-v19/lib/.libs/libportaudio.a: | ||||
| 	(cd portaudio-v19;./configure --with-jack=no) | ||||
| 	(cd portaudio-v19;${MAKE}) | ||||
| ###
 | ||||
| 
 | ||||
| map65:	@NEEDPORTAUDIO@ Audio.so # map65.spec
 | ||||
| #	${PYTHON} c:\python23\installer\Build.py map65.spec
 | ||||
| #portaudio-v19/lib/.libs/libportaudio.a:
 | ||||
| #	(cd portaudio-v19;./configure --with-jack=no)
 | ||||
| #	(cd portaudio-v19;${MAKE})
 | ||||
| 
 | ||||
| deep65.o: deep65.F | ||||
| 	$(FC) -c -O0 -Wall -fPIC deep65.F | ||||
| @ -106,10 +98,6 @@ Audio.so: $(OBJS2C) $(OBJS3C) $(OBJS2F77) $(SRCS2F90) $(AUDIOSRCS) | ||||
| 	: $(SRCS2F90) \
 | ||||
| 	${SRCS3C} ${AUDIOSRCS} | ||||
| 
 | ||||
| map65.spec: map65.py astro.py g.py options.py palettes.py smeter.py specjt.py | ||||
| 	${PYTHON} c:\python23\installer\makespec.py --icon wsjt.ico \
 | ||||
| 	--tk --onefile map65.py | ||||
| 
 | ||||
| 
 | ||||
| init_rs_int.o: init_rs.c | ||||
| 	$(CC) $(CFLAGS) -c -DBIGSYM=1 -o init_rs_int.o init_rs.c | ||||
|  | ||||
| @ -1,12 +1,15 @@ | ||||
| subroutine display | ||||
| 
 | ||||
| #ifdef Win32 | ||||
|   use dfport | ||||
| #endif | ||||
| 
 | ||||
|   parameter (MAXLINES=500,MX=500) | ||||
|   integer indx(MAXLINES),indx2(MX) | ||||
|   character*80 line(MAXLINES),line2(MX),line3(MAXLINES) | ||||
|   character out*41,cfreq0*3 | ||||
|   character callsign*6,callsign0*6,freqcall*10(100) | ||||
|   character*6 callsign,callsign0 | ||||
|   character*10 freqcall(100) | ||||
|   character*36 bm2 | ||||
|   real freqkHz(MAXLINES) | ||||
|   integer utc(MAXLINES),utc2(MX),utcz | ||||
| @ -46,6 +49,7 @@ subroutine display | ||||
|         write(26,1010) line(i) | ||||
|      enddo | ||||
|   endif | ||||
|   call flushqqq(26) | ||||
| 
 | ||||
|   call indexx(nz,freqkHz,indx) | ||||
| 
 | ||||
| @ -124,6 +128,7 @@ subroutine display | ||||
|         endif | ||||
|      endif | ||||
|   enddo | ||||
|   call flushqqq(19) | ||||
|   nc=nc+1 | ||||
|   freqcall(nc)='          ' | ||||
|   nc=nc+1 | ||||
| @ -134,6 +139,7 @@ subroutine display | ||||
|      write(20,1040) bm2 | ||||
| 1040 format(a36) | ||||
|   enddo | ||||
|   call flushqqq(20) | ||||
| 
 | ||||
|   return | ||||
| end subroutine display | ||||
|  | ||||
							
								
								
									
										12
									
								
								ftn_init.F90
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								ftn_init.F90
									
									
									
									
									
								
							| @ -91,7 +91,8 @@ subroutine ftn_init | ||||
|   open(21,file=appdir(:iz)//'/ALL.TXT',status='unknown',                   & | ||||
|        access='append',share='denynone',err=950) | ||||
| #else | ||||
|   open(21,file=appdir(:iz)//'/ALL.TXT',status='unknown',err=950) | ||||
|   open(21,file=appdir(:iz)//'/ALL.TXT',status='unknown',                   & | ||||
| 	access='append',err=950) | ||||
|   do i=1,9999999 | ||||
|      read(21,*,end=10) cjunk | ||||
|   enddo | ||||
| @ -106,10 +107,19 @@ subroutine ftn_init | ||||
|        status='unknown') | ||||
| #endif | ||||
| 
 | ||||
| #ifdef Win32 | ||||
|   open(24,file=appdir(:iz)//'/tmp24.txt',status='unknown',                 & | ||||
|        share='denynone') | ||||
| #else | ||||
|   open(24,file=appdir(:iz)//'/tmp24.txt',status='unknown') | ||||
| #endif | ||||
| 
 | ||||
| #ifdef Win32 | ||||
|   open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown',                 & | ||||
|        share='denynone') | ||||
| #else | ||||
|   open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown') | ||||
| #endif | ||||
| 
 | ||||
|   return | ||||
| 
 | ||||
|  | ||||
| @ -5,10 +5,12 @@ subroutine getfile(fname,len) | ||||
|   parameter (NSMAX=60*96000)          !Samples per 60 s file | ||||
|   integer*2 id(4,NSMAX)               !46 MB: raw data from Linrad timf2 | ||||
|   common/datcom/nutc,newdat2,id,fname80,nlen | ||||
|   include 'gcom2.f90' | ||||
| 
 | ||||
|   fname80=fname | ||||
|   nlen=len | ||||
|   newdat2=1 | ||||
|   ierr=0 | ||||
| 
 | ||||
|   return | ||||
| end subroutine getfile | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
| !----------------------------------------------------- getfile | ||||
| subroutine getfile2(fname,len) | ||||
| 
 | ||||
| #ifdef Win32 | ||||
| @ -31,16 +30,22 @@ subroutine getfile2(fname,len) | ||||
| 10 filename=fname(i+1:) | ||||
|   ierr=0 | ||||
| 
 | ||||
|   n=8*NSMAX | ||||
| #ifdef Win32 | ||||
| !  open(10,file=fname,form='binary',status='old',err=998) | ||||
|   n=8*NSMAX | ||||
|   call rfile3a(fname,id,n,ierr) | ||||
|   if(ierr.ne.0) then | ||||
|      print*,'Error opening or reading file: ',fname,ierr | ||||
|      go to 999 | ||||
|   endif | ||||
| #else | ||||
|   call rfile2(fname,hdr,44+2*NDMAX,nr) | ||||
|   call rfile2(fname,id,n,nr) | ||||
|   if(nr.ne.n) then | ||||
|      print*,'Error opening or reading file: ',fname,n,nr | ||||
|      ierr=1002 | ||||
|      go to 999 | ||||
|   endif | ||||
| 
 | ||||
| #endif | ||||
| 
 | ||||
|   read(filename(8:11),*) nutc | ||||
							
								
								
									
										8
									
								
								map65rc
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								map65rc
									
									
									
									
									
								
							| @ -1,7 +1,7 @@ | ||||
| *font:			"bitstream vera sans" 11 | ||||
| *Label*font:		"bitstream vera sans" 11 | ||||
| *Text*font:		"terminus" 13 | ||||
| *Canvas*font:           "LucidaTypewriter" 18 | ||||
| *font:			Arial 8 | ||||
| *Label*font:		Arial 8 | ||||
| *Text*font:		"Courier New" 9 | ||||
| *Canvas*font:           "Lucida Console" 16 | ||||
| *background:		gray85 | ||||
| *Text*background:	white | ||||
| *Entry*background:	white | ||||
|  | ||||
							
								
								
									
										4
									
								
								rfile2.f
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								rfile2.f
									
									
									
									
									
								
							| @ -1,13 +1,13 @@ | ||||
|       subroutine rfile2(fname,buf,n,nr) | ||||
| 
 | ||||
| C  Write a wave file to disk. | ||||
| C  Read data from disk. | ||||
| 
 | ||||
|       integer RMODE | ||||
|       parameter(RMODE=0) | ||||
|       integer*1 buf(n) | ||||
|       integer open,read,close | ||||
|       integer fd | ||||
|       character fname*80 | ||||
|       character fname*(*) | ||||
|       data iz/0/                            !Silence g77 warning | ||||
| 
 | ||||
|       do i=80,1,-1 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user