flag fields are u_int's
[unix-history] / usr / src / lib / libc / string / ffs.3
CommitLineData
1c05e080
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek.
6.\"
7.\" %sccs.include.redist.man%
8.\"
9.\" @(#)ffs.3 5.1 (Berkeley) %G%
10.\"
11.TH FFS 3 ""
12.UC 7
13.SH NAME
14ffs \- find first bit set in a bit string
15.SH SYNOPSIS
16.nf
17.ft B
18#include <string.h>
19
20int
21ffs(int value);
22.ft R
23.fi
24.SH DESCRIPTION
25.B Ffs
26finds the first bit set in
27.I value
28and returns the index of that bit.
29Bits are numbered starting from 1, starting at the right-most
30bit.
31A return value of 0 means that the argument was zero.
32.SH SEE\ ALSO
33bitstring(3)