www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/28/18:23:43

Date: Wed, 28 Jan 1998 15:23:03 -0800 (PST)
Message-Id: <199801282323.PAA15335@adit.ap.net>
Mime-Version: 1.0
To: Ian Perez <fish AT discover DOT net>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: __file_tree_walk()

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019