Changed compile-time flag from "Win32" to "CVF", and a few other changes

to enable compiling MAP65.EXE under Windows, using gcc and g95.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@594 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-12-21 18:40:47 +00:00
parent f87f65fc3d
commit 2b1a57aa0e
26 changed files with 196 additions and 87 deletions

91
Makefile.MinGW Normal file
View File

@ -0,0 +1,91 @@
#Makefile to compile MAP65.EXE for Windows.
#!include <dfinc.mak> #Some definitions for Compaq Visual Fortran
CC = /mingw/bin/gcc
FC = g95
CFLAGS = -I.
all: MAP65.EXE
OBJS2C = init_rs.o encode_rs.o decode_rs.o jtaudio.o plrr_subs.o
F2PYONLY = ftn_init ftn_quit audio_init getfile azdist0 astro0 spec
SRCS2F90 = a2d.f90 astro0.f90 audio_init.f90 azdist0.f90 \
decode1.f90 ftn_init.f90 ftn_quit.f90 wsjtgen.f90 \
runqqq.f90 fivehz.f90 flushqqq.f90 \
rfile.f90 rfile3a.F90 spec.f90 map65a.F90 display.F90 \
getfile.f90 getfile2.f90 recvpkt.f90 savetf2.F90 \
symspec.f90 sec_midn.F90 getdphi.f90
SRCSCOM = datcom.f90 gcom1.f90 gcom2.f90 gcom3.f90 gcom4.f90 spcom.f90
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 \
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
SRCS2C = resample.c ptt.c igray.c wrapkarn.c wfile3.c cutil.c \
start_portaudio.c
MAP65.EXE: Audio.pyd map65.spec
c:/python25/python c:/python25/pyinstaller-1.3/Build.py map65.spec
Audio.pyd: $(OBJS2C) $(SRCS2F90) $(SRCS2F77) $(SRCS2C) $(SRCSCOM)
c:/Python25/python C:/python25/scripts/f2py.py -c -I. \
--quiet --fcompiler=g95 \
--opt="-fbounds-check -O2 -cpp -DWin32 -DUSE_PORTAUDIO" \
--compiler=mingw32 \
$(OBJS2C) libfftw3f.a libsamplerate.a \
libportaudio.a libpthreadGC2.a -lwinmm -lws2_32 \
-m Audio \
only: $(F2PYONLY) : \
$(SRCS2F90) $(SRCS2F77) $(SRCS2C)
map65.spec: map65.py astro.py g.py options.py palettes.py smeter.py specjt.py
C:/Python25/python C:/Python25/pyinstaller-1.3/makespec.py \
--icon wsjt.ico --tk --onefile map65.py
jtaudio.o: jtaudio.c
$(CC) -c -DWin32 -o jtaudio.o jtaudio.c
init_rs.obj: init_rs.c
$(CC) -c -DBIGSYM=1 init_rs.c
init_rs.o: init_rs.c
$(CC) -c -DBIGSYM=1 -o init_rs.o init_rs.c
encode_rs.obj: encode_rs.c
$(CC) -c -DBIGSYM=1 encode_rs.c
encode_rs.o: encode_rs.c
$(CC) -c -DBIGSYM=1 -o encode_rs.o encode_rs.c
decode_rs.obj: decode_rs.c
$(CC) -c -DBIGSYM=1 decode_rs.c
decode_rs.o: decode_rs.c
$(CC) -c -DBIGSYM=1 -o decode_rs.o decode_rs.c
wrapkarn.obj: wrapkarn.c
$(CC) -c -DWin32=1 wrapkarn.c
igray.obj: igray.c
$(CC) -c -DWin32=1 igray.c
plrr_subs.o: plrr_subs_win.c
$(CC) -c plrr_subs_win.c -o plrr_subs.o
.PHONY : clean
clean:
rm *.o Audio.pyd map65.spec MAP65.EXE

View File

@ -29,7 +29,7 @@ C NB: may want to smooth the Tsky map to 10 degrees or so.
1 lenappdir=i 1 lenappdir=i
call zero(nsky,180*180) call zero(nsky,180*180)
fname=Appdir(1:lenappdir)//'/TSKY.DAT' fname=Appdir(1:lenappdir)//'/TSKY.DAT'
#ifdef Win32 #ifdef CVF
open(13,file=fname,status='old',form='binary',err=10) open(13,file=fname,status='old',form='binary',err=10)
read(13) nsky read(13) nsky
close(13) close(13)

