OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / ffs.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 19:39:35 1993 by Rik Faith (faith@cs.unc.edu)
28 .\"
29 .\" Modified 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
30 .\"
31 .\"
32 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
33 .\"     all rights reserved.
34 .\" Translated Thu Dec 18 16:26:22 JST 1997
35 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
36 .\" Updated Wed Jan  9 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
37 .\" Updated Mon Sep  1 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
38 .\"
39 .TH FFS 3 2010-09-20 "GNU" "Linux Programmer's Manual"
40 .SH 名前
41 .\"O ffs, ffsl, ffsll \- find first bit set in a word
42 ffs, ffsl, ffsll \- ワードの中で最初にセットされているビットの検出
43 .SH 書式
44 .nf
45 .B #include <strings.h>
46 .sp
47 .BI "int ffs(int " i );
48 .sp
49 .B #include <string.h>
50 .sp
51 .BI "int ffsl(long int " i );
52 .sp
53 .BI "int ffsll(long long int " i );
54 .fi
55 .sp
56 .in -4n
57 .\"O Feature Test Macro Requirements for glibc (see
58 .\"O .BR feature_test_macros (7)):
59 glibc 向けの機能検査マクロの要件
60 .RB ( feature_test_macros (7)
61 参照):
62 .in
63 .PD 0
64 .ad l
65 .sp
66 .BR ffs ():
67 .RS 4
68 .TP 4
69 .\"O Since glibc 2.10:
70 glibc 2.10 以降:
71 _SVID_SOURCE || _BSD_SOURCE ||
72 _POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700 ||
73 .TP
74 .\"O Before glibc 2.10:
75 glibc 2.10 より前:
76 none
77 .RE
78 .PP
79 .BR ffsl (),
80 .BR ffsll ():
81 .RS 4
82 _GNU_SOURCE
83 .RE
84 .ad
85 .PD
86 .SH 説明
87 .\"O The
88 .\"O .BR ffs ()
89 .\"O function returns the position of the first
90 .\"O (least significant) bit set in the word \fIi\fP.
91 .\"O The least significant bit is position 1 and the
92 .\"O most significant position is, for example, 32 or 64.
93 .BR ffs ()
94 関数は、ワード \fIi\fP の中で最初にセットされている
95 (最下位)ビットの位置を返す。
96 最下位ビットの位置は 1、最上位ビットの位置は例えば 32 や 64 である。
97 .\"O The functions
98 .\"O .BR ffsll ()
99 .\"O and
100 .\"O .BR ffsl ()
101 .\"O do the same but take
102 .\"O arguments of possibly different size.
103 .BR ffsll ()
104 関数と
105 .BR ffsl ()
106 関数も同様だが、
107 異なったサイズの引数をとる。
108 .SH 返り値
109 .\"O These functions return the position of the first bit set,
110 .\"O or 0 if no bits are set in
111 .\"O .IR i .
112 これらの関数は、最初にセットされているビットの位置を返し、
113 .I i
114 のどのビットもセットされていなければ 0 を返す。
115 .\"O .SH "CONFORMING TO"
116 .SH 準拠
117 .BR ffs ():
118 4.3BSD, POSIX.1-2001.
119
120 .\"O The
121 .\"O .BR ffsl ()
122 .\"O and
123 .\"O .BR ffsll ()
124 .\"O functions are glibc extensions.
125 関数
126 .BR ffsl ()
127
128 .BR ffsll ()
129 は glibc による拡張である。
130 .\"O .SH NOTES
131 .SH 注意
132 .\"O BSD systems have a prototype in
133 .\"O .IR <string.h> .
134 BSD システムでは
135 .I <string.h>
136 にプロトタイプがある。
137 .\"O .SH "SEE ALSO"
138 .SH 関連項目
139 .BR memchr (3)