154174Sbostic /*- 254174Sbostic * Copyright (c) 1992 The Regents of the University of California. 354174Sbostic * All rights reserved. 454174Sbostic * 554174Sbostic * %sccs.include.redist.c% 654174Sbostic * 7*54184Sbostic * @(#)skpc.c 7.3 (Berkeley) 06/21/92 854174Sbostic */ 954174Sbostic 10*54184Sbostic #include "libkern.h" 11*54184Sbostic 1254174Sbostic int 1354181Storek skpc(mask0, size, cp0) 1454181Storek int mask0; 1554181Storek int size; 1654181Storek char *cp0; 1754174Sbostic { 18*54184Sbostic register u_char *cp, *end, mask; 1954174Sbostic 2054181Storek mask = mask0; 21*54184Sbostic cp = (u_char *)cp0; 2254174Sbostic for (end = &cp[size]; cp < end && *cp == mask; ++cp); 2354174Sbostic return (end - cp); 2454174Sbostic } 25