154173Sbostic /*- 2*63186Sbostic * Copyright (c) 1992, 1993 3*63186Sbostic * The Regents of the University of California. All rights reserved. 454173Sbostic * 554173Sbostic * %sccs.include.redist.c% 654173Sbostic * 7*63186Sbostic * @(#)scanc.c 8.1 (Berkeley) 06/10/93 854173Sbostic */ 954173Sbostic 1056518Sbostic #include <libkern/libkern.h> 1154184Sbostic 1254173Sbostic int scanc(size,cp,table,mask0)1354180Storekscanc(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