Always #include corresponding .h in .c files While doing this, remove declarations from header files where the corresponding definition is declared "static" in order to avoid build errors. Also re-order existing headers in ui-*.c so that the file-specific header always comes immediately after "cgit.h", helping with future consistency. Signed-off-by: John Keeping <john@keeping.me.uk>
John Keeping john@keeping.me.uk
Sat, 06 Apr 2013 11:37:59 +0100
22 files changed,
20 insertions(+),
8 deletions(-)
M
scan-tree.c
→
scan-tree.c
@@ -8,6 +8,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "scan-tree.h" #include "configfile.h" #include "html.h"
M
ui-clone.c
→
ui-clone.c
@@ -8,6 +8,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-clone.h" #include "html.h" #include "ui-shared.h"
M
ui-commit.c
→
ui-commit.c
@@ -7,6 +7,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-commit.h" #include "html.h" #include "ui-shared.h" #include "ui-diff.h"
M
ui-diff.h
→
ui-diff.h
@@ -3,9 +3,6 @@ #define UI_DIFF_H
extern void cgit_print_diff_ctrls(); -extern void cgit_print_diffstat(const unsigned char *old_sha1, - const unsigned char *new_sha1); - extern void cgit_print_diff(const char *new_hex, const char *old_hex, const char *prefix, int show_ctrls);
M
ui-patch.c
→
ui-patch.c
@@ -7,6 +7,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-patch.h" #include "html.h" #include "ui-shared.h"
M
ui-plain.c
→
ui-plain.c
@@ -8,6 +8,7 @@ */
#include <stdio.h> #include "cgit.h" +#include "ui-plain.h" #include "html.h" #include "ui-shared.h"
M
ui-repolist.c
→
ui-repolist.c
@@ -8,6 +8,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-repolist.h" #include "html.h" #include "ui-shared.h" #include <strings.h>
M
ui-snapshot.c
→
ui-snapshot.c
@@ -8,6 +8,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-snapshot.h" #include "html.h" #include "ui-shared.h"
M
ui-ssdiff.c
→
ui-ssdiff.c
@@ -1,8 +1,8 @@
#include "cgit.h" +#include "ui-ssdiff.h" #include "html.h" #include "ui-shared.h" #include "ui-diff.h" -#include "ui-ssdiff.h" extern int use_ssdiff;
M
ui-stats.c
→
ui-stats.c
@@ -1,7 +1,7 @@
#include "cgit.h" +#include "ui-stats.h" #include "html.h" #include "ui-shared.h" -#include "ui-stats.h" #ifdef NO_C99_FORMAT #define SZ_FMT "%u"
M
ui-summary.c
→
ui-summary.c
@@ -8,6 +8,7 @@ * (see COPYING for full license text)
*/ #include "cgit.h" +#include "ui-summary.h" #include "html.h" #include "ui-log.h" #include "ui-refs.h"