home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / communic / pcmail / main / mailfile.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1.9 KB  |  77 lines

  1. /*++
  2. /* NAME
  3. /*      mailfile 3
  4. /* SUMMARY
  5. /*      mail the file currently being displayed
  6. /* PROJECT
  7. /*      pc-mail
  8. /* PACKAGE
  9. /*      mail
  10. /* SYNOPSIS
  11. /*    #include "mail.h"
  12. /*
  13. /*      int mailfile()
  14. /* DESCRIPTION
  15. /*      mailfile() is invoked when the user wants to mail a copy of a
  16. /*    file or message to some person. The name of the file is taken
  17. /*    from the global string variable message[].
  18. /*
  19. /*    The user is asked for a destination, the necessary spool files
  20. /*    are created and the main menu display is junked.
  21. /* FUNCTIONS AND MACROS
  22. /*    kbdinp(), junk_desk()
  23. /* FILES
  24. /*      message and meta file in the spool directory.
  25. /* SEE ALSO
  26. /*      pager(3), pager(5), kbdinp(3)
  27. /* DIAGNOSTICS
  28. /*      An error message is displayed in case of problems.
  29. /* AUTHOR(S)
  30. /*      W.Z. Venema
  31. /*      Eindhoven University of Technology
  32. /*      Department of Mathematics and Computer Science
  33. /*      Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands
  34. /* CREATION DATE
  35. /*    Mon Apr  4 13:03:44 MET 1988
  36. /* LAST MODIFICATION
  37. /*    90/01/22 13:02:06
  38. /* VERSION/RELEASE
  39. /*    2.1
  40. /*--*/
  41.  
  42. #include "defs.h"
  43. #include "path.h"
  44. #include "screen.h"
  45. #include "mail.h"
  46.  
  47. hidden int queue_mailfile();
  48.  
  49. /* mailfile - ask mail address to send file to */
  50.  
  51. public int mailfile()
  52. {
  53.     static Screen screen[] = {
  54.     STRING,    0,              queue_mailfile, int_error,
  55.     0,    0,              when,        getaddr,
  56.     };
  57.  
  58.     kbdinp(screen);                /* ask message destination */
  59.     return(S_REDRAW);                /* say screen has changed */
  60. }
  61.  
  62. /* queue_mailfile - queue a copy to another person */
  63.  
  64. hidden int queue_mailfile(to)
  65. char *to;
  66. {
  67.     register int stat;
  68.  
  69.     if (stat = submit(message,to)) {
  70.     errdisp(stat);                /* notify user */
  71.     return(S_BREAK|S_REDRAW);        /* say screen has changed */
  72.     } else {
  73.     junk_desk();                /* say mail box has changed */
  74.     return(S_BREAK);            /* terminate caller */
  75.     }
  76. }
  77.