static char *SccsId = "@(#)strfind.c 4.3 (TU-Delft) 01/28/93";
/**********************************************************

Name/Version      : aux/4.3

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Authors           : A.J. van Genderen
                  : N.P. van der Meijs
Creation date     : 15-Mar-1988
Modified by       :
Modification date :


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1988. All rights reserved.
**********************************************************/
#include <stdio.h>

/*
 * Return first instance of s2 in s1
 *
 * Return NULL if not found, or if either s1 or s2 NULL.
 */
char * strfind (s1, s2)
register char * s1, * s2;
{
    char * c1, * c2;

    if (s1 == NULL) return (NULL);
    if (s2 == NULL) return (NULL);

    for (; *s1; s1++) {
	for (c1 = s1, c2 = s2; *c1 == *c2 && *c1 != '\0'; c1++, c2++);
	if (*c2 == '\0') return (s1);
    }
    return (NULL);
}
