home *** CD-ROM | disk | FTP | other *** search
- /*
- * @(#)dllmex.h generated by: makeheader Thu Mar 18 19:30:35 1993
- *
- * built from: cmexmain.c
- */
-
- #ifndef dllmex_h
- #define dllmex_h
-
-
-
- #include "matrix.h"
- #include "windows.h"
-
- #define malloc(N) mxCalloc(N,1)
- #define calloc(N,S) mxCalloc(N,S)
- #define free(P) mxFree(P)
- #define printf mexPrintf
-
- #define REAL 0
- #define COMPLEX 1
- #define IMAG 1
-
- #define create_real_array(N) (double *) mxCalloc((N),sizeof(double))
- #define create_int_array(N) (int *) mxCalloc((N),sizeof(int))
- #define mexFunction(nl,pl,nr,pr) __export far pascal mexFunction(nl,pl,nr,pr)
-
-
- extern HANDLE hInstMATLAB; /* instance handle for MATLAB */
-
- extern HWND hWndMATLABCmd; /* handle to MATLAB command window */
-
- extern HANDLE hInstDLL; /* instance handle for the dll */
-
- extern WORD wDataSegment; /* data segment for the dll */
-
- extern WORD wHeapSize; /* heap size of the dll */
-
-
- extern int mexAtExit (void (*ExitFcn)());
-
-
- extern Matrix *mxCreateFull(long m, long n, long imag_flag);
-
-
- extern void mxFreeMatrix(Matrix *pmat);
-
-
- extern char *mxCalloc(long n, long size);
-
-
- extern void mxFree(char *p);
-
-
- extern Matrix *mexGetMatrixPtr(const char *name);
-
-
- extern int mexCallMATLAB(int nlhs, Matrix **plhs, int nrhs, Matrix **prhs, char *name);
-
-
- extern void mexSetTrapFlag(int flag);
-
-
- extern void mexErrMsgTxt(const char *pch);
-
-
- extern void mexPrintf(const char *format, ...);
-
-
- extern int mexEvalString(const char *pch);
-
-
- extern Matrix *mxCreateSparse(
- long m,
- long n,
- long nzmax,
- long cmplx
- );
-
-
- extern Matrix *mexGetMatrix(
- char *name /* name of variable in question */
- );
-
-
- extern int mexPutMatrix(
- Matrix *pm /* pointer to matrix */
- );
-
-
- extern int mexGetFull(
- char *name, /* name of variable in question */
- long *m, /* number of rows */
- long *n, /* number of columns */
- double **pr, /* real part */
- double **pi /* imaginary part */
- );
-
-
- extern int mexPutFull(
- char *name, /* name of variable in question */
- long m, /* number of rows */
- long n, /* number of columns */
- double *pr, /* real part */
- double *pi /* imaginary part */
- );
-
-
- extern Matrix *mxCreateString(
- char *str_ptr /* char input C string */
- );
-
-
- #endif /* dllmex_h */
-