diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-24 13:07:36 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-24 15:30:53 +0000 |
commit | 0a0c70e05aab5f98f465e5155df3d40a9a423afe (patch) | |
tree | 08edf085b44be6c65c09e2527fbb579dbc2bd341 /soltools/mkdepend/main.c | |
parent | 290b7e0632921ca0c204eb91c8ebfd253813f137 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'soltools/mkdepend/main.c')
-rw-r--r-- | soltools/mkdepend/main.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index aef22ab06962..b8dde42ef9a0 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] == '\\')) { |