ffsのヘルプ・マニュアル
日本語 英語
ffs --help
man ffs
FFS(3) Linux Programmer’s Manual FFS(3)
名前
ffs, ffsl, ffsll - ワードの中で最初にセットされているビットの検出
書式
#include
int ffs(int i);
#define _GNU_SOURCE
#include
int ffsl(long int i);
int ffsll(long long int i);
説明
ffs() 関数は、ワード i の中で最初にセットされている (最下位)ビットの位
置を返す。最下位ビットの位置は 1、最上位ビットの位置は例えば 32 や 64
である。 ffsll() 関数と ffsl() 関数も同様だが、異なったサイズの引数をと
る。
返り値
これらの関数は、最初にセットされているビットの位置を返し、 i のどのビッ
トもセットされていなければ 0 を返す。
準拠
4.3BSD, POSIX.1-2001.
注意
BSD システムでは にプロトタイプがある。
関連項目
feature_test_macros(7)
GNU 2003-08-05 FFS(3)
FFS(3) Linux Programmer’s Manual FFS(3)
NAME
ffs, ffsl, ffsll - find first bit set in a word
SYNOPSIS
#include
int ffs(int i);
#define _GNU_SOURCE
#include
int ffsl(long int i);
int ffsll(long long int i);
DESCRIPTION
The ffs() function returns the position of the first (least signifi-
cant) bit set in the word i. The least significant bit is position 1
and the most significant position is, for example, 32 or 64. The func-
tions ffsll() and ffsl() do the same but take arguments of possibly
different size.
RETURN VALUE
These functions return the position of the first bit set, or 0 if no
bits are set in i.
CONFORMING TO
4.3BSD, POSIX.1-2001.
NOTES
BSD systems have a prototype in .
SEE ALSO
memchr(3), feature_test_macros(7)
COLOPHON
This page is part of release 3.22 of the Linux man-pages project. A
description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU 2009-04-21 FFS(3)