/************************************************************************
* CMEX.DLL Headerdatei für C-Matlab-Funktionen *
* h#s, 07/97, Idee: EA *
************************************************************************/
#ifndef cmex_h
#define cmex_h
#include <windows.h>
#define DLLMEX
#define mxFULL 0 /* full matrix */
#define mxSPARSE 1 /* sparse matrix */
#define mxCOLON 2 /* colon operator */
#define mxGLOBAL 3 /* global (internal parse only) */
#define mxUNASSIGNED 4 /* unassigned variable flag */
#define mxCLEARMAT 5 /* cleared variable flag */
#define mxUNASSARG 6 /* unassigned M-file arg */
#define mxRHSUNASSIGNED 7 /* undefined symbol */
#define mxASSIGNED 8 /* assigned variable flag */
#define mxSPAM 9 /* spam format matrix */
#define mxDOUBLE 0 /* double precision */
#define mxFLOAT 1 /* single precision */
#define mxLONGINT 2 /* 32 bit signed int */
#define mxSHORTINT 3 /* 16 bit signed int */
#define mxUSHORTINT 4 /* 16 bit unsigned int */
#define mxUCHAR 5 /* 8 bit unsigned char/int */
#define mxNUMBER 0 /* Display as a number */
#define mxSTRING 1 /* Display as a string */
#define mxMAXNAM 20 /* maximum name length */
#define mxMAXTAG 4 /* maximum tag length */
#define mxMAXDIM 2 /* maximum array dimension */
typedef double huge* HPDOUBLE;
typedef long huge* HPLONG;
typedef struct matrix{
char name[mxMAXNAM];
long struc;
long type;
long dmode;
char tag[mxMAXTAG];
long dim[mxMAXDIM]; /* array of dimensions */
HPDOUBLE pr; /* pointer to real part */
HPDOUBLE pi; /* pointer to imag part */
long nzmax; /* number of nonzero sparse entries */
HPLONG jc; /* sparse indices */
HPLONG ir; /* sparse indices */
} Matrix;
typedef Matrix* PMatrix;
typedef Matrix near* NPMatrix;
typedef Matrix far* LPMatrix;
typedef const Matrix near* NPCMatrix;
typedef const Matrix far* LPCMatrix;
typedef Matrix far* far* LPPMatrix;
#define REAL 0
#define COMPLEX 1
#define IMAG 1
/* MX-Funktionen */
LPSTR WINAPI mxGetName(LPCMatrix);
void WINAPI mxSetName(LPMatrix,LPCSTR);
long WINAPI mxGetM(LPCMatrix);
void WINAPI mxSetM(LPMatrix, long);
long WINAPI mxGetN(LPCMatrix);
void WINAPI mxSetN(LPMatrix, long);
HPDOUBLE WINAPI mxGetPr(LPCMatrix);
void WINAPI mxSetPr(LPMatrix, HPDOUBLE);
HPDOUBLE WINAPI mxGetPi(LPCMatrix);
void WINAPI mxSetPi(LPMatrix, HPDOUBLE);
long WINAPI mxGetNzmax(LPCMatrix);
void WINAPI mxSetNzmax(LPMatrix, long);
HPLONG WINAPI mxGetIr(LPCMatrix);
void WINAPI mxSetIr(LPMatrix, HPLONG);
HPLONG WINAPI mxGetJc(LPCMatrix);
void WINAPI mxSetJc(LPMatrix, HPLONG);
int WINAPI mxIsComplex(LPCMatrix);
int WINAPI mxIsDouble(LPCMatrix);
int WINAPI mxIsFull(LPCMatrix);
int WINAPI mxIsNumeric(LPCMatrix);
int WINAPI mxIsSparse(LPCMatrix);
int WINAPI mxIsString(LPCMatrix);
int WINAPI mxGetString(LPMatrix, LPSTR, long);
double WINAPI mxGetScalar(LPMatrix);
LPMatrix WINAPI mxCreateFull(long, long, long);
void WINAPI mxFreeMatrix(LPMatrix);
LPVOID WINAPI mxCalloc(unsigned, unsigned);
void WINAPI mxFree(LPVOID);
LPMatrix WINAPI mxCreateSparse(long, long, long, long);
LPMatrix WINAPI mxCreateString(LPSTR);
/* MEX-Funktionen */
void WINAPI mexFunction(int,LPPMatrix,int,LPPMatrix);
int WINAPI mexAtExit(FARPROC);
LPMatrix WINAPI mexGetGlobal(LPCSTR);
LPMatrix WINAPI mexGetMatrixPtr(LPCSTR);
int WINAPI mexCallMATLAB(int, LPPMatrix, int, LPPMatrix, LPSTR);
void WINAPI mexSetTrapFlag(int);
void WINAPI mexErrMsgTxt(LPCSTR);
#define mexPrintf MEXPRINTF
void far cdecl mexPrintf(LPCSTR, ...);
int WINAPI mexEvalString(LPCSTR);
LPMatrix WINAPI mexGetMatrix(LPSTR);
int WINAPI mexPutMatrix(LPMatrix);
int WINAPI mexGetFull(LPSTR, LPLONG, LPLONG, HPDOUBLE far*, HPDOUBLE far*);
int WINAPI mexPutFull(LPSTR, long, long, HPDOUBLE, HPDOUBLE);
#ifndef NO_MAT
typedef struct matfile {
int dummy
} MATFile;
typedef MATFile* PMATFile;
typedef MATFile near* NPMATFile;
typedef MATFile far* LPMATFile;
#define matREAD 0
#define matWRITE 1
#define matAPPEND 2
/* MAT-Funktionen */
LPMATFile WINAPI matOpen(LPSTR,LPSTR);
int WINAPI matClose(LPMATFile);
FILE far* WINAPI matGetFp(LPMATFile);
LPSTR far* WINAPI matGetDir(LPMATFile, LPLONG);
int WINAPI matDeleteMatrix(LPMATFile, LPSTR);
LPMatrix WINAPI matGetMatrix(LPMATFile, LPSTR);
int WINAPI matPutMatrix(LPMATFile, LPMatrix);
LPMatrix WINAPI matGetNextMatrix(LPMATFile);
int WINAPI matGetFull(LPMATFile, LPSTR, LPLONG, LPLONG,
HPDOUBLE far*, HPDOUBLE far*);
int WINAPI matPutFull(LPMATFile, LPSTR, long, long, HPDOUBLE, HPDOUBLE);
int WINAPI matGetString(LPMATFile, LPSTR, LPSTR, long);
int WINAPI matPutString(LPMATFile, LPSTR, LPSTR);
#endif //NO_MAT
#ifndef NO_ENG
typedef struct engine{
HGLOBAL hgEngine;
HCONV hConvWithMatlab;
void (*UserFcn)();
long lTimeout;
char *pszBuffer;
int iBufSize;
} Engine;
typedef Engine* PEngine;
typedef Engine near* NPEngine;
typedef Engine far* LPEngine;
/* ENG-Funktionen */
void WINAPI engWinInit(HANDLE);
LPEngine WINAPI engOpen(LPSTR);
void WINAPI engSetEvalTimeout(LPEngine,long);
void WINAPI engSetEvalCallback(LPEngine,FARPROC);
int WINAPI engEvalString(LPEngine, LPSTR);
int WINAPI engClose(LPEngine);
LPMatrix WINAPI engGetMatrix(LPEngine, LPSTR);
int WINAPI engPutMatrix(LPEngine, LPMatrix);
int WINAPI engGetFull(LPEngine, LPSTR, LPLONG, LPLONG,
HPDOUBLE far*, HPDOUBLE far*);
int WINAPI engPutFull(LPEngine, LPSTR, long, long, HPDOUBLE, HPDOUBLE);
void WINAPI engOutputBuffer(LPEngine, LPSTR, int);
#endif //NO_ENG
/* Variablenzugriffe */
HANDLE WINAPI hInstMATLAB(void);
HWND WINAPI hWndMATLABCmd(void);
HANDLE WINAPI hInstDLL(void);
WORD WINAPI wDataSegment(void);
WORD WINAPI wHeapSize(void);
/* HugeMem- und sonstige Zugriffe */
void WINAPI IncHP(void huge* far*, unsigned);
void WINAPI DecHP(void huge* far*, unsigned);
void WINAPI IncHPL(void huge* far*, long);
void WINAPI mexVPrintf(LPCSTR, const void far*, unsigned);
unsigned WINAPI mxGetLibVersion(void);
#endif //cmex_h
Detected encoding: OEM (CP437) | 1
|
|