version 1.9, 1997/07/28 15:20:28 |
version 1.10, 1997/07/30 07:19:29 |
|
|
} |
} |
|
|
/* |
/* |
* 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'; |
|
} |
} |
} |
|
|
/* |
/* |
|
|
* 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 |