home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / examples / samplelib / try_multi.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-24  |  788 b   |  36 lines

  1. #include "proto/exec.h"
  2. #include "proto/dos.h"
  3. #include "test_pragmas.h"
  4. #include <stdio.h>
  5.  
  6. char __stdiowin[] = "con:0/0/640/100";
  7.  
  8.  
  9. struct Library *TestBase;
  10.  
  11. main()
  12. {
  13.         int ret;
  14.         
  15.         printf("Each time this version is run, the value\n");
  16.         printf("returned from test1() will be reset to 0\n");
  17.         
  18.         
  19.         TestBase = OpenLibrary("test_multi.library",0);
  20.         if (TestBase)
  21.         {
  22.             printf("Library Opened Sucessfully.\n");
  23.             ret = test1();
  24.             
  25.             printf("test1 returned = %d\n", ret);
  26.             
  27.             test2(ret+1);
  28.             
  29.             printf("test1 returned = %d\n",test1());
  30.             CloseLibrary(TestBase);
  31.             printf("Library Closed.\n");
  32.             Delay(200);
  33.         }
  34. }
  35.  
  36.