Changeset View
Standalone View
lib/libc/gen/fts.3
Context not available. | |||||
.\" @(#)fts.3 8.5 (Berkeley) 4/16/94 | .\" @(#)fts.3 8.5 (Berkeley) 4/16/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 12, 2014 | .Dd May 5, 2014 | ||||
.Dt FTS 3 | .Dt FTS 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
Context not available. | |||||
.In fts.h | .In fts.h | ||||
.Ft FTS * | .Ft FTS * | ||||
.Fn fts_open "char * const *path_argv" "int options" "int (*compar)(const FTSENT * const *, const FTSENT * const *)" | .Fn fts_open "char * const *path_argv" "int options" "int (*compar)(const FTSENT * const *, const FTSENT * const *)" | ||||
.Ft FTS * | |||||
.Fn fts_open_b "char * const *path_argv" "int options" "int (^compar)(const FTSENT * const *, const FTSENT * const *)" | |||||
.Ft FTSENT * | .Ft FTSENT * | ||||
.Fn fts_read "FTS *ftsp" | .Fn fts_read "FTS *ftsp" | ||||
.Ft FTSENT * | .Ft FTSENT * | ||||
Context not available. | |||||
file hierarchies. | file hierarchies. | ||||
A simple overview is that the | A simple overview is that the | ||||
.Fn fts_open | .Fn fts_open | ||||
function returns a | and | ||||
.Fn fts_open_b | |||||
functions return a | |||||
wblock: s/returns/return/ | |||||
.Dq handle | .Dq handle | ||||
on a file hierarchy, which is then supplied to | on a file hierarchy, which is then supplied to | ||||
the other | the other | ||||
Context not available. | |||||
.Ql ..\& | .Ql ..\& | ||||
which was not specified as a file name to | which was not specified as a file name to | ||||
.Fn fts_open | .Fn fts_open | ||||
or | |||||
.Fn fts_open_b | |||||
(see | (see | ||||
.Dv FTS_SEEDOT ) . | .Dv FTS_SEEDOT ) . | ||||
.It Dv FTS_DP | .It Dv FTS_DP | ||||
Context not available. | |||||
The path for the file relative to the root of the traversal. | The path for the file relative to the root of the traversal. | ||||
This path contains the path specified to | This path contains the path specified to | ||||
.Fn fts_open | .Fn fts_open | ||||
or | |||||
.Fn fts_open_b | |||||
as a prefix. | as a prefix. | ||||
.It Fa fts_pathlen | .It Fa fts_pathlen | ||||
The length of the string referenced by | The length of the string referenced by | ||||
Context not available. | |||||
.Fa path_argv | .Fa path_argv | ||||
for the root paths, and in the order listed in the directory for | for the root paths, and in the order listed in the directory for | ||||
everything else. | everything else. | ||||
.Sh FTS_OPEN_B | |||||
.Fn fts_open_b | |||||
Not Done Inline ActionsThis line should be deleted. There is no leading "The" in this form: "blahblah is" wblock: This line should be deleted. There is no leading "The" in this form:
"blahblah is"
as opposed… | |||||
is a block-based version of | |||||
.Fn fts_open | |||||
where | |||||
.Fa compar | |||||
is a block pointer that is passed to | |||||
.Xr qsort_b 3 . | |||||
Done Inline ActionsThis sentence is ambiguous here. The "instead of" can be misinterpreted. It might not be necessary to describe what fts_open does in this sentence, just what fts_open_b does. That reduces the number of things that can be confused. A suggestion follows. Note that I also find the "The blahblah function" needlessly redundant, at least after the first use. I suggest just referring to these and other special words by their name alone, like this sentence refers to fts_open. .Fn fts_open_b A possibly better way to do this would be to say (markup omitted) "fts_open_b is a block-based version of fts_open. It works in the same way, but compar is a block pointer that is passed to qsort_b(3)." wblock: This sentence is ambiguous here. The "instead of" can be misinterpreted. It might not be… | |||||
.Sh FTS_READ | .Sh FTS_READ | ||||
The | The | ||||
Not Done Inline ActionsThis last part is still a little ambiguous, although I can see where it might be wanted for comparison. The sentence could be ended immediately after .Xr qsort_b 3. Given the clarity improvement to the first part of the sentence, this part should work either way. wblock: This last part is still a little ambiguous, although I can see where it might be wanted for… | |||||
.Fn fts_read | .Fn fts_read | ||||
Context not available. | |||||
.Xr chdir 2 , | .Xr chdir 2 , | ||||
.Xr stat 2 , | .Xr stat 2 , | ||||
.Xr ftw 3 , | .Xr ftw 3 , | ||||
.Xr qsort 3 | .Xr qsort 3 , | ||||
.Xr qsort_b 3 | |||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
Context not available. | |||||
principally to provide for alternative interfaces to the | principally to provide for alternative interfaces to the | ||||
.Nm | .Nm | ||||
functionality using different data structures. | functionality using different data structures. | ||||
The | |||||
.Fn fts_open_b | |||||
function first appeared in Mac OS X. | |||||
This implementation was created by Stacey Son for | |||||
.Fx 11.0 . | |||||
.Sh BUGS | .Sh BUGS | ||||
The | The | ||||
.Fn fts_open | .Fn fts_open | ||||
function will automatically set the | and | ||||
.Fn fts_open_b | |||||
functions will automatically set the | |||||
.Dv FTS_NOCHDIR | .Dv FTS_NOCHDIR | ||||
option if the | option if the | ||||
.Dv FTS_LOGICAL | .Dv FTS_LOGICAL | ||||
Context not available. |
s/returns/return/