OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[linuxjm/LDP_man-pages.git] / draft / 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 .\"
39 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
40 .\"     all rights reserved.
41 .\" Translated Thu Dec 18 16:26:22 JST 1997
42 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
43 .\" Updated Wed Jan  9 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
44 .\" Updated Mon Sep  1 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
45 .\"
46 .TH FFS 3 2010\-09\-20 GNU "Linux Programmer's Manual"
47 .SH 名前
48 ffs, ffsl, ffsll \- ワードの中で最初にセットされているビットの検出
49 .SH 書式
50 .nf
51 \fB#include <strings.h>\fP
52 .sp
53 \fBint ffs(int \fP\fIi\fP\fB);\fP
54 .sp
55 \fB#include <string.h>\fP
56 .sp
57 \fBint ffsl(long int \fP\fIi\fP\fB);\fP
58 .sp
59 \fBint ffsll(long long int \fP\fIi\fP\fB);\fP
60 .fi
61 .sp
62 .in -4n
63 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
64 .in
65 .PD 0
66 .ad l
67 .sp
68 \fBffs\fP():
69 .RS 4
70 .TP  4
71 glibc 2.10 以降:
72 _SVID_SOURCE || _BSD_SOURCE || _POSIX_C_SOURCE\ >=\ 200809L ||
73 _XOPEN_SOURCE\ >=\ 700 ||
74 .TP 
75 glibc 2.10 より前:
76 none
77 .RE
78 .PP
79 \fBffsl\fP(), \fBffsll\fP():
80 .RS 4
81 _GNU_SOURCE
82 .RE
83 .ad
84 .PD
85 .SH 説明
86 \fBffs\fP()  関数は、ワード \fIi\fP の中で最初にセットされている (最下位)ビットの位置を返す。 最下位ビットの位置は
87 1、最上位ビットの位置は例えば 32 や 64 である。 \fBffsll\fP()  関数と \fBffsl\fP()  関数も同様だが、
88 異なったサイズの引数をとる。
89 .SH 返り値
90 これらの関数は、最初にセットされているビットの位置を返し、 \fIi\fP のどのビットもセットされていなければ 0 を返す。
91 .SH 準拠
92 \fBffs\fP(): 4.3BSD, POSIX.1\-2001.
93
94 関数 \fBffsl\fP()  と \fBffsll\fP()  は glibc による拡張である。
95 .SH 注意
96 BSD システムでは \fI<string.h>\fP にプロトタイプがある。
97 .SH 関連項目
98 \fBmemchr\fP(3)
99 .SH この文書について
100 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
101 である。プロジェクトの説明とバグ報告に関する情報は
102 http://www.kernel.org/doc/man\-pages/ に書かれている。