154173Sbostic /*- 254173Sbostic * Copyright (c) 1992 The Regents of the University of California. 354173Sbostic * All rights reserved. 454173Sbostic * 554173Sbostic * %sccs.include.redist.c% 654173Sbostic * 7*56518Sbostic * @(#)scanc.c 7.4 (Berkeley) 10/11/92 854173Sbostic */ 954173Sbostic 10*56518Sbostic #include <libkern/libkern.h> 1154184Sbostic 1254173Sbostic int 1354180Storek scanc(size, cp, table, mask0) 1454184Sbostic u_int size; 1554184Sbostic register u_char *cp, table[]; 1654180Storek int mask0; 1754173Sbostic { 1854184Sbostic register u_char *end; 1954184Sbostic register u_char mask; 2054173Sbostic 2154180Storek mask = mask0; 2254173Sbostic for (end = &cp[size]; cp < end && (table[*cp] & mask) == 0; ++cp); 2354173Sbostic return (end - cp); 2454173Sbostic } 25