home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / files / utility / poplibsr / xtest.c < prev   
Encoding:
C/C++ Source or Header  |  1988-08-19  |  706 b   |  35 lines

  1. /*
  2.     Shared library test
  3.     written November, 1987
  4.     by Preston L. Bannister
  5. */
  6.  
  7. #include <debug.h>
  8. #include "libs.h"
  9. #include "xlib.h"
  10.  
  11. Library XLibBase;    /* points to our example library */
  12.  
  13. main ()
  14. {
  15.   if (InitLibSupport())
  16.   {
  17.     printf("Attempting to find library '%s'\n",XLIB_NAME);
  18.     if (XLibBase = (Library)FindLibrary(XLIB_NAME,XLIB_VERSION))
  19.     {
  20.       printf("XLibBase 0x%08X\n",XLibBase);
  21.       DEBUG(("Calling XLibP0 @ 0x%08X\n",XLibBase[0]));
  22.       XLibP0();
  23.       DEBUG(("Calling XLibP1 @ 0x%08X\n",XLibBase[1]));
  24.       XLibP1();
  25.       DEBUG(("Calling XLibP2 @ 0x%08X\n",XLibBase[2]));
  26.       (void)XLibP2();
  27.     }
  28.     else
  29.     {
  30.       printf("XLib not availible??\n");
  31.     }
  32.   }
  33.   exit(0);
  34. }
  35.