home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / programs / documentation / lightwave / sdk / source / slib4.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-03  |  977 b   |  59 lines

  1. /*
  2.  * LWSDK Library Source File
  3.  * Copyright 1995  NewTek, Inc.
  4.  */
  5. #include <splug.h>
  6.  
  7. #ifdef _AMIGA
  8. #include <functions.h>
  9.  
  10. struct ExecBase         *SysBase;
  11. struct DosBase          *DosBase;
  12. #endif
  13. #ifdef __SASC
  14.        extern int  __stdargs    __fpinit (void);
  15.        extern void __stdargs    __fpterm (void);
  16. #endif
  17. #ifdef _AMIGA
  18.     XCALL_(void *)
  19. _Startup (void)
  20. {
  21.     void                    *val;
  22.  
  23.     XCALL_INIT;
  24.  
  25.     SysBase = *((struct ExecBase **)4);
  26.     DosBase = (struct DosBase *) OpenLibrary ((UBYTE*) "dos.library", 37L);
  27.     if (!DosBase)
  28.         return NULL;
  29.  
  30.     #ifdef __SASC
  31.            if (__fpinit ())
  32.                goto die;
  33.     #endif
  34.  
  35.     val = Startup ();
  36.     if (val)
  37.         return val;
  38.  
  39. die:
  40.     #ifdef __SASC
  41.            __fpterm ();
  42.     #endif
  43.     CloseLibrary ((struct Library *) DosBase);
  44.     return NULL;
  45. }
  46.     XCALL_(void)
  47. _Shutdown (
  48.     void                    *serverData)
  49. {
  50.     XCALL_INIT;
  51.  
  52.     Shutdown (serverData);
  53.     #ifdef __SASC
  54.            __fpterm ();
  55.     #endif
  56.     CloseLibrary ((struct Library *) DosBase);
  57. }
  58. #endif
  59.