home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 626a.lha / GUISpell_v1.0 / libraries.c < prev    next >
C/C++ Source or Header  |  1992-03-27  |  637b  |  30 lines

  1. #error By license you aren't permitted to compile this.  Read GUISpell.doc.
  2. #include <proto/exec.h>
  3. #define INCLUDE_LIBS_STRUCT
  4. #include "libraries.h"
  5. #include "error.h"
  6.  
  7. extern char *_ProgramName;
  8.  
  9. void OpenLibraries (void)
  10. {
  11.   int i;
  12.  
  13.   for (i = 0; libs[i].name; i++)
  14.     if (!(libs[i].base = OpenLibrary (libs[i].name, libs[i].version)))
  15.       Error ("ssssds", _ProgramName, ": Can't open needed library (",
  16.          libs[i].name, " version ", libs[i].version, ")!\n");
  17. }
  18.  
  19. void CloseLibraries (void)
  20. {
  21.   int i;
  22.  
  23.   for (i = 0; libs[i].name; i++)
  24.     {
  25.       if (libs[i].base)
  26.     CloseLibrary (libs[i].base);
  27.       libs[i].base = 0;
  28.     }
  29. }
  30.