(fts_open): Use prototypes for COMPAR decl.

This commit is contained in:
Roland McGrath 1996-01-24 03:02:14 +00:00
parent 6d5cbf7b35
commit 8ebd0a71be
1 changed files with 8 additions and 8 deletions

View File

@ -90,7 +90,7 @@ FTS *
fts_open(argv, options, compar)
char * const *argv;
register int options;
int (*compar)();
int (*compar) __P((const FTSENT **, const FTSENT **));
{
register FTS *sp;
register FTSENT *p, *root;
@ -108,7 +108,7 @@ fts_open(argv, options, compar)
if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
return (NULL);
bzero(sp, sizeof(FTS));
sp->fts_compar = compar;
sp->fts_compar = (int (*) __P((const void *, const void *))) compar;
sp->fts_options = options;
/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
@ -333,7 +333,7 @@ fts_read(sp)
}
p->fts_info = FTS_DP;
return (p);
}
}
/* Rebuild if only read the names and now traversing. */
if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
@ -528,7 +528,7 @@ fts_children(sp, instr)
if (instr == FTS_NAMEONLY) {
sp->fts_options |= FTS_NAMEONLY;
instr = BNAMES;
} else
} else
instr = BCHILD;
/*
@ -700,7 +700,7 @@ mem1: saved_errno = errno;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
#ifdef DT_DIR
|| nlinks > 0 &&
|| nlinks > 0 &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN
#endif
) {
@ -790,7 +790,7 @@ fts_stat(sp, p, follow)
/* If user needs stat info, stat buffer already allocated. */
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
/*
* If doing a logical walk, or application requested FTS_FOLLOW, do
* a stat(2). If that fails, check for a non-existent symlink. If
@ -802,7 +802,7 @@ fts_stat(sp, p, follow)
if (!lstat(p->fts_accpath, sbp)) {
errno = 0;
return (FTS_SLNONE);
}
}
p->fts_errno = saved_errno;
goto err;
}
@ -935,7 +935,7 @@ fts_lfree(head)
* Allow essentially unlimited paths; find, rm, ls should all work on any tree.
* Most systems will allow creation of paths much longer than MAXPATHLEN, even
* though the kernel won't resolve them. Add the size (not just what's needed)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
fts_palloc(sp, more)