home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / biblioteki / c_library / asyncio / source / asynclib.c < prev    next >
C/C++ Source or Header  |  1977-12-31  |  549b  |  36 lines

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