diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-15 19:09:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-17 07:30:56 +0200 |
commit | ffe2b51a4919fb64a8debecb724d1e959abf343a (patch) | |
tree | 355b81f6858c10a7abd6329b4e9452edb8f8bf58 /soltools | |
parent | 38aae53a1004bb7393c81a98c7b370344613244e (diff) |
loplugin:external in Executable_mkdepend
...moving notdotdot to include.c (and some other decls to def.h)
Change-Id: I5d05988aca3daed978c2302380f69d1373081571
Reviewed-on: https://gerrit.libreoffice.org/60537
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'soltools')
-rw-r--r-- | soltools/mkdepend/def.h | 3 | ||||
-rw-r--r-- | soltools/mkdepend/include.c | 14 | ||||
-rw-r--r-- | soltools/mkdepend/main.c | 13 | ||||
-rw-r--r-- | soltools/mkdepend/parse.c | 10 | ||||
-rw-r--r-- | soltools/mkdepend/pr.c | 5 |
5 files changed, 22 insertions, 23 deletions
diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h index 009d32772d27..ed8b5faadcaa 100644 --- a/soltools/mkdepend/def.h +++ b/soltools/mkdepend/def.h @@ -189,8 +189,11 @@ char *append_slash(char *); extern char * directives[]; +extern struct inclist inclist[ MAXFILES ]; extern struct inclist * inclistp; +extern char *includedirs[ ]; + extern char * objprefix; extern char * objsuffix; diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c index 4fbc651f15a9..50fdcb9b9ee4 100644 --- a/soltools/mkdepend/include.c +++ b/soltools/mkdepend/include.c @@ -31,16 +31,14 @@ in this Software without prior written authorization from the X Consortium. #include "def.h" #include <string.h> -void remove_dotdot( char * ); -int isdot( char const * ); -int isdotdot( char const * ); -int issymbolic(char * dir, char * component); -int exists_path(struct IncludesCollection*, char*); +static void remove_dotdot( char * ); +static int isdot( char const * ); +static int isdotdot( char const * ); +static int issymbolic(char * dir, char * component); +static int exists_path(struct IncludesCollection*, char*); -extern struct inclist inclist[ MAXFILES ]; -extern char *includedirs[ ]; -extern char *notdotdot[ ]; +static char *notdotdot[ MAXDIRS ]; struct inclist *inc_path(char *file, char *include, boolean dot, struct IncludesCollection *incCollection) { diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index dcd86838f7da..a32e0dd38316 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -85,7 +85,7 @@ typedef _W64 int ssize_t; int _debugmask; #endif -char *ProgramName; +static char *ProgramName; #define OBJSUFFIX ".obj" #define INCLUDEDIR "." @@ -115,16 +115,15 @@ char *directives[] = { /******* function declarations ********/ /******* added by -Wall project *******/ -void redirect(char * makefile); +static void redirect(char * makefile); -struct inclist inclist[ MAXFILES ], - *inclistp = inclist; +struct inclist inclist[ MAXFILES ]; +struct inclist *inclistp = inclist; static struct symhash *maininclist = NULL; -char *filelist[ MAXFILES ]; +static char *filelist[ MAXFILES ]; char *includedirs[ MAXDIRS + 1 ]; -char *notdotdot[ MAXDIRS ]; char *objprefix = ""; char *objsuffix = OBJSUFFIX; static char *startat = "# DO NOT DELETE"; @@ -158,7 +157,7 @@ catch (int sig) #define sa_mask sv_mask #define sa_flags sv_flags #endif -struct sigaction sig_act; +static struct sigaction sig_act; #endif /* USGISH */ static boolean native_win_slashes = FALSE; diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c index 23aa67849b49..94533a49f6ce 100644 --- a/soltools/mkdepend/parse.c +++ b/soltools/mkdepend/parse.c @@ -30,13 +30,13 @@ in this Software without prior written authorization from the X Consortium. #include <ctype.h> #include "def.h" -char *hash_lookup( char *symbol, struct symhash *symbols ); -void hash_undefine( char *symbol, struct symhash *symbols ); -int gobble( struct filepointer *filep, struct inclist *file, +static char *hash_lookup( char *symbol, struct symhash *symbols ); +static void hash_undefine( char *symbol, struct symhash *symbols ); +static int gobble( struct filepointer *filep, struct inclist *file, struct inclist *file_red, struct symhash *symbols ); -int deftype ( char *line, struct filepointer *filep, struct inclist *file, +static int deftype ( char *line, struct filepointer *filep, struct inclist *file, int parse_it, struct symhash *symbols); -int zero_value(char const *exp, struct symhash *symbols); +static int zero_value(char const *exp, struct symhash *symbols); extern struct symhash *maininclist; diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c index 9fd88877a8fd..4fe0b4ada2fa 100644 --- a/soltools/mkdepend/pr.c +++ b/soltools/mkdepend/pr.c @@ -29,9 +29,8 @@ in this Software without prior written authorization from the X Consortium. #include "def.h" #include <string.h> -size_t pr( struct inclist *ip, char *file,char *base); +static size_t pr( struct inclist *ip, char *file,char *base); -extern struct inclist inclist[ MAXFILES ]; extern int width; void add_include(struct filepointer *filep, struct inclist *file, struct inclist *file_red, char *include, boolean dot, boolean failOK, struct IncludesCollection* incCollection, struct symhash *symbols) @@ -73,7 +72,7 @@ void add_include(struct filepointer *filep, struct inclist *file, struct inclist } } -void pr_dummy(struct inclist const *ip) +static void pr_dummy(struct inclist const *ip) { fwrite(ip->i_file, strlen(ip->i_file), 1, stdout); fwrite(" :\n\n", 4, 1, stdout); |