I would appreciate any donations. Wishlist or send e-mail type donations to maekawa AT daemon-systems.org.

Thank you.

SCANC(9)                   Kernel Developer's Manual                  SCANC(9)

     scanc -- use byte string as lookup table index

     #include <lib/libkern/libkern.h>

     scanc(u_int size, const u_char *cp, const u_char table[], int mask);

     The scanc() function scans the byte string cp, whose length is size.  A
     character in the string is used as an index in the 256-byte table.  If a
     bitwise-AND of the byte from the table and mask isn't zero or the string
     is exhausted, the scan stops.

     The scanc() function returns the length of the rest of the string,
     including the character which made the scan stop.  If the scanc()
     function exhausted the string, it returns 0.

     The scanc() function emulates a VAX instruction with the same name.

NetBSD 7.1.2                    April 24, 2013                    NetBSD 7.1.2