SCANC(9)

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

# NAME

scanc — use byte string as lookup table index

# SYNOPSIS

#include <lib/libkern/libkern.h>

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

# DESCRIPTION

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.

# RETURN VALUES

The scanc() function returns the number of characters skipped.

# HISTORY

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

November 1, 2011 | NetBSD 5.99