home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / asyncio / src / asynclib.c < prev    next >
C/C++ Source or Header  |  1997-04-27  |  584b  |  40 lines

  1. #include <proto/exec.h>
  2. #include <proto/asyncio.h>
  3.  
  4.  
  5. void __regargs __autoopenfail( char * );
  6.  
  7.  
  8. struct Library    *AsyncIOBase;
  9. static void *libbase;
  10.  
  11. extern long __oslibversion;
  12. extern long __asiolibversion;
  13.  
  14.  
  15. LONG
  16. _STI_110_OpenAsyncIO( VOID )
  17. {
  18.     AsyncIOBase = libbase = OpenLibrary( "asyncio.library", __asiolibversion );
  19.  
  20.     if( AsyncIOBase == NULL )
  21.     {
  22.         __oslibversion = __asiolibversion;
  23.         __autoopenfail( "asyncio.library" );
  24.         return( 1 );
  25.     }
  26.  
  27.     return( 0 );
  28. }
  29.  
  30.  
  31. VOID
  32. _STD_110_CloseAsyncIO( VOID )
  33. {
  34.     if( libbase )
  35.     {
  36.         CloseLibrary( libbase );
  37.         libbase = AsyncIOBase = NULL;
  38.     }
  39. }
  40.