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

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

version 1.4, 1997/07/13 23:53:57 version 1.5, 1997/07/14 00:24:24
Line 177 
Line 177 
         FILE *obuf;          FILE *obuf;
   
         msgvec = (int *)salloc((msgCount + 2) * sizeof(*msgvec));          msgvec = (int *)salloc((msgCount + 2) * sizeof(*msgvec));
         if ((file = snarf(str, &f)) == NOSTR)          if ((file = snarf(str, &f)) == NULL)
                 return(1);                  return(1);
         if (!f) {          if (!f) {
                 *msgvec = first(0, MMNORM);                  *msgvec = first(0, MMNORM);
Line 189 
Line 189 
         }          }
         if (f && getmsglist(str, msgvec, 0) < 0)          if (f && getmsglist(str, msgvec, 0) < 0)
                 return(1);                  return(1);
         if ((file = expand(file)) == NOSTR)          if ((file = expand(file)) == NULL)
                 return(1);                  return(1);
         printf("\"%s\" ", file);          printf("\"%s\" ", file);
         fflush(stdout);          fflush(stdout);
Line 198 
Line 198 
         else          else
                 disp = "[New file]";                  disp = "[New file]";
         if ((obuf = Fopen(file, "a")) == NULL) {          if ((obuf = Fopen(file, "a")) == NULL) {
                 warn(NOSTR);                  warn(NULL);
                 return(1);                  return(1);
         }          }
         for (ip = msgvec; *ip && ip-msgvec < msgCount; ip++) {          for (ip = msgvec; *ip && ip-msgvec < msgCount; ip++) {
                 mp = &message[*ip - 1];                  mp = &message[*ip - 1];
                 touch(mp);                  touch(mp);
                 if (send(mp, obuf, ignore, NOSTR) < 0) {                  if (send(mp, obuf, ignore, NULL) < 0) {
                         perror(file);                          perror(file);
                         (void)Fclose(obuf);                          (void)Fclose(obuf);
                         return(1);                          return(1);
Line 236 
Line 236 
 /*  /*
  * Snarf the file from the end of the command line and   * Snarf the file from the end of the command line and
  * return a pointer to it.  If there is no file attached,   * return a pointer to it.  If there is no file attached,
  * just return NOSTR.  Put a null in front of the file   * just return NULL.  Put a null in front of the file
  * name so that the message list processing won't see it,   * name so that the message list processing won't see it,
  * unless the file name is the only thing on the line, in   * unless the file name is the only thing on the line, in
  * which case, return 0 in the reference flag variable.   * which case, return 0 in the reference flag variable.
Line 268 
Line 268 
                 cp--;                  cp--;
         if (*cp == '\0') {          if (*cp == '\0') {
                 puts("No file specified.");                  puts("No file specified.");
                 return(NOSTR);                  return(NULL);
         }          }
         if (isspace(*cp))          if (isspace(*cp))
                 *cp++ = 0;                  *cp++ = 0;
Line 493 
Line 493 
         register struct ignore *igp;          register struct ignore *igp;
         char **ap;          char **ap;
   
         if (*list == NOSTR)          if (*list == NULL)
                 return(igshow(tab, which));                  return(igshow(tab, which));
         for (ap = list; *ap != 0; ap++) {          for (ap = list; *ap != 0; ap++) {
                 istrcpy(field, *ap);                  istrcpy(field, *ap);

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