From 4cd9f67a2a4766d77b93818e99e0d5e97636bf85 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 18 Jun 1996 17:06:32 +0000 Subject: [PATCH] clean up CVS patchset: 642 CVS date: 1996/06/18 17:06:32 --- build/myftw.c | 15 ++++++++++----- build/myftw.h | 6 +++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build/myftw.c b/build/myftw.c index 2f6f469..fc8a3aa 100644 --- a/build/myftw.c +++ b/build/myftw.c @@ -19,7 +19,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -35,7 +34,9 @@ Cambridge, MA 02139, USA. */ 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; @@ -72,7 +73,7 @@ myftw_dir (DIR **dirs, int level, int descriptors, } 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) { @@ -151,7 +152,11 @@ myftw_dir (DIR **dirs, int level, int descriptors, /* 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; @@ -194,7 +199,7 @@ int myftw (const char *dir, __ftw_func_t func, int descriptors) 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); diff --git a/build/myftw.h b/build/myftw.h index d6f075b..bc9781b 100644 --- a/build/myftw.h +++ b/build/myftw.h @@ -3,6 +3,10 @@ #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_ -- 2.7.4