msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2013-03-26 16:48+0900\n"
+"POT-Creation-Date: 2013-04-30 20:29+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr ""
#. type: TH
-#: build/C/man3/closedir.3:31 build/C/man3/dirfd.3:25 build/C/man2/getdents.2:30 build/C/man3/getdirentries.3:27 build/C/man3/opendir.3:32 build/C/man2/readdir.2:30 build/C/man3/readdir.3:36 build/C/man3/rewinddir.3:31 build/C/man3/scandir.3:36 build/C/man3/scandirat.3:25 build/C/man3/seekdir.3:30 build/C/man3/telldir.3:30
+#: build/C/man3/closedir.3:31 build/C/man3/dirfd.3:25 build/C/man2/getdents.2:30 build/C/man3/getdirentries.3:27 build/C/man3/opendir.3:32 build/C/man2/readdir.2:30 build/C/man3/readdir.3:36 build/C/man3/rewinddir.3:31 build/C/man3/scandir.3:36 build/C/man3/scandirat.3:25 build/C/man3/seekdir.3:31 build/C/man3/telldir.3:30
#, no-wrap
msgid "Linux Programmer's Manual"
msgstr ""
#. type: SH
-#: build/C/man3/closedir.3:32 build/C/man3/dirfd.3:26 build/C/man2/getdents.2:31 build/C/man3/getdirentries.3:28 build/C/man3/opendir.3:33 build/C/man2/readdir.2:31 build/C/man3/readdir.3:37 build/C/man3/rewinddir.3:32 build/C/man3/scandir.3:37 build/C/man3/scandirat.3:26 build/C/man3/seekdir.3:31 build/C/man3/telldir.3:31
+#: build/C/man3/closedir.3:32 build/C/man3/dirfd.3:26 build/C/man2/getdents.2:31 build/C/man3/getdirentries.3:28 build/C/man3/opendir.3:33 build/C/man2/readdir.2:31 build/C/man3/readdir.3:37 build/C/man3/rewinddir.3:32 build/C/man3/scandir.3:37 build/C/man3/scandirat.3:26 build/C/man3/seekdir.3:32 build/C/man3/telldir.3:31
#, no-wrap
msgid "NAME"
msgstr ""
msgstr ""
#. type: SH
-#: build/C/man3/closedir.3:34 build/C/man3/dirfd.3:28 build/C/man2/getdents.2:33 build/C/man3/getdirentries.3:30 build/C/man3/opendir.3:35 build/C/man2/readdir.2:33 build/C/man3/readdir.3:39 build/C/man3/rewinddir.3:34 build/C/man3/scandir.3:39 build/C/man3/scandirat.3:28 build/C/man3/seekdir.3:34 build/C/man3/telldir.3:33
+#: build/C/man3/closedir.3:34 build/C/man3/dirfd.3:28 build/C/man2/getdents.2:33 build/C/man3/getdirentries.3:30 build/C/man3/opendir.3:35 build/C/man2/readdir.2:33 build/C/man3/readdir.3:39 build/C/man3/rewinddir.3:34 build/C/man3/scandir.3:39 build/C/man3/scandirat.3:28 build/C/man3/seekdir.3:35 build/C/man3/telldir.3:33
#, no-wrap
msgid "SYNOPSIS"
msgstr ""
msgstr ""
#. type: Plain text
-#: build/C/man3/closedir.3:39 build/C/man3/opendir.3:40 build/C/man3/readdir.3:42 build/C/man3/rewinddir.3:39 build/C/man3/scandir.3:42 build/C/man3/seekdir.3:37 build/C/man3/telldir.3:36
+#: build/C/man3/closedir.3:39 build/C/man3/opendir.3:40 build/C/man3/readdir.3:42 build/C/man3/rewinddir.3:39 build/C/man3/scandir.3:42 build/C/man3/seekdir.3:38 build/C/man3/telldir.3:36
#, no-wrap
msgid "B<#include E<lt>dirent.hE<gt>>\n"
msgstr ""
msgstr ""
#. type: SH
-#: build/C/man3/closedir.3:42 build/C/man3/dirfd.3:54 build/C/man2/getdents.2:41 build/C/man3/getdirentries.3:43 build/C/man3/opendir.3:63 build/C/man2/readdir.2:42 build/C/man3/readdir.3:61 build/C/man3/rewinddir.3:42 build/C/man3/scandir.3:65 build/C/man3/scandirat.3:44 build/C/man3/seekdir.3:48 build/C/man3/telldir.3:47
+#: build/C/man3/closedir.3:42 build/C/man3/dirfd.3:54 build/C/man2/getdents.2:41 build/C/man3/getdirentries.3:43 build/C/man3/opendir.3:63 build/C/man2/readdir.2:42 build/C/man3/readdir.3:61 build/C/man3/rewinddir.3:42 build/C/man3/scandir.3:65 build/C/man3/scandirat.3:44 build/C/man3/seekdir.3:49 build/C/man3/telldir.3:47
#, no-wrap
msgid "DESCRIPTION"
msgstr ""
msgstr ""
#. type: SH
-#: build/C/man3/closedir.3:66 build/C/man3/dirfd.3:97 build/C/man2/getdents.2:282 build/C/man3/getdirentries.3:72 build/C/man3/opendir.3:140 build/C/man2/readdir.2:125 build/C/man3/readdir.3:243 build/C/man3/rewinddir.3:53 build/C/man3/scandir.3:174 build/C/man3/scandirat.3:112 build/C/man3/seekdir.3:74 build/C/man3/telldir.3:74
+#: build/C/man3/closedir.3:66 build/C/man3/dirfd.3:97 build/C/man2/getdents.2:282 build/C/man3/getdirentries.3:72 build/C/man3/opendir.3:140 build/C/man2/readdir.2:127 build/C/man3/readdir.3:256 build/C/man3/rewinddir.3:53 build/C/man3/scandir.3:174 build/C/man3/scandirat.3:112 build/C/man3/seekdir.3:78 build/C/man3/telldir.3:90
#, no-wrap
msgid "SEE ALSO"
msgstr ""
msgstr ""
#. type: SH
-#: build/C/man3/closedir.3:74 build/C/man3/dirfd.3:106 build/C/man2/getdents.2:285 build/C/man3/getdirentries.3:75 build/C/man3/opendir.3:149 build/C/man2/readdir.2:128 build/C/man3/readdir.3:255 build/C/man3/rewinddir.3:60 build/C/man3/scandir.3:186 build/C/man3/scandirat.3:116 build/C/man3/seekdir.3:82 build/C/man3/telldir.3:81
+#: build/C/man3/closedir.3:74 build/C/man3/dirfd.3:106 build/C/man2/getdents.2:285 build/C/man3/getdirentries.3:75 build/C/man3/opendir.3:149 build/C/man2/readdir.2:130 build/C/man3/readdir.3:268 build/C/man3/rewinddir.3:60 build/C/man3/scandir.3:186 build/C/man3/scandirat.3:116 build/C/man3/seekdir.3:86 build/C/man3/telldir.3:97
#, no-wrap
msgid "COLOPHON"
msgstr ""
#. type: Plain text
-#: build/C/man3/closedir.3:81 build/C/man3/dirfd.3:113 build/C/man2/getdents.2:292 build/C/man3/getdirentries.3:82 build/C/man3/opendir.3:156 build/C/man2/readdir.2:135 build/C/man3/readdir.3:262 build/C/man3/rewinddir.3:67 build/C/man3/scandir.3:193 build/C/man3/scandirat.3:123 build/C/man3/seekdir.3:89 build/C/man3/telldir.3:88
+#: build/C/man3/closedir.3:81 build/C/man3/dirfd.3:113 build/C/man2/getdents.2:292 build/C/man3/getdirentries.3:82 build/C/man3/opendir.3:156 build/C/man2/readdir.2:137 build/C/man3/readdir.3:275 build/C/man3/rewinddir.3:67 build/C/man3/scandir.3:193 build/C/man3/scandirat.3:123 build/C/man3/seekdir.3:93 build/C/man3/telldir.3:104
msgid ""
-"This page is part of release 3.50 of the Linux I<man-pages> project. A "
+"This page is part of release 3.51 of the Linux I<man-pages> project. A "
"description of the project, and information about reporting bugs, can be "
"found at http://www.kernel.org/doc/man-pages/."
msgstr ""
msgstr ""
#. type: Plain text
-#: build/C/man3/dirfd.3:38 build/C/man3/getdirentries.3:39 build/C/man3/opendir.3:48 build/C/man3/readdir.3:52 build/C/man3/scandir.3:57 build/C/man3/seekdir.3:44 build/C/man3/telldir.3:43
+#: build/C/man3/dirfd.3:38 build/C/man3/getdirentries.3:39 build/C/man3/opendir.3:48 build/C/man3/readdir.3:52 build/C/man3/scandir.3:57 build/C/man3/seekdir.3:45 build/C/man3/telldir.3:43
msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
msgstr ""
#: build/C/man3/dirfd.3:69
msgid ""
"This descriptor is the one used internally by the directory stream. As a "
-"result, it is only useful for functions which do not depend on or alter the "
+"result, it is useful only for functions which do not depend on or alter the "
"file position, such as B<fstat>(2) and B<fchdir>(2). It will be "
"automatically closed when B<closedir>(3) is called."
msgstr ""
#. type: Plain text
#: build/C/man3/dirfd.3:97
msgid ""
-"The prototype for B<dirfd>() is only available if B<_BSD_SOURCE> or "
+"The prototype for B<dirfd>() is available only if B<_BSD_SOURCE> or "
"B<_SVID_SOURCE> is defined."
msgstr ""
" unsigned long d_off; /* Offset to next I<linux_dirent> */\n"
" unsigned short d_reclen; /* Length of this I<linux_dirent> */\n"
" char d_name[]; /* Filename (null-terminated) */\n"
-" /* length is actually (d_reclen - 2 -\n"
-" offsetof(struct linux_dirent, d_name) */\n"
+" /* length is actually (d_reclen - 2 -\n"
+" offsetof(struct linux_dirent, d_name)) */\n"
" /*\n"
" char pad; // Zero padding byte\n"
-" char d_type; // File type (only since Linux 2.6.4;\n"
-" // offset is (d_reclen - 1))\n"
+" char d_type; // File type (only since Linux\n"
+" // 2.6.4); offset is (d_reclen - 1)\n"
" */\n"
msgstr ""
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:99 build/C/man3/readdir.3:178
+#: build/C/man2/getdents.2:99 build/C/man3/readdir.3:191
#, no-wrap
msgid "B<DT_BLK>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:102 build/C/man3/readdir.3:181
+#: build/C/man2/getdents.2:102 build/C/man3/readdir.3:194
msgid "This is a block device."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:102 build/C/man3/readdir.3:181
+#: build/C/man2/getdents.2:102 build/C/man3/readdir.3:194
#, no-wrap
msgid "B<DT_CHR>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:105 build/C/man3/readdir.3:184
+#: build/C/man2/getdents.2:105 build/C/man3/readdir.3:197
msgid "This is a character device."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:105 build/C/man3/readdir.3:184
+#: build/C/man2/getdents.2:105 build/C/man3/readdir.3:197
#, no-wrap
msgid "B<DT_DIR>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:108 build/C/man3/readdir.3:187
+#: build/C/man2/getdents.2:108 build/C/man3/readdir.3:200
msgid "This is a directory."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:108 build/C/man3/readdir.3:187
+#: build/C/man2/getdents.2:108 build/C/man3/readdir.3:200
#, no-wrap
msgid "B<DT_FIFO>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:111 build/C/man3/readdir.3:190
+#: build/C/man2/getdents.2:111 build/C/man3/readdir.3:203
msgid "This is a named pipe (FIFO)."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:111 build/C/man3/readdir.3:190
+#: build/C/man2/getdents.2:111 build/C/man3/readdir.3:203
#, no-wrap
msgid "B<DT_LNK>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:114 build/C/man3/readdir.3:193
+#: build/C/man2/getdents.2:114 build/C/man3/readdir.3:206
msgid "This is a symbolic link."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:114 build/C/man3/readdir.3:193
+#: build/C/man2/getdents.2:114 build/C/man3/readdir.3:206
#, no-wrap
msgid "B<DT_REG>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:117 build/C/man3/readdir.3:196
+#: build/C/man2/getdents.2:117 build/C/man3/readdir.3:209
msgid "This is a regular file."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:117 build/C/man3/readdir.3:196
+#: build/C/man2/getdents.2:117 build/C/man3/readdir.3:209
#, no-wrap
msgid "B<DT_SOCK>"
msgstr ""
#. type: Plain text
-#: build/C/man2/getdents.2:120 build/C/man3/readdir.3:199
+#: build/C/man2/getdents.2:120 build/C/man3/readdir.3:212
msgid "This is a UNIX domain socket."
msgstr ""
#. type: TP
-#: build/C/man2/getdents.2:120 build/C/man3/readdir.3:199
+#: build/C/man2/getdents.2:120 build/C/man3/readdir.3:212
#, no-wrap
msgid "B<DT_UNKNOWN>"
msgstr ""
#. The glibc manual says that on some systems this is the only
#. value returned
#. type: Plain text
-#: build/C/man2/getdents.2:123 build/C/man3/readdir.3:204
+#: build/C/man2/getdents.2:123 build/C/man3/readdir.3:217
msgid "The file type is unknown."
msgstr ""
#. kernel 2.6.27
#. The same sentence is in getdents.2
#. type: Plain text
-#: build/C/man2/getdents.2:142 build/C/man3/readdir.3:218
+#: build/C/man2/getdents.2:142 build/C/man3/readdir.3:231
msgid ""
"Currently, only some file systems (among them: Btrfs, ext2, ext3, and ext4) "
"have full support for returning the file type in I<d_type>. All "
msgid "EXAMPLE"
msgstr ""
-#. FIXME: This program uses the older getdents(0 system call
+#. FIXME: This program uses the older getdents() system call
#. and the structure with smaller field widths.
#. type: Plain text
#: build/C/man2/getdents.2:200
#. type: TH
#: build/C/man2/readdir.2:30
#, no-wrap
-msgid "2012-07-13"
+msgid "2013-03-26"
msgstr ""
#. type: Plain text
msgstr ""
#. type: Plain text
-#: build/C/man2/readdir.2:128
+#: build/C/man2/readdir.2:127
+msgid "This system call does not exist on x86-64."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/readdir.2:130
msgid "B<getdents>(2), B<readdir>(3)"
msgstr ""
#. type: TH
-#: build/C/man3/readdir.3:36
+#: build/C/man3/readdir.3:36 build/C/man3/seekdir.3:31 build/C/man3/telldir.3:30
#, no-wrap
-msgid "2012-07-07"
+msgid "2013-03-24"
msgstr ""
#. type: Plain text
msgid ""
"struct dirent {\n"
" ino_t d_ino; /* inode number */\n"
-" off_t d_off; /* offset to the next dirent */\n"
+" off_t d_off; /* not an offset; see NOTES */\n"
" unsigned short d_reclen; /* length of this record */\n"
" unsigned char d_type; /* type of file; not supported\n"
" by all file system types */\n"
"are defined."
msgstr ""
+#. https://lwn.net/Articles/544298/
#. type: Plain text
#: build/C/man3/readdir.3:178
msgid ""
+"The value returned in I<d_off> is the same as would be returned by calling "
+"B<telldir>(3) at the current position in the directory stream. Be aware "
+"that despite its type and name, the I<d_off> field is seldom any kind of "
+"directory offset on modern file systems. Applications should treat this "
+"field as an opaque value, making no assumptions about its contents; see also "
+"B<telldir>(3)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man3/readdir.3:191
+msgid ""
"Other than Linux, the I<d_type> field is available mainly only on BSD "
"systems. This field makes it possible to avoid the expense of calling "
"B<lstat>(2) if further actions depend on the type of the file. If the "
msgstr ""
#. type: Plain text
-#: build/C/man3/readdir.3:209
+#: build/C/man3/readdir.3:222
msgid ""
"If the file type could not be determined, the value B<DT_UNKNOWN> is "
"returned in I<d_type>."
msgstr ""
#. type: Plain text
-#: build/C/man3/readdir.3:228
+#: build/C/man3/readdir.3:241
msgid ""
"Since POSIX.1 does not specify the size of the I<d_name> field, and other "
"nonstandard fields may precede that field within the I<dirent> structure, "
msgstr ""
#. type: Plain text
-#: build/C/man3/readdir.3:236
+#: build/C/man3/readdir.3:249
#, no-wrap
msgid ""
"name_max = pathconf(dirpath, _PC_NAME_MAX);\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/readdir.3:243
+#: build/C/man3/readdir.3:256
msgid "(POSIX.1 requires that I<d_name> is the last field in a I<struct dirent>.)"
msgstr ""
#. type: Plain text
-#: build/C/man3/readdir.3:255
+#: build/C/man3/readdir.3:268
msgid ""
"B<getdents>(2), B<read>(2), B<closedir>(3), B<dirfd>(3), B<ftw>(3), "
"B<offsetof>(3), B<opendir>(3), B<rewinddir>(3), B<scandir>(3), "
msgstr ""
#. type: TH
-#: build/C/man3/seekdir.3:30
+#: build/C/man3/seekdir.3:31
#, no-wrap
msgid "SEEKDIR"
msgstr ""
-#. type: TH
-#: build/C/man3/seekdir.3:30 build/C/man3/telldir.3:30
-#, no-wrap
-msgid "2009-03-11"
-msgstr ""
-
#. type: Plain text
-#: build/C/man3/seekdir.3:34
+#: build/C/man3/seekdir.3:35
msgid ""
"seekdir - set the position of the next readdir() call in the directory "
"stream."
msgstr ""
#. type: Plain text
-#: build/C/man3/seekdir.3:39
+#: build/C/man3/seekdir.3:40
#, no-wrap
-msgid "B<void seekdir(DIR *>I<dirp>B<, long >I<offset>B<);>\n"
+msgid "B<void seekdir(DIR *>I<dirp>B<, long >I<loc>B<);>\n"
msgstr ""
#. type: Plain text
-#: build/C/man3/seekdir.3:48
+#: build/C/man3/seekdir.3:49
msgid "B<seekdir>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
msgstr ""
#: build/C/man3/seekdir.3:60
msgid ""
"The B<seekdir>() function sets the location in the directory stream from "
-"which the next B<readdir>(2) call will start. B<seekdir>() should be used "
-"with an I<offset> returned by B<telldir>(3)."
+"which the next B<readdir>(2) call will start. The I<loc> argument should "
+"be a value returned by a previous call to B<telldir>(3)."
msgstr ""
#. type: Plain text
msgstr ""
#. type: Plain text
-#: build/C/man3/seekdir.3:74
+#: build/C/man3/seekdir.3:78
msgid ""
-"In glibc up to version 2.1.1, the type of the I<offset> argument was "
-"I<off_t>. POSIX.1-2001 specifies I<long>, and this is the type used since "
-"glibc 2.1.2."
+"In glibc up to version 2.1.1, the type of the I<loc> argument was I<off_t>. "
+"POSIX.1-2001 specifies I<long>, and this is the type used since glibc "
+"2.1.2. See B<telldir>(3) for information on why you should be careful in "
+"making any assumptions about the value in this argument."
msgstr ""
#. type: Plain text
-#: build/C/man3/seekdir.3:82
+#: build/C/man3/seekdir.3:86
msgid ""
"B<lseek>(2), B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
"B<scandir>(3), B<telldir>(3)"
"glibc 2.1.2."
msgstr ""
+#. https://lwn.net/Articles/544298/
+#. type: Plain text
+#: build/C/man3/telldir.3:90
+msgid ""
+"In early file systems, the value returned by B<telldir>() was a simple file "
+"offset within a directory. Modern file systems use tree or hash structures, "
+"rather than flat tables, to represent directories. On such file systems, "
+"the value returned by B<telldir>() (and used internally by B<readdir>(3)) "
+"is a \"cookie\" that is used by the implementation to derive a position "
+"within a directory. Application programs should treat this strictly as an "
+"opaque value, making I<no> assumptions about its contents."
+msgstr ""
+
#. type: Plain text
-#: build/C/man3/telldir.3:81
+#: build/C/man3/telldir.3:97
msgid ""
"B<closedir>(3), B<opendir>(3), B<readdir>(3), B<rewinddir>(3), "
"B<scandir>(3), B<seekdir>(3)"