[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.15 and 1.16

version 1.15, 2001/11/28 01:26:35 version 1.16, 2003/05/15 02:47:47
Line 67 
Line 67 
         int count;          int count;
         FILE *ibuf;          FILE *ibuf;
         char line[LINESIZE];          char line[LINESIZE];
           char visline[4 * LINESIZE - 3];
         int ishead, infld, ignoring = 0, dostat, firstline;          int ishead, infld, ignoring = 0, dostat, firstline;
         char *cp, *cp2;          char *cp, *cp2;
         int c = 0;          int c = 0;
         int length;          int length;
         int prefixlen = 0;          int prefixlen = 0;
         int rval;          int rval;
           int dovis;
         struct sigaction act, saveint;          struct sigaction act, saveint;
         sigset_t oset;          sigset_t oset;
   
         sendsignal = 0;          sendsignal = 0;
         rval = -1;          rval = -1;
           dovis = isatty(fileno(obuf));
         sigemptyset(&act.sa_mask);          sigemptyset(&act.sa_mask);
         act.sa_flags = SA_RESTART;          act.sa_flags = SA_RESTART;
         act.sa_handler = sendint;          act.sa_handler = sendint;
Line 199 
Line 202 
                                         (void)fwrite(prefix, sizeof(*prefix),                                          (void)fwrite(prefix, sizeof(*prefix),
                                                         prefixlen, obuf);                                                          prefixlen, obuf);
                         }                          }
                         (void)fwrite(line, sizeof(*line), length, obuf);                          if (dovis) {
                                   length = strvis(visline, line, VIS_SAFE|VIS_NOSLASH);
                                   (void)fwrite(visline, sizeof(*visline), length, obuf);
                           } else
                                   (void)fwrite(line, sizeof(*line), length, obuf);
                         if (ferror(obuf))                          if (ferror(obuf))
                                 goto out;                                  goto out;
                 }                  }
Line 236 
Line 243 
                  */                   */
                 if (strncmp(line, "From ", 5) == 0)                  if (strncmp(line, "From ", 5) == 0)
                         (void)fwrite(">", 1, 1, obuf); /* '>' before 'From ' */                          (void)fwrite(">", 1, 1, obuf); /* '>' before 'From ' */
                 (void)fwrite(line, sizeof(*line), c, obuf);                  if (dovis) {
                           length = strvis(visline, line, VIS_SAFE|VIS_NOSLASH);
                           (void)fwrite(visline, sizeof(*visline), length, obuf);
                   } else
                           (void)fwrite(line, sizeof(*line), c, obuf);
                 if (ferror(obuf) || sendsignal == SIGINT)                  if (ferror(obuf) || sendsignal == SIGINT)
                         goto out;                          goto out;
         }          }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16