From d8e4c710eb9b56efde177bd5be5a9564548ff1d8 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 11 Jan 2004 19:25:56 +0000 Subject: [PATCH] collect all "extern bla" stuff in extern.h in order to get cross-file type checking. No bugs found. --- usr.sbin/mtree/compare.c | 3 --- usr.sbin/mtree/create.c | 6 ------ usr.sbin/mtree/extern.h | 8 ++++++++ usr.sbin/mtree/misc.c | 2 -- usr.sbin/mtree/verify.c | 5 ----- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 5b621f064555..bf4353c51855 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -61,9 +61,6 @@ __FBSDID("$FreeBSD$"); #include "mtree.h" #include "extern.h" -extern int uflag; -extern int lineno; - #define INDENTNAMELEN 8 #define LABEL \ if (!label++) { \ diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index 22f20bcae160..04e9a2ba1b93 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -64,12 +64,6 @@ __FBSDID("$FreeBSD$"); #define INDENTNAMELEN 15 #define MAXLINELEN 80 -extern int ftsoptions; -extern int dflag, iflag, nflag, sflag; -extern u_int keys; -extern char fullpath[MAXPATHLEN]; -extern int lineno; - static gid_t gid; static uid_t uid; static mode_t mode; diff --git a/usr.sbin/mtree/extern.h b/usr.sbin/mtree/extern.h index 8670bb15aea8..5f923441d7f7 100644 --- a/usr.sbin/mtree/extern.h +++ b/usr.sbin/mtree/extern.h @@ -49,3 +49,11 @@ int check_excludes(const char *, const char *); void init_excludes(void); void read_excludes_file(const char *); const char * ftype(u_int type); + +extern int ftsoptions; +extern u_int keys; +extern int lineno; +extern int dflag, eflag, iflag, nflag, qflag, rflag, sflag, uflag; +#ifdef MAXPATHLEN +extern char fullpath[MAXPATHLEN]; +#endif diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index b97032888154..cc211f025911 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -44,8 +44,6 @@ __FBSDID("$FreeBSD$"); #include "mtree.h" #include "extern.h" -extern int lineno; - typedef struct _key { const char *name; /* key name */ u_int val; /* value */ diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index 3f697f6cbaf0..7f2cf8dbe846 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -47,11 +47,6 @@ __FBSDID("$FreeBSD$"); #include "mtree.h" #include "extern.h" -extern int ftsoptions; -extern int dflag, eflag, qflag, rflag, sflag, uflag; -extern char fullpath[MAXPATHLEN]; -extern int lineno; - static NODE *root; static char path[MAXPATHLEN];