xref: /csrg-svn/sys/libkern/skpc.c (revision 54181)
154174Sbostic /*-
254174Sbostic  * Copyright (c) 1992 The Regents of the University of California.
354174Sbostic  * All rights reserved.
454174Sbostic  *
554174Sbostic  * %sccs.include.redist.c%
654174Sbostic  *
7*54181Storek  *	@(#)skpc.c	7.2 (Berkeley) 06/21/92
854174Sbostic  */
954174Sbostic 
1054174Sbostic int
11*54181Storek skpc(mask0, size, cp0)
12*54181Storek 	int mask0;
13*54181Storek 	int size;
14*54181Storek 	char *cp0;
1554174Sbostic {
16*54181Storek 	register unsigned char *cp, *end, mask;
1754174Sbostic 
18*54181Storek 	mask = mask0;
19*54181Storek 	cp = (unsigned char *)cp0;
2054174Sbostic 	for (end = &cp[size]; cp < end && *cp == mask; ++cp);
2154174Sbostic 	return (end - cp);
2254174Sbostic }
23