xref: /csrg-svn/sys/libkern/skpc.c (revision 63186)
154174Sbostic /*-
2*63186Sbostic  * Copyright (c) 1992, 1993
3*63186Sbostic  *	The Regents of the University of California.  All rights reserved.
454174Sbostic  *
554174Sbostic  * %sccs.include.redist.c%
654174Sbostic  *
7*63186Sbostic  *	@(#)skpc.c	8.1 (Berkeley) 06/10/93
854174Sbostic  */
954174Sbostic 
1056518Sbostic #include <libkern/libkern.h>
1154184Sbostic 
1254174Sbostic int
skpc(mask0,size,cp0)1354181Storek skpc(mask0, size, cp0)
1454181Storek 	int mask0;
1554181Storek 	int size;
1654181Storek 	char *cp0;
1754174Sbostic {
1854184Sbostic 	register u_char *cp, *end, mask;
1954174Sbostic 
2054181Storek 	mask = mask0;
2154184Sbostic 	cp = (u_char *)cp0;
2254174Sbostic 	for (end = &cp[size]; cp < end && *cp == mask; ++cp);
2354174Sbostic 	return (end - cp);
2454174Sbostic }
25