Made importing of numpy/Numeric more flexible, as in WSJT.

Changed compile-time flag Win32 to CVF (for Compaq Visual Fortran).


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@618 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2007-12-31 15:15:55 +00:00
parent 312d01f775
commit fc6221043a
9 changed files with 23 additions and 17 deletions

View File

@ -1,10 +1,10 @@
subroutine fstatqqq(lu,istat,ierr) subroutine fstatqqq(lu,istat,ierr)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#endif #endif
#ifdef Win32 #ifdef CVF
ierr=fstat(lu,istat) ierr=fstat(lu,istat)
#else #else
call fstat(lu,istat,ierr) call fstat(lu,istat,ierr)

View File

@ -1,4 +1,4 @@
#ifdef Win32 #ifdef CVF
extern int __stdcall IGRAY(int *n0, int *idir) extern int __stdcall IGRAY(int *n0, int *idir)
#else #else
int igray_(int *n0, int *idir) int igray_(int *n0, int *idir)

View File

@ -40,7 +40,7 @@ typedef struct _SYSTEMTIME
short Millisecond; short Millisecond;
} SYSTEMTIME; } SYSTEMTIME;
#ifdef Win32 #ifdef CVF
extern void __stdcall GetSystemTime(SYSTEMTIME *st); extern void __stdcall GetSystemTime(SYSTEMTIME *st);
#else #else
#include <sys/time.h> #include <sys/time.h>

View File

@ -8,8 +8,10 @@ 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 try:
from numpy import zeros from numpy.oldnumeric import zeros
except:
from Numeric 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

@ -4,7 +4,7 @@ subroutine recvpkt(iarg)
! Receive timf2 packets from Linrad, stuff data into id(). ! Receive timf2 packets from Linrad, stuff data into id().
! 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

View File

@ -1,5 +1,5 @@
#include <stdio.h> #include <stdio.h>
//#ifdef Win32 //#ifdef CVF
#include "samplerate.h" #include "samplerate.h"
//#else //#else
//#include <samplerate.h> //#include <samplerate.h>

View File

@ -9,7 +9,11 @@ import g
import string import string
import cPickle import cPickle
#from Numeric import zeros, multiarray #from Numeric import zeros, multiarray
import numpy #import numpy
try:
from numpy.oldnumeric import zeros, multiarray
except:
from Numeric import zeros, multiarray
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,15 +73,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) #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) #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)

View File

@ -1,6 +1,6 @@
subroutine sysqqq(cmnd,iret) subroutine sysqqq(cmnd,iret)
#ifdef Win32 #ifdef CVF
use dfport use dfport
#else #else
integer system integer system

View File

@ -8,7 +8,7 @@
void *rs; void *rs;
static int first=1; static int first=1;
#ifdef Win32 #ifdef CVF
void __stdcall RS_ENCODE(int *dgen, int *sent) void __stdcall RS_ENCODE(int *dgen, int *sent)
#else #else
void rs_encode_(int *dgen, int *sent) void rs_encode_(int *dgen, int *sent)
@ -38,7 +38,7 @@ void rs_encode_(int *dgen, int *sent)
for (i = 0; i < 12; i++) sent[i+51] = dat1[11-i]; for (i = 0; i < 12; i++) sent[i+51] = dat1[11-i];
} }
#ifdef Win32 #ifdef CVF
void __stdcall RS_DECODE(int *recd0, int *era0, int *numera0, int *decoded, int *nerr) void __stdcall RS_DECODE(int *recd0, int *era0, int *numera0, int *decoded, int *nerr)
#else #else
void rs_decode_(int *recd0, int *era0, int *numera0, int *decoded, int *nerr) void rs_decode_(int *recd0, int *era0, int *numera0, int *decoded, int *nerr)
@ -69,7 +69,7 @@ void rs_decode_(int *recd0, int *era0, int *numera0, int *decoded, int *nerr)
} }
#ifndef Win32 #ifndef CVF
void rs_encode__(int *dgen, int *sent) void rs_encode__(int *dgen, int *sent)
{ {
rs_encode_(dgen, sent); rs_encode_(dgen, sent);