OSDN Git Service

e81482420402127ed8878c67126c503b1b484142
[linuxjm/LDP_man-pages.git] / release / man3 / ffs.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 19:39:35 1993 by Rik Faith (faith@cs.unc.edu)
30 .\"
31 .\" Modified 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .\"*******************************************************************
34 .\"
35 .\" This file was generated with po4a. Translate the source file.
36 .\"
37 .\"*******************************************************************
38 .TH FFS 3 2010\-09\-20 GNU "Linux Programmer's Manual"
39 .SH 名前
40 ffs, ffsl, ffsll \- ワードの中で最初にセットされているビットの検出
41 .SH 書式
42 .nf
43 \fB#include <strings.h>\fP
44 .sp
45 \fBint ffs(int \fP\fIi\fP\fB);\fP
46 .sp
47 \fB#include <string.h>\fP
48 .sp
49 \fBint ffsl(long int \fP\fIi\fP\fB);\fP
50 .sp
51 \fBint ffsll(long long int \fP\fIi\fP\fB);\fP
52 .fi
53 .sp
54 .in -4n
55 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
56 .in
57 .PD 0
58 .ad l
59 .sp
60 \fBffs\fP():
61 .RS 4
62 .TP  4
63 glibc 2.10 以降:
64 _SVID_SOURCE || _BSD_SOURCE || _POSIX_C_SOURCE\ >=\ 200809L ||
65 _XOPEN_SOURCE\ >=\ 700 ||
66 .TP 
67 glibc 2.10 より前:
68 none
69 .RE
70 .PP
71 \fBffsl\fP(), \fBffsll\fP():
72 .RS 4
73 _GNU_SOURCE
74 .RE
75 .ad
76 .PD
77 .SH 説明
78 \fBffs\fP()  関数は、ワード \fIi\fP の中で最初にセットされている (最下位)ビットの位置を返す。 最下位ビットの位置は
79 1、最上位ビットの位置は例えば 32 や 64 である。 \fBffsll\fP()  関数と \fBffsl\fP()  関数も同様だが、
80 異なったサイズの引数をとる。
81 .SH 返り値
82 これらの関数は、最初にセットされているビットの位置を返し、 \fIi\fP のどのビットもセットされていなければ 0 を返す。
83 .SH 準拠
84 \fBffs\fP(): 4.3BSD, POSIX.1\-2001.
85
86 関数 \fBffsl\fP()  と \fBffsll\fP()  は glibc による拡張である。
87 .SH 注意
88 BSD システムでは \fI<string.h>\fP にプロトタイプがある。
89 .SH 関連項目
90 \fBmemchr\fP(3)
91 .SH この文書について
92 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
93 である。プロジェクトの説明とバグ報告に関する情報は
94 http://www.kernel.org/doc/man\-pages/ に書かれている。