home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 March / VPR9703A.ISO / VPR_DATA / DOGA / SOURCES / POLYEDIT.LZH / ML / MLINIT.C < prev    next >
C/C++ Source or Header  |  1995-03-05  |  741b  |  39 lines

  1.  
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include "lib.h"
  5.  
  6. #include "ml.h"
  7.  
  8. extern    Library    **LibAry ;
  9. extern    int        (**SystemFunc)();
  10.  
  11. /*    _mlinit.c    */
  12. extern    void    _MLInit( Library* );
  13.  
  14. static    int        ver = ( 2 << 20 ) + ( 0 << 10 ) + 2 ;
  15.  
  16. void    MLInit()
  17. {
  18.     Library    *libinfo ;
  19.     int        id ;
  20.     
  21.     LibraryInit();
  22.     id = LibraryGet( "Macro Language Library" );
  23.  
  24.     if ( id == 0 )
  25.     {
  26.         printf( "\'Marco Language\' ライブラリが常駐していません。\n" );
  27.         exit( 1 );
  28.     }
  29.     libinfo = LibraryGetInfo( id );
  30.     if ( ( libinfo->ver1 << 20 ) + ( libinfo->ver2 << 10 ) + libinfo->ver3 < ver )
  31.     {
  32.         printf( "\'Marco Language\' ライブラリのバージョンが違います。\n" );
  33.         exit( 1 );
  34.     }
  35.     
  36.     _MLInit( LibAry[id] );
  37.     __MLInit( SystemFunc );
  38. }
  39.