home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / OPENDOOR / WRITEJAM.ZIP / MAINTEST.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-01  |  833 b   |  38 lines

  1. // Written by and contributed to the public domain by
  2. // Michael Lecuyer,   Viola. DE,  December 1993.
  3.  
  4. #include <stdio.h>
  5. #include <string.h>
  6. #include <stdlib.h>
  7. #include <time.h>
  8. #include <dos.h>
  9. #include <io.h>
  10.  
  11. // Include this for access to the JAM structures and flags.
  12.  
  13. #include "jammb.h"
  14.  
  15. #include "writejam.h"
  16.  
  17. main()
  18. {
  19.    int ret;
  20.    char *jambase = "C:\\n\\test";
  21.    char *from = "System Operator";
  22.    char *to = "Michael Lecuyer";
  23.    char *subject = "Testing the jamwrite";
  24.    char *text = "This is a test message that we will want to test\n"
  25.                 "which should be easy enough\n";
  26.  
  27.    JAMcopyright();
  28.  
  29.    ret = write_jam(jambase, from, to, subject, text, MSG_LOCAL | MSG_PRIVATE);
  30.  
  31.    if (ret == 0)
  32.       printf("write to jam failed errno = %d\n", errno);
  33.  
  34.    return 0;
  35. }
  36.  
  37.  
  38.