OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man3 / fts.3
index 1c49155..0d9e7cf 100644 (file)
@@ -3,6 +3,7 @@
 .\" Copyright (c) 1989, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
 .\"
+.\" %%%LICENSE_START(BSD_4_CLAUSE_UCB)
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
+.\" %%%LICENSE_END
 .\"
 .\"     @(#)fts.3      8.5 (Berkeley) 4/16/94
 .\"
 .\" 2007-12-08, mtk, Converted from mdoc to man macros
 .\"
-.TH FTS 3 2007-12-28 "Linux" "Linux Programmer's Manual"
+.TH FTS 3 2014-03-18 "Linux" "Linux Programmer's Manual"
 .SH NAME
 fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \
 traverse a file hierarchy
@@ -77,8 +79,10 @@ In general, directories are visited two distinguishable times; in preorder
 (before any of their descendants are visited) and in postorder (after all
 of their descendants have been visited).
 Files are visited once.
-It is possible to walk the hierarchy "logically" (ignoring symbolic links)
-or physically (visiting symbolic links), order the walk of the hierarchy or
+It is possible to walk the hierarchy "logically" (visiting the files that
+symbolic links point to)
+or physically (visiting the symbolic links themselves),
+order the walk of the hierarchy or
 prune and/or revisit portions of the hierarchy.
 .PP
 Two structures are defined (and typedef'd) in the include file
@@ -369,8 +373,7 @@ The
 function takes a pointer to an array of character pointers naming one
 or more paths which make up a logical file hierarchy to be traversed.
 The array must be terminated by a
-NULL
-pointer.
+null pointer.
 .PP
 There are
 a number of options, at least one of which (either
@@ -583,7 +586,7 @@ field of the
 structure, and is ordered by the user-specified comparison function, if any.
 Repeated calls to
 .BR fts_children ()
-will recreate this linked list.
+will re-create this linked list.
 .PP
 As a special case, if
 .BR fts_read ()
@@ -654,7 +657,7 @@ must be set to one of the following values:
 .\" .Bl -tag -width FTS_PHYSICAL
 .TP 13
 .BR FTS_AGAIN
-Re-visit the file; any file type may be revisited.
+Revisit the file; any file type may be revisited.
 The next call to
 .BR fts_read ()
 will return the referenced file.
@@ -693,7 +696,7 @@ fields of the structure, when returned by
 .BR fts_read (),
 will reflect the target of the symbolic link instead of the symbolic link
 itself.
-In either case, if the target of the symbolic link does not exist the
+In either case, if the target of the symbolic link does not exist, the
 fields of the returned structure will be unchanged and the
 .I fts_info
 field will be set to
@@ -769,8 +772,14 @@ as follows:
 The options were invalid.
 .SH VERSIONS
 These functions are available in Linux since glibc2.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 4.4BSD.
+.SH BUGS
+All of the APIs described in this man page are not safe when compiling
+a program using the LFS APIs (e.g., when compiling with
+.IR -D_FILE_OFFSET_BITS=64 ).
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=15838
+.\" https://sourceware.org/bugzilla/show_bug.cgi?id=11460
 .\" The following statement is years old, and seems no closer to
 .\" being true -- mtk
 .\" The
@@ -784,3 +793,12 @@ These functions are available in Linux since glibc2.
 .BR stat (2),
 .BR ftw (3),
 .BR qsort (3)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.