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 911bf76080
commit 8dfca65f08
9 changed files with 23 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ subroutine recvpkt(iarg)
! Receive timf2 packets from Linrad, stuff data into id().
! This routine runs in a background thread and will never return.
!#ifdef Win32
!#ifdef CVF
! use dflib
!#endif

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@
void *rs;
static int first=1;
#ifdef Win32
#ifdef CVF
void __stdcall RS_ENCODE(int *dgen, int *sent)
#else
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];
}
#ifdef Win32
#ifdef CVF
void __stdcall RS_DECODE(int *recd0, int *era0, int *numera0, int *decoded, int *nerr)
#else
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)
{
rs_encode_(dgen, sent);