[Libreoffice-commits] core.git: soltools/mkdepend
Noel Grandin
noel at peralex.com
Tue Jun 24 08:31:14 PDT 2014
soltools/mkdepend/cppsetup.c | 15 +-
soltools/mkdepend/def.h | 18 +--
soltools/mkdepend/ifparser.c | 235 +++++++++++++++++++++----------------------
soltools/mkdepend/ifparser.h | 7 -
soltools/mkdepend/include.c | 38 ++----
soltools/mkdepend/main.c | 33 ++----
soltools/mkdepend/parse.c | 64 ++++-------
soltools/mkdepend/pr.c | 14 --
8 files changed, 186 insertions(+), 238 deletions(-)
New commits:
commit 0a0c70e05aab5f98f465e5155df3d40a9a423afe
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 24 13:07:36 2014 +0200
mkdepend: cleanup indentation and function declarations
to make it easier to read
Change-Id: Iff0fe055c12358edc1be335ec83d0855cc32f03c
Reviewed-on: https://gerrit.libreoffice.org/9877
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/soltools/mkdepend/cppsetup.c b/soltools/mkdepend/cppsetup.c
index 9f6dc63..3833530 100644
--- a/soltools/mkdepend/cppsetup.c
+++ b/soltools/mkdepend/cppsetup.c
@@ -187,20 +187,17 @@ _my_eval_variable (IfParser *ip, const char *var, int len)
if (!s)
return 0;
do {
- var = s;
- if (!isvarfirstletter(*var))
+ var = s;
+ if (!isvarfirstletter(*var))
break;
- s = _lookup_variable (var, strlen(var));
+ s = _lookup_variable (var, strlen(var));
} while (s);
return atoi(var);
}
-int cppsetup(line, filep, inc)
- char *line;
- struct filepointer *filep;
- struct inclist *inc;
+int cppsetup(char *line, struct filepointer *filep, struct inclist *inc)
{
IfParser ip;
struct _parse_data pd;
@@ -216,9 +213,9 @@ int cppsetup(line, filep, inc)
(void) ParseIfExpression (&ip, line, &val);
if (val)
- return IF;
+ return IF;
else
- return IFFALSE;
+ return IFFALSE;
}
#endif /* CPP */
diff --git a/soltools/mkdepend/def.h b/soltools/mkdepend/def.h
index 0515e42e..3ad3e16 100644
--- a/soltools/mkdepend/def.h
+++ b/soltools/mkdepend/def.h
@@ -125,15 +125,15 @@ struct symhash {
};
struct inclist {
- char *i_incstring; /* string from #include line */
- char *i_file; /* path name of the include file */
- struct inclist **i_list; /* list of files it itself includes */
- int i_listlen; /* length of i_list */
- boolean i_defchecked; /* whether defines have been checked */
- boolean i_notified; /* whether we have revealed includes */
- boolean i_marked; /* whether it's in the makefile */
- boolean i_searched; /* whether we have read this */
- boolean i_included_sym; /* whether #include SYMBOL was found */
+ char *i_incstring; /* string from #include line */
+ char *i_file; /* path name of the include file */
+ struct inclist **i_list; /* list of files it itself includes */
+ int i_listlen; /* length of i_list */
+ boolean i_defchecked; /* whether defines have been checked */
+ boolean i_notified; /* whether we have revealed includes */
+ boolean i_marked; /* whether it's in the makefile */
+ boolean i_searched; /* whether we have read this */
+ boolean i_included_sym; /* whether #include SYMBOL was found */
/* Can't use i_list if TRUE */
};
diff --git a/soltools/mkdepend/ifparser.c b/soltools/mkdepend/ifparser.c
index f9b4b66..d342aa0 100644
--- a/soltools/mkdepend/ifparser.c
+++ b/soltools/mkdepend/ifparser.c
@@ -123,66 +123,66 @@ parse_value (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '(':
- DO (cp = ParseIfExpression (g, cp + 1, valp));
- SKIPSPACE (cp);
- if (*cp != ')')
- return CALLFUNC(g, handle_error) (g, cp, ")");
+ DO (cp = ParseIfExpression (g, cp + 1, valp));
+ SKIPSPACE (cp);
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
- return cp + 1; /* skip the right paren */
+ return cp + 1; /* skip the right paren */
case '!':
- DO (cp = parse_value (g, cp + 1, valp));
- *valp = !(*valp);
- return cp;
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = !(*valp);
+ return cp;
case '-':
- DO (cp = parse_value (g, cp + 1, valp));
- *valp = -(*valp);
- return cp;
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = -(*valp);
+ return cp;
case '#':
- DO (cp = parse_variable (g, cp + 1, &var));
- SKIPSPACE (cp);
- if (*cp != '(')
- return CALLFUNC(g, handle_error) (g, cp, "(");
- do {
DO (cp = parse_variable (g, cp + 1, &var));
SKIPSPACE (cp);
- } while (*cp && *cp != ')');
- if (*cp != ')')
- return CALLFUNC(g, handle_error) (g, cp, ")");
- *valp = 1; /* XXX */
- return cp + 1;
+ if (*cp != '(')
+ return CALLFUNC(g, handle_error) (g, cp, "(");
+ do {
+ DO (cp = parse_variable (g, cp + 1, &var));
+ SKIPSPACE (cp);
+ } while (*cp && *cp != ')');
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = 1; /* XXX */
+ return cp + 1;
case 'd':
- if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
- int paren = 0;
- int len;
-
- cp += 7;
- SKIPSPACE (cp);
- if (*cp == '(') {
- paren = 1;
- cp++;
+ if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
+ int paren = 0;
+ int len;
+
+ cp += 7;
+ SKIPSPACE (cp);
+ if (*cp == '(') {
+ paren = 1;
+ cp++;
+ }
+ DO (cp = parse_variable (g, cp, &var));
+ len = (int)(cp - var);
+ SKIPSPACE (cp);
+ if (paren && *cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = (*(g->funcs.eval_defined)) (g, var, len);
+ return cp + paren; /* skip the right paren */
}
- DO (cp = parse_variable (g, cp, &var));
- len = (int)(cp - var);
- SKIPSPACE (cp);
- if (paren && *cp != ')')
- return CALLFUNC(g, handle_error) (g, cp, ")");
- *valp = (*(g->funcs.eval_defined)) (g, var, len);
- return cp + paren; /* skip the right paren */
- }
/* fall out */
}
if (isdigit(*cp)) {
- DO (cp = parse_number (g, cp, valp));
+ DO (cp = parse_number (g, cp, valp));
} else if (!isvarfirstletter(*cp))
- return CALLFUNC(g, handle_error) (g, cp, "variable or number");
+ return CALLFUNC(g, handle_error) (g, cp, "variable or number");
else {
- DO (cp = parse_variable (g, cp, &var));
- *valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
+ DO (cp = parse_variable (g, cp, &var));
+ *valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
}
return cp;
@@ -200,23 +200,23 @@ parse_product (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '*':
- DO (cp = parse_product (g, cp + 1, &rightval));
- *valp = (*valp * rightval);
- break;
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp * rightval);
+ break;
case '/':
- DO (cp = parse_product (g, cp + 1, &rightval));
+ DO (cp = parse_product (g, cp + 1, &rightval));
- /* Do nothing in the divide-by-zero case. */
- if (rightval) {
- *valp = (*valp / rightval);
- }
- break;
+ /* Do nothing in the divide-by-zero case. */
+ if (rightval) {
+ *valp = (*valp / rightval);
+ }
+ break;
case '%':
- DO (cp = parse_product (g, cp + 1, &rightval));
- *valp = (*valp % rightval);
- break;
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp % rightval);
+ break;
}
return cp;
}
@@ -232,14 +232,14 @@ parse_sum (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '+':
- DO (cp = parse_sum (g, cp + 1, &rightval));
- *valp = (*valp + rightval);
- break;
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp + rightval);
+ break;
case '-':
- DO (cp = parse_sum (g, cp + 1, &rightval));
- *valp = (*valp - rightval);
- break;
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp - rightval);
+ break;
}
return cp;
}
@@ -255,18 +255,18 @@ parse_shift (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '<':
- if (cp[1] == '<') {
- DO (cp = parse_shift (g, cp + 2, &rightval));
- *valp = (*valp << rightval);
- }
- break;
+ if (cp[1] == '<') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp << rightval);
+ }
+ break;
case '>':
- if (cp[1] == '>') {
- DO (cp = parse_shift (g, cp + 2, &rightval));
- *valp = (*valp >> rightval);
- }
- break;
+ if (cp[1] == '>') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp >> rightval);
+ }
+ break;
}
return cp;
}
@@ -282,24 +282,24 @@ parse_inequality (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '<':
- if (cp[1] == '=') {
- DO (cp = parse_inequality (g, cp + 2, &rightval));
- *valp = (*valp <= rightval);
- } else {
- DO (cp = parse_inequality (g, cp + 1, &rightval));
- *valp = (*valp < rightval);
- }
- break;
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp <= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp < rightval);
+ }
+ break;
case '>':
- if (cp[1] == '=') {
- DO (cp = parse_inequality (g, cp + 2, &rightval));
- *valp = (*valp >= rightval);
- } else {
- DO (cp = parse_inequality (g, cp + 1, &rightval));
- *valp = (*valp > rightval);
- }
- break;
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp >= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp > rightval);
+ }
+ break;
}
return cp;
}
@@ -315,18 +315,18 @@ parse_equality (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '=':
- if (cp[1] == '=')
- cp++;
- DO (cp = parse_equality (g, cp + 1, &rightval));
- *valp = (*valp == rightval);
- break;
+ if (cp[1] == '=')
+ cp++;
+ DO (cp = parse_equality (g, cp + 1, &rightval));
+ *valp = (*valp == rightval);
+ break;
case '!':
- if (cp[1] != '=')
+ if (cp[1] != '=')
+ break;
+ DO (cp = parse_equality (g, cp + 2, &rightval));
+ *valp = (*valp != rightval);
break;
- DO (cp = parse_equality (g, cp + 2, &rightval));
- *valp = (*valp != rightval);
- break;
}
return cp;
}
@@ -342,11 +342,11 @@ parse_band (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '&':
- if (cp[1] != '&') {
- DO (cp = parse_band (g, cp + 1, &rightval));
- *valp = (*valp & rightval);
- }
- break;
+ if (cp[1] != '&') {
+ DO (cp = parse_band (g, cp + 1, &rightval));
+ *valp = (*valp & rightval);
+ }
+ break;
}
return cp;
}
@@ -362,11 +362,11 @@ parse_bor (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '|':
- if (cp[1] != '|') {
- DO (cp = parse_bor (g, cp + 1, &rightval));
- *valp = (*valp | rightval);
- }
- break;
+ if (cp[1] != '|') {
+ DO (cp = parse_bor (g, cp + 1, &rightval));
+ *valp = (*valp | rightval);
+ }
+ break;
}
return cp;
}
@@ -382,11 +382,11 @@ parse_land (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '&':
- if (cp[1] != '&')
- return CALLFUNC(g, handle_error) (g, cp, "&&");
- DO (cp = parse_land (g, cp + 2, &rightval));
- *valp = (*valp && rightval);
- break;
+ if (cp[1] != '&')
+ return CALLFUNC(g, handle_error) (g, cp, "&&");
+ DO (cp = parse_land (g, cp + 2, &rightval));
+ *valp = (*valp && rightval);
+ break;
}
return cp;
}
@@ -402,11 +402,11 @@ parse_lor (IfParser *g, const char *cp, int *valp)
switch (*cp) {
case '|':
- if (cp[1] != '|')
- return CALLFUNC(g, handle_error) (g, cp, "||");
- DO (cp = parse_lor (g, cp + 2, &rightval));
- *valp = (*valp || rightval);
- break;
+ if (cp[1] != '|')
+ return CALLFUNC(g, handle_error) (g, cp, "||");
+ DO (cp = parse_lor (g, cp + 2, &rightval));
+ *valp = (*valp || rightval);
+ break;
}
return cp;
}
@@ -417,10 +417,7 @@ parse_lor (IfParser *g, const char *cp, int *valp)
****************************************************************************/
const char *
-ParseIfExpression (g, cp, valp)
- IfParser *g;
- const char *cp;
- int *valp;
+ParseIfExpression (IfParser *g, const char *cp, int *valp)
{
return parse_lor (g, cp, valp);
}
diff --git a/soltools/mkdepend/ifparser.h b/soltools/mkdepend/ifparser.h
index c404e43..97d7482 100644
--- a/soltools/mkdepend/ifparser.h
+++ b/soltools/mkdepend/ifparser.h
@@ -64,10 +64,9 @@ typedef int Bool;
typedef struct _if_parser {
struct { /* functions */
- const char *(*handle_error) (struct _if_parser *, const char *,
- const char *);
- int (*eval_variable) (struct _if_parser *, const char *, int);
- int (*eval_defined) (struct _if_parser *, const char *, int);
+ const char *(*handle_error) (struct _if_parser *, const char *, const char *);
+ int (*eval_variable) (struct _if_parser *, const char *, int);
+ int (*eval_defined) (struct _if_parser *, const char *, int);
} funcs;
char *data;
} IfParser;
diff --git a/soltools/mkdepend/include.c b/soltools/mkdepend/include.c
index 5b0a54a..f525272 100644
--- a/soltools/mkdepend/include.c
+++ b/soltools/mkdepend/include.c
@@ -38,14 +38,14 @@ int issymbolic(char * dir, char * component);
int exists_path(struct IncludesCollection*, char*);
-extern struct inclist inclist[ MAXFILES ],
- *inclistp;
+extern struct inclist inclist[ MAXFILES ],
+ *inclistp;
extern char *includedirs[ ];
extern char *notdotdot[ ];
extern boolean show_where_not;
extern boolean warn_multiple;
-struct inclist *inc_path(char *file, char *include, boolean dot, struct IncludesCollection* incCollection)
+struct inclist *inc_path(char *file, char *include, boolean dot, struct IncludesCollection *incCollection)
{
static char path[ BUFSIZ ];
char **pp, *p;
@@ -61,8 +61,8 @@ struct inclist *inc_path(char *file, char *include, boolean dot, struct Includes
for (ip = inclist; ip->i_file; ip++)
if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym)
{
- found = TRUE;
- break;
+ found = TRUE;
+ break;
}
/*
@@ -128,9 +128,7 @@ struct inclist *inc_path(char *file, char *include, boolean dot, struct Includes
return(ip);
}
-int exists_path(incCollection, path)
- struct IncludesCollection* incCollection;
- char* path;
+int exists_path(struct IncludesCollection *incCollection, char *path)
{
convert_slashes(path);
return call_IncludesCollection_exists(incCollection, path);
@@ -141,8 +139,7 @@ int exists_path(incCollection, path)
* Any of the 'x/..' sequences within the name can be eliminated.
* (but only if 'x' is not a symbolic link!!)
*/
-void remove_dotdot(path)
- char *path;
+void remove_dotdot(char *path)
{
char *end, *from, *to, **cp;
char *components[ MAXFILES ],
@@ -179,9 +176,9 @@ void remove_dotdot(path)
char **fp = cp + 2;
char **tp = cp;
- do
- *tp++ = *fp; /* move all the pointers down */
- while (*fp++);
+ do {
+ *tp++ = *fp; /* move all the pointers down */
+ } while (*fp++);
if (cp != components)
cp--; /* go back and check for nested ".." */
} else {
@@ -210,24 +207,21 @@ void remove_dotdot(path)
strcpy(path, newpath);
}
-int isdot(p)
- char *p;
+int isdot(char *p)
{
if(p && p[0] == '.' && p[1] == '\0')
return(TRUE);
return(FALSE);
}
-int isdotdot(p)
- char *p;
+int isdotdot(char *p)
{
if(p && p[0] == '.' && p[1] == '.' && p[2] == '\0')
return(TRUE);
return(FALSE);
}
-int issymbolic(dir, component)
- char *dir, *component;
+int issymbolic(char *dir, char *component)
{
#ifdef S_IFLNK
struct stat st;
@@ -251,8 +245,7 @@ int issymbolic(dir, component)
/*
* Add an include file to the list of those included by 'file'.
*/
-struct inclist *newinclude(newfile, incstring)
- char *newfile, *incstring;
+struct inclist *newinclude(char *newfile, char *incstring)
{
struct inclist *ip;
@@ -272,8 +265,7 @@ struct inclist *newinclude(newfile, incstring)
return(ip);
}
-void included_by(ip, newfile)
- struct inclist *ip, *newfile;
+void included_by(struct inclist *ip, struct inclist *newfile)
{
int i;
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c
index aef22ab..b8dde42 100644
--- a/soltools/mkdepend/main.c
+++ b/soltools/mkdepend/main.c
@@ -118,7 +118,7 @@ char *directives[] = {
void redirect(char * line, char * makefile );
struct inclist inclist[ MAXFILES ],
- *inclistp = inclist;
+ *inclistp = inclist;
struct symhash *maininclist = NULL;
@@ -472,8 +472,7 @@ int main(int argc, char **argv)
exit(0);
}
-struct filepointer *getfile(file)
- char *file;
+struct filepointer *getfile(char *file)
{
int fd;
struct filepointer *content;
@@ -521,15 +520,13 @@ struct filepointer *getfile(file)
return(content);
}
-void freefile(fp)
- struct filepointer *fp;
+void freefile(struct filepointer *fp)
{
free(fp->f_base);
free(fp);
}
-char *copy(str)
- char *str;
+char *copy(char *str)
{
char *p = (char *)malloc(strlen(str) + 1);
@@ -537,8 +534,7 @@ char *copy(str)
return(p);
}
-int match(str, list)
- char *str, **list;
+int match(char *str, char **list)
{
int i;
@@ -552,8 +548,7 @@ int match(str, list)
* Get the next line. We only return lines beginning with '#' since that
* is all this program is ever interested in.
*/
-char *get_line(filep)
- struct filepointer *filep;
+char *get_line(struct filepointer *filep)
{
char *p, /* walking pointer */
*eof, /* end of file pointer */
@@ -622,8 +617,7 @@ done:
* Strip the file name down to what we want to see in the Makefile.
* It will have objprefix and objsuffix around it.
*/
-char *base_name(file)
- char *file;
+char *base_name(char *file)
{
char *p;
@@ -644,8 +638,7 @@ char *base_name(file)
}
#if defined(USG) && !defined(CRAY) && !defined(SVR4)
-int rename (from, to)
- char *from, *to;
+int rename (char *from, char *to)
{
(void) unlink (to);
if (link (from, to) == 0) {
@@ -657,9 +650,7 @@ int rename (from, to)
}
#endif /* USGISH */
-void redirect(line, makefile)
- char *line,
- *makefile;
+void redirect(char *line, char *makefile)
{
FILE *fdout;
fdout = freopen(makefile, "wb", stdout); // binary mode please
@@ -771,8 +762,7 @@ void warning1(char *msg, ...)
#endif /* DEBUG_MKDEPEND */
}
-void convert_slashes(path)
- char* path;
+void convert_slashes(char *path)
{
#if defined (WNT)
/*
@@ -793,8 +783,7 @@ void convert_slashes(path)
#endif
}
-char* append_slash(path)
- char* path;
+char* append_slash(char *path)
{
char *new_string;
if ((path[strlen(path) - 1] == '/') || (path[strlen(path) - 1] == '\\')) {
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 5b1334f..0c53d01 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -162,10 +162,10 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis
return(-1);
}
-int gobble(filep, file, file_red, symbols)
- struct filepointer *filep;
- struct inclist *file, *file_red;
- struct symhash *symbols;
+int gobble(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
+ struct symhash *symbols)
{
char *line;
int type;
@@ -216,12 +216,7 @@ int gobble(filep, file, file_red, symbols)
/*
* Decide what type of # directive this line is.
*/
-int deftype (line, filep, file_red, file, parse_it, symbols)
- char *line;
- struct filepointer *filep;
- struct inclist *file_red, *file;
- int parse_it;
- struct symhash *symbols;
+int deftype (char *line, struct filepointer *filep, struct inclist *file_red, struct inclist *file, int parse_it, struct symhash *symbols)
{
char *p;
char *directive, savechar;
@@ -251,7 +246,7 @@ int deftype (line, filep, file_red, file, parse_it, symbols)
if (ret == ELIF && !parse_it)
{
while (*p == ' ' || *p == '\t')
- p++;
+ p++;
/*
* parse an expression.
*/
@@ -260,16 +255,16 @@ int deftype (line, filep, file_red, file, parse_it, symbols)
ret = zero_value(p, filep, file_red, symbols);
if (ret != IF)
{
- debug(0,("false...\n"));
- if (ret == IFFALSE)
- return(ELIFFALSE);
- else
- return(ELIFGUESSFALSE);
- }
+ debug(0,("false...\n"));
+ if (ret == IFFALSE)
+ return(ELIFFALSE);
+ else
+ return(ELIFGUESSFALSE);
+ }
else
{
- debug(0,("true...\n"));
- return(ELIF);
+ debug(0,("true...\n"));
+ return(ELIF);
}
}
@@ -368,8 +363,7 @@ int deftype (line, filep, file_red, file, parse_it, symbols)
*/
struct symhash *global_symbols = NULL;
-char * isdefined( symbol )
- char *symbol;
+char * isdefined( char *symbol )
{
return hash_lookup( symbol, global_symbols );
}
@@ -377,11 +371,7 @@ char * isdefined( symbol )
/*
* Return type based on if the #if expression evaluates to 0
*/
-int zero_value(exp, filep, file_red, symbols)
- char *exp;
- struct filepointer *filep;
- struct inclist *file_red;
- struct symhash *symbols;
+int zero_value(char *exp, struct filepointer *filep, struct inclist *file_red, struct symhash *symbols)
{
global_symbols = symbols; /* HACK! see above */
if (cppsetup(exp, filep, file_red))
@@ -390,9 +380,7 @@ int zero_value(exp, filep, file_red, symbols)
return(IF);
}
-void define( def, symbols )
- char *def;
- struct symhash **symbols;
+void define( char *def, struct symhash **symbols )
{
char *val;
@@ -423,8 +411,7 @@ static int hash( char *str )
return hashval & ( SYMHASHMEMBERS - 1 );
}
-struct symhash *hash_copy( symbols )
- struct symhash *symbols;
+struct symhash *hash_copy( struct symhash *symbols )
{
int i;
struct symhash *newsym;
@@ -459,8 +446,7 @@ struct symhash *hash_copy( symbols )
return newsym;
}
-void hash_free( symbols )
- struct symhash *symbols;
+void hash_free( struct symhash *symbols )
{
int i;
@@ -481,9 +467,7 @@ void hash_free( symbols )
free( symbols->s_pairs );
}
-void hash_define( name, val, symbols )
- char *name, *val;
- struct symhash **symbols;
+void hash_define( char *name, char *val, struct symhash **symbols )
{
int hashval;
struct pair *it;
@@ -537,9 +521,7 @@ void hash_define( name, val, symbols )
}
}
-char *hash_lookup( symbol, symbols )
- char *symbol;
- struct symhash *symbols;
+char *hash_lookup( char *symbol, struct symhash *symbols )
{
struct pair *it;
@@ -558,9 +540,7 @@ char *hash_lookup( symbol, symbols )
return NULL;
}
-void hash_undefine( symbol, symbols )
- char *symbol;
- struct symhash *symbols;
+void hash_undefine( char *symbol, struct symhash *symbols )
{
int hashval;
struct pair *it;
diff --git a/soltools/mkdepend/pr.c b/soltools/mkdepend/pr.c
index 497e72c..23a93f4 100644
--- a/soltools/mkdepend/pr.c
+++ b/soltools/mkdepend/pr.c
@@ -32,7 +32,7 @@ in this Software without prior written authorization from the X Consortium.
size_t pr( struct inclist *ip, char *file,char *base);
extern struct inclist inclist[ MAXFILES ],
- *inclistp;
+ *inclistp;
extern char *objprefix;
extern char *objsuffix;
extern int width;
@@ -85,9 +85,7 @@ void pr_dummy(struct inclist *ip)
fwrite(" :\n\n", 4, 1, stdout);
}
-void recursive_pr_dummy(head, file)
- struct inclist *head;
- char *file;
+void recursive_pr_dummy(struct inclist *head, char *file)
{
int i;
@@ -101,9 +99,7 @@ void recursive_pr_dummy(head, file)
}
-void recursive_pr_include(head, file, base)
- struct inclist *head;
- char *file, *base;
+void recursive_pr_include(struct inclist *head, char *file, char *base)
{
int i;
@@ -116,9 +112,7 @@ void recursive_pr_include(head, file, base)
recursive_pr_include(head->i_list[ i ], file, base);
}
-size_t pr(ip, file, base)
- struct inclist *ip;
- char *file, *base;
+size_t pr(struct inclist *ip, char *file, char *base)
{
size_t ret;
static char *lastfile;
More information about the Libreoffice-commits
mailing list