Source:NetHack 3.6.0/src/mail.c

From NetHackWiki
(Redirected from Source:Mail.c)
Jump to: navigation, search

Below is the full text to mail.c from the source code of NetHack 3.6.0. To link to a particular line, write [[Source:NetHack 3.6.0/src/mail.c#line123]], for example.

The NetHack General Public License applies to screenshots, source code and other content from NetHack.

This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.

Top of file

  1.  /* NetHack 3.6	mail.c	$NHDT-Date: 1436754892 2015/07/13 02:34:52 $  $NHDT-Branch: master $:$NHDT-Revision: 1.20 $ */
  2.  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3.  /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5.  #include "hack.h"
  6.  
  7.  #ifdef MAIL
  8.  #include "mail.h"
  9.  
  10.  /*
  11.   * Notify user when new mail has arrived.  Idea by Merlyn Leroy.
  12.   *
  13.   * The mail daemon can move with less than usual restraint.  It can:
  14.   *	- move diagonally from a door
  15.   *	- use secret and closed doors
  16.   *	- run through a monster ("Gangway!", etc.)
  17.   *	- run over pools & traps
  18.   *
  19.   * Possible extensions:
  20.   *	- Open the file MAIL and do fstat instead of stat for efficiency.
  21.   *	  (But sh uses stat, so this cannot be too bad.)
  22.   *	- Examine the mail and produce a scroll of mail named "From somebody".
  23.   *	- Invoke MAILREADER in such a way that only this single letter is
  24.   *read.
  25.   *	- Do something to the text when the scroll is enchanted or cancelled.
  26.   *	- Make the daemon always appear at a stairwell, and have it find a
  27.   *	  path to the hero.
  28.   *
  29.   * Note by Olaf Seibert: On the Amiga, we usually don't get mail.  So we go
  30.   *			 through most of the effects at 'random' moments.
  31.   * Note by Paul Winner:  The MSDOS port also 'fakes' the mail daemon at
  32.   *			 random intervals.
  33.   */
  34.  
  35.  STATIC_DCL boolean FDECL(md_start, (coord *));
  36.  STATIC_DCL boolean FDECL(md_stop, (coord *, coord *));
  37.  STATIC_DCL boolean FDECL(md_rush, (struct monst *, int, int));
  38.  STATIC_DCL void FDECL(newmail, (struct mail_info *));
  39.  
  40.  extern char *viz_rmin, *viz_rmax; /* line-of-sight limits (vision.c) */
  41.  
  42.  #if !defined(UNIX) && !defined(VMS)
  43.  int mustgetmail = -1;
  44.  #endif
  45.  
  46.  #ifdef UNIX
  47.  #include <sys/stat.h>
  48.  #include <pwd.h>
  49.  /* DON'T trust all Unices to declare getpwuid() in <pwd.h> */
  50.  #if !defined(_BULL_SOURCE) && !defined(__sgi) && !defined(_M_UNIX)
  51.  #if !defined(SUNOS4) && !(defined(ULTRIX) && defined(__GNUC__))
  52.  /* DO trust all SVR4 to typedef uid_t in <sys/types.h> (probably to a long) */
  53.  #if defined(POSIX_TYPES) || defined(SVR4) || defined(HPUX)
  54.  extern struct passwd *FDECL(getpwuid, (uid_t));
  55.  #else
  56.  extern struct passwd *FDECL(getpwuid, (int));
  57.  #endif
  58.  #endif
  59.  #endif
  60.  static struct stat omstat, nmstat;
  61.  static char *mailbox = (char *) 0;
  62.  static long laststattime;
  63.  
  64.  #if !defined(MAILPATH) && defined(AMS) /* Just a placeholder for AMS */
  65.  #define MAILPATH "/dev/null"
  66.  #endif
  67.  #if !defined(MAILPATH) && (defined(LINUX) || defined(__osf__))
  68.  #define MAILPATH "/var/spool/mail/"
  69.  #endif
  70.  #if !defined(MAILPATH) && defined(__FreeBSD__)
  71.  #define MAILPATH "/var/mail/"
  72.  #endif
  73.  #if !defined(MAILPATH) && (defined(BSD) || defined(ULTRIX))
  74.  #define MAILPATH "/usr/spool/mail/"
  75.  #endif
  76.  #if !defined(MAILPATH) && (defined(SYSV) || defined(HPUX))
  77.  #define MAILPATH "/usr/mail/"
  78.  #endif
  79.  

getmailstatus

  1.  void
  2.  getmailstatus()
  3.  {
  4.      if (!mailbox && !(mailbox = nh_getenv("MAIL"))) {
  5.  #ifdef MAILPATH
  6.  #ifdef AMS
  7.          struct passwd ppasswd;
  8.  
  9.          (void) memcpy(&ppasswd, getpwuid(getuid()), sizeof(struct passwd));
  10.          if (ppasswd.pw_dir) {
  11.              mailbox = (char *) alloc((unsigned) strlen(ppasswd.pw_dir)
  12.                                       + sizeof(AMS_MAILBOX));
  13.              Strcpy(mailbox, ppasswd.pw_dir);
  14.              Strcat(mailbox, AMS_MAILBOX);
  15.          } else
  16.              return;
  17.  #else
  18.          const char *pw_name = getpwuid(getuid())->pw_name;
  19.          mailbox = (char *) alloc(sizeof(MAILPATH) + strlen(pw_name));
  20.          Strcpy(mailbox, MAILPATH);
  21.          Strcat(mailbox, pw_name);
  22.  #endif /* AMS */
  23.  #else
  24.          return;
  25.  #endif
  26.      }
  27.      if (stat(mailbox, &omstat)) {
  28.  #ifdef PERMANENT_MAILBOX
  29.          pline("Cannot get status of MAIL=\"%s\".", mailbox);
  30.          mailbox = 0;
  31.  #else
  32.          omstat.st_mtime = 0;
  33.  #endif
  34.      }
  35.  }
  36.  #endif /* UNIX */
  37.  

md_start

  1.  /*
  2.   * Pick coordinates for a starting position for the mail daemon.  Called
  3.   * from newmail() and newphone().
  4.   */
  5.  STATIC_OVL boolean
  6.  md_start(startp)
  7.  coord *startp;
  8.  {
  9.      coord testcc;     /* scratch coordinates */
  10.      int row;          /* current row we are checking */
  11.      int lax;          /* if TRUE, pick a position in sight. */
  12.      int dd;           /* distance to current point */
  13.      int max_distance; /* max distance found so far */
  14.  
  15.      /*
  16.       * If blind and not telepathic, then it doesn't matter what we pick ---
  17.       * the hero is not going to see it anyway.  So pick a nearby position.
  18.       */
  19.      if (Blind && !Blind_telepat) {
  20.          if (!enexto(startp, u.ux, u.uy, (struct permonst *) 0))
  21.              return FALSE; /* no good positions */
  22.          return TRUE;
  23.      }
  24.  
  25.      /*
  26.       * Arrive at an up or down stairwell if it is in line of sight from the
  27.       * hero.
  28.       */
  29.      if (couldsee(upstair.sx, upstair.sy)) {
  30.          startp->x = upstair.sx;
  31.          startp->y = upstair.sy;
  32.          return TRUE;
  33.      }
  34.      if (couldsee(dnstair.sx, dnstair.sy)) {
  35.          startp->x = dnstair.sx;
  36.          startp->y = dnstair.sy;
  37.          return TRUE;
  38.      }
  39.  
  40.      /*
  41.       * Try to pick a location out of sight next to the farthest position away
  42.       * from the hero.  If this fails, try again, just picking the farthest
  43.       * position that could be seen.  What we really ought to be doing is
  44.       * finding a path from a stairwell...
  45.       *
  46.       * The arrays viz_rmin[] and viz_rmax[] are set even when blind.  These
  47.       * are the LOS limits for each row.
  48.       */
  49.      lax = 0; /* be picky */
  50.      max_distance = -1;
  51.  retry:
  52.      for (row = 0; row < ROWNO; row++) {
  53.          if (viz_rmin[row] < viz_rmax[row]) {
  54.              /* There are valid positions on this row. */
  55.              dd = distu(viz_rmin[row], row);
  56.              if (dd > max_distance) {
  57.                  if (lax) {
  58.                      max_distance = dd;
  59.                      startp->y = row;
  60.                      startp->x = viz_rmin[row];
  61.  
  62.                  } else if (enexto(&testcc, (xchar) viz_rmin[row], row,
  63.                                    (struct permonst *) 0)
  64.                             && !cansee(testcc.x, testcc.y)
  65.                             && couldsee(testcc.x, testcc.y)) {
  66.                      max_distance = dd;
  67.                      *startp = testcc;
  68.                  }
  69.              }
  70.              dd = distu(viz_rmax[row], row);
  71.              if (dd > max_distance) {
  72.                  if (lax) {
  73.                      max_distance = dd;
  74.                      startp->y = row;
  75.                      startp->x = viz_rmax[row];
  76.  
  77.                  } else if (enexto(&testcc, (xchar) viz_rmax[row], row,
  78.                                    (struct permonst *) 0)
  79.                             && !cansee(testcc.x, testcc.y)
  80.                             && couldsee(testcc.x, testcc.y)) {
  81.                      max_distance = dd;
  82.                      *startp = testcc;
  83.                  }
  84.              }
  85.          }
  86.      }
  87.  
  88.      if (max_distance < 0) {
  89.          if (!lax) {
  90.              lax = 1; /* just find a position */
  91.              goto retry;
  92.          }
  93.          return FALSE;
  94.      }
  95.  
  96.      return TRUE;
  97.  }
  98.  

md_stop

  1.  /*
  2.   * Try to choose a stopping point as near as possible to the starting
  3.   * position while still adjacent to the hero.  If all else fails, try
  4.   * enexto().  Use enexto() as a last resort because enexto() chooses
  5.   * its point randomly, which is not what we want.
  6.   */
  7.  STATIC_OVL boolean
  8.  md_stop(stopp, startp)
  9.  coord *stopp;  /* stopping position (we fill it in) */
  10.  coord *startp; /* starting position (read only) */
  11.  {
  12.      int x, y, distance, min_distance = -1;
  13.  
  14.      for (x = u.ux - 1; x <= u.ux + 1; x++)
  15.          for (y = u.uy - 1; y <= u.uy + 1; y++) {
  16.              if (!isok(x, y) || (x == u.ux && y == u.uy))
  17.                  continue;
  18.  
  19.              if (accessible(x, y) && !MON_AT(x, y)) {
  20.                  distance = dist2(x, y, startp->x, startp->y);
  21.                  if (min_distance < 0 || distance < min_distance
  22.                      || (distance == min_distance && rn2(2))) {
  23.                      stopp->x = x;
  24.                      stopp->y = y;
  25.                      min_distance = distance;
  26.                  }
  27.              }
  28.          }
  29.  
  30.      /* If we didn't find a good spot, try enexto(). */
  31.      if (min_distance < 0 && !enexto(stopp, u.ux, u.uy, &mons[PM_MAIL_DAEMON]))
  32.          return FALSE;
  33.  
  34.      return TRUE;
  35.  }
  36.  

md_rush

  1.  /* Let the mail daemon have a larger vocabulary. */
  2.  static NEARDATA const char *mail_text[] = { "Gangway!", "Look out!",
  3.                                              "Pardon me!" };
  4.  #define md_exclamations() (mail_text[rn2(3)])
  5.  
  6.  /*
  7.   * Make the mail daemon run through the dungeon.  The daemon will run over
  8.   * any monsters that are in its path, but will replace them later.  Return
  9.   * FALSE if the md gets stuck in a position where there is a monster.  Return
  10.   * TRUE otherwise.
  11.   */
  12.  STATIC_OVL boolean
  13.  md_rush(md, tx, ty)
  14.  struct monst *md;
  15.  register int tx, ty; /* destination of mail daemon */
  16.  {
  17.      struct monst *mon;            /* displaced monster */
  18.      register int dx, dy;          /* direction counters */
  19.      int fx = md->mx, fy = md->my; /* current location */
  20.      int nfx = fx, nfy = fy,       /* new location */
  21.          d1, d2;                   /* shortest distances */
  22.  
  23.      /*
  24.       * It is possible that the monster at (fx,fy) is not the md when:
  25.       * the md rushed the hero and failed, and is now starting back.
  26.       */
  27.      if (m_at(fx, fy) == md) {
  28.          remove_monster(fx, fy); /* pick up from orig position */
  29.          newsym(fx, fy);
  30.      }
  31.  
  32.      /*
  33.       * At the beginning and exit of this loop, md is not placed in the
  34.       * dungeon.
  35.       */
  36.      while (1) {
  37.          /* Find a good location next to (fx,fy) closest to (tx,ty). */
  38.          d1 = dist2(fx, fy, tx, ty);
  39.          for (dx = -1; dx <= 1; dx++)
  40.              for (dy = -1; dy <= 1; dy++)
  41.                  if ((dx || dy) && isok(fx + dx, fy + dy)
  42.                      && !IS_STWALL(levl[fx + dx][fy + dy].typ)) {
  43.                      d2 = dist2(fx + dx, fy + dy, tx, ty);
  44.                      if (d2 < d1) {
  45.                          d1 = d2;
  46.                          nfx = fx + dx;
  47.                          nfy = fy + dy;
  48.                      }
  49.                  }
  50.  
  51.          /* Break if the md couldn't find a new position. */
  52.          if (nfx == fx && nfy == fy)
  53.              break;
  54.  
  55.          fx = nfx; /* this is our new position */
  56.          fy = nfy;
  57.  
  58.          /* Break if the md reaches its destination. */
  59.          if (fx == tx && fy == ty)
  60.              break;
  61.  
  62.          if ((mon = m_at(fx, fy)) != 0) /* save monster at this position */
  63.              verbalize1(md_exclamations());
  64.          else if (fx == u.ux && fy == u.uy)
  65.              verbalize("Excuse me.");
  66.  
  67.          place_monster(md, fx, fy); /* put md down */
  68.          newsym(fx, fy);            /* see it */
  69.          flush_screen(0);           /* make sure md shows up */
  70.          delay_output();            /* wait a little bit */
  71.  
  72.          /* Remove md from the dungeon.  Restore original mon, if necessary. */
  73.          if (mon) {
  74.              if ((mon->mx != fx) || (mon->my != fy))
  75.                  place_worm_seg(mon, fx, fy);
  76.              else
  77.                  place_monster(mon, fx, fy);
  78.          } else
  79.              remove_monster(fx, fy);
  80.          newsym(fx, fy);
  81.      }
  82.  
  83.      /*
  84.       * Check for a monster at our stopping position (this is possible, but
  85.       * very unlikely).  If one exists, then have the md leave in disgust.
  86.       */
  87.      if ((mon = m_at(fx, fy)) != 0) {
  88.          place_monster(md, fx, fy); /* display md with text below */
  89.          newsym(fx, fy);
  90.          verbalize("This place's too crowded.  I'm outta here.");
  91.  
  92.          if ((mon->mx != fx) || (mon->my != fy)) /* put mon back */
  93.              place_worm_seg(mon, fx, fy);
  94.          else
  95.              place_monster(mon, fx, fy);
  96.  
  97.          newsym(fx, fy);
  98.          return FALSE;
  99.      }
  100.  
  101.      place_monster(md, fx, fy); /* place at final spot */
  102.      newsym(fx, fy);
  103.      flush_screen(0);
  104.      delay_output(); /* wait a little bit */
  105.  
  106.      return TRUE;
  107.  }
  108.  

newmail

  1.  /* Deliver a scroll of mail. */
  2.  /*ARGSUSED*/
  3.  STATIC_OVL void
  4.  newmail(info)
  5.  struct mail_info *info;
  6.  {
  7.      struct monst *md;
  8.      coord start, stop;
  9.      boolean message_seen = FALSE;
  10.  
  11.      /* Try to find good starting and stopping places. */
  12.      if (!md_start(&start) || !md_stop(&stop, &start))
  13.          goto give_up;
  14.  
  15.      /* Make the daemon.  Have it rush towards the hero. */
  16.      if (!(md = makemon(&mons[PM_MAIL_DAEMON], start.x, start.y, NO_MM_FLAGS)))
  17.          goto give_up;
  18.      if (!md_rush(md, stop.x, stop.y))
  19.          goto go_back;
  20.  
  21.      message_seen = TRUE;
  22.      verbalize("%s, %s!  %s.", Hello(md), plname, info->display_txt);
  23.  
  24.      if (info->message_typ) {
  25.          struct obj *obj = mksobj(SCR_MAIL, FALSE, FALSE);
  26.  
  27.          if (info->object_nam)
  28.              obj = oname(obj, info->object_nam);
  29.          if (info->response_cmd)
  30.              new_omailcmd(obj, info->response_cmd);
  31.  
  32.          if (distu(md->mx, md->my) > 2)
  33.              verbalize("Catch!");
  34.          display_nhwindow(WIN_MESSAGE, FALSE);
  35.          obj = hold_another_object(obj, "Oops!", (const char *) 0,
  36.                                    (const char *) 0);
  37.      }
  38.  
  39.  /* zip back to starting location */
  40.  go_back:
  41.      (void) md_rush(md, start.x, start.y);
  42.      mongone(md);
  43.  /* deliver some classes of messages even if no daemon ever shows up */
  44.  give_up:
  45.      if (!message_seen && info->message_typ == MSG_OTHER)
  46.          pline("Hark!  \"%s.\"", info->display_txt);
  47.  }
  48.  

ckmailstatus

These function versions are for systems that are not POSIX-compatible.

  1.  #if !defined(UNIX) && !defined(VMS)
  2.  
  3.  void
  4.  ckmailstatus()
  5.  {
  6.      if (u.uswallow || !flags.biff)
  7.          return;
  8.      if (mustgetmail < 0) {
  9.  #if defined(AMIGA) || defined(MSDOS) || defined(TOS)
  10.          mustgetmail = (moves < 2000) ? (100 + rn2(2000)) : (2000 + rn2(3000));
  11.  #endif
  12.          return;
  13.      }
  14.      if (--mustgetmail <= 0) {
  15.          static struct mail_info deliver = { MSG_MAIL,
  16.                                              "I have some mail for you", 0,
  17.                                              0 };
  18.          newmail(&deliver);
  19.          mustgetmail = -1;
  20.      }
  21.  }
  22.  

readmail

  1.  /*ARGSUSED*/
  2.  void
  3.  readmail(otmp)
  4.  struct obj *otmp;
  5.  {
  6.      static char *junk[] = {
  7.          NULL, /* placeholder for "Report bugs to <devteam@nethack.org>.", */
  8.          "Please disregard previous letter.", "Welcome to NetHack.",
  9.  #ifdef AMIGA
  10.          "Only Amiga makes it possible.", "CATS have all the answers.",
  11.  #endif
  12.          "This mail complies with the Yendorian Anti-Spam Act (YASA)",
  13.          "Please find enclosed a small token to represent your Owlbear",
  14.          "**FR33 P0T10N 0F FULL H34L1NG**",
  15.          "Please return to sender (Asmodeus)",
  16.        "Buy a potion of gain level for only $19.99! Guaranteed to be blessed!",
  17.          "Invitation: Visit the NetHack web site at http://www.nethack.org!"
  18.      };
  19.  
  20.      /* XXX replace with more general substitution code and add local
  21.       * contact message.  Also use DEVTEAM_URL */
  22.      if (junk[0] == NULL) {
  23.  #define BUGS_FORMAT "Report bugs to <%s>."
  24.          /* +2 from '%s' suffices as substitute for usual +1 for terminator */
  25.          junk[0] = (char *) alloc(strlen(BUGS_FORMAT) + strlen(DEVTEAM_EMAIL));
  26.          Sprintf(junk[0], BUGS_FORMAT, DEVTEAM_EMAIL);
  27.  #undef BUGS_FORMAT
  28.      }
  29.      if (Blind) {
  30.          pline("Unfortunately you cannot see what it says.");
  31.      } else
  32.          pline("It reads:  \"%s\"", junk[rn2(SIZE(junk))]);
  33.  }
  34.  
  35.  #endif /* !UNIX && !VMS */
  36.  

ckmailstatus

These function versions are for Unix-like systems.

  1.  #ifdef UNIX
  2.  
  3.  void
  4.  ckmailstatus()
  5.  {
  6.      if (!mailbox || u.uswallow || !flags.biff
  7.  #ifdef MAILCKFREQ
  8.          || moves < laststattime + MAILCKFREQ
  9.  #endif
  10.          )
  11.          return;
  12.  
  13.      laststattime = moves;
  14.      if (stat(mailbox, &nmstat)) {
  15.  #ifdef PERMANENT_MAILBOX
  16.          pline("Cannot get status of MAIL=\"%s\" anymore.", mailbox);
  17.          mailbox = 0;
  18.  #else
  19.          nmstat.st_mtime = 0;
  20.  #endif
  21.      } else if (nmstat.st_mtime > omstat.st_mtime) {
  22.          if (nmstat.st_size) {
  23.              static struct mail_info deliver = {
  24.  #ifndef NO_MAILREADER
  25.                  MSG_MAIL, "I have some mail for you",
  26.  #else
  27.                  /* suppress creation and delivery of scroll of mail */
  28.                  MSG_OTHER, "You have some mail in the outside world",
  29.  #endif
  30.                  0, 0
  31.              };
  32.              newmail(&deliver);
  33.          }
  34.          getmailstatus(); /* might be too late ... */
  35.      }
  36.  }
  37.  

readmail

  1.  /*ARGSUSED*/
  2.  void
  3.  readmail(otmp)
  4.  struct obj *otmp;
  5.  {
  6.  #ifdef DEF_MAILREADER /* This implies that UNIX is defined */
  7.      register const char *mr = 0;
  8.  
  9.      display_nhwindow(WIN_MESSAGE, FALSE);
  10.      if (!(mr = nh_getenv("MAILREADER")))
  11.          mr = DEF_MAILREADER;
  12.  
  13.      if (child(1)) {
  14.          (void) execl(mr, mr, (char *) 0);
  15.          terminate(EXIT_FAILURE);
  16.      }
  17.  #else
  18.  #ifndef AMS /* AMS mailboxes are directories */
  19.      display_file(mailbox, TRUE);
  20.  #endif      /* AMS */
  21.  #endif      /* DEF_MAILREADER */
  22.  
  23.      /* get new stat; not entirely correct: there is a small time
  24.         window where we do not see new mail */
  25.      getmailstatus();
  26.  }
  27.  
  28.  #endif /* UNIX */
  29.  

ckmailstatus

These function versions are for Alpha systems.

  1.  #ifdef VMS
  2.  
  3.  extern NDECL(struct mail_info *parse_next_broadcast);
  4.  
  5.  volatile int broadcasts = 0;
  6.  
  7.  void
  8.  ckmailstatus()
  9.  {
  10.      struct mail_info *brdcst;
  11.  
  12.      if (u.uswallow || !flags.biff)
  13.          return;
  14.  
  15.      while (broadcasts > 0) { /* process all trapped broadcasts [until] */
  16.          broadcasts--;
  17.          if ((brdcst = parse_next_broadcast()) != 0) {
  18.              newmail(brdcst);
  19.              break; /* only handle one real message at a time */
  20.          }
  21.      }
  22.  }
  23.  

readmail

  1.  void
  2.  readmail(otmp)
  3.  struct obj *otmp;
  4.  {
  5.  #ifdef SHELL /* can't access mail reader without spawning subprocess */
  6.      const char *txt, *cmd;
  7.      char *p, buf[BUFSZ], qbuf[BUFSZ];
  8.      int len;
  9.  
  10.      /* there should be a command in OMAILCMD */
  11.      if (has_oname(otmp))
  12.          txt = ONAME(otmp);
  13.      else
  14.          txt = "";
  15.      len = strlen(txt);
  16.      if (has_omailcmd(otmp))
  17.          cmd = OMAILCMD(otmp);
  18.      if (!cmd || !*cmd)
  19.          cmd = "SPAWN";
  20.  
  21.      Sprintf(qbuf, "System command (%s)", cmd);
  22.      getlin(qbuf, buf);
  23.      if (*buf != '\033') {
  24.          for (p = eos(buf); p > buf; *p = '\0')
  25.              if (*--p != ' ')
  26.                  break; /* strip trailing spaces */
  27.          if (*buf)
  28.              cmd = buf; /* use user entered command */
  29.          if (!strcmpi(cmd, "SPAWN") || !strcmp(cmd, "!"))
  30.              cmd = (char *) 0; /* interactive escape */
  31.  
  32.          vms_doshell(cmd, TRUE);
  33.          (void) sleep(1);
  34.      }
  35.  #endif /* SHELL */
  36.  }
  37.  
  38.  #endif /* VMS */
  39.  #endif /* MAIL */
  40.  
  41.  /*mail.c*/