/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ # include "sys/types.h" # include "macros.h" /* This routine returns the position of the first character in s1 that matches any character in s2. */ static char Sccsid[] = "@(#)anystr.c 3.0 4/22/86"; anystr(s1, s2) char *s1, *s2; { register int i = -1; register int c; while (c = s1[++i]) if (any(c, s2)) return(i); return(-1); }