diff options
author | obrien <obrien@FreeBSD.org> | 2002-02-01 01:32:19 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-02-01 01:32:19 +0000 |
commit | b45ff0fb569a631733b0fe8174ef6bd2e76d6523 (patch) | |
tree | 00d3cf581cd6698c5f1022d99c44cb5d6fa3bd12 /lib/libc/gen/fts-compat.c | |
parent | 821a3b87a652fabbbe0c63b418858e7bc7a1537b (diff) | |
download | FreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.zip FreeBSD-src-b45ff0fb569a631733b0fe8174ef6bd2e76d6523.tar.gz |
* Remove __P and convert to ANSI prototypes.
* Remove 'register'. (some functions had 7+ register functions...)
* Fix SCM ID's.
Diffstat (limited to 'lib/libc/gen/fts-compat.c')
-rw-r--r-- | lib/libc/gen/fts-compat.c | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index b42ec5a..6220dc6 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -34,12 +34,10 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -#if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; -#else -static char rcsid[] = "$FreeBSD$"; -#endif #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "namespace.h" #include <sys/types.h> @@ -55,16 +53,16 @@ static char rcsid[] = "$FreeBSD$"; #include <unistd.h> #include "un-namespace.h" -static FTSENT *fts_alloc __P((FTS *, char *, int)); -static FTSENT *fts_build __P((FTS *, int)); -static void fts_lfree __P((FTSENT *)); -static void fts_load __P((FTS *, FTSENT *)); -static size_t fts_maxarglen __P((char * const *)); -static void fts_padjust __P((FTS *, FTSENT *)); -static int fts_palloc __P((FTS *, size_t)); -static FTSENT *fts_sort __P((FTS *, FTSENT *, int)); -static u_short fts_stat __P((FTS *, FTSENT *, int)); -static int fts_safe_changedir __P((FTS *, FTSENT *, int, char *)); +static FTSENT *fts_alloc(FTS *, char *, int); +static FTSENT *fts_build(FTS *, int); +static void fts_lfree(FTSENT *); +static void fts_load(FTS *, FTSENT *); +static size_t fts_maxarglen(char * const *); +static void fts_padjust(FTS *, FTSENT *); +static int fts_palloc(FTS *, size_t); +static FTSENT *fts_sort(FTS *, FTSENT *, int); +static u_short fts_stat(FTS *, FTSENT *, int); +static int fts_safe_changedir(FTS *, FTSENT *, int, char *); #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) @@ -82,12 +80,12 @@ static int fts_safe_changedir __P((FTS *, FTSENT *, int, char *)); FTS * fts_open(argv, options, compar) char * const *argv; - register int options; - int (*compar) __P((const FTSENT **, const FTSENT **)); + int options; + int (*compar)(const FTSENT **, const FTSENT **); { - register FTS *sp; - register FTSENT *p, *root; - register int nitems; + FTS *sp; + FTSENT *p, *root; + int nitems; FTSENT *parent, *tmp; int len; @@ -193,10 +191,10 @@ mem1: free(sp); static void fts_load(sp, p) FTS *sp; - register FTSENT *p; + FTSENT *p; { - register int len; - register char *cp; + int len; + char *cp; /* * Load the stream structure for the next traversal. Since we don't @@ -220,7 +218,7 @@ int fts_close(sp) FTS *sp; { - register FTSENT *freep, *p; + FTSENT *freep, *p; int saved_errno; /* @@ -273,12 +271,12 @@ fts_close(sp) FTSENT * fts_read(sp) - register FTS *sp; + FTS *sp; { struct stat sb; - register FTSENT *p, *tmp; - register int instr; - register char *t; + FTSENT *p, *tmp; + int instr; + char *t; int saved_errno; /* If finished or unrecoverable error, return NULL. */ @@ -483,10 +481,10 @@ fts_set(sp, p, instr) FTSENT * fts_children(sp, instr) - register FTS *sp; + FTS *sp; int instr; { - register FTSENT *p; + FTSENT *p; int fd; if (instr != 0 && instr != FTS_NAMEONLY) { @@ -565,12 +563,12 @@ fts_children(sp, instr) */ static FTSENT * fts_build(sp, type) - register FTS *sp; + FTS *sp; int type; { - register struct dirent *dp; - register FTSENT *p, *head; - register int nitems; + struct dirent *dp; + FTSENT *p, *head; + int nitems; FTSENT *cur, *tail; DIR *dirp; void *oldaddr; @@ -829,12 +827,12 @@ mem1: saved_errno = errno; static u_short fts_stat(sp, p, follow) FTS *sp; - register FTSENT *p; + FTSENT *p; int follow; { - register FTSENT *t; - register dev_t dev; - register ino_t ino; + FTSENT *t; + dev_t dev; + ino_t ino; struct stat *sbp, sb; int saved_errno; @@ -913,9 +911,9 @@ static FTSENT * fts_sort(sp, head, nitems) FTS *sp; FTSENT *head; - register int nitems; + int nitems; { - register FTSENT **ap, *p; + FTSENT **ap, *p; /* * Construct an array of pointers to the structures and call qsort(3). @@ -945,9 +943,9 @@ static FTSENT * fts_alloc(sp, name, namelen) FTS *sp; char *name; - register int namelen; + int namelen; { - register FTSENT *p; + FTSENT *p; size_t len; /* @@ -982,9 +980,9 @@ fts_alloc(sp, name, namelen) static void fts_lfree(head) - register FTSENT *head; + FTSENT *head; { - register FTSENT *p; + FTSENT *p; /* Free a linked list of structures. */ while ((p = head)) { |