[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.5 and 1.6

version 1.5, 1997/07/13 23:54:01 version 1.6, 1997/07/14 00:24:29
Line 103 
Line 103 
         register struct name *top, *np, *t;          register struct name *top, *np, *t;
         char nbuf[BUFSIZ];          char nbuf[BUFSIZ];
   
         if (line == NOSTR || *line == '\0')          if (line == NULL || *line == '\0')
                 return(NIL);                  return(NIL);
         top = NIL;          top = NIL;
         np = NIL;          np = NIL;
         cp = line;          cp = line;
         while ((cp = yankword(cp, nbuf)) != NOSTR) {          while ((cp = yankword(cp, nbuf)) != NULL) {
                 t = nalloc(nbuf, ntype);                  t = nalloc(nbuf, ntype);
                 if (top == NIL)                  if (top == NIL)
                         top = t;                          top = t;
Line 135 
Line 135 
   
         comma = ntype & GCOMMA;          comma = ntype & GCOMMA;
         if (np == NIL)          if (np == NIL)
                 return(NOSTR);                  return(NULL);
         ntype &= ~GCOMMA;          ntype &= ~GCOMMA;
         s = 0;          s = 0;
         if (debug && comma)          if (debug && comma)
Line 148 
Line 148 
                         s++;                          s++;
         }          }
         if (s == 0)          if (s == 0)
                 return(NOSTR);                  return(NULL);
         s += 2;          s += 2;
         top = salloc(s);          top = salloc(s);
         cp = top;          cp = top;
Line 179 
Line 179 
         cp = ap;          cp = ap;
         for (;;) {          for (;;) {
                 if (*cp == '\0')                  if (*cp == '\0')
                         return(NOSTR);                          return(NULL);
                 if (*cp == '(') {                  if (*cp == '(') {
                         register int nesting = 0;                          register int nesting = 0;
   
Line 297 
Line 297 
                          * share the same lseek location and trample                           * share the same lseek location and trample
                          * on one another.                           * on one another.
                          */                           */
                         if ((shell = value("SHELL")) == NOSTR)                          if ((shell = value("SHELL")) == NULL)
                                 shell = _PATH_CSHELL;                                  shell = _PATH_CSHELL;
                         sigemptyset(&nset);                          sigemptyset(&nset);
                         sigaddset(&nset, SIGHUP);                          sigaddset(&nset, SIGHUP);
                         sigaddset(&nset, SIGINT);                          sigaddset(&nset, SIGINT);
                         sigaddset(&nset, SIGQUIT);                          sigaddset(&nset, SIGQUIT);
                         pid = start_command(shell, &nset,                          pid = start_command(shell, &nset,
                                 image, -1, "-c", fname, NOSTR);                                  image, -1, "-c", fname, NULL);
                         if (pid < 0) {                          if (pid < 0) {
                                 senderr++;                                  senderr++;
                                 goto cant;                                  goto cant;
Line 393 
Line 393 
   
         new = NIL;          new = NIL;
         np = names;          np = names;
         metoo = (value("metoo") != NOSTR);          metoo = (value("metoo") != NULL);
         while (np != NIL) {          while (np != NIL) {
                 if (np->n_name[0] == '\\') {                  if (np->n_name[0] == '\\') {
                         cp = np->n_flink;                          cp = np->n_flink;
Line 504 
Line 504 
          */           */
         extra = 2;          extra = 2;
         extra++;          extra++;
         metoo = value("metoo") != NOSTR;          metoo = value("metoo") != NULL;
         if (metoo)          if (metoo)
                 extra++;                  extra++;
         verbose = value("verbose") != NOSTR;          verbose = value("verbose") != NULL;
         if (verbose)          if (verbose)
                 extra++;                  extra++;
         top = (char **)salloc((t + extra) * sizeof(*top));          top = (char **)salloc((t + extra) * sizeof(*top));
Line 521 
Line 521 
         for (; n != NIL; n = n->n_flink)          for (; n != NIL; n = n->n_flink)
                 if ((n->n_type & GDEL) == 0)                  if ((n->n_type & GDEL) == 0)
                         *ap++ = n->n_name;                          *ap++ = n->n_name;
         *ap = NOSTR;          *ap = NULL;
         return(top);          return(top);
 }  }
   

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