View File

@ -95,7 +95,7 @@ subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, &
imin=60*uth8 imin=60*uth8
isec=3600*uth8 isec=3600*uth8
#ifdef Win32 !#ifdef CVF
if(isec.ne.isec0) then if(isec.ne.isec0) then
ih=uth8 ih=uth8
im=mod(imin,60) im=mod(imin,60)
@ -114,7 +114,7 @@ subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, &
rewind 14 rewind 14
isec0=isec isec0=isec
endif endif
#endif !#endif
return return
end subroutine astro0 end subroutine astro0

View File

@ -1,7 +1,7 @@
!------------------------------------------------ audio_init !------------------------------------------------ audio_init
subroutine audio_init(ndin,ndout) subroutine audio_init(ndin,ndout)
#ifdef Win32 #ifdef CVF
use dfmt use dfmt
integer Thread1,Thread2,Thread3 integer Thread1,Thread2,Thread3
external a2d,decode1,recvpkt external a2d,decode1,recvpkt
@ -28,7 +28,7 @@ subroutine audio_init(ndin,ndout)
iwave(i)=nint(32767.0*sin(6.283185307*i*f0/nfsample)) iwave(i)=nint(32767.0*sin(6.283185307*i*f0/nfsample))
enddo enddo
#ifdef Win32 #ifdef CVF
! Priority classes (for processes): ! Priority classes (for processes):
! IDLE_PRIORITY_CLASS 64 ! IDLE_PRIORITY_CLASS 64
! NORMAL_PRIORITY_CLASS 32 ! NORMAL_PRIORITY_CLASS 32

24
cutil.c
View File

