home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / lib / dial / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-04-22  |  945 b   |  61 lines

  1. # include    <stdio.h>
  2. # include    "ll_log.h"
  3.  
  4. char scfile[128];
  5. struct ll_struct log = {
  6.     "Log",
  7.     "mktran log",
  8.     '\0177',
  9.     100,
  10.     0,
  11.     0,
  12.     0,
  13. };
  14.  
  15. main(argc, argv)
  16.   int argc;
  17.   char **argv;
  18.     {
  19.     register int result, word;
  20.     extern int d_debug;
  21.     extern int d_master, d_snseq, d_rcvseq;
  22.  
  23.     mmdf_init();
  24.     siginit();
  25.  
  26.     if (argc > 1)
  27.     log.ll_level = (char)(atoi (argv[1]));
  28.  
  29.     if ((result = d_opnlog(&log)) < 0)
  30.     {
  31.     printf("opnlog returns %d\n", result);
  32.     exit(-1);
  33.     }
  34.  
  35.     d_init();
  36.  
  37.     if ((result = d_tsopen("Tranfile")) < 0)
  38.     {
  39.     printf("d_tsopen returns %d\n", result);
  40.     exit(-1);
  41.     }
  42.  
  43.     d_master = 1;
  44.     d_snseq = 3;
  45.     d_rcvseq = 3;
  46.  
  47.     if ((result = d_scopen("Script", 0, (char **) 0)) < 0)
  48.     {
  49.     printf("d_scopen returns %d\n", result);
  50.     exit(-1);
  51.     }
  52.  
  53.     result = d_script();
  54.     printf("d_script returns %d\n", result);
  55.  
  56.  
  57.     /*  drop the connection  */
  58.     d_drop ();
  59.     exit(0);
  60. }
  61.