home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-2.LHA / modula / dice / dice.lha / examples / shared_lib / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-15  |  487 b   |  35 lines

  1.  
  2. /*
  3.  *  TEST.C
  4.  */
  5.  
  6. /*
  7.  *  The #ifdef is to demonstrate what is required to compile this
  8.  *  test program with registered args.
  9.  */
  10.  
  11. #ifdef REGISTERED
  12. #include "test-protos.h"
  13. #include <stdio.h>
  14. #endif
  15.  
  16. main(ac, av)
  17. short ac;
  18. char *av[];
  19. {
  20.     if (ac == 1) {
  21.     char buf[256];
  22.     while (GetString(buf, sizeof(buf)) >= 0)
  23.         printf("GET: %s\n", buf);
  24.     } else {
  25.     short i;
  26.  
  27.     for (i = 1; i < ac; ++i) {
  28.         PostString(av[i]);
  29.         printf("POSTED: %s\n", av[i]);
  30.     }
  31.     }
  32.     return(0);
  33. }
  34.  
  35.