@ -4,9 +4,11 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/times.h> // #include <sys/times.h>
#include <time.h> // #include <time.h>
#include <sys/time.h> // #include <sys/time.h>
#include "sleep.h"
#include "timeval.h"
/* FORTRAN: fd = close(filedes) */ /* FORTRAN: fd = close(filedes) */
int close_(int *filedes) int close_(int *filedes)
@ -39,10 +41,10 @@ int lseek_(int *fd,int *offset, int *origin)
return(lseek(*fd,*offset,*origin)); return(lseek(*fd,*offset,*origin));
} }
/* times(2) */ /* times(2) */
int times_(struct tms *buf) //int times_(struct tms *buf)
{ //{
return (times(buf)); // return (times(buf));
} //}
/* ioperm(2) */ /* ioperm(2) */
//ioperm_(from,num,turn_on) //ioperm_(from,num,turn_on)
//unsigned long *from,*num,*turn_on; //unsigned long *from,*num,*turn_on;
@ -54,7 +56,7 @@ int times_(struct tms *buf)
/* usleep(3) */ /* usleep(3) */
int usleep_(unsigned long *microsec) int usleep_(unsigned long *microsec)
{ {
return (usleep(*microsec)); usleep(*microsec);
} }
/* returns random numbers between 0 and 32767 to FORTRAN program */ /* returns random numbers between 0 and 32767 to FORTRAN program */
@ -62,16 +64,19 @@ int iran_(int *arg)
{ {
return (rand()); return (rand());
} }
int exit_(int *n) int exit_(int *n)
{ {
printf("\n\n"); printf("\n\n");
exit(*n); exit(*n);
} }
struct tm * struct tm *
gmtime_r_(const time_t *clock, struct tm *result) gmtime_r_(const time_t *clock, struct tm *result)
{ {
gmtime_r(clock, result); // gmtime_r(clock, result);
} }
time_t time_(void) time_t time_(void)
{ {
return time(0); return time(0);
@ -81,7 +86,6 @@ time_t time_(void)
double hrtime_(void) double hrtime_(void)
{ {
struct timeval tv; struct timeval tv;
gettimeofday(&tv,NULL); gettimeofday(&tv,NULL);
return(tv.tv_sec+1.e-6*tv.tv_usec); return(tv.tv_sec+1.e-6*tv.tv_usec);
} }

View File

@ -3,7 +3,7 @@ subroutine decode1(iarg)
! Get data and parameters from gcom, then call the decoders when needed. ! Get data and parameters from gcom, then call the decoders when needed.
! This routine runs in a background thread and will never return. ! This routine runs in a background thread and will never return.
#ifdef Win32 #ifdef CVF
use dflib use dflib
#endif #endif
@ -37,12 +37,10 @@ subroutine decode1(iarg)
kbuf0=kbuf kbuf0=kbuf
kkk=kk kkk=kk
if(kbuf.eq.2) kkk=kk-5760000 if(kbuf.eq.2) kkk=kk-5760000
n=Tsec n=Tsec
if(ndebug.eq.2 .and. n.ne.ns00) then if(ndebug.eq.2 .and. n.ne.ns00) then
write(29,3101) nutc,mod(n,60),ndiskdat,ndecoding,kbuf, & write(29,3101) nutc,mod(n,60),kbuf,kk,kkdone,ndecoding,newdat
newdat,kk,kkdone 3101 format('d1:',i5.4,i3.2,i5,2i10,2i3)
3101 format('d1:',i5.4,i3.2,4i5,2i10)
ns00=n ns00=n
endif endif

View File

@ -1,6 +1,6 @@
subroutine display(nkeep,ncsmin) subroutine display(nkeep,ncsmin)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#endif #endif

View File

@ -10,7 +10,8 @@ C f_stop = 750 Hz.
complex c4a(NFFT2),c4b(NFFT2) !Output data complex c4a(NFFT2),c4b(NFFT2) !Output data
complex ca(NFFT1),cb(NFFT1) !FFTs of input complex ca(NFFT1),cb(NFFT1) !FFTs of input
real*8 df real*8 df
real halfpulse(8) !Impulse response of filter (one side) C Impulse response of filter (one side)
real halfpulse(8)
complex cfilt(NFFT2) complex cfilt(NFFT2)
!Filter (complex; imag = 0) !Filter (complex; imag = 0)
real rfilt(NFFT2) !Filter (real) real rfilt(NFFT2) !Filter (real)

View File

@ -9,7 +9,7 @@ subroutine fivehz
! Disk I/O is a bad idea. Writing to stdout (for diagnostic purposes) ! Disk I/O is a bad idea. Writing to stdout (for diagnostic purposes)
! seems to be OK. ! seems to be OK.
#ifdef Win32 #ifdef CVF
use dflib use dflib
use dfport use dfport
#endif #endif
@ -187,7 +187,7 @@ subroutine fivehztx
! Called at interrupt level from the PortAudio output callback. ! Called at interrupt level from the PortAudio output callback.
#ifdef Win32 #ifdef CVF
use dflib use dflib
use dfport use dfport
#endif #endif

View File

@ -1,6 +1,6 @@
subroutine flushqqq(lu) subroutine flushqqq(lu)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#endif #endif

View File

@ -46,7 +46,7 @@ subroutine ftn_init
enddo enddo
2 iz2=i 2 iz2=i
#ifdef Win32 #ifdef CVF
open(11,file=appdir(:iz)//'/decoded.txt',status='unknown', & open(11,file=appdir(:iz)//'/decoded.txt',status='unknown', &
share='denynone',err=910) share='denynone',err=910)
#else #else
@ -55,7 +55,7 @@ subroutine ftn_init
#endif #endif
endfile 11 endfile 11
#ifdef Win32 #ifdef CVF
open(12,file=appdir(:iz)//'/decoded.ave',status='unknown', & open(12,file=appdir(:iz)//'/decoded.ave',status='unknown', &
share='denynone',err=920) share='denynone',err=920)
#else #else
@ -64,7 +64,7 @@ subroutine ftn_init
#endif #endif
endfile 12 endfile 12
#ifdef Win32 #ifdef CVF
open(14,file=azeldir(:iz2)//'/azel.dat',status='unknown', & open(14,file=azeldir(:iz2)//'/azel.dat',status='unknown', &
share='denynone',err=930) share='denynone',err=930)
#else #else
@ -72,7 +72,7 @@ subroutine ftn_init
err=930) err=930)
#endif #endif
#ifdef Win32 #ifdef CVF
open(19,file=appdir(:iz)//'/messages.txt',status='unknown', & open(19,file=appdir(:iz)//'/messages.txt',status='unknown', &
share='denynone',err=911) share='denynone',err=911)
#else #else
@ -81,7 +81,7 @@ subroutine ftn_init
#endif #endif
endfile 19 endfile 19
#ifdef Win32 #ifdef CVF
open(20,file=appdir(:iz)//'/bandmap.txt',status='unknown', & open(20,file=appdir(:iz)//'/bandmap.txt',status='unknown', &
share='denynone',err=912) share='denynone',err=912)
#else #else
@ -90,7 +90,7 @@ subroutine ftn_init
#endif #endif
endfile 20 endfile 20
#ifdef Win32 #ifdef CVF
open(21,file=appdir(:iz)//'/ALL65.TXT',status='unknown', & open(21,file=appdir(:iz)//'/ALL65.TXT',status='unknown', &
access='append',share='denynone',err=950) access='append',share='denynone',err=950)
#else #else
@ -102,7 +102,7 @@ subroutine ftn_init
10 continue 10 continue
#endif #endif
#ifdef Win32 #ifdef CVF
open(22,file=appdir(:iz)//'/kvasd.dat',access='direct',recl=1024, & open(22,file=appdir(:iz)//'/kvasd.dat',access='direct',recl=1024, &
status='unknown',share='denynone') status='unknown',share='denynone')
#else #else
@ -110,35 +110,35 @@ subroutine ftn_init
status='unknown') status='unknown')
#endif #endif
#ifdef Win32 #ifdef CVF
open(24,file=appdir(:iz)//'/meas24.txt',status='unknown', & open(24,file=appdir(:iz)//'/meas24.txt',status='unknown', &
share='denynone') share='denynone')
#else #else
open(24,file=appdir(:iz)//'/meas24.txt',status='unknown') open(24,file=appdir(:iz)//'/meas24.txt',status='unknown')
#endif #endif
#ifdef Win32 #ifdef CVF
open(25,file=appdir(:iz)//'/meas25.txt',status='unknown', & open(25,file=appdir(:iz)//'/meas25.txt',status='unknown', &
share='denynone') share='denynone')
#else #else
open(25,file=appdir(:iz)//'/meas25.txt',status='unknown') open(25,file=appdir(:iz)//'/meas25.txt',status='unknown')
#endif #endif
#ifdef Win32 #ifdef CVF
open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown', & open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown', &
share='denynone') share='denynone')
#else #else
open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown') open(26,file=appdir(:iz)//'/tmp26.txt',status='unknown')
#endif #endif
#ifdef Win32 #ifdef CVF
open(27,file=appdir(:iz)//'/dphi.txt',status='unknown', & open(27,file=appdir(:iz)//'/dphi.txt',status='unknown', &
share='denynone') share='denynone')
#else #else
open(27,file=appdir(:iz)//'/dphi.txt',status='unknown') open(27,file=appdir(:iz)//'/dphi.txt',status='unknown')
#endif #endif
#ifdef Win32 #ifdef CVF
open(29,file=appdir(:iz)//'/debug.txt',status='unknown', & open(29,file=appdir(:iz)//'/debug.txt',status='unknown', &
share='denynone') share='denynone')
#else #else

