#ifndef lint
static char *RCSid = "$Header: strscan.c 1.0 91/02/22 17:36:00 bailey";
#endif

/*
 * strscan.c
 *
 * scan a string for any occurrence of another string
 *
 */

#include <stdio.h>
#include "misc.h"

strscan(target,string)
	s_char *target,*string;
{
	int	i,n,delta;

	if ((string == NULL) || (target == NULL))
		return(1);
	n = strlen(target);
	delta = strlen(string);
	if (delta < n)
		return(1);
	delta -= n;
	for (i = 0; i <= delta; i++) {
		if (!strncmp(target,&(string[i]),n))
			return(0);
	}
	return(1);
}
