home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / b / bmh02src.zip / COMP.C < prev    next >
C/C++ Source or Header  |  1992-08-16  |  876b  |  47 lines

  1. /*
  2.    comp.c : Copyright Paul Healy, EI9GL, 1992.
  3.  
  4.    911215 : Created
  5.    920804 : Replaced mostly with calls to fns in mailer.c
  6. */
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <ctype.h>
  10. #include <string.h>
  11. #include <dir.h>
  12. #include <process.h>
  13. #include "rc.h"
  14. #include "send.h"
  15. #include "misc.h"
  16. #include "header.h"
  17. #include "help.h"
  18. #include "mailer.h"
  19.  
  20. #ifdef BMH
  21. #define main comp_main
  22. #endif
  23.  
  24. int
  25. main(int argc, char *argv[])
  26. {
  27.    char filename[256];
  28.    FILE *fp;
  29.  
  30.    dohelp(argc, argv, "comp (compose mail)");
  31.  
  32.    if (loadconfig()==-1)
  33.       return -1;
  34.  
  35.    if ((fp = tempfile("comp", filename, "w")) == NULL)
  36.       return -1;
  37.    
  38.    fprintf(fp, "To: \nCc: \nSubject: \n--------\n");
  39.    dosignature(fp);
  40.    fclose(fp);
  41.  
  42.    if (call_ed("comp", filename) == -1)
  43.       return -1;
  44.  
  45.    return dowhatnow("comp", filename, 1);
  46. }
  47.