View File

@ -1,7 +1,7 @@
subroutine get_fname(hiscall,ntime,trperiod,lauto,fname) subroutine get_fname(hiscall,ntime,trperiod,lauto,fname)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#else #else
external gmtime_r external gmtime_r
@ -15,7 +15,7 @@ subroutine get_fname(hiscall,ntime,trperiod,lauto,fname)
n1=ntime n1=ntime
n2=(n1+2)/trperiod n2=(n1+2)/trperiod
n3=n2*trperiod n3=n2*trperiod
#ifdef Win32 #ifdef CVF
call gmtime(n3,it) call gmtime(n3,it)
#else #else
call gmtime_r(n3,it) call gmtime_r(n3,it)

View File

@ -1,6 +1,6 @@
subroutine getfile2(fname,len) subroutine getfile2(fname,len)
#ifdef Win32 #ifdef CVF
use dflib use dflib
#endif #endif
@ -14,7 +14,7 @@ subroutine getfile2(fname,len)
include 'gcom4.f90' include 'gcom4.f90'
1 if(ndecoding.eq.0) go to 2 1 if(ndecoding.eq.0) go to 2
#ifdef Win32 #ifdef CVF
call sleepqq(100) call sleepqq(100)
#else #else
call usleep(100*1000) call usleep(100*1000)
@ -33,22 +33,22 @@ subroutine getfile2(fname,len)
ndecoding=4 ndecoding=4
monitoring=0 monitoring=0
kbuf=1 kbuf=1
#ifdef Win32 !#ifdef CVF
! open(10,file=fname,form='binary',status='old',err=998) ! open(10,file=fname,form='binary',status='old',err=998)
call rfile3a(fname,id,n,ierr) call rfile3a(fname,id,n,ierr)
if(ierr.ne.0) then if(ierr.ne.0) then
print*,'Error opening or reading file: ',fname,ierr print*,'Error opening or reading file: ',fname,ierr
go to 999 go to 999
endif endif
#else !#else
call rfile2(fname,id,n,nr) ! call rfile2(fname,id,n,nr)
if(nr.ne.n) then ! if(nr.ne.n) then
print*,'Error opening or reading file: ',fname,n,nr ! print*,'Error opening or reading file: ',fname,n,nr
ierr=1002 ! ierr=1002
go to 999 ! go to 999
endif ! endif
!
#endif !#endif
sq=0. sq=0.
ka=0.1*NSMAX ka=0.1*NSMAX

