From 869e81e1cf115e835040d0ecadb6108880103abe Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 5 Mar 2007 22:13:33 +0000 Subject: This commit looks much more monumental than it is. Almost all just #include reordering and adding ones that were forgotten (noticed when trying to compile after reordering). * Updated the HACKING file to include information on #include usage. * print -> vprint in "making dir" function in pactest. --- src/pacman/add.c | 5 ++++- src/pacman/conf.c | 5 ++++- src/pacman/deptest.c | 4 +++- src/pacman/downloadprog.c | 4 +++- src/pacman/log.c | 2 ++ src/pacman/package.c | 5 ++++- src/pacman/pacman.c | 2 ++ src/pacman/query.c | 5 ++++- src/pacman/remove.c | 5 ++++- src/pacman/sync.c | 12 ++++++------ src/pacman/trans.c | 4 +++- src/pacman/upgrade.c | 7 ++++--- src/pacman/util.c | 5 +++-- src/util/testpkg.c | 2 ++ src/util/vercmp.c | 4 ++++ 15 files changed, 52 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/pacman/add.c b/src/pacman/add.c index 40a4bc2d..2adf8681 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,11 +28,12 @@ #include #include + /* pacman */ +#include "add.h" #include "log.h" #include "downloadprog.h" #include "trans.h" -#include "add.h" #include "conf.h" #include "util.h" diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 4c0381cf..a770fd47 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,12 +28,13 @@ #include #include + /* pacman */ +#include "conf.h" #include "util.h" #include "log.h" #include "sync.h" #include "downloadprog.h" -#include "conf.h" config_t *config_new() { diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c index f8bf513d..a7c913d9 100644 --- a/src/pacman/deptest.c +++ b/src/pacman/deptest.c @@ -25,14 +25,16 @@ #include #include #include + #include #include + /* pacman */ +#include "deptest.h" #include "util.h" #include "conf.h" #include "log.h" #include "sync.h" -#include "deptest.h" extern config_t *config; diff --git a/src/pacman/downloadprog.c b/src/pacman/downloadprog.c index 0d5a9b22..6ce8e2f5 100644 --- a/src/pacman/downloadprog.c +++ b/src/pacman/downloadprog.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -32,10 +33,11 @@ #include #include + /* pacman */ +#include "downloadprog.h" #include "util.h" #include "log.h" -#include "downloadprog.h" #include "conf.h" /* progress bar */ diff --git a/src/pacman/log.c b/src/pacman/log.c index 501f32d2..1b65e28d 100644 --- a/src/pacman/log.c +++ b/src/pacman/log.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -28,6 +29,7 @@ #include #include + /* pacman */ #include "log.h" #include "conf.h" diff --git a/src/pacman/package.c b/src/pacman/package.c index d5a3d04e..091ed9ed 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -28,10 +30,11 @@ #include #include + /* pacman */ +#include "package.h" #include "log.h" #include "util.h" -#include "package.h" /* Display the content of an installed package * diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index e2a5eec9..a26d34c7 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -44,6 +45,7 @@ #include #include + /* pacman */ #include "util.h" #include "log.h" diff --git a/src/pacman/query.c b/src/pacman/query.c index 2ce36ac4..2964a7cb 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -28,9 +30,10 @@ #include #include + /* pacman */ -#include "package.h" #include "query.h" +#include "package.h" #include "log.h" #include "conf.h" #include "sync.h" diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 0b48410c..9989f8e5 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include @@ -26,11 +28,12 @@ #include #include + /* pacman */ +#include "remove.h" #include "util.h" #include "log.h" #include "trans.h" -#include "remove.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 8db1d9ac..4245b964 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -19,16 +19,15 @@ * USA. */ -#if defined(__APPLE__) || defined(__OpenBSD__) -#include -#include -#endif - #include "config.h" + #include #include #include #include +#if defined(__APPLE__) || defined(__OpenBSD__) +#include +#endif #include #include #include @@ -41,13 +40,14 @@ #include /* downloadLastErrString */ /* TODO remove above download.h inclusion once we abstract more, and also * remove it from Makefile.am on the pacman side */ + /* pacman */ +#include "sync.h" #include "util.h" #include "log.h" #include "downloadprog.h" #include "package.h" #include "trans.h" -#include "sync.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/trans.c b/src/pacman/trans.c index 55b40413..23efadf6 100644 --- a/src/pacman/trans.c +++ b/src/pacman/trans.c @@ -20,6 +20,7 @@ */ #include "config.h" + #include #include #include @@ -30,10 +31,11 @@ #include #include + /* pacman */ +#include "trans.h" #include "util.h" #include "log.h" -#include "trans.h" #include "conf.h" #define LOG_STR_LEN 256 diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 5b803353..a4c94bb7 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -19,15 +19,16 @@ * USA. */ +#include "config.h" + #include -#include -#include #include #include + /* pacman */ -#include "add.h" #include "upgrade.h" +#include "add.h" #include "conf.h" extern config_t *config; diff --git a/src/pacman/util.c b/src/pacman/util.c index 96eb621e..76bbc189 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -19,16 +19,16 @@ * USA. */ +#include "config.h" + #if defined(__APPLE__) || defined(__OpenBSD__) #include #include #endif - #include #include #include -#include "config.h" #include #include #include @@ -44,6 +44,7 @@ #include #include + /* pacman */ #include "util.h" #include "conf.h" diff --git a/src/util/testpkg.c b/src/util/testpkg.c index fdee6708..a64e6b34 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -19,6 +19,8 @@ * USA. */ +#include "config.h" + #include #include #include diff --git a/src/util/vercmp.c b/src/util/vercmp.c index 75972532..cc951988 100644 --- a/src/util/vercmp.c +++ b/src/util/vercmp.c @@ -19,14 +19,18 @@ * USA. */ +#include "config.h" + #include #include #include #include #include +/* TODO this is probably not the best way to do this */ #ifndef PATH_MAX #define PATH_MAX 1024 #endif + #include int main(int argc, char *argv[]) -- cgit v1.2.3-24-g4f1b