Mail Archives: djgpp/1998/01/28/18:23:43
At 06:56 1/28/1998 -0800, Ian Perez wrote:
>Ok, Here is the prototype of __file_tree_walk() :
>
>int __file_tree_walk(const char *_dir, int (*_fn)(const char *_path,
>const struct ffblk *_ff));
>
> The second argument is a function.... so what is the function passed
>supposed to return??
An int, zero if OK or nonzero on error. The docs do say this:
The tree traversal continues until one of the following events:
[snipped]
(2) An invocation of FUNC returns a non-zero value. In this case,
`__file_tree_walk' stops the tree traversal and returns whatever FUNC
returned.
If you were confused about the prototyping, I refer you to the comp.lang.c FAQ.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -