=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/Attic/aux.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/mail/Attic/aux.c 1997/07/28 15:20:28 1.9 --- src/usr.bin/mail/Attic/aux.c 1997/07/30 07:19:29 1.10 *************** *** 1,4 **** ! /* $OpenBSD: aux.c,v 1.9 1997/07/28 15:20:28 millert Exp $ */ /* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: aux.c,v 1.10 1997/07/30 07:19:29 millert Exp $ */ /* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: aux.c,v 1.9 1997/07/28 15:20:28 millert Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: aux.c,v 1.10 1997/07/30 07:19:29 millert Exp $"; #endif #endif /* not lint */ *************** *** 277,295 **** } /* ! * Copy a string, lowercasing it as we go. */ void ! istrcpy(dest, src) register char *dest, *src; { ! do { ! if (isupper(*src)) ! *dest++ = tolower(*src); ! else ! *dest++ = *src; ! } while (*src++ != 0); } /* --- 277,300 ---- } /* ! * Copy a string, lowercasing it as we go. ``dsize'' should be ! * the real size (not len) of the dest string (guarantee NULL term). */ void ! istrncpy(dest, src, dsize) register char *dest, *src; + register size_t dsize; { ! if (dsize != 0) { ! while (--dsize != 0 && *src != '\0') { ! if (isupper(*src)) ! *dest++ = tolower(*src++); ! else ! *dest++ = *src++; ! } ! *dest = '\0'; ! } } /* *************** *** 695,701 **** * Lower-case the string, so that "Status" and "status" * will hash to the same place. */ ! istrcpy(realfld, field); if (ignore[1].i_count > 0) return(!member(realfld, ignore + 1)); else --- 700,706 ---- * Lower-case the string, so that "Status" and "status" * will hash to the same place. */ ! istrncpy(realfld, field, sizeof(realfld)); if (ignore[1].i_count > 0) return(!member(realfld, ignore + 1)); else