View File

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
#include <portaudio.h> #include "portaudio.h"
#include <string.h> #include <string.h>
void fivehz_(); void fivehz_();

View File

@ -8,7 +8,8 @@ from tkMessageBox import showwarning
import g,os,time import g,os,time
import Audio import Audio
from math import log10 from math import log10
from Numeric import zeros #from Numeric import zeros
from numpy import zeros
import dircache import dircache
import Image,ImageTk #, ImageDraw import Image,ImageTk #, ImageDraw
from palettes import colormapblue, colormapgray0, colormapHot, \ from palettes import colormapblue, colormapgray0, colormapHot, \

View File

@ -38,7 +38,7 @@ subroutine map65a(newdat)
nrw26=0 nrw26=0
endif endif
#ifdef Win32 #ifdef CVF
open(23,file='CALL3.TXT',status='unknown',share='denynone') open(23,file='CALL3.TXT',status='unknown',share='denynone')
#else #else
open(23,file='CALL3.TXT',status='unknown') open(23,file='CALL3.TXT',status='unknown')

View File

@ -1,4 +1,4 @@
!---------------------------------------------------- recvpkt !----------------------------------------------------- recvpkt
subroutine recvpkt(iarg) subroutine recvpkt(iarg)
! Receive timf2 packets from Linrad, stuff data into id(). ! Receive timf2 packets from Linrad, stuff data into id().
@ -49,7 +49,7 @@ subroutine recvpkt(iarg)
if(nb.lt.0) nb=nb+65536 if(nb.lt.0) nb=nb+65536
nb0=nblock0 nb0=nblock0
if(nb0.lt.0) nb0=nb0+65536 if(nb0.lt.0) nb0=nb0+65536
if(ndebug.gt.0) print*,'Lost packets:',nb0,nb,lost ! if(ndebug.gt.0) print*,'Lost packets:',nb0,nb,lost
lost_tot=lost_tot + lost ! Insert zeros for the lost data. lost_tot=lost_tot + lost ! Insert zeros for the lost data.
do i=1,174*lost do i=1,174*lost
k=k+1 k=k+1
@ -129,16 +129,16 @@ subroutine recvpkt(iarg)
kk=k kk=k
ndiskdat=0 ndiskdat=0
ndone1=1 ndone1=1
if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60),ns, & ! if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60), &
kbuf,kk ! kbuf,kk,kkdone
3001 format('r1:',i5.4,2i3.2,i5,i10) !3001 format('r1:',i5.4,i3.2,i5,2i10)
endif endif
if(ns.ge.nt2 .and. ndone2.eq.0) then if(ns.ge.nt2 .and. ndone2.eq.0) then
kk=k kk=k
ndone2=1 ndone2=1
if(ndebug.eq.2) write(29,3002) nutc,mod(int(sec_midn()),60),ns, & ! if(ndebug.eq.2) write(29,3002) nutc,mod(int(sec_midn()),60), &
kbuf,kk ! kbuf,kk,kkdone
3002 format('r2:',i5.4,2i3.2,i5,i10) !3002 format('r2:',i5.4,i3.2,i5,2i10)
nlost=lost_tot ! Save stats for printout nlost=lost_tot ! Save stats for printout
endif endif
endif endif

View File

