Guardian Native C Library Calls Reference Manual (G06.28+, H06.04+)

Guardian Native C Library Calls (f) ffs(3)
NAME
ffs - Finds rst bit set
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL
G-series native OSS processes: /G/system/sysnn/zstfnsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <strings.h>
int ffs(int i);
PARAMETERS
i is an integer to examined.
DESCRIPTION
The ffs( ) function examines the i parameter bit-by-bit beginning with the least signicant bit and
returns the number of the rst bit that is set to 1. The bits are numbered starting with the least
signicant bit being one.
NOTES
The ffs( ) function can be called by native processes only.
RETURN VALUES
The ffs( ) function returns the number of the rst bit set. If the value of the i parameter is 0
(zero), ffs( ) returns 0 (zero).
ERRORS
None. The ffs( ) function does not set errno.
STANDARDS CONFORMANCE
The ffs( ) function is dened in the XPG4 Version 2 specication.
527192-005 Hewlett-Packard Company 213