[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.9 and 1.10

version 1.9, 1997/07/28 15:20:28 version 1.10, 1997/07/30 07:19:29
Line 277 
Line 277 
 }  }
   
 /*  /*
  * Copy a string, lowercasing it as we go.   * Copy a string, lowercasing it as we go.  ``dsize'' should be
    * the real size (not len) of the dest string (guarantee NULL term).
  */   */
 void  void
 istrcpy(dest, src)  istrncpy(dest, src, dsize)
         register char *dest, *src;          register char *dest, *src;
           register size_t dsize;
 {  {
   
         do {          if (dsize != 0) {
                 if (isupper(*src))                  while (--dsize != 0 && *src != '\0') {
                         *dest++ = tolower(*src);                          if (isupper(*src))
                 else                                  *dest++ = tolower(*src++);
                         *dest++ = *src;                          else
         } while (*src++ != 0);                                  *dest++ = *src++;
                   }
                   *dest = '\0';
           }
 }  }
   
 /*  /*
Line 695 
Line 700 
          * Lower-case the string, so that "Status" and "status"           * Lower-case the string, so that "Status" and "status"
          * will hash to the same place.           * will hash to the same place.
          */           */
         istrcpy(realfld, field);          istrncpy(realfld, field, sizeof(realfld));
         if (ignore[1].i_count > 0)          if (ignore[1].i_count > 0)
                 return(!member(realfld, ignore + 1));                  return(!member(realfld, ignore + 1));
         else          else

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10