[BACK]Return to send.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Diff for /src/usr.bin/mail/send.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:39 version 1.2, 1996/06/11 12:53:50
Line 1 
Line 1 
   /*      $OpenBSD$       */
   /*      $NetBSD: send.c,v 1.6 1996/06/08 19:48:39 christos Exp $        */
   
 /*  /*
  * Copyright (c) 1980, 1993   * Copyright (c) 1980, 1993
  *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
Line 32 
Line 35 
  */   */
   
 #ifndef lint  #ifndef lint
 static char sccsid[] = "from: @(#)send.c        8.1 (Berkeley) 6/6/93";  #if 0
 static char rcsid[] = "$Id$";  static char sccsid[] = "@(#)send.c      8.1 (Berkeley) 6/6/93";
   #else
   static char rcsid[] = "$OpenBSD$";
   #endif
 #endif /* not lint */  #endif /* not lint */
   
 #include "rcv.h"  #include "rcv.h"
Line 62 
Line 68 
         long count;          long count;
         register FILE *ibuf;          register FILE *ibuf;
         char line[LINESIZE];          char line[LINESIZE];
         int ishead, infld, ignoring, dostat, firstline;          int ishead, infld, ignoring = 0, dostat, firstline;
         register char *cp, *cp2;          register char *cp, *cp2;
         register int c;          register int c = 0;
         int length;          int length;
         int prefixlen;          int prefixlen = 0;
   
         /*          /*
          * Compute the prefix string, without trailing whitespace           * Compute the prefix string, without trailing whitespace
Line 273 
Line 279 
  * the mail routine below.   * the mail routine below.
  */   */
 int  int
 sendmail(str)  sendmail(v)
         char *str;          void *v;
 {  {
           char *str = v;
         struct header head;          struct header head;
   
         head.h_to = extract(str, GTO);          head.h_to = extract(str, GTO);
Line 373 
Line 380 
                 goto out;                  goto out;
         }          }
         if (pid == 0) {          if (pid == 0) {
                 prepare_child(sigmask(SIGHUP)|sigmask(SIGINT)|sigmask(SIGQUIT)|                  sigset_t nset;
                         sigmask(SIGTSTP)|sigmask(SIGTTIN)|sigmask(SIGTTOU),                  sigemptyset(&nset);
                         fileno(mtf), -1);                  sigaddset(&nset, SIGHUP);
                   sigaddset(&nset, SIGINT);
                   sigaddset(&nset, SIGQUIT);
                   sigaddset(&nset, SIGTSTP);
                   sigaddset(&nset, SIGTTIN);
                   sigaddset(&nset, SIGTTOU);
                   prepare_child(&nset, fileno(mtf), -1);
                 if ((cp = value("sendmail")) != NOSTR)                  if ((cp = value("sendmail")) != NOSTR)
                         cp = expand(cp);                          cp = expand(cp);
                 else                  else
Line 539 
Line 552 
         register FILE *fo;          register FILE *fo;
         char buf[BUFSIZ];          char buf[BUFSIZ];
         register i;          register i;
         time_t now, time();          time_t now;
         char *ctime();  
   
         if ((fo = Fopen(name, "a")) == NULL) {          if ((fo = Fopen(name, "a")) == NULL) {
                 perror(name);                  perror(name);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2