home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume3 / pcmail / part07 / submit.c < prev    next >
C/C++ Source or Header  |  1989-02-03  |  2KB  |  68 lines

  1. /*++
  2. /* NAME
  3. /*    submit 3
  4. /* SUMMARY
  5. /*    queue a message for transfer over the network
  6. /* PROJECT
  7. /*    pc-mail
  8. /* PACKAGE
  9. /*    mailsh
  10. /* SYNOPSIS
  11. /*    int submit(file,to)
  12. /*    char *file;
  13. /*    char *to;
  14. /* DESCRIPTION
  15. /*    submit() invokes the smail command to prepare a message for
  16. /*    transmission across the network. file is the name of a file
  17. /*    with a message; to is a string with one or more destinations,
  18. /*    separated by blanks. The to string is modified.
  19. /* FUNCTIONS AND MACROS
  20. /*    invokevp()
  21. /* COMMANDS
  22. /*    smail, alias processing and queueing
  23. /* FILES
  24. /*    d<seqno>    message file
  25. /*    x<seqno>    destination
  26. /* SEE ALSO
  27. /*    path(5)        spool file names
  28. /*    status(5)    error status codes
  29. /* DIAGNOSTICS
  30. /*    A nonzero error status is returned in case of problems.
  31. /* BUGS
  32. /*    On some non-Unix systems the limit on the command-line length
  33. /*    may cause problems.
  34. /* AUTHOR(S)
  35. /*    W.Z. Venema
  36. /*    Eindhoven University of Technology
  37. /*    Department of Mathematics and Computer Science
  38. /*    Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  39. /* CREATION DATE
  40. /*    Sat Apr  9 17:48:03 MET 1988
  41. /* LAST MODIFICATION
  42. /*    Sat Apr  9 17:48:03 MET 1988
  43. /* VERSION/RELEASE
  44. /*    1.0
  45. /*--*/
  46.  
  47. #include "defs.h"
  48. #include "path.h"
  49.  
  50. public int submit(file,to)
  51. char *file;
  52. char *to;
  53. {
  54.      char *arglist[BUFSIZ];
  55.      register char **cpp = arglist;
  56.      static char sep[] = ", \t";
  57.  
  58.      /* Build the argment vector for the smail command */
  59.  
  60.      *cpp++ = SMAIL;
  61.      *cpp++ = file;
  62.  
  63.      for (*cpp = strtok(to,sep); *cpp; *++cpp = strtok((char *)0,sep))
  64.     /* void */;
  65.  
  66.      return(invokevp(arglist));
  67. }
  68.