@ -1,5 +1,9 @@
#include <stdio.h> #include <stdio.h>
#include <samplerate.h> //#ifdef Win32
#include "samplerate.h"
//#else
//#include <samplerate.h>
//#endif
int resample_(float din[], int *jzin, int *conv_type, int *channels, int resample_(float din[], int *jzin, int *conv_type, int *channels,
double *samfac, float dout[], int *jzout) double *samfac, float dout[], int *jzout)

View File

@ -4,7 +4,11 @@ subroutine rfile3a(infile,ibuf,n,ierr)
character*(*) infile character*(*) infile
integer*1 ibuf(n) integer*1 ibuf(n)
#ifdef CVF
open(10,file=infile,form='binary',status='old',err=998) open(10,file=infile,form='binary',status='old',err=998)
#else
open(10,file=infile,access='stream',status='old',err=998)
#endif
read(10,end=998) ibuf read(10,end=998) ibuf
ierr=0 ierr=0
go to 999 go to 999

View File

@ -1,16 +1,18 @@
subroutine runqqq(fname,cmnd,iret) subroutine runqqq(fname,cmnd,iret)
#ifdef Win32 #ifdef CVF
use dflib use dflib
#endif #endif
integer system integer system
character*(*) fname,cmnd character*(*) fname,cmnd
#ifdef Win32 #ifdef CVF
iret=runqq(fname,cmnd) iret=runqq(fname,cmnd)
#else #else
iret=system('./KVASD -q >& /dev/null') ! iret=system('./KVASD -q >& /dev/null')
iret=system('KVASD -q')
! print*,iret
#endif #endif
return return

View File

@ -1,6 +1,6 @@
subroutine savetf2(id,nsave,ntime,nutc,savedir) subroutine savetf2(id,nsave,ntime,nutc,savedir)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#else #else
external gmtime_r external gmtime_r
@ -18,7 +18,7 @@ subroutine savetf2(id,nsave,ntime,nutc,savedir)
if(nsave.eq.1) then if(nsave.eq.1) then
n2=ntime/60 n2=ntime/60
n3=(n2-1)*60 n3=(n2-1)*60
#ifdef Win32 #ifdef CVF
call gmtime(n3,it) call gmtime(n3,it)
#else #else
call gmtime_r(n3,it) call gmtime_r(n3,it)
@ -35,7 +35,7 @@ subroutine savetf2(id,nsave,ntime,nutc,savedir)
1 iz=i 1 iz=i
fname=savedir(1:iz)//fname fname=savedir(1:iz)//fname
#ifdef Win32 #ifdef CVF
open(17,file=fname,status='unknown',form='binary',err=998) open(17,file=fname,status='unknown',form='binary',err=998)
write(17) id write(17) id
close(17) close(17)

View File

@ -2,7 +2,7 @@ real function sec_midn()
real*8 sec8,hrtime real*8 sec8,hrtime
#ifdef Win32 #ifdef CVF
sec_midn=secnds(0.0) sec_midn=secnds(0.0)
#else #else
sec8=hrtime() sec8=hrtime()
@ -14,15 +14,14 @@ end function sec_midn
subroutine sleep_msec(n) subroutine sleep_msec(n)
#ifdef Win32 #ifdef CVF
use dflib use dflib
#endif #endif
#ifdef Win32 #ifdef CVF
call sleepqq(n) call sleepqq(n)
#else #else
!m=min(1,n) call usleep(1000*n)
! call usleep(m)
#endif #endif
return return

View File

