home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / MATLIB / MATCLASS.C < prev    next >
C/C++ Source or Header  |  1996-03-19  |  937b  |  57 lines

  1. /*
  2.  *        行列演算ライブラリ
  3.  *
  4.  *        1994.6.5        Copyright T.Kobayashi
  5.  */
  6.  
  7. #include <stdio.h>
  8. #include <string.h>
  9. #include <stdlib.h>
  10. #include <assert.h>
  11.  
  12. #include "lib.h"
  13. #include "_matclas.h"
  14.  
  15. #include "inlib.h"
  16. #include "err.h"
  17.  
  18. extern    int        (**SystemFunc)();
  19. void    _MatrixInit( Library* );
  20. void    _MLInit( Library* );
  21.  
  22. /*    setmat.c    */
  23. extern    void    InitMatrixLibrary( void );
  24.  
  25. /*    setvec.c    */
  26. extern    void    InitVectorLibrary( void );
  27.  
  28. int        __MatrixClassInit( func )
  29. void    *func ;
  30. {
  31. #ifdef DYNAMIC
  32.     int        id ;
  33.     if ( func != NULL )
  34.     {
  35.         SystemFunc = (int(**)())func ;
  36.  
  37.         id = LibraryGet( "Matrix Library" );
  38.         if ( id <= 0 )
  39.             return -1 ;
  40.         _MatrixInit( LibraryGetInfo( id ) );
  41.  
  42.         id = LibraryGet( "Macro Language Library" );
  43.         if ( id <= 0 )
  44.             return -1 ;
  45.         _MLInit( LibraryGetInfo( id ) );
  46.     }
  47. #else
  48.     MatrixInit();
  49.     MLInit();
  50. #endif
  51.     InitVectorLibrary();
  52.     InitMatrixLibrary();
  53.  
  54.     return 0 ;
  55. }
  56.  
  57.