OSDN Git Service

(split) LDP: Update release from the latest PO files
[linuxjm/LDP_man-pages.git] / release / man3 / telldir.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 17:48:42 1993 by Rik Faith (faith@cs.unc.edu)
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH TELLDIR 3 2013\-03\-24 "" "Linux Programmer's Manual"
36 .SH 名前
37 telldir \- ディレクトリストリーム中の現在位置を返す
38 .SH 書式
39 .nf
40 \fB#include <dirent.h>\fP
41 .sp
42 \fBlong telldir(DIR *\fP\fIdirp\fP\fB);\fP
43 .fi
44 .sp
45 .in -4n
46 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
47 .in
48 .sp
49 \fBtelldir\fP(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
50 .SH 説明
51 \fBtelldir\fP()  関数は、ディレクトリストリーム \fIdirp\fP に結びつけられた 現在位置を返す。
52 .SH 返り値
53 成功した場合、 \fBtelldir\fP()  関数はディレクトリストリーム中の現在位置を返す。 エラーの場合、\-1 が返されて、 \fIerrno\fP
54 が適切に設定される。
55 .SH エラー
56 .TP 
57 \fBEBADF\fP
58 ディレクトリストリームディスクリプタ \fIdirp\fP が無効である。
59 .SH 準拠
60 4.3BSD, POSIX.1\-2001.
61 .SH 注意
62 バージョン 2.1.1 以前の glibc では、 \fBtelldir\fP()9 の返り値の型は \fIoff_t\fP であった。 POSIX.1\-2001
63 では \fIlong\fP と規定されており、glibc 2.1.2 以降では \fIlong\fP になっている。
64
65 .\" https://lwn.net/Articles/544298/
66 初期のファイルシステムでは、 \fBtelldir\fP()
67 が返す値は単なるディレクトリ内のファイルオフセットであった。新しめのファイルシステムでは、ディレクトリを表現するのに、フラットなテーブルではなく、ツリーやハッシュ構造が使用されている。このようなファイルシステムでは、
68 \fBtelldir\fP() が返す値 (および \fBreaddir\fP(3) が内部で使用する値)
69 は、ディレクトリ内での値を示すのにファイルシステム実装が使っている "cookie"
70 となる。アプリケーションプログラムでは、必ずこの値を内容を意識せず単なる値として扱うべきであり、その内容について前提を持つべきでは「ない」。
71 .SH 関連項目
72 \fBclosedir\fP(3), \fBopendir\fP(3), \fBreaddir\fP(3), \fBrewinddir\fP(3),
73 \fBscandir\fP(3), \fBseekdir\fP(3)
74 .SH この文書について
75 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
76 である。プロジェクトの説明とバグ報告に関する情報は
77 http://www.kernel.org/doc/man\-pages/ に書かれている。