@ -8,8 +8,8 @@ import Audio
import g import g
import string import string
import cPickle import cPickle
#import Numeric #from Numeric import zeros, multiarray
from Numeric import zeros, multiarray import numpy
import Image, ImageTk, ImageDraw import Image, ImageTk, ImageDraw
from palettes import colormapblue, colormapgray0, colormapHot, \ from palettes import colormapblue, colormapgray0, colormapHot, \
colormapAFMHot, colormapgray1, colormapLinrad, Colormap2Palette colormapAFMHot, colormapgray1, colormapLinrad, Colormap2Palette
@ -69,13 +69,15 @@ ttot=0.0
c=Canvas() c=Canvas()
NX=750 NX=750
NY=130 NY=130
a=zeros(NX*NY,'s') #a=zeros(NX*NY,'s')
a=numpy.zeros(NX*NY,numpy.int16)
im=Image.new('P',(NX,NY)) im=Image.new('P',(NX,NY))
line0=Image.new('P',(NX,1)) #Image fragment for top line of waterfall line0=Image.new('P',(NX,1)) #Image fragment for top line of waterfall
draw=ImageDraw.Draw(im) draw=ImageDraw.Draw(im)
pim=ImageTk.PhotoImage(im) pim=ImageTk.PhotoImage(im)
a2=zeros(NX*NY,'s') #a2=zeros(NX*NY,'s')
a2=numpy.zeros(NX*NY,numpy.int16)
im2=Image.new('P',(NX,NY)) im2=Image.new('P',(NX,NY))
line02=Image.new('P',(NX,1)) #Image fragment for top line of zoomed waterfall line02=Image.new('P',(NX,1)) #Image fragment for top line of zoomed waterfall
draw2=ImageDraw.Draw(im2) draw2=ImageDraw.Draw(im2)

6
sun.f
View File

@ -25,8 +25,10 @@ C Other standard variables:
real r !Distance to sun, AU real r !Distance to sun, AU
real xv,yv !x and y coords in ecliptic real xv,yv !x and y coords in ecliptic
real lonsun !Ecliptic long and lat of sun real lonsun !Ecliptic long and lat of sun
real xs,ys !Ecliptic coords of sun (geocentric) C Ecliptic coords of sun (geocentric)
real xe,ye,ze !Equatorial coords of sun (geocentric) real xs,ys
C Equatorial coords of sun (geocentric)
real xe,ye,ze
real lon,lat real lon,lat
real GMST0,LST,HA real GMST0,LST,HA
real xx,yy,zz real xx,yy,zz

View File

@ -18,9 +18,9 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
! kbuf,kk,kkk,kkdone ! kbuf,kk,kkk,kkdone
!4001 format(a1,i5.4,2i3,3i9,i5) !4001 format(a1,i5.4,2i3,3i9,i5)
if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60),n, & if(ndebug.eq.2) write(29,3001) nutc,mod(int(sec_midn()),60), &
newdat,ndecoding,kbuf,kk,kkdone kbuf,kk,kkdone,ndecoding,newdat,n
3001 format('s1:',i5.4,i3.2,4i5,2i10) 3001 format('s1:',i5.4,i3.2,i5,2i10,2i3,i5)
fac=0.0002 fac=0.0002
if(nagc.ne.0) fac=0.0002 * 10.0**(0.05*(-rxnoise)) if(nagc.ne.0) fac=0.0002 * 10.0**(0.05*(-rxnoise))
hsym=2048.d0*96000.d0/11025.d0 !Samples per half symbol hsym=2048.d0*96000.d0/11025.d0 !Samples per half symbol
@ -120,8 +120,9 @@ subroutine symspec(id,kbuf,kk,kkdone,nutc,newdat)
999 continue 999 continue
! if(ndebug.gt.0) write(*,4001) 'B',nutc,mod(int(sec_midn()),60), & ! if(ndebug.gt.0) write(*,4001) 'B',nutc,mod(int(sec_midn()),60), &
! kbuf,kk,kkk,kkdone,n ! kbuf,kk,kkk,kkdone,n
if(ndebug.eq.2) write(29,3002) mod(int(sec_midn()),60),n, &
newdat,ndecoding,kbuf,kk,kkdone if(ndebug.eq.2) write(29,3002) nutc,mod(int(sec_midn()),60), &
3002 format('s2:',i8.2,4i5,2i10) kbuf,kk,kkdone,ndecoding,newdat,n
3002 format('s2:',i5.4,i3.2,i5,2i10,2i3,i5)
return return
end subroutine symspec end subroutine symspec

View File

@ -62,7 +62,7 @@ subroutine wsjtgen
if(msg(2:2).eq.'/' .or. ichar(msg(2:2)).eq.92) then if(msg(2:2).eq.'/' .or. ichar(msg(2:2)).eq.92) then
txmsg=msg txmsg=msg
testfile=msg(2:) testfile=msg(2:)
#ifdef Win32 #ifdef CVF
open(18,file=testfile,form='binary',status='old',err=12) open(18,file=testfile,form='binary',status='old',err=12)
go to 14 go to 14
12 print*,'Cannot open test file ',msg(2:) 12 print*,'Cannot open test file ',msg(2:)