Use ANSI prototypes.

This commit is contained in:
Xin LI 2012-02-18 00:55:54 +00:00
parent 90de8d2a65
commit 3a12c0461b

View File

@ -226,9 +226,7 @@ mem1: free(sp);
}
static void
fts_load(sp, p)
FTS *sp;
FTSENT *p;
fts_load(FTS *sp, FTSENT *p)
{
size_t len;
char *cp;
@ -252,8 +250,7 @@ fts_load(sp, p)
}
int
fts_close(sp)
FTS *sp;
fts_close(FTS *sp)
{
FTSENT *freep, *p;
int saved_errno;
@ -307,8 +304,7 @@ fts_close(sp)
? p->fts_pathlen - 1 : p->fts_pathlen)
FTSENT *
fts_read(sp)
FTS *sp;
fts_read(FTS *sp)
{
FTSENT *p, *tmp;
int instr;
@ -501,10 +497,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
*/
/* ARGSUSED */
int
fts_set(sp, p, instr)
FTS *sp;
FTSENT *p;
int instr;
fts_set(FTS *sp, FTSENT *p, int instr)
{
if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
instr != FTS_NOINSTR && instr != FTS_SKIP) {
@ -516,9 +509,7 @@ fts_set(sp, p, instr)
}
FTSENT *
fts_children(sp, instr)
FTS *sp;
int instr;
fts_children(FTS *sp, int instr)
{
FTSENT *p;
int fd;
@ -628,9 +619,7 @@ fts_set_clientptr(FTS *sp, void *clientptr)
* been found, cutting the stat calls by about 2/3.
*/
static FTSENT *
fts_build(sp, type)
FTS *sp;
int type;
fts_build(FTS *sp, int type)
{
struct dirent *dp;
FTSENT *p, *head;
@ -876,10 +865,7 @@ mem1: saved_errno = errno;
}
static int
fts_stat(sp, p, follow)
FTS *sp;
FTSENT *p;
int follow;
fts_stat(FTS *sp, FTSENT *p, int follow)
{
FTSENT *t;
dev_t dev;
@ -974,10 +960,7 @@ fts_compar(const void *a, const void *b)
}
static FTSENT *
fts_sort(sp, head, nitems)
FTS *sp;
FTSENT *head;
size_t nitems;
fts_sort(FTS *sp, FTSENT *head, size_t nitems)
{
FTSENT **ap, *p;
@ -1006,10 +989,7 @@ fts_sort(sp, head, nitems)
}
static FTSENT *
fts_alloc(sp, name, namelen)
FTS *sp;
char *name;
size_t namelen;
fts_alloc(FTS *sp, char *name, size_t namelen)
{
FTSENT *p;
size_t len;
@ -1056,8 +1036,7 @@ fts_alloc(sp, name, namelen)
}
static void
fts_lfree(head)
FTSENT *head;
fts_lfree(FTSENT *head)
{
FTSENT *p;
@ -1075,9 +1054,7 @@ fts_lfree(head)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
fts_palloc(sp, more)
FTS *sp;
size_t more;
fts_palloc(FTS *sp, size_t more)
{
sp->fts_pathlen += more + 256;
@ -1090,9 +1067,7 @@ fts_palloc(sp, more)
* already returned.
*/
static void
fts_padjust(sp, head)
FTS *sp;
FTSENT *head;
fts_padjust(FTS *sp, FTSENT *head)
{
FTSENT *p;
char *addr = sp->fts_path;
@ -1133,11 +1108,7 @@ fts_maxarglen(argv)
* Assumes p->fts_dev and p->fts_ino are filled in.
*/
static int
fts_safe_changedir(sp, p, fd, path)
FTS *sp;
FTSENT *p;
int fd;
char *path;
fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
{
int ret, oerrno, newfd;
struct stat sb;