home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / INCLUDE.DI$ / DLLMEX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-18  |  2.2 KB  |  115 lines

  1. /*
  2.  * @(#)dllmex.h    generated by: makeheader    Thu Mar 18 19:30:35 1993
  3.  *
  4.  *        built from:    cmexmain.c
  5.  */
  6.  
  7. #ifndef dllmex_h
  8. #define dllmex_h
  9.  
  10.  
  11.  
  12. #include "matrix.h"
  13. #include "windows.h"
  14.  
  15. #define malloc(N)    mxCalloc(N,1)
  16. #define calloc(N,S)    mxCalloc(N,S)
  17. #define free(P)        mxFree(P)
  18. #define    printf        mexPrintf
  19.  
  20. #define REAL    0
  21. #define COMPLEX 1
  22. #define IMAG     1
  23.  
  24. #define    create_real_array(N)        (double *) mxCalloc((N),sizeof(double))
  25. #define    create_int_array(N)            (int *) mxCalloc((N),sizeof(int))
  26. #define mexFunction(nl,pl,nr,pr)    __export far pascal mexFunction(nl,pl,nr,pr)
  27.  
  28.  
  29. extern HANDLE    hInstMATLAB;    /* instance handle for MATLAB */
  30.  
  31. extern HWND        hWndMATLABCmd;    /* handle to MATLAB command window */
  32.  
  33. extern HANDLE    hInstDLL;        /* instance handle for the dll */
  34.  
  35. extern WORD     wDataSegment;    /* data segment for the dll */
  36.  
  37. extern WORD     wHeapSize;        /* heap size of the dll */
  38.  
  39.  
  40. extern    int  mexAtExit (void (*ExitFcn)());
  41.  
  42.  
  43. extern    Matrix  *mxCreateFull(long m, long n, long imag_flag);
  44.  
  45.  
  46. extern    void     mxFreeMatrix(Matrix    *pmat);
  47.  
  48.  
  49. extern    char     *mxCalloc(long n, long size);
  50.  
  51.  
  52. extern    void     mxFree(char    *p);
  53.  
  54.  
  55. extern    Matrix     *mexGetMatrixPtr(const char *name);
  56.  
  57.  
  58. extern    int   mexCallMATLAB(int nlhs, Matrix **plhs, int nrhs, Matrix **prhs, char *name);
  59.  
  60.  
  61. extern    void     mexSetTrapFlag(int flag);
  62.  
  63.  
  64. extern    void  mexErrMsgTxt(const char *pch);
  65.  
  66.  
  67. extern    void  mexPrintf(const char *format, ...);
  68.  
  69.  
  70. extern    int     mexEvalString(const char *pch);
  71.  
  72.  
  73. extern    Matrix  *mxCreateSparse(
  74.     long    m,
  75.     long    n,
  76.     long    nzmax,
  77.     long    cmplx
  78.     );
  79.  
  80.  
  81. extern    Matrix  *mexGetMatrix(
  82.     char    *name                /* name of variable in question */
  83.     );
  84.  
  85.  
  86. extern    int  mexPutMatrix(
  87.     Matrix    *pm                    /* pointer to matrix */
  88.     );
  89.  
  90.  
  91. extern    int  mexGetFull(
  92.     char    *name,                /* name of variable in question */
  93.     long    *m,                    /* number of rows */
  94.     long    *n,                    /* number of columns */
  95.     double    **pr,                /* real part */
  96.     double    **pi                /* imaginary part */
  97.     );
  98.  
  99.  
  100. extern    int  mexPutFull(
  101.     char    *name,                /* name of variable in question */
  102.     long    m,                    /* number of rows */
  103.     long    n,                    /* number of columns */
  104.     double    *pr,                /* real part */
  105.     double    *pi                    /* imaginary part */
  106.     );
  107.  
  108.  
  109. extern    Matrix  *mxCreateString(
  110.     char *str_ptr    /*     char input C string */
  111.     );
  112.  
  113.  
  114. #endif /* dllmex_h */
  115.