not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
static int
myftw_dir (DIR **dirs, int level, int descriptors,
char *dir, size_t len,
- __ftw_func_t func)
+ int (*func) (const char *file,
+ struct stat *status,
+ int flag))
{
int got;
struct dirent *entry;
}
dir[len] = '/';
- memcpy ((PTR) (dir + len + 1), (PTR) entry->d_name, d_namlen);
+ memcpy ((void *) (dir + len + 1), (void *) entry->d_name, d_namlen);
if (lstat (dir, &s) < 0)
{
/* Call a function on every element in a directory tree. */
-int myftw (const char *dir, __ftw_func_t func, int descriptors)
+int myftw (const char *dir,
+ int (*func) (const char *file,
+ struct stat *status,
+ int flag),
+ int descriptors)
{
DIR **dirs;
size_t len;
flag = FTW_F;
len = strlen (dir);
- memcpy ((PTR) buf, (PTR) dir, len + 1);
+ memcpy ((void *) buf, (void *) dir, len + 1);
retval = (*func) (buf, &s, flag);
#ifndef _MYFTW_H_
#define _MYFTW_H_
-int myftw (const char *dir, __ftw_func_t func, int descriptors);
+int myftw (const char *dir,
+ int (*func) (const char *file,
+ struct stat *status,
+ int flag),
+ int descriptors);
#endif _MYFTW_H_