From 77db27331eb326615395fa59f3741424f85887bb Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 1 Sep 2016 00:33:20 +0100 Subject: Sort #includes in all source files. --- toxcore/DHT.c | 2 +- toxcore/LAN_discovery.c | 2 +- toxcore/Messenger.c | 2 +- toxcore/Messenger.h | 2 +- toxcore/TCP_client.h | 2 +- toxcore/TCP_server.h | 2 +- toxcore/assoc.c | 2 +- toxcore/crypto_core.h | 4 ++-- toxcore/friend_connection.h | 2 +- toxcore/list.h | 2 +- toxcore/net_crypto.c | 2 +- toxcore/net_crypto.h | 2 +- toxcore/network.h | 17 +++++++++-------- toxcore/onion_announce.c | 2 +- toxcore/onion_client.c | 2 +- toxcore/onion_client.h | 2 +- toxcore/ping.c | 2 +- toxcore/ping_array.c | 2 +- toxcore/util.h | 2 +- 19 files changed, 28 insertions(+), 27 deletions(-) (limited to 'toxcore') diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 538cd220..c9fa9939 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -41,9 +41,9 @@ #include "ping.h" -#include "network.h" #include "LAN_discovery.h" #include "misc_tools.h" +#include "network.h" #include "util.h" /* The timeout after which a node is discarded completely. */ diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index d430c3fe..ab28f612 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -30,9 +30,9 @@ /* Used for get_broadcast(). */ #ifdef __linux -#include #include #include +#include #endif #define MAX_INTERFACES 16 diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 0d3f10b5..81e17b7b 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -29,9 +29,9 @@ #include #endif -#include "logger.h" #include "Messenger.h" #include "assoc.h" +#include "logger.h" #include "network.h" #include "util.h" diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 75427965..a59f8c4e 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -26,8 +26,8 @@ #ifndef MESSENGER_H #define MESSENGER_H -#include "friend_requests.h" #include "friend_connection.h" +#include "friend_requests.h" #include "logger.h" #define MAX_NAME_LENGTH 128 diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 37ab30a7..44049698 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h @@ -24,8 +24,8 @@ #ifndef TCP_CLIENT_H #define TCP_CLIENT_H -#include "crypto_core.h" #include "TCP_server.h" +#include "crypto_core.h" #define TCP_CONNECTION_TIMEOUT 10 diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h index 3f6b18ae..908916ef 100644 --- a/toxcore/TCP_server.h +++ b/toxcore/TCP_server.h @@ -24,8 +24,8 @@ #define TCP_SERVER_H #include "crypto_core.h" -#include "onion.h" #include "list.h" +#include "onion.h" #ifdef TCP_SERVER_USE_EPOLL #include "sys/epoll.h" diff --git a/toxcore/assoc.c b/toxcore/assoc.c index 14f56fb3..3a033851 100644 --- a/toxcore/assoc.c +++ b/toxcore/assoc.c @@ -3,9 +3,9 @@ #include "config.h" #endif -#include "logger.h" #include "DHT.h" #include "assoc.h" +#include "logger.h" #include "ping.h" #include "LAN_discovery.h" diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index 1c9d7f94..2e89896b 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h @@ -30,12 +30,12 @@ #include #else #include -#include #include #include +#include #include #include -#include +#include #define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) /* I know */ #define sodium_memcmp(a, b, c) memcmp(a, b, c) diff --git a/toxcore/friend_connection.h b/toxcore/friend_connection.h index ecfc55ab..cbc6b9a1 100644 --- a/toxcore/friend_connection.h +++ b/toxcore/friend_connection.h @@ -25,9 +25,9 @@ #ifndef FRIEND_CONNECTION_H #define FRIEND_CONNECTION_H -#include "net_crypto.h" #include "DHT.h" #include "LAN_discovery.h" +#include "net_crypto.h" #include "onion_client.h" diff --git a/toxcore/list.h b/toxcore/list.h index b04177e1..aac72e81 100644 --- a/toxcore/list.h +++ b/toxcore/list.h @@ -26,8 +26,8 @@ #ifndef LIST_H #define LIST_H -#include #include +#include #include typedef struct { diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c index 8ae8acf8..63043494 100644 --- a/toxcore/net_crypto.c +++ b/toxcore/net_crypto.c @@ -27,9 +27,9 @@ #include "config.h" #endif +#include "math.h" #include "net_crypto.h" #include "util.h" -#include "math.h" static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_connection_id) { diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 9be71020..6a3ba40f 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h @@ -24,11 +24,11 @@ #ifndef NET_CRYPTO_H #define NET_CRYPTO_H +#include #include "DHT.h" #include "LAN_discovery.h" #include "TCP_connection.h" #include "logger.h" -#include #define CRYPTO_CONN_NO_CONNECTION 0 #define CRYPTO_CONN_COOKIE_REQUESTING 1 //send cookie request packets diff --git a/toxcore/network.h b/toxcore/network.h index 1cd1c999..5cc16523 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -25,15 +25,16 @@ #define NETWORK_H #ifdef PLAN9 -#include //Plan 9 requires this is imported first +#include // Plan 9 requires this is imported first +// Comment line here to avoid reordering by source code formatters. #include #endif #include "logger.h" -#include -#include #include +#include +#include #include #include @@ -42,8 +43,8 @@ //Windows XP #define WINVER 0x0501 #endif -#include #include +#include #include #ifndef IPV6_V6ONLY @@ -60,14 +61,14 @@ typedef short sa_family_t; #else // Linux includes -#include -#include -#include #include #include +#include +#include +#include +#include #include #include -#include #include typedef int sock_t; diff --git a/toxcore/onion_announce.c b/toxcore/onion_announce.c index 08492bb9..cebd56bb 100644 --- a/toxcore/onion_announce.c +++ b/toxcore/onion_announce.c @@ -23,8 +23,8 @@ #include "config.h" #endif -#include "onion_announce.h" #include "LAN_discovery.h" +#include "onion_announce.h" #include "util.h" #define PING_ID_TIMEOUT 20 diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index c6528c97..9d573240 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c @@ -24,9 +24,9 @@ #include "config.h" #endif +#include "LAN_discovery.h" #include "onion_client.h" #include "util.h" -#include "LAN_discovery.h" /* defines for the array size and timeout for onion announce packets. */ diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 91056a09..cdf2c16f 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h @@ -24,8 +24,8 @@ #ifndef ONION_CLIENT_H #define ONION_CLIENT_H -#include "onion_announce.h" #include "net_crypto.h" +#include "onion_announce.h" #include "ping_array.h" #define MAX_ONION_CLIENTS 8 diff --git a/toxcore/ping.c b/toxcore/ping.c index 8993c6b2..a0cfbf18 100644 --- a/toxcore/ping.c +++ b/toxcore/ping.c @@ -33,8 +33,8 @@ #include "ping.h" #include "network.h" -#include "util.h" #include "ping_array.h" +#include "util.h" #define PING_NUM_MAX 512 diff --git a/toxcore/ping_array.c b/toxcore/ping_array.c index 59eb7018..8c5d72e9 100644 --- a/toxcore/ping_array.c +++ b/toxcore/ping_array.c @@ -26,8 +26,8 @@ #include "config.h" #endif -#include "ping_array.h" #include "crypto_core.h" +#include "ping_array.h" #include "util.h" static void clear_entry(Ping_Array *array, uint32_t index) diff --git a/toxcore/util.h b/toxcore/util.h index bdbf7d3b..17b1a27b 100644 --- a/toxcore/util.h +++ b/toxcore/util.h @@ -25,9 +25,9 @@ #ifndef __UTIL_H__ #define __UTIL_H__ +#include #include #include -#include #define MIN(a,b) (((a)<(b))?(a):(b)) #define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } -- cgit v1.2.3