summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-07-12 13:40:41 +0200
committerJulian Andres Klode <jak@debian.org>2017-07-12 13:57:51 +0200
commit87274d0f22e1dfd99b2e5200e2fe75c1b804eac3 (patch)
treeba3dd14cf899c550ea2e79a696a323bfe8479322 /methods
parent78fcdd9629022c0c37742614351f5b02fed97607 (diff)
Reformat and sort all includes with clang-format
This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
Diffstat (limited to 'methods')
-rw-r--r--methods/aptmethod.h2
-rw-r--r--methods/basehttp.cc10
-rw-r--r--methods/basehttp.h8
-rw-r--r--methods/cdrom.cc4
-rw-r--r--methods/connect.cc20
-rw-r--r--methods/connect.h2
-rw-r--r--methods/copy.cc8
-rw-r--r--methods/curl.cc15
-rw-r--r--methods/curl.h6
-rw-r--r--methods/file.cc4
-rw-r--r--methods/ftp.cc20
-rw-r--r--methods/ftp.h2
-rw-r--r--methods/gpgv.cc10
-rw-r--r--methods/http.cc16
-rw-r--r--methods/http_main.cc2
-rw-r--r--methods/mirror.cc20
-rw-r--r--methods/rfc2553emu.cc6
-rw-r--r--methods/rfc2553emu.h2
-rw-r--r--methods/rred.cc14
-rw-r--r--methods/rsh.cc12
-rw-r--r--methods/store.cc8
21 files changed, 95 insertions, 96 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h
index 30ef134c8..04858e29d 100644
--- a/methods/aptmethod.h
+++ b/methods/aptmethod.h
@@ -11,9 +11,9 @@
#include <string>
#include <vector>
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/stat.h>
#include <unistd.h>
#include <apti18n.h>
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index a2f1a6e55..c3d570c83 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -15,6 +15,11 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
+#include <iostream>
+#include <limits>
+#include <map>
+#include <string>
+#include <vector>
#include <ctype.h>
#include <signal.h>
#include <stdio.h>
@@ -23,11 +28,6 @@
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
-#include <iostream>
-#include <limits>
-#include <map>
-#include <string>
-#include <vector>
#include "basehttp.h"
diff --git a/methods/basehttp.h b/methods/basehttp.h
index 41a9a4306..7000e7b89 100644
--- a/methods/basehttp.h
+++ b/methods/basehttp.h
@@ -11,14 +11,14 @@
#ifndef APT_SERVER_H
#define APT_SERVER_H
-#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
#include "aptmethod.h"
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
-#include <time.h>
#include <iostream>
-#include <string>
#include <memory>
+#include <string>
+#include <time.h>
using std::cout;
using std::endl;
diff --git a/methods/cdrom.cc b/methods/cdrom.cc
index 87a58e948..8b7587fe5 100644
--- a/methods/cdrom.cc
+++ b/methods/cdrom.cc
@@ -12,11 +12,11 @@
#include <apt-pkg/cdrom.h>
#include <apt-pkg/cdromutl.h>
-#include <apt-pkg/error.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/hashes.h>
+#include <apt-pkg/strutl.h>
#include "aptmethod.h"
diff --git a/methods/connect.cc b/methods/connect.cc
index 182af48ae..949cd3f99 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -13,29 +13,29 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/acquire-method.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/srvrec.h>
+#include <apt-pkg/strutl.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#include <stdio.h>
-#include <errno.h>
-#include <unistd.h>
+#include <set>
#include <sstream>
+#include <string>
+#include <errno.h>
+#include <stdio.h>
#include <string.h>
-#include<set>
-#include<string>
+#include <unistd.h>
// Internet stuff
+#include <netdb.h>
+#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
-#include <arpa/inet.h>
-#include <netdb.h>
#include "aptmethod.h"
#include "connect.h"
diff --git a/methods/connect.h b/methods/connect.h
index 4456d660d..817ebf765 100644
--- a/methods/connect.h
+++ b/methods/connect.h
@@ -11,8 +11,8 @@
#define CONNECT_H
#include <memory>
-#include <stddef.h>
#include <string>
+#include <stddef.h>
class aptMethod;
diff --git a/methods/copy.cc b/methods/copy.cc
index 810fc2f38..fd4786ede 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -11,12 +11,12 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/strutl.h>
+#include "aptmethod.h"
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
-#include <apt-pkg/configuration.h>
-#include "aptmethod.h"
+#include <apt-pkg/strutl.h>
#include <string>
#include <sys/stat.h>
diff --git a/methods/curl.cc b/methods/curl.cc
index ac3f77ab6..dfdd3b06b 100644
--- a/methods/curl.cc
+++ b/methods/curl.cc
@@ -12,27 +12,26 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
-#include <apt-pkg/netrc.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/macros.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/netrc.h>
#include <apt-pkg/proxy.h>
+#include <apt-pkg/strutl.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
#include <array>
#include <iostream>
#include <sstream>
-
#include "curl.h"
#include <apti18n.h>
diff --git a/methods/curl.h b/methods/curl.h
index fbbf34501..d352dc52a 100644
--- a/methods/curl.h
+++ b/methods/curl.h
@@ -11,11 +11,11 @@
#ifndef APT_HTTPS_H
#define APT_HTTPS_H
-#include <curl/curl.h>
#include <iostream>
-#include <stddef.h>
-#include <string>
#include <memory>
+#include <string>
+#include <curl/curl.h>
+#include <stddef.h>
#include "basehttp.h"
diff --git a/methods/file.cc b/methods/file.cc
index 5cbf1924e..6111329d5 100644
--- a/methods/file.cc
+++ b/methods/file.cc
@@ -15,12 +15,12 @@
// Include Files /*{{{*/
#include <config.h>
+#include "aptmethod.h"
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/hashes.h>
#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
#include <apt-pkg/strutl.h>
-#include "aptmethod.h"
#include <string>
#include <sys/stat.h>
diff --git a/methods/ftp.cc b/methods/ftp.cc
index f4986f648..9bfe72bc6 100644
--- a/methods/ftp.cc
+++ b/methods/ftp.cc
@@ -17,33 +17,33 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/netrc.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
+#include <iostream>
#include <ctype.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <iostream>
// Internet stuff
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <netdb.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
-#include "rfc2553emu.h"
#include "connect.h"
#include "ftp.h"
+#include "rfc2553emu.h"
#include <apti18n.h>
/*}}}*/
diff --git a/methods/ftp.h b/methods/ftp.h
index 5b23dba41..67d00d9f1 100644
--- a/methods/ftp.h
+++ b/methods/ftp.h
@@ -14,10 +14,10 @@
#include "connect.h"
#include <apt-pkg/strutl.h>
+#include <string>
#include <sys/socket.h>
#include <sys/types.h>
#include <time.h>
-#include <string>
class FTPConn
{
diff --git a/methods/gpgv.cc b/methods/gpgv.cc
index 51c268d02..8de15c48a 100644
--- a/methods/gpgv.cc
+++ b/methods/gpgv.cc
@@ -1,11 +1,11 @@
#include <config.h>
+#include "aptmethod.h"
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/gpgv.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
-#include "aptmethod.h"
#include <ctype.h>
#include <errno.h>
@@ -16,11 +16,11 @@
#include <sys/wait.h>
#include <unistd.h>
-#include <array>
#include <algorithm>
-#include <sstream>
-#include <iterator>
+#include <array>
#include <iostream>
+#include <iterator>
+#include <sstream>
#include <string>
#include <vector>
diff --git a/methods/http.cc b/methods/http.cc
index 0f347e700..9f01d15b3 100644
--- a/methods/http.cc
+++ b/methods/http.cc
@@ -19,26 +19,26 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/netrc.h>
-#include <apt-pkg/strutl.h>
#include <apt-pkg/proxy.h>
+#include <apt-pkg/strutl.h>
+#include <cstring>
+#include <iostream>
+#include <sstream>
+#include <arpa/inet.h>
+#include <errno.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
-#include <cstring>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <arpa/inet.h>
-#include <iostream>
-#include <sstream>
#include "config.h"
#include "connect.h"
diff --git a/methods/http_main.cc b/methods/http_main.cc
index 90a0450e2..792b5e22f 100644
--- a/methods/http_main.cc
+++ b/methods/http_main.cc
@@ -1,6 +1,6 @@
#include <config.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <signal.h>
#include "http.h"
diff --git a/methods/mirror.cc b/methods/mirror.cc
index 5047463d1..b0da5c530 100644
--- a/methods/mirror.cc
+++ b/methods/mirror.cc
@@ -10,35 +10,35 @@
// Include Files /*{{{*/
#include <config.h>
-#include <apt-pkg/aptconfiguration.h>
-#include <apt-pkg/fileutl.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire.h>
-#include <apt-pkg/error.h>
-#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/sourcelist.h>
#include <apt-pkg/strutl.h>
#include <algorithm>
-#include <iostream>
#include <fstream>
+#include <iostream>
+#include <dirent.h>
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/utsname.h>
-#include <dirent.h>
-#include <fcntl.h>
+#include <unistd.h>
using namespace std;
-#include<sstream>
+#include <sstream>
-#include "mirror.h"
#include "http.h"
+#include "mirror.h"
#include <apti18n.h>
/*}}}*/
diff --git a/methods/rfc2553emu.cc b/methods/rfc2553emu.cc
index 372882769..13f79391a 100644
--- a/methods/rfc2553emu.cc
+++ b/methods/rfc2553emu.cc
@@ -16,12 +16,12 @@
/*}}}*/
#include <config.h>
-#include <stdlib.h>
+#include "rfc2553emu.h"
#include <arpa/inet.h>
#include <netinet/in.h>
-#include <string.h>
#include <stdio.h>
-#include "rfc2553emu.h"
+#include <stdlib.h>
+#include <string.h>
#ifndef HAVE_GETADDRINFO
// getaddrinfo - Resolve a hostname /*{{{*/
diff --git a/methods/rfc2553emu.h b/methods/rfc2553emu.h
index ad7ddf48a..462bfe26f 100644
--- a/methods/rfc2553emu.h
+++ b/methods/rfc2553emu.h
@@ -23,8 +23,8 @@
#define RFC2553EMU_H
#include <netdb.h>
-#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/types.h>
// Autosense getaddrinfo
#if defined(AI_PASSIVE) && defined(EAI_NONAME)
diff --git a/methods/rred.cc b/methods/rred.cc
index 2e5008d46..3a3b20286 100644
--- a/methods/rred.cc
+++ b/methods/rred.cc
@@ -7,19 +7,19 @@
#include <config.h>
-#include <apt-pkg/init.h>
-#include <apt-pkg/fileutl.h>
+#include "aptmethod.h"
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
-#include <apt-pkg/configuration.h>
-#include "aptmethod.h"
+#include <apt-pkg/init.h>
+#include <apt-pkg/strutl.h>
-#include <stddef.h>
#include <iostream>
-#include <string>
#include <list>
+#include <string>
#include <vector>
+#include <stddef.h>
#include <assert.h>
#include <errno.h>
diff --git a/methods/rsh.cc b/methods/rsh.cc
index 7b8af6f9b..69a51a13d 100644
--- a/methods/rsh.cc
+++ b/methods/rsh.cc
@@ -13,22 +13,22 @@
// Include Files /*{{{*/
#include <config.h>
+#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
-#include <apt-pkg/configuration.h>
#include <apt-pkg/strutl.h>
+#include "rsh.h"
+#include <errno.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <unistd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-#include "rsh.h"
#include <apti18n.h>
/*}}}*/
diff --git a/methods/store.cc b/methods/store.cc
index 1faaa4fb4..d54a14397 100644
--- a/methods/store.cc
+++ b/methods/store.cc
@@ -13,19 +13,19 @@
// Include Files /*{{{*/
#include <config.h>
+#include "aptmethod.h"
+#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/hashes.h>
#include <apt-pkg/strutl.h>
-#include <apt-pkg/aptconfiguration.h>
-#include "aptmethod.h"
+#include <string>
+#include <vector>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <string>
-#include <vector>
#include <apti18n.h>
/*}}}*/