#include "listserv.h" 

static char rcsid[] = "$Header: /usr/local/src/mail/listserv/RCS/str.c,v 1.3 92/02/24 12:55:07 andy Exp Locker: andy $";

strcasecmp(a,b)
char *a, *b;
	{
	char *p;
	p = a;
	while (p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	p = b;
	while (p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	return(strcmp(a,b));
	}
strncasecmp(a,b,n)
char *a, *b;
int n;
	{
	char *p;
	p = a;
	while (p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	p = b;
	while (p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	return(strncmp(a,b,n));
	}
char *strstr(a,b)
char *a, *b;
	{
	char *p;
	p = a;
	while(p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	p = b;
	while (p && *p)
		{
		if (isupper(*p))
			*p = tolower(*p);
		p++;
		}
	p = a;
	while (p && *p)
		{
		if (!strncmp(p, b, strlen(b)))
			return p;
		p++;
		}
	p = 0;
	return p;
	}
