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

Diff for /src/usr.bin/mail/names.c between version 1.4 and 1.5

version 1.4, 1997/07/13 21:21:15 version 1.5, 1997/07/13 23:54:01
Line 64 
Line 64 
 {  {
         register struct name *np;          register struct name *np;
   
         np = (struct name *) salloc(sizeof(*np));          np = (struct name *)salloc(sizeof(*np));
         np->n_flink = NIL;          np->n_flink = NIL;
         np->n_blink = NIL;          np->n_blink = NIL;
         np->n_type = ntype;          np->n_type = ntype;
Line 234 
Line 234 
   
         top = names;          top = names;
         np = names;          np = names;
         (void) time(&now);          (void)time(&now);
         date = ctime(&now);          date = ctime(&now);
         while (np != NIL) {          while (np != NIL) {
                 if (!isfileaddr(np->n_name) && np->n_name[0] != '|') {                  if (!isfileaddr(np->n_name) && np->n_name[0] != '|') {
Line 259 
Line 259 
                                 goto cant;                                  goto cant;
                         }                          }
                         image = open(tempEdit, 2);                          image = open(tempEdit, 2);
                         (void) unlink(tempEdit);                          (void)unlink(tempEdit);
                         if (image < 0) {                          if (image < 0) {
                                 warn(tempEdit);                                  warn(tempEdit);
                                 senderr++;                                  senderr++;
                                 (void)Fclose(fout);                                  (void)Fclose(fout);
                                 goto cant;                                  goto cant;
                         }                          }
                         (void) fcntl(image, F_SETFD, 1);                          (void)fcntl(image, F_SETFD, 1);
                         fprintf(fout, "From %s %s", myname, date);                          fprintf(fout, "From %s %s", myname, date);
                         puthead(hp, fout, GTO|GSUBJECT|GCC|GNL);                          puthead(hp, fout, GTO|GSUBJECT|GCC|GNL);
                         while ((c = getc(fo)) != EOF)                          while ((c = getc(fo)) != EOF)
                                 (void) putc(c, fout);                                  (void)putc(c, fout);
                         rewind(fo);                          rewind(fo);
                         (void) putc('\n', fout);                          (void)putc('\n', fout);
                         (void) fflush(fout);                          (void)fflush(fout);
                         if (ferror(fout))                          if (ferror(fout))
                                 warn(tempEdit);                                  warn(tempEdit);
                         (void)Fclose(fout);                          (void)Fclose(fout);
Line 330 
Line 330 
                         }                          }
                         rewind(fin);                          rewind(fin);
                         while ((c = getc(fin)) != EOF)                          while ((c = getc(fin)) != EOF)
                                 (void) putc(c, fout);                                  (void)putc(c, fout);
                         if (ferror(fout)) {                          if (ferror(fout)) {
                                 senderr++;                                  senderr++;
                                 warn(fname);                                  warn(fname);
Line 510 
Line 510 
         verbose = value("verbose") != NOSTR;          verbose = value("verbose") != NOSTR;
         if (verbose)          if (verbose)
                 extra++;                  extra++;
         top = (char **) salloc((t + extra) * sizeof(*top));          top = (char **)salloc((t + extra) * sizeof(*top));
         ap = top;          ap = top;
         *ap++ = "send-mail";          *ap++ = "send-mail";
         *ap++ = "-i";          *ap++ = "-i";

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5