diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-01 00:33:20 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-01 16:35:46 +0100 |
commit | 77db27331eb326615395fa59f3741424f85887bb (patch) | |
tree | 233270b558c30f9a045e30e09c2d5681c800a139 | |
parent | ad135181531e567255c314593984d16cdb839eba (diff) |
Sort #includes in all source files.
54 files changed, 123 insertions, 122 deletions
diff --git a/auto_tests/TCP_test.c b/auto_tests/TCP_test.c index 2721fbd2..4c26926f 100644 --- a/auto_tests/TCP_test.c +++ b/auto_tests/TCP_test.c | |||
@@ -2,15 +2,15 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <sys/types.h> | ||
6 | #include <stdint.h> | ||
7 | #include <string.h> | ||
8 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | #include "../toxcore/TCP_server.h" | ||
13 | #include "../toxcore/TCP_client.h" | 12 | #include "../toxcore/TCP_client.h" |
13 | #include "../toxcore/TCP_server.h" | ||
14 | 14 | ||
15 | #include "../toxcore/util.h" | 15 | #include "../toxcore/util.h" |
16 | 16 | ||
diff --git a/auto_tests/assoc_test.c b/auto_tests/assoc_test.c index 05c8d2f3..e9f5207f 100644 --- a/auto_tests/assoc_test.c +++ b/auto_tests/assoc_test.c | |||
@@ -7,9 +7,9 @@ | |||
7 | #include "../toxcore/assoc.h" | 7 | #include "../toxcore/assoc.h" |
8 | #include "../toxcore/util.h" | 8 | #include "../toxcore/util.h" |
9 | 9 | ||
10 | #include <sys/types.h> | ||
11 | #include <stdint.h> | 10 | #include <stdint.h> |
12 | #include <string.h> | 11 | #include <string.h> |
12 | #include <sys/types.h> | ||
13 | 13 | ||
14 | #include <check.h> | 14 | #include <check.h> |
15 | 15 | ||
diff --git a/auto_tests/crypto_test.c b/auto_tests/crypto_test.c index e7201a34..eeb99567 100644 --- a/auto_tests/crypto_test.c +++ b/auto_tests/crypto_test.c | |||
@@ -2,13 +2,13 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "../toxcore/net_crypto.h" | ||
6 | #include <sys/types.h> | ||
7 | #include <stdint.h> | ||
8 | #include <string.h> | ||
9 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
10 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
11 | #include <time.h> | 10 | #include <time.h> |
11 | #include "../toxcore/net_crypto.h" | ||
12 | 12 | ||
13 | #include "helpers.h" | 13 | #include "helpers.h" |
14 | 14 | ||
diff --git a/auto_tests/dht_test.c b/auto_tests/dht_test.c index b5d979f4..92209e7a 100644 --- a/auto_tests/dht_test.c +++ b/auto_tests/dht_test.c | |||
@@ -5,8 +5,8 @@ | |||
5 | #include <sys/param.h> | 5 | #include <sys/param.h> |
6 | #include <time.h> | 6 | #include <time.h> |
7 | 7 | ||
8 | #include "../toxcore/tox.h" | ||
9 | #include "../toxcore/DHT.c" | 8 | #include "../toxcore/DHT.c" |
9 | #include "../toxcore/tox.h" | ||
10 | 10 | ||
11 | #include "helpers.h" | 11 | #include "helpers.h" |
12 | 12 | ||
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c index d27f7d6b..99a5792e 100644 --- a/auto_tests/encryptsave_test.c +++ b/auto_tests/encryptsave_test.c | |||
@@ -2,19 +2,19 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <sys/types.h> | ||
6 | #include <stdint.h> | ||
7 | #include <string.h> | ||
8 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | #include "helpers.h" | 12 | #include "helpers.h" |
13 | 13 | ||
14 | #include "../toxcore/tox.h" | 14 | #include "../toxcore/tox.h" |
15 | 15 | ||
16 | #include "../toxencryptsave/toxencryptsave.h" | ||
17 | #include "../toxcore/crypto_core.h" | 16 | #include "../toxcore/crypto_core.h" |
17 | #include "../toxencryptsave/toxencryptsave.h" | ||
18 | #ifdef VANILLA_NACL | 18 | #ifdef VANILLA_NACL |
19 | #include "../toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h" | 19 | #include "../toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h" |
20 | #endif | 20 | #endif |
diff --git a/auto_tests/messenger_test.c b/auto_tests/messenger_test.c index b8559b17..2407574e 100644 --- a/auto_tests/messenger_test.c +++ b/auto_tests/messenger_test.c | |||
@@ -14,12 +14,12 @@ | |||
14 | #include "config.h" | 14 | #include "config.h" |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #include "../testing/misc_tools.c" // hex_string_to_bin | 17 | #include <check.h> |
18 | #include "../toxcore/Messenger.h" | ||
19 | #include <sys/types.h> | ||
20 | #include <stdint.h> | 18 | #include <stdint.h> |
21 | #include <string.h> | 19 | #include <string.h> |
22 | #include <check.h> | 20 | #include <sys/types.h> |
21 | #include "../testing/misc_tools.c" // hex_string_to_bin | ||
22 | #include "../toxcore/Messenger.h" | ||
23 | 23 | ||
24 | #include "helpers.h" | 24 | #include "helpers.h" |
25 | 25 | ||
diff --git a/auto_tests/network_test.c b/auto_tests/network_test.c index b88b0e8c..b5d8b33e 100644 --- a/auto_tests/network_test.c +++ b/auto_tests/network_test.c | |||
@@ -2,11 +2,11 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <sys/types.h> | ||
6 | #include <stdint.h> | ||
7 | #include <string.h> | ||
8 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | #include "../toxcore/network.h" | 12 | #include "../toxcore/network.h" |
diff --git a/auto_tests/onion_test.c b/auto_tests/onion_test.c index fe764517..b12c6a3f 100644 --- a/auto_tests/onion_test.c +++ b/auto_tests/onion_test.c | |||
@@ -2,11 +2,11 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <sys/types.h> | ||
6 | #include <stdint.h> | ||
7 | #include <string.h> | ||
8 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | #include "../toxcore/onion.h" | 12 | #include "../toxcore/onion.h" |
diff --git a/auto_tests/skeleton_test.c b/auto_tests/skeleton_test.c index 27c9123a..8d3ec3bb 100644 --- a/auto_tests/skeleton_test.c +++ b/auto_tests/skeleton_test.c | |||
@@ -2,11 +2,11 @@ | |||
2 | #include "config.h" | 2 | #include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <sys/types.h> | ||
6 | #include <stdint.h> | ||
7 | #include <string.h> | ||
8 | #include <check.h> | 5 | #include <check.h> |
6 | #include <stdint.h> | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <string.h> | ||
9 | #include <sys/types.h> | ||
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | #include "helpers.h" | 12 | #include "helpers.h" |
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index a8fba35d..b2dc0c17 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -14,13 +14,13 @@ | |||
14 | #include "config.h" | 14 | #include "config.h" |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #include <sys/param.h> | 17 | #include <check.h> |
18 | #include <sys/types.h> | ||
19 | #include <stdint.h> | 18 | #include <stdint.h> |
20 | #include <string.h> | ||
21 | #include <stdio.h> | 19 | #include <stdio.h> |
22 | #include <check.h> | ||
23 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | #include <string.h> | ||
22 | #include <sys/param.h> | ||
23 | #include <sys/types.h> | ||
24 | #include <time.h> | 24 | #include <time.h> |
25 | 25 | ||
26 | #include "../toxcore/tox.h" | 26 | #include "../toxcore/tox.h" |
diff --git a/auto_tests/toxav_basic_test.c b/auto_tests/toxav_basic_test.c index 701cf841..971c1d83 100644 --- a/auto_tests/toxav_basic_test.c +++ b/auto_tests/toxav_basic_test.c | |||
@@ -12,20 +12,20 @@ | |||
12 | # include "helpers.h" | 12 | # include "helpers.h" |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include <sys/types.h> | ||
16 | #include <stdint.h> | 15 | #include <stdint.h> |
17 | #include <string.h> | ||
18 | #include <stdio.h> | 16 | #include <stdio.h> |
19 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | #include <string.h> | ||
19 | #include <sys/types.h> | ||
20 | #include <time.h> | 20 | #include <time.h> |
21 | 21 | ||
22 | #include <vpx/vpx_image.h> | 22 | #include <vpx/vpx_image.h> |
23 | 23 | ||
24 | #include "../toxav/toxav.h" | ||
25 | #include "../toxcore/crypto_core.h" | ||
26 | #include "../toxcore/logger.h" | ||
24 | #include "../toxcore/tox.h" | 27 | #include "../toxcore/tox.h" |
25 | #include "../toxcore/util.h" | 28 | #include "../toxcore/util.h" |
26 | #include "../toxcore/logger.h" | ||
27 | #include "../toxcore/crypto_core.h" | ||
28 | #include "../toxav/toxav.h" | ||
29 | 29 | ||
30 | 30 | ||
31 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | 31 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) |
diff --git a/auto_tests/toxav_many_test.c b/auto_tests/toxav_many_test.c index 24d2ae6e..e3476512 100644 --- a/auto_tests/toxav_many_test.c +++ b/auto_tests/toxav_many_test.c | |||
@@ -12,26 +12,26 @@ | |||
12 | # include "helpers.h" | 12 | # include "helpers.h" |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include <sys/types.h> | ||
16 | #include <stdint.h> | 15 | #include <stdint.h> |
17 | #include <string.h> | ||
18 | #include <stdio.h> | 16 | #include <stdio.h> |
19 | #include <stdlib.h> | 17 | #include <stdlib.h> |
18 | #include <string.h> | ||
19 | #include <sys/types.h> | ||
20 | #include <time.h> | 20 | #include <time.h> |
21 | 21 | ||
22 | #include <vpx/vpx_image.h> | 22 | #include <vpx/vpx_image.h> |
23 | 23 | ||
24 | #include "../toxav/toxav.h" | ||
25 | #include "../toxcore/crypto_core.h" | ||
26 | #include "../toxcore/logger.h" | ||
24 | #include "../toxcore/tox.h" | 27 | #include "../toxcore/tox.h" |
25 | #include "../toxcore/util.h" | 28 | #include "../toxcore/util.h" |
26 | #include "../toxcore/logger.h" | ||
27 | #include "../toxcore/crypto_core.h" | ||
28 | #include "../toxav/toxav.h" | ||
29 | 29 | ||
30 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | 30 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) |
31 | #define c_sleep(x) Sleep(1*x) | 31 | #define c_sleep(x) Sleep(1*x) |
32 | #else | 32 | #else |
33 | #include <unistd.h> | ||
34 | #include <pthread.h> | 33 | #include <pthread.h> |
34 | #include <unistd.h> | ||
35 | #define c_sleep(x) usleep(1000*x) | 35 | #define c_sleep(x) usleep(1000*x) |
36 | #endif | 36 | #endif |
37 | 37 | ||
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index 5ce8e40d..b67dd100 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -50,8 +50,8 @@ | |||
50 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | 50 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) |
51 | #define c_sleep(x) Sleep(1*x) | 51 | #define c_sleep(x) Sleep(1*x) |
52 | #else | 52 | #else |
53 | #include <unistd.h> | ||
54 | #include <arpa/inet.h> | 53 | #include <arpa/inet.h> |
54 | #include <unistd.h> | ||
55 | #define c_sleep(x) usleep(1000*x) | 55 | #define c_sleep(x) usleep(1000*x) |
56 | #endif | 56 | #endif |
57 | 57 | ||
diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index 29924ae4..dc0a251c 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | #include <string.h> | 31 | #include <string.h> |
32 | #include <string.h> | ||
33 | 32 | ||
34 | #include <libconfig.h> | 33 | #include <libconfig.h> |
35 | 34 | ||
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index 72d4572c..2ae60f76 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c | |||
@@ -33,8 +33,8 @@ | |||
33 | 33 | ||
34 | // toxcore | 34 | // toxcore |
35 | #include "../../../toxcore/LAN_discovery.h" | 35 | #include "../../../toxcore/LAN_discovery.h" |
36 | #include "../../../toxcore/onion_announce.h" | ||
37 | #include "../../../toxcore/TCP_server.h" | 36 | #include "../../../toxcore/TCP_server.h" |
37 | #include "../../../toxcore/onion_announce.h" | ||
38 | #include "../../../toxcore/util.h" | 38 | #include "../../../toxcore/util.h" |
39 | 39 | ||
40 | // misc | 40 | // misc |
diff --git a/testing/DHT_test.c b/testing/DHT_test.c index cd3ff5f7..e782d765 100644 --- a/testing/DHT_test.c +++ b/testing/DHT_test.c | |||
@@ -44,8 +44,8 @@ | |||
44 | #define c_sleep(x) Sleep(1*x) | 44 | #define c_sleep(x) Sleep(1*x) |
45 | 45 | ||
46 | #else | 46 | #else |
47 | #include <unistd.h> | ||
48 | #include <arpa/inet.h> | 47 | #include <arpa/inet.h> |
48 | #include <unistd.h> | ||
49 | #define c_sleep(x) usleep(1000*x) | 49 | #define c_sleep(x) usleep(1000*x) |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index f31052e3..790439e7 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -49,8 +49,8 @@ | |||
49 | #define c_sleep(x) Sleep(1*x) | 49 | #define c_sleep(x) Sleep(1*x) |
50 | 50 | ||
51 | #else | 51 | #else |
52 | #include <unistd.h> | ||
53 | #include <arpa/inet.h> | 52 | #include <arpa/inet.h> |
53 | #include <unistd.h> | ||
54 | #define c_sleep(x) usleep(1000*x) | 54 | #define c_sleep(x) usleep(1000*x) |
55 | #define PORT 33445 | 55 | #define PORT 33445 |
56 | 56 | ||
diff --git a/testing/av_test.c b/testing/av_test.c index c370a66f..2870e587 100644 --- a/testing/av_test.c +++ b/testing/av_test.c | |||
@@ -24,9 +24,9 @@ | |||
24 | 24 | ||
25 | 25 | ||
26 | #include "../toxav/toxav.h" | 26 | #include "../toxav/toxav.h" |
27 | #include "../toxcore/network.h" /* current_time_monotonic() */ | ||
27 | #include "../toxcore/tox.h" | 28 | #include "../toxcore/tox.h" |
28 | #include "../toxcore/util.h" | 29 | #include "../toxcore/util.h" |
29 | #include "../toxcore/network.h" /* current_time_monotonic() */ | ||
30 | 30 | ||
31 | /* Playing audio data */ | 31 | /* Playing audio data */ |
32 | #include <portaudio.h> | 32 | #include <portaudio.h> |
@@ -35,16 +35,16 @@ | |||
35 | 35 | ||
36 | /* Reading and Displaying video data */ | 36 | /* Reading and Displaying video data */ |
37 | #include <opencv/cv.h> | 37 | #include <opencv/cv.h> |
38 | #include <opencv/highgui.h> | ||
39 | #include <opencv/cvwimage.h> | 38 | #include <opencv/cvwimage.h> |
39 | #include <opencv/highgui.h> | ||
40 | 40 | ||
41 | #include <sys/stat.h> | ||
42 | #include <assert.h> | 41 | #include <assert.h> |
42 | #include <errno.h> | ||
43 | #include <stdio.h> | 43 | #include <stdio.h> |
44 | #include <stdlib.h> | 44 | #include <stdlib.h> |
45 | #include <time.h> | ||
46 | #include <string.h> | 45 | #include <string.h> |
47 | #include <errno.h> | 46 | #include <sys/stat.h> |
47 | #include <time.h> | ||
48 | #include <unistd.h> | 48 | #include <unistd.h> |
49 | 49 | ||
50 | #ifdef __APPLE__ | 50 | #ifdef __APPLE__ |
diff --git a/testing/dns3_test.c b/testing/dns3_test.c index ee719b8e..063ea8c7 100644 --- a/testing/dns3_test.c +++ b/testing/dns3_test.c | |||
@@ -1,8 +1,8 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include "../toxdns/toxdns.h" | ||
4 | #include "../toxcore/tox.h" | ||
5 | #include "../toxcore/network.h" | 3 | #include "../toxcore/network.h" |
4 | #include "../toxcore/tox.h" | ||
5 | #include "../toxdns/toxdns.h" | ||
6 | #include "misc_tools.c" | 6 | #include "misc_tools.c" |
7 | 7 | ||
8 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | 8 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) |
diff --git a/testing/irc_syncbot.c b/testing/irc_syncbot.c index 01e557d5..558b3631 100644 --- a/testing/irc_syncbot.c +++ b/testing/irc_syncbot.c | |||
@@ -1,19 +1,19 @@ | |||
1 | 1 | ||
2 | #include <stdlib.h> | ||
3 | #include <stdio.h> | ||
4 | #include <stdint.h> | 2 | #include <stdint.h> |
3 | #include <stdio.h> | ||
4 | #include <stdlib.h> | ||
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <time.h> | 6 | #include <time.h> |
7 | 7 | ||
8 | 8 | ||
9 | #include <fcntl.h> | ||
10 | #include <sys/socket.h> | ||
11 | #include <netinet/in.h> | ||
12 | #include <arpa/inet.h> | 9 | #include <arpa/inet.h> |
13 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <fcntl.h> | ||
12 | #include <netdb.h> | ||
13 | #include <netinet/in.h> | ||
14 | #include <sys/socket.h> | ||
14 | #include <sys/time.h> | 15 | #include <sys/time.h> |
15 | #include <sys/types.h> | 16 | #include <sys/types.h> |
16 | #include <netdb.h> | ||
17 | #include <unistd.h> | 17 | #include <unistd.h> |
18 | 18 | ||
19 | #include <sys/ioctl.h> | 19 | #include <sys/ioctl.h> |
diff --git a/testing/misc_tools.c b/testing/misc_tools.c index ba49ebc8..de246d82 100644 --- a/testing/misc_tools.c +++ b/testing/misc_tools.c | |||
@@ -25,10 +25,10 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include <string.h> | ||
29 | #include <stdlib.h> | ||
30 | #include <stdio.h> | ||
31 | #include <stdint.h> | 28 | #include <stdint.h> |
29 | #include <stdio.h> | ||
30 | #include <stdlib.h> | ||
31 | #include <string.h> | ||
32 | 32 | ||
33 | #ifdef TOX_DEBUG | 33 | #ifdef TOX_DEBUG |
34 | #include <assert.h> | 34 | #include <assert.h> |
diff --git a/testing/nTox.c b/testing/nTox.c index 3494015c..d55d7653 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -29,21 +29,21 @@ | |||
29 | #include <winsock2.h> | 29 | #include <winsock2.h> |
30 | #include <ws2tcpip.h> | 30 | #include <ws2tcpip.h> |
31 | #else | 31 | #else |
32 | #include <sys/socket.h> | ||
33 | #include <netinet/in.h> | ||
34 | #include <arpa/inet.h> | 32 | #include <arpa/inet.h> |
35 | #include <sys/types.h> | ||
36 | #include <netdb.h> | 33 | #include <netdb.h> |
34 | #include <netinet/in.h> | ||
35 | #include <sys/socket.h> | ||
36 | #include <sys/types.h> | ||
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include <sys/select.h> | 39 | #include <sys/select.h> |
40 | 40 | ||
41 | #include "nTox.h" | ||
42 | #include "misc_tools.c" | 41 | #include "misc_tools.c" |
42 | #include "nTox.h" | ||
43 | 43 | ||
44 | #include <locale.h> | ||
44 | #include <stdio.h> | 45 | #include <stdio.h> |
45 | #include <time.h> | 46 | #include <time.h> |
46 | #include <locale.h> | ||
47 | 47 | ||
48 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) | 48 | #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) |
49 | #define c_sleep(x) Sleep(1*x) | 49 | #define c_sleep(x) Sleep(1*x) |
diff --git a/testing/tox_shell.c b/testing/tox_shell.c index f6dae7b9..77047a44 100644 --- a/testing/tox_shell.c +++ b/testing/tox_shell.c | |||
@@ -40,8 +40,8 @@ | |||
40 | #else | 40 | #else |
41 | #include <pty.h> | 41 | #include <pty.h> |
42 | #endif | 42 | #endif |
43 | #include <unistd.h> | ||
44 | #include <fcntl.h> | 43 | #include <fcntl.h> |
44 | #include <unistd.h> | ||
45 | 45 | ||
46 | #define c_sleep(x) usleep(1000*x) | 46 | #define c_sleep(x) usleep(1000*x) |
47 | 47 | ||
diff --git a/testing/tox_sync.c b/testing/tox_sync.c index c80db339..8fa11625 100644 --- a/testing/tox_sync.c +++ b/testing/tox_sync.c | |||
@@ -38,10 +38,10 @@ | |||
38 | #include <unistd.h> | 38 | #include <unistd.h> |
39 | #define c_sleep(x) usleep(1000*x) | 39 | #define c_sleep(x) usleep(1000*x) |
40 | 40 | ||
41 | #include <arpa/inet.h> | ||
41 | #include <dirent.h> | 42 | #include <dirent.h> |
42 | #include <stdio.h> | ||
43 | #include <netinet/in.h> | 43 | #include <netinet/in.h> |
44 | #include <arpa/inet.h> | 44 | #include <stdio.h> |
45 | 45 | ||
46 | #define NUM_FILE_SENDERS 256 | 46 | #define NUM_FILE_SENDERS 256 |
47 | typedef struct { | 47 | typedef struct { |
diff --git a/toxav/bwcontroller.c b/toxav/bwcontroller.c index 4d3b7f7d..a38d71c0 100644 --- a/toxav/bwcontroller.c +++ b/toxav/bwcontroller.c | |||
@@ -24,9 +24,9 @@ | |||
24 | #endif /* HAVE_CONFIG_H */ | 24 | #endif /* HAVE_CONFIG_H */ |
25 | 25 | ||
26 | #include <assert.h> | 26 | #include <assert.h> |
27 | #include "bwcontroller.h" | ||
28 | #include "../toxcore/logger.h" | 27 | #include "../toxcore/logger.h" |
29 | #include "../toxcore/util.h" | 28 | #include "../toxcore/util.h" |
29 | #include "bwcontroller.h" | ||
30 | 30 | ||
31 | #define BWC_PACKET_ID 196 | 31 | #define BWC_PACKET_ID 196 |
32 | #define BWC_SEND_INTERVAL_MS 1000 | 32 | #define BWC_SEND_INTERVAL_MS 1000 |
diff --git a/toxav/group.c b/toxav/group.c index 88d9bd5a..dea10af7 100644 --- a/toxav/group.c +++ b/toxav/group.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include "config.h" | 22 | #include "config.h" |
23 | #endif /* HAVE_CONFIG_H */ | 23 | #endif /* HAVE_CONFIG_H */ |
24 | 24 | ||
25 | #include "group.h" | ||
26 | #include "../toxcore/util.h" | ||
27 | #include "../toxcore/logger.h" | 25 | #include "../toxcore/logger.h" |
26 | #include "../toxcore/util.h" | ||
27 | #include "group.h" | ||
28 | 28 | ||
29 | #define GROUP_JBUF_SIZE 6 | 29 | #define GROUP_JBUF_SIZE 6 |
30 | #define GROUP_JBUF_DEAD_SECONDS 4 | 30 | #define GROUP_JBUF_DEAD_SECONDS 4 |
diff --git a/toxav/msi.c b/toxav/msi.c index cdc3c879..3becac7e 100644 --- a/toxav/msi.c +++ b/toxav/msi.c | |||
@@ -24,15 +24,15 @@ | |||
24 | #include "config.h" | 24 | #include "config.h" |
25 | #endif /* HAVE_CONFIG_H */ | 25 | #endif /* HAVE_CONFIG_H */ |
26 | 26 | ||
27 | #include "msi.h" | ||
28 | #include "../toxcore/logger.h" | 27 | #include "../toxcore/logger.h" |
29 | #include "../toxcore/util.h" | 28 | #include "../toxcore/util.h" |
29 | #include "msi.h" | ||
30 | 30 | ||
31 | #include <unistd.h> | ||
32 | #include <string.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <stdbool.h> | ||
35 | #include <assert.h> | 31 | #include <assert.h> |
32 | #include <stdbool.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <string.h> | ||
35 | #include <unistd.h> | ||
36 | 36 | ||
37 | #define MSI_MAXMSG_SIZE 256 | 37 | #define MSI_MAXMSG_SIZE 256 |
38 | 38 | ||
diff --git a/toxav/msi.h b/toxav/msi.h index e69581d1..8cb47384 100644 --- a/toxav/msi.h +++ b/toxav/msi.h | |||
@@ -25,9 +25,9 @@ | |||
25 | #include <inttypes.h> | 25 | #include <inttypes.h> |
26 | #include <pthread.h> | 26 | #include <pthread.h> |
27 | 27 | ||
28 | #include "../toxcore/Messenger.h" | ||
28 | #include "audio.h" | 29 | #include "audio.h" |
29 | #include "video.h" | 30 | #include "video.h" |
30 | #include "../toxcore/Messenger.h" | ||
31 | 31 | ||
32 | /** | 32 | /** |
33 | * Error codes. | 33 | * Error codes. |
diff --git a/toxav/rtp.c b/toxav/rtp.c index a226f3ff..1556d23d 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c | |||
@@ -23,14 +23,14 @@ | |||
23 | #include "config.h" | 23 | #include "config.h" |
24 | #endif /* HAVE_CONFIG_H */ | 24 | #endif /* HAVE_CONFIG_H */ |
25 | 25 | ||
26 | #include "rtp.h" | 26 | #include "../toxcore/Messenger.h" |
27 | #include "bwcontroller.h" | ||
28 | #include "../toxcore/logger.h" | 27 | #include "../toxcore/logger.h" |
29 | #include "../toxcore/util.h" | 28 | #include "../toxcore/util.h" |
30 | #include "../toxcore/Messenger.h" | 29 | #include "bwcontroller.h" |
30 | #include "rtp.h" | ||
31 | 31 | ||
32 | #include <stdlib.h> | ||
33 | #include <assert.h> | 32 | #include <assert.h> |
33 | #include <stdlib.h> | ||
34 | 34 | ||
35 | 35 | ||
36 | int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object); | 36 | int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object); |
diff --git a/toxav/rtp.h b/toxav/rtp.h index 9a5db78a..18929e12 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h | |||
@@ -22,8 +22,8 @@ | |||
22 | #ifndef RTP_H | 22 | #ifndef RTP_H |
23 | #define RTP_H | 23 | #define RTP_H |
24 | 24 | ||
25 | #include "bwcontroller.h" | ||
26 | #include "../toxcore/Messenger.h" | 25 | #include "../toxcore/Messenger.h" |
26 | #include "bwcontroller.h" | ||
27 | #include "stdbool.h" | 27 | #include "stdbool.h" |
28 | 28 | ||
29 | /** | 29 | /** |
diff --git a/toxav/toxav_old.c b/toxav/toxav_old.c index 2945909b..b132080b 100644 --- a/toxav/toxav_old.c +++ b/toxav/toxav_old.c | |||
@@ -22,8 +22,8 @@ | |||
22 | * This file contains the group chats code for the backwards compatibility. | 22 | * This file contains the group chats code for the backwards compatibility. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "toxav.h" | ||
26 | #include "group.h" | 25 | #include "group.h" |
26 | #include "toxav.h" | ||
27 | 27 | ||
28 | /* Create a new toxav group. | 28 | /* Create a new toxav group. |
29 | * | 29 | * |
diff --git a/toxav/video.c b/toxav/video.c index 251a2cb5..7eba21cf 100644 --- a/toxav/video.c +++ b/toxav/video.c | |||
@@ -23,12 +23,12 @@ | |||
23 | #include "config.h" | 23 | #include "config.h" |
24 | #endif /* HAVE_CONFIG_H */ | 24 | #endif /* HAVE_CONFIG_H */ |
25 | 25 | ||
26 | #include <stdlib.h> | ||
27 | #include <assert.h> | 26 | #include <assert.h> |
27 | #include <stdlib.h> | ||
28 | 28 | ||
29 | #include "video.h" | ||
30 | #include "msi.h" | 29 | #include "msi.h" |
31 | #include "rtp.h" | 30 | #include "rtp.h" |
31 | #include "video.h" | ||
32 | 32 | ||
33 | #include "../toxcore/logger.h" | 33 | #include "../toxcore/logger.h" |
34 | #include "../toxcore/network.h" | 34 | #include "../toxcore/network.h" |
diff --git a/toxav/video.h b/toxav/video.h index c6a473c2..6aeeaef6 100644 --- a/toxav/video.h +++ b/toxav/video.h | |||
@@ -24,9 +24,10 @@ | |||
24 | 24 | ||
25 | #include <vpx/vpx_decoder.h> | 25 | #include <vpx/vpx_decoder.h> |
26 | #include <vpx/vpx_encoder.h> | 26 | #include <vpx/vpx_encoder.h> |
27 | #include <vpx/vp8dx.h> | ||
28 | #include <vpx/vp8cx.h> | ||
29 | #include <vpx/vpx_image.h> | 27 | #include <vpx/vpx_image.h> |
28 | |||
29 | #include <vpx/vp8cx.h> | ||
30 | #include <vpx/vp8dx.h> | ||
30 | #define VIDEO_CODEC_DECODER_INTERFACE (vpx_codec_vp8_dx()) | 31 | #define VIDEO_CODEC_DECODER_INTERFACE (vpx_codec_vp8_dx()) |
31 | #define VIDEO_CODEC_ENCODER_INTERFACE (vpx_codec_vp8_cx()) | 32 | #define VIDEO_CODEC_ENCODER_INTERFACE (vpx_codec_vp8_cx()) |
32 | 33 | ||
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 @@ | |||
41 | 41 | ||
42 | #include "ping.h" | 42 | #include "ping.h" |
43 | 43 | ||
44 | #include "network.h" | ||
45 | #include "LAN_discovery.h" | 44 | #include "LAN_discovery.h" |
46 | #include "misc_tools.h" | 45 | #include "misc_tools.h" |
46 | #include "network.h" | ||
47 | #include "util.h" | 47 | #include "util.h" |
48 | 48 | ||
49 | /* The timeout after which a node is discarded completely. */ | 49 | /* 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 @@ | |||
30 | 30 | ||
31 | /* Used for get_broadcast(). */ | 31 | /* Used for get_broadcast(). */ |
32 | #ifdef __linux | 32 | #ifdef __linux |
33 | #include <sys/ioctl.h> | ||
34 | #include <arpa/inet.h> | 33 | #include <arpa/inet.h> |
35 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
35 | #include <sys/ioctl.h> | ||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #define MAX_INTERFACES 16 | 38 | #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 @@ | |||
29 | #include <assert.h> | 29 | #include <assert.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #include "logger.h" | ||
33 | #include "Messenger.h" | 32 | #include "Messenger.h" |
34 | #include "assoc.h" | 33 | #include "assoc.h" |
34 | #include "logger.h" | ||
35 | #include "network.h" | 35 | #include "network.h" |
36 | #include "util.h" | 36 | #include "util.h" |
37 | 37 | ||
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 @@ | |||
26 | #ifndef MESSENGER_H | 26 | #ifndef MESSENGER_H |
27 | #define MESSENGER_H | 27 | #define MESSENGER_H |
28 | 28 | ||
29 | #include "friend_requests.h" | ||
30 | #include "friend_connection.h" | 29 | #include "friend_connection.h" |
30 | #include "friend_requests.h" | ||
31 | #include "logger.h" | 31 | #include "logger.h" |
32 | 32 | ||
33 | #define MAX_NAME_LENGTH 128 | 33 | #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 @@ | |||
24 | #ifndef TCP_CLIENT_H | 24 | #ifndef TCP_CLIENT_H |
25 | #define TCP_CLIENT_H | 25 | #define TCP_CLIENT_H |
26 | 26 | ||
27 | #include "crypto_core.h" | ||
28 | #include "TCP_server.h" | 27 | #include "TCP_server.h" |
28 | #include "crypto_core.h" | ||
29 | 29 | ||
30 | #define TCP_CONNECTION_TIMEOUT 10 | 30 | #define TCP_CONNECTION_TIMEOUT 10 |
31 | 31 | ||
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 @@ | |||
24 | #define TCP_SERVER_H | 24 | #define TCP_SERVER_H |
25 | 25 | ||
26 | #include "crypto_core.h" | 26 | #include "crypto_core.h" |
27 | #include "onion.h" | ||
28 | #include "list.h" | 27 | #include "list.h" |
28 | #include "onion.h" | ||
29 | 29 | ||
30 | #ifdef TCP_SERVER_USE_EPOLL | 30 | #ifdef TCP_SERVER_USE_EPOLL |
31 | #include "sys/epoll.h" | 31 | #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 @@ | |||
3 | #include "config.h" | 3 | #include "config.h" |
4 | #endif | 4 | #endif |
5 | 5 | ||
6 | #include "logger.h" | ||
7 | #include "DHT.h" | 6 | #include "DHT.h" |
8 | #include "assoc.h" | 7 | #include "assoc.h" |
8 | #include "logger.h" | ||
9 | #include "ping.h" | 9 | #include "ping.h" |
10 | 10 | ||
11 | #include "LAN_discovery.h" | 11 | #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 @@ | |||
30 | #include <sodium.h> | 30 | #include <sodium.h> |
31 | #else | 31 | #else |
32 | #include <crypto_box.h> | 32 | #include <crypto_box.h> |
33 | #include <randombytes.h> | ||
34 | #include <crypto_hash_sha256.h> | 33 | #include <crypto_hash_sha256.h> |
35 | #include <crypto_hash_sha512.h> | 34 | #include <crypto_hash_sha512.h> |
35 | #include <crypto_scalarmult_curve25519.h> | ||
36 | #include <crypto_verify_16.h> | 36 | #include <crypto_verify_16.h> |
37 | #include <crypto_verify_32.h> | 37 | #include <crypto_verify_32.h> |
38 | #include <crypto_scalarmult_curve25519.h> | 38 | #include <randombytes.h> |
39 | #define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) | 39 | #define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) |
40 | /* I know */ | 40 | /* I know */ |
41 | #define sodium_memcmp(a, b, c) memcmp(a, b, c) | 41 | #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 @@ | |||
25 | #ifndef FRIEND_CONNECTION_H | 25 | #ifndef FRIEND_CONNECTION_H |
26 | #define FRIEND_CONNECTION_H | 26 | #define FRIEND_CONNECTION_H |
27 | 27 | ||
28 | #include "net_crypto.h" | ||
29 | #include "DHT.h" | 28 | #include "DHT.h" |
30 | #include "LAN_discovery.h" | 29 | #include "LAN_discovery.h" |
30 | #include "net_crypto.h" | ||
31 | #include "onion_client.h" | 31 | #include "onion_client.h" |
32 | 32 | ||
33 | 33 | ||
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 @@ | |||
26 | #ifndef LIST_H | 26 | #ifndef LIST_H |
27 | #define LIST_H | 27 | #define LIST_H |
28 | 28 | ||
29 | #include <stdlib.h> | ||
30 | #include <stdint.h> | 29 | #include <stdint.h> |
30 | #include <stdlib.h> | ||
31 | #include <string.h> | 31 | #include <string.h> |
32 | 32 | ||
33 | typedef struct { | 33 | 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 @@ | |||
27 | #include "config.h" | 27 | #include "config.h" |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #include "math.h" | ||
30 | #include "net_crypto.h" | 31 | #include "net_crypto.h" |
31 | #include "util.h" | 32 | #include "util.h" |
32 | #include "math.h" | ||
33 | 33 | ||
34 | static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_connection_id) | 34 | static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_connection_id) |
35 | { | 35 | { |
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 @@ | |||
24 | #ifndef NET_CRYPTO_H | 24 | #ifndef NET_CRYPTO_H |
25 | #define NET_CRYPTO_H | 25 | #define NET_CRYPTO_H |
26 | 26 | ||
27 | #include <pthread.h> | ||
27 | #include "DHT.h" | 28 | #include "DHT.h" |
28 | #include "LAN_discovery.h" | 29 | #include "LAN_discovery.h" |
29 | #include "TCP_connection.h" | 30 | #include "TCP_connection.h" |
30 | #include "logger.h" | 31 | #include "logger.h" |
31 | #include <pthread.h> | ||
32 | 32 | ||
33 | #define CRYPTO_CONN_NO_CONNECTION 0 | 33 | #define CRYPTO_CONN_NO_CONNECTION 0 |
34 | #define CRYPTO_CONN_COOKIE_REQUESTING 1 //send cookie request packets | 34 | #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 @@ | |||
25 | #define NETWORK_H | 25 | #define NETWORK_H |
26 | 26 | ||
27 | #ifdef PLAN9 | 27 | #ifdef PLAN9 |
28 | #include <u.h> //Plan 9 requires this is imported first | 28 | #include <u.h> // Plan 9 requires this is imported first |
29 | // Comment line here to avoid reordering by source code formatters. | ||
29 | #include <libc.h> | 30 | #include <libc.h> |
30 | #endif | 31 | #endif |
31 | 32 | ||
32 | #include "logger.h" | 33 | #include "logger.h" |
33 | 34 | ||
34 | #include <stdlib.h> | ||
35 | #include <stdio.h> | ||
36 | #include <stdint.h> | 35 | #include <stdint.h> |
36 | #include <stdio.h> | ||
37 | #include <stdlib.h> | ||
37 | #include <string.h> | 38 | #include <string.h> |
38 | #include <time.h> | 39 | #include <time.h> |
39 | 40 | ||
@@ -42,8 +43,8 @@ | |||
42 | //Windows XP | 43 | //Windows XP |
43 | #define WINVER 0x0501 | 44 | #define WINVER 0x0501 |
44 | #endif | 45 | #endif |
45 | #include <winsock2.h> | ||
46 | #include <windows.h> | 46 | #include <windows.h> |
47 | #include <winsock2.h> | ||
47 | #include <ws2tcpip.h> | 48 | #include <ws2tcpip.h> |
48 | 49 | ||
49 | #ifndef IPV6_V6ONLY | 50 | #ifndef IPV6_V6ONLY |
@@ -60,14 +61,14 @@ typedef short sa_family_t; | |||
60 | 61 | ||
61 | #else // Linux includes | 62 | #else // Linux includes |
62 | 63 | ||
63 | #include <fcntl.h> | ||
64 | #include <sys/socket.h> | ||
65 | #include <netinet/in.h> | ||
66 | #include <arpa/inet.h> | 64 | #include <arpa/inet.h> |
67 | #include <errno.h> | 65 | #include <errno.h> |
66 | #include <fcntl.h> | ||
67 | #include <netdb.h> | ||
68 | #include <netinet/in.h> | ||
69 | #include <sys/socket.h> | ||
68 | #include <sys/time.h> | 70 | #include <sys/time.h> |
69 | #include <sys/types.h> | 71 | #include <sys/types.h> |
70 | #include <netdb.h> | ||
71 | #include <unistd.h> | 72 | #include <unistd.h> |
72 | 73 | ||
73 | typedef int sock_t; | 74 | 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 @@ | |||
23 | #include "config.h" | 23 | #include "config.h" |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #include "onion_announce.h" | ||
27 | #include "LAN_discovery.h" | 26 | #include "LAN_discovery.h" |
27 | #include "onion_announce.h" | ||
28 | #include "util.h" | 28 | #include "util.h" |
29 | 29 | ||
30 | #define PING_ID_TIMEOUT 20 | 30 | #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 @@ | |||
24 | #include "config.h" | 24 | #include "config.h" |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include "LAN_discovery.h" | ||
27 | #include "onion_client.h" | 28 | #include "onion_client.h" |
28 | #include "util.h" | 29 | #include "util.h" |
29 | #include "LAN_discovery.h" | ||
30 | 30 | ||
31 | /* defines for the array size and | 31 | /* defines for the array size and |
32 | timeout for onion announce packets. */ | 32 | 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 @@ | |||
24 | #ifndef ONION_CLIENT_H | 24 | #ifndef ONION_CLIENT_H |
25 | #define ONION_CLIENT_H | 25 | #define ONION_CLIENT_H |
26 | 26 | ||
27 | #include "onion_announce.h" | ||
28 | #include "net_crypto.h" | 27 | #include "net_crypto.h" |
28 | #include "onion_announce.h" | ||
29 | #include "ping_array.h" | 29 | #include "ping_array.h" |
30 | 30 | ||
31 | #define MAX_ONION_CLIENTS 8 | 31 | #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 @@ | |||
33 | #include "ping.h" | 33 | #include "ping.h" |
34 | 34 | ||
35 | #include "network.h" | 35 | #include "network.h" |
36 | #include "util.h" | ||
37 | #include "ping_array.h" | 36 | #include "ping_array.h" |
37 | #include "util.h" | ||
38 | 38 | ||
39 | #define PING_NUM_MAX 512 | 39 | #define PING_NUM_MAX 512 |
40 | 40 | ||
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 @@ | |||
26 | #include "config.h" | 26 | #include "config.h" |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #include "ping_array.h" | ||
30 | #include "crypto_core.h" | 29 | #include "crypto_core.h" |
30 | #include "ping_array.h" | ||
31 | #include "util.h" | 31 | #include "util.h" |
32 | 32 | ||
33 | static void clear_entry(Ping_Array *array, uint32_t index) | 33 | 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 @@ | |||
25 | #ifndef __UTIL_H__ | 25 | #ifndef __UTIL_H__ |
26 | #define __UTIL_H__ | 26 | #define __UTIL_H__ |
27 | 27 | ||
28 | #include <pthread.h> | ||
28 | #include <stdbool.h> | 29 | #include <stdbool.h> |
29 | #include <stdint.h> | 30 | #include <stdint.h> |
30 | #include <pthread.h> | ||
31 | 31 | ||
32 | #define MIN(a,b) (((a)<(b))?(a):(b)) | 32 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
33 | #define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } | 33 | #define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } |
diff --git a/toxencryptsave/toxencryptsave.c b/toxencryptsave/toxencryptsave.c index e62e2283..bcbe9518 100644 --- a/toxencryptsave/toxencryptsave.c +++ b/toxencryptsave/toxencryptsave.c | |||
@@ -25,14 +25,14 @@ | |||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #include "toxencryptsave.h" | ||
29 | #include "defines.h" | ||
30 | #include "../toxcore/crypto_core.h" | 28 | #include "../toxcore/crypto_core.h" |
29 | #include "defines.h" | ||
30 | #include "toxencryptsave.h" | ||
31 | #define SET_ERROR_PARAMETER(param, x) {if(param) {*param = x;}} | 31 | #define SET_ERROR_PARAMETER(param, x) {if(param) {*param = x;}} |
32 | 32 | ||
33 | #ifdef VANILLA_NACL | 33 | #ifdef VANILLA_NACL |
34 | #include "crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h" | ||
35 | #include <crypto_hash_sha256.h> | 34 | #include <crypto_hash_sha256.h> |
35 | #include "crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h" | ||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #if TOX_PASS_SALT_LENGTH != crypto_pwhash_scryptsalsa208sha256_SALTBYTES | 38 | #if TOX_PASS_SALT_LENGTH != crypto_pwhash_scryptsalsa208sha256_SALTBYTES |
diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h index cf191810..6451f3f5 100644 --- a/toxencryptsave/toxencryptsave.h +++ b/toxencryptsave/toxencryptsave.h | |||
@@ -28,9 +28,9 @@ | |||
28 | extern "C" { | 28 | extern "C" { |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include <stdint.h> | ||
32 | #include <stddef.h> | ||
33 | #include <stdbool.h> | 31 | #include <stdbool.h> |
32 | #include <stddef.h> | ||
33 | #include <stdint.h> | ||
34 | 34 | ||
35 | #ifndef TOX_DEFINED | 35 | #ifndef TOX_DEFINED |
36 | #define TOX_DEFINED | 36 | #define TOX_DEFINED |