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

Diff for /src/usr.bin/mail/Attic/aux.c between version 1.2 and 1.3

version 1.2, 1996/06/11 12:53:32 version 1.3, 1997/01/17 07:12:44
Line 414 
Line 414 
         cp = skin(name1(mp, reptype));          cp = skin(name1(mp, reptype));
         if (reptype != 0 || charcount(cp, '!') < 2)          if (reptype != 0 || charcount(cp, '!') < 2)
                 return(cp);                  return(cp);
         cp2 = rindex(cp, '!');          cp2 = strrchr(cp, '!');
         cp2--;          cp2--;
         while (cp2 > cp && *cp2 != '!')          while (cp2 > cp && *cp2 != '!')
                 cp2--;                  cp2--;
Line 466 
Line 466 
   
         if (name == NOSTR)          if (name == NOSTR)
                 return(NOSTR);                  return(NOSTR);
         if (index(name, '(') == NOSTR && index(name, '<') == NOSTR          if (strchr(name, '(') == NOSTR && strchr(name, '<') == NOSTR
             && index(name, ' ') == NOSTR)              && strchr(name, ' ') == NOSTR)
                 return(name);                  return(name);
         gotlt = 0;          gotlt = 0;
         lastsp = 0;          lastsp = 0;
Line 592 
Line 592 
         *cp2 = '\0';          *cp2 = '\0';
         if (readline(ibuf, linebuf, LINESIZE) < 0)          if (readline(ibuf, linebuf, LINESIZE) < 0)
                 return(savestr(namebuf));                  return(savestr(namebuf));
         if ((cp = index(linebuf, 'F')) == NULL)          if ((cp = strchr(linebuf, 'F')) == NULL)
                 return(savestr(namebuf));                  return(savestr(namebuf));
         if (strncmp(cp, "From", 4) != 0)          if (strncmp(cp, "From", 4) != 0)
                 return(savestr(namebuf));                  return(savestr(namebuf));
         while ((cp = index(cp, 'r')) != NULL) {          while ((cp = strchr(cp, 'r')) != NULL) {
                 if (strncmp(cp, "remote", 6) == 0) {                  if (strncmp(cp, "remote", 6) == 0) {
                         if ((cp = index(cp, 'f')) == NULL)                          if ((cp = strchr(cp, 'f')) == NULL)
                                 break;                                  break;
                         if (strncmp(cp, "from", 4) != 0)                          if (strncmp(cp, "from", 4) != 0)
                                 break;                                  break;
                         if ((cp = index(cp, ' ')) == NULL)                          if ((cp = strchr(cp, ' ')) == NULL)
                                 break;                                  break;
                         cp++;                          cp++;
                         if (first) {                          if (first) {
                                 strcpy(namebuf, cp);                                  strcpy(namebuf, cp);
                                 first = 0;                                  first = 0;
                         } else                          } else
                                 strcpy(rindex(namebuf, '!')+1, cp);                                  strcpy(strrchr(namebuf, '!')+1, cp);
                         strcat(namebuf, "!");                          strcat(namebuf, "!");
                         goto newname;                          goto newname;
                 }                  }
Line 644 
Line 644 
 {  {
   
         while (*s1)          while (*s1)
                 if (index(s2, *s1++))                  if (strchr(s2, *s1++))
                         return 1;                          return 1;
         return 0;          return 0;
 }  }

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