From 49bb43f6626b927b978eac765609844294523cad Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 9 Sep 2018 19:54:05 +0000 Subject: [PATCH] Standardise header guards. Using the full path including the repo name. --- auto_tests/check_compat.h | 6 +++--- other/bootstrap_daemon/src/command_line_arguments.h | 6 +++--- other/bootstrap_daemon/src/config.h | 6 +++--- other/bootstrap_daemon/src/config_defaults.h | 6 +++--- other/bootstrap_daemon/src/global.h | 6 +++--- other/bootstrap_daemon/src/log.h | 6 +++--- other/bootstrap_daemon/src/log_backend_stdout.h | 6 +++--- other/bootstrap_daemon/src/log_backend_syslog.h | 6 +++--- other/bootstrap_node_packets.h | 6 +++--- toxav/audio.h | 6 +++--- toxav/bwcontroller.h | 6 +++--- toxav/msi.h | 6 +++--- toxav/ring_buffer.h | 6 +++--- toxav/rtp.h | 6 +++--- toxav/toxav.api.h | 6 +++--- toxav/toxav.h | 6 +++--- toxav/video.h | 6 +++--- toxcore/DHT.h | 4 ++-- toxcore/LAN_discovery.api.h | 6 +++--- toxcore/LAN_discovery.h | 4 ++-- toxcore/Messenger.h | 4 ++-- toxcore/TCP_client.h | 4 ++-- toxcore/TCP_connection.h | 4 ++-- toxcore/TCP_server.h | 4 ++-- toxcore/ccompat.h | 6 +++--- toxcore/crypto_core.api.h | 6 +++--- toxcore/crypto_core.h | 6 +++--- toxcore/friend_connection.h | 4 ++-- toxcore/friend_requests.h | 4 ++-- toxcore/group.h | 4 ++-- toxcore/list.h | 4 ++-- toxcore/logger.h | 6 +++--- toxcore/mono_time.h | 2 +- toxcore/net_crypto.h | 4 ++-- toxcore/network.h | 4 ++-- toxcore/onion.h | 4 ++-- toxcore/onion_announce.h | 4 ++-- toxcore/onion_client.h | 4 ++-- toxcore/ping.api.h | 6 +++--- toxcore/ping.h | 6 +++--- toxcore/ping_array.api.h | 2 +- toxcore/ping_array.h | 2 +- toxcore/tox.api.h | 6 +++--- toxcore/tox.h | 6 +++--- toxcore/util.h | 6 +++--- .../crypto_pwhash_scryptsalsa208sha256.h | 5 +++++ .../crypto_pwhash_scryptsalsa208sha256/crypto_scrypt.h | 5 +++++ toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h | 5 +++++ .../crypto_pwhash_scryptsalsa208sha256/pbkdf2-sha256.h | 5 +++++ toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h | 5 +++++ .../crypto_pwhash_scryptsalsa208sha256/sysendian.h | 5 +++++ toxencryptsave/defines.h | 5 +++++ toxencryptsave/toxencryptsave.api.h | 6 +++--- toxencryptsave/toxencryptsave.h | 6 +++--- 54 files changed, 155 insertions(+), 120 deletions(-) diff --git a/auto_tests/check_compat.h b/auto_tests/check_compat.h index 2f83577d..b1b73e0f 100644 --- a/auto_tests/check_compat.h +++ b/auto_tests/check_compat.h @@ -1,5 +1,5 @@ -#ifndef CHECK_COMPAT_H -#define CHECK_COMPAT_H +#ifndef C_TOXCORE_AUTO_TESTS_CHECK_COMPAT_H +#define C_TOXCORE_AUTO_TESTS_CHECK_COMPAT_H #include "../toxcore/ccompat.h" @@ -64,4 +64,4 @@ static inline int srunner_ntests_failed(SRunner *r) abort(); \ } while (0) -#endif // CHECK_COMPAT_H +#endif // C_TOXCORE_AUTO_TESTS_CHECK_COMPAT_H diff --git a/other/bootstrap_daemon/src/command_line_arguments.h b/other/bootstrap_daemon/src/command_line_arguments.h index d0f07583..e6e69eed 100644 --- a/other/bootstrap_daemon/src/command_line_arguments.h +++ b/other/bootstrap_daemon/src/command_line_arguments.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef COMMAND_LINE_ARGUMENTS_H -#define COMMAND_LINE_ARGUMENTS_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_COMMAND_LINE_ARGUMENTS_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_COMMAND_LINE_ARGUMENTS_H #include "log.h" @@ -40,4 +40,4 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path, LOG_BACKEND *log_backend, bool *run_in_foreground); -#endif // COMMAND_LINE_ARGUMENTS_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_COMMAND_LINE_ARGUMENTS_H diff --git a/other/bootstrap_daemon/src/config.h b/other/bootstrap_daemon/src/config.h index c6fca58e..022419bf 100644 --- a/other/bootstrap_daemon/src/config.h +++ b/other/bootstrap_daemon/src/config.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_H #include "../../../toxcore/DHT.h" @@ -49,4 +49,4 @@ int get_general_config(const char *cfg_file_path, char **pid_file_path, char **k */ int bootstrap_from_config(const char *cfg_file_path, DHT *dht, int enable_ipv6); -#endif // CONFIG_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_H diff --git a/other/bootstrap_daemon/src/config_defaults.h b/other/bootstrap_daemon/src/config_defaults.h index 603968c2..2b9bbf8e 100644 --- a/other/bootstrap_daemon/src/config_defaults.h +++ b/other/bootstrap_daemon/src/config_defaults.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef CONFIG_DEFAULTS_H -#define CONFIG_DEFAULTS_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_DEFAULTS_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_DEFAULTS_H #include "global.h" @@ -39,4 +39,4 @@ #define DEFAULT_ENABLE_MOTD 1 // 1 - true, 0 - false #define DEFAULT_MOTD DAEMON_NAME -#endif // CONFIG_DEFAULTS_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_CONFIG_DEFAULTS_H diff --git a/other/bootstrap_daemon/src/global.h b/other/bootstrap_daemon/src/global.h index 437dbadd..c939f19d 100644 --- a/other/bootstrap_daemon/src/global.h +++ b/other/bootstrap_daemon/src/global.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef GLOBAL_H -#define GLOBAL_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_GLOBAL_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_GLOBAL_H #include "../../../toxcore/tox.h" @@ -56,4 +56,4 @@ #define MIN_ALLOWED_PORT 1 #define MAX_ALLOWED_PORT 65535 -#endif // GLOBAL_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_GLOBAL_H diff --git a/other/bootstrap_daemon/src/log.h b/other/bootstrap_daemon/src/log.h index 77e623f9..9327da6c 100644 --- a/other/bootstrap_daemon/src/log.h +++ b/other/bootstrap_daemon/src/log.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LOG_H -#define LOG_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_H #include @@ -63,4 +63,4 @@ bool log_close(void); bool log_write(LOG_LEVEL level, const char *format, ...) GNU_PRINTF(2, 3); -#endif // LOG_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_H diff --git a/other/bootstrap_daemon/src/log_backend_stdout.h b/other/bootstrap_daemon/src/log_backend_stdout.h index d24b5bf5..3ebcd069 100644 --- a/other/bootstrap_daemon/src/log_backend_stdout.h +++ b/other/bootstrap_daemon/src/log_backend_stdout.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LOG_STDOUT_H -#define LOG_STDOUT_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_STDOUT_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_STDOUT_H #include "log.h" @@ -31,4 +31,4 @@ void log_backend_stdout_write(LOG_LEVEL level, const char *format, va_list args) GNU_PRINTF(2, 0); -#endif // LOG_BACKEND_STDOUT_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_STDOUT_H diff --git a/other/bootstrap_daemon/src/log_backend_syslog.h b/other/bootstrap_daemon/src/log_backend_syslog.h index ed82fec5..6afae224 100644 --- a/other/bootstrap_daemon/src/log_backend_syslog.h +++ b/other/bootstrap_daemon/src/log_backend_syslog.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LOG_BACKEND_SYSLOG_H -#define LOG_BACKEND_SYSLOG_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_SYSLOG_H +#define C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_SYSLOG_H #include "log.h" @@ -33,4 +33,4 @@ void log_backend_syslog_open(void); void log_backend_syslog_close(void); void log_backend_syslog_write(LOG_LEVEL level, const char *format, va_list args) GNU_PRINTF(2, 0); -#endif // LOG_BACKEND_SYSLOG_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_DAEMON_SRC_LOG_BACKEND_SYSLOG_H diff --git a/other/bootstrap_node_packets.h b/other/bootstrap_node_packets.h index 0ac314f4..1b8b87f2 100644 --- a/other/bootstrap_node_packets.h +++ b/other/bootstrap_node_packets.h @@ -23,8 +23,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef BOOTSTRAP_NODE_PACKETS_H -#define BOOTSTRAP_NODE_PACKETS_H +#ifndef C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H +#define C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H #include "../toxcore/network.h" @@ -32,4 +32,4 @@ int bootstrap_set_callbacks(Networking_Core *net, uint32_t version, uint8_t *motd, uint16_t motd_length); -#endif // BOOTSTRAP_NODE_PACKETS_H +#endif // C_TOXCORE_OTHER_BOOTSTRAP_NODE_PACKETS_H diff --git a/toxav/audio.h b/toxav/audio.h index a323a08e..ccb28c10 100644 --- a/toxav/audio.h +++ b/toxav/audio.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef AUDIO_H -#define AUDIO_H +#ifndef C_TOXCORE_TOXAV_AUDIO_H +#define C_TOXCORE_TOXAV_AUDIO_H #include "toxav.h" @@ -85,4 +85,4 @@ void ac_iterate(ACSession *ac); int ac_queue_message(Mono_Time *mono_time, void *acp, struct RTPMessage *msg); int ac_reconfigure_encoder(ACSession *ac, int32_t bit_rate, int32_t sampling_rate, uint8_t channels); -#endif /* AUDIO_H */ +#endif // C_TOXCORE_TOXAV_AUDIO_H diff --git a/toxav/bwcontroller.h b/toxav/bwcontroller.h index 00342d97..c54cc5a6 100644 --- a/toxav/bwcontroller.h +++ b/toxav/bwcontroller.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef BWCONROLLER_H -#define BWCONROLLER_H +#ifndef C_TOXCORE_TOXAV_BWCONTROLLER_H +#define C_TOXCORE_TOXAV_BWCONTROLLER_H #include "../toxcore/Messenger.h" @@ -33,4 +33,4 @@ void bwc_kill(BWController *bwc); void bwc_add_lost(BWController *bwc, uint32_t bytes_lost); void bwc_add_recv(BWController *bwc, uint32_t recv_bytes); -#endif /* BWCONROLLER_H */ +#endif // C_TOXCORE_TOXAV_BWCONTROLLER_H diff --git a/toxav/msi.h b/toxav/msi.h index 30841498..af7f6f34 100644 --- a/toxav/msi.h +++ b/toxav/msi.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef MSI_H -#define MSI_H +#ifndef C_TOXCORE_TOXAV_MSI_H +#define C_TOXCORE_TOXAV_MSI_H #include "audio.h" #include "video.h" @@ -148,4 +148,4 @@ int msi_answer(MSICall *call, uint8_t capabilities); */ int msi_change_capabilities(MSICall *call, uint8_t capabilities); -#endif /* MSI_H */ +#endif // C_TOXCORE_TOXAV_MSI_H diff --git a/toxav/ring_buffer.h b/toxav/ring_buffer.h index 307e16ec..e63d08e4 100644 --- a/toxav/ring_buffer.h +++ b/toxav/ring_buffer.h @@ -19,8 +19,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef RING_BUFFER_H -#define RING_BUFFER_H +#ifndef C_TOXCORE_TOXAV_RING_BUFFER_H +#define C_TOXCORE_TOXAV_RING_BUFFER_H #include #include @@ -44,4 +44,4 @@ uint16_t rb_data(const RingBuffer *b, void **dest); } #endif -#endif /* RING_BUFFER_H */ +#endif // C_TOXCORE_TOXAV_RING_BUFFER_H diff --git a/toxav/rtp.h b/toxav/rtp.h index e068f6ac..4d6fb791 100644 --- a/toxav/rtp.h +++ b/toxav/rtp.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef RTP_H -#define RTP_H +#ifndef C_TOXCORE_TOXAV_RTP_H +#define C_TOXCORE_TOXAV_RTP_H #include "bwcontroller.h" @@ -220,4 +220,4 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length, } // extern "C" #endif -#endif /* RTP_H */ +#endif // C_TOXCORE_TOXAV_RTP_H diff --git a/toxav/toxav.api.h b/toxav/toxav.api.h index 02f8bc9f..14c6a8e1 100644 --- a/toxav/toxav.api.h +++ b/toxav/toxav.api.h @@ -18,8 +18,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOXAV_H -#define TOXAV_H +#ifndef C_TOXCORE_TOXAV_TOXAV_H +#define C_TOXCORE_TOXAV_TOXAV_H #include #include @@ -668,5 +668,5 @@ typedef TOXAV_ERR_BIT_RATE_SET Toxav_Err_Bit_Rate_Set; typedef TOXAV_ERR_SEND_FRAME Toxav_Err_Send_Frame; typedef TOXAV_CALL_CONTROL Toxav_Call_Control; -#endif /* TOXAV_H */ +#endif // C_TOXCORE_TOXAV_TOXAV_H %} diff --git a/toxav/toxav.h b/toxav/toxav.h index 4cc2af2c..bc634e91 100644 --- a/toxav/toxav.h +++ b/toxav/toxav.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOXAV_H -#define TOXAV_H +#ifndef C_TOXCORE_TOXAV_TOXAV_H +#define C_TOXCORE_TOXAV_TOXAV_H #include #include @@ -797,4 +797,4 @@ typedef TOXAV_ERR_BIT_RATE_SET Toxav_Err_Bit_Rate_Set; typedef TOXAV_ERR_SEND_FRAME Toxav_Err_Send_Frame; typedef TOXAV_CALL_CONTROL Toxav_Call_Control; -#endif /* TOXAV_H */ +#endif // C_TOXCORE_TOXAV_TOXAV_H diff --git a/toxav/video.h b/toxav/video.h index 16f4658b..f7dfc992 100644 --- a/toxav/video.h +++ b/toxav/video.h @@ -17,8 +17,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef VIDEO_H -#define VIDEO_H +#ifndef C_TOXCORE_TOXAV_VIDEO_H +#define C_TOXCORE_TOXAV_VIDEO_H #include "toxav.h" @@ -67,4 +67,4 @@ void vc_iterate(VCSession *vc); int vc_queue_message(Mono_Time *mono_time, void *vcp, struct RTPMessage *msg); int vc_reconfigure_encoder(VCSession *vc, uint32_t bit_rate, uint16_t width, uint16_t height, int16_t kf_max_dist); -#endif /* VIDEO_H */ +#endif // C_TOXCORE_TOXAV_VIDEO_H diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 9f5f1ec7..cbe905ce 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef DHT_H -#define DHT_H +#ifndef C_TOXCORE_TOXCORE_DHT_H +#define C_TOXCORE_TOXCORE_DHT_H #include "crypto_core.h" #include "logger.h" diff --git a/toxcore/LAN_discovery.api.h b/toxcore/LAN_discovery.api.h index 515552f7..31d6a5f6 100644 --- a/toxcore/LAN_discovery.api.h +++ b/toxcore/LAN_discovery.api.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LAN_DISCOVERY_H -#define LAN_DISCOVERY_H +#ifndef C_TOXCORE_TOXCORE_LAN_DISCOVERY_H +#define C_TOXCORE_TOXCORE_LAN_DISCOVERY_H #include "DHT.h" %} @@ -68,5 +68,5 @@ static bool ip_is_local(iP::this ip); static bool ip_is_lan(iP::this ip); %{ -#endif +#endif // C_TOXCORE_TOXCORE_LAN_DISCOVERY_H %} diff --git a/toxcore/LAN_discovery.h b/toxcore/LAN_discovery.h index 3e563782..8c48316d 100644 --- a/toxcore/LAN_discovery.h +++ b/toxcore/LAN_discovery.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LAN_DISCOVERY_H -#define LAN_DISCOVERY_H +#ifndef C_TOXCORE_TOXCORE_LAN_DISCOVERY_H +#define C_TOXCORE_TOXCORE_LAN_DISCOVERY_H #include "DHT.h" diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 09f631ff..b2de6a5a 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef MESSENGER_H -#define MESSENGER_H +#ifndef C_TOXCORE_TOXCORE_MESSENGER_H +#define C_TOXCORE_TOXCORE_MESSENGER_H #include "friend_connection.h" #include "friend_requests.h" diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 412e43e2..9d43d642 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TCP_CLIENT_H -#define TCP_CLIENT_H +#ifndef C_TOXCORE_TOXCORE_TCP_CLIENT_H +#define C_TOXCORE_TOXCORE_TCP_CLIENT_H #include "TCP_server.h" #include "crypto_core.h" diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h index 8ae9549f..1962fb1a 100644 --- a/toxcore/TCP_connection.h +++ b/toxcore/TCP_connection.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TCP_CONNECTION_H -#define TCP_CONNECTION_H +#ifndef C_TOXCORE_TOXCORE_TCP_CONNECTION_H +#define C_TOXCORE_TOXCORE_TCP_CONNECTION_H #include "TCP_client.h" diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h index fe05b5a5..1798ebeb 100644 --- a/toxcore/TCP_server.h +++ b/toxcore/TCP_server.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TCP_SERVER_H -#define TCP_SERVER_H +#ifndef C_TOXCORE_TOXCORE_TCP_SERVER_H +#define C_TOXCORE_TOXCORE_TCP_SERVER_H #include "crypto_core.h" #include "list.h" diff --git a/toxcore/ccompat.h b/toxcore/ccompat.h index 5b37a294..ba8c7fe8 100644 --- a/toxcore/ccompat.h +++ b/toxcore/ccompat.h @@ -1,8 +1,8 @@ /* * C language compatibility macros for varying compiler support. */ -#ifndef CCOMPAT_H -#define CCOMPAT_H +#ifndef C_TOXCORE_TOXCORE_CCOMPAT_H +#define C_TOXCORE_TOXCORE_CCOMPAT_H // Variable length arrays. // VLA(type, name, size) allocates a variable length array with automatic @@ -48,4 +48,4 @@ #define GNU_PRINTF(f, a) #endif -#endif /* CCOMPAT_H */ +#endif // C_TOXCORE_TOXCORE_CCOMPAT_H diff --git a/toxcore/crypto_core.api.h b/toxcore/crypto_core.api.h index 9623e5b3..94ccac47 100644 --- a/toxcore/crypto_core.api.h +++ b/toxcore/crypto_core.api.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef CRYPTO_CORE_H -#define CRYPTO_CORE_H +#ifndef C_TOXCORE_TOXCORE_CRYPTO_CORE_H +#define C_TOXCORE_TOXCORE_CRYPTO_CORE_H #include #include @@ -264,5 +264,5 @@ static void new_symmetric_key(uint8_t[CRYPTO_SYMMETRIC_KEY_SIZE] key); } // extern "C" #endif -#endif /* CRYPTO_CORE_H */ +#endif // C_TOXCORE_TOXCORE_CRYPTO_CORE_H %} diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index 90b86990..b287b21e 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef CRYPTO_CORE_H -#define CRYPTO_CORE_H +#ifndef C_TOXCORE_TOXCORE_CRYPTO_CORE_H +#define C_TOXCORE_TOXCORE_CRYPTO_CORE_H #include #include @@ -249,4 +249,4 @@ void new_symmetric_key(uint8_t *key); } // extern "C" #endif -#endif /* CRYPTO_CORE_H */ +#endif // C_TOXCORE_TOXCORE_CRYPTO_CORE_H diff --git a/toxcore/friend_connection.h b/toxcore/friend_connection.h index 8a355377..149a4fa7 100644 --- a/toxcore/friend_connection.h +++ b/toxcore/friend_connection.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef FRIEND_CONNECTION_H -#define FRIEND_CONNECTION_H +#ifndef C_TOXCORE_TOXCORE_FRIEND_CONNECTION_H +#define C_TOXCORE_TOXCORE_FRIEND_CONNECTION_H #include "DHT.h" #include "LAN_discovery.h" diff --git a/toxcore/friend_requests.h b/toxcore/friend_requests.h index f8b3718c..7fcd3f0d 100644 --- a/toxcore/friend_requests.h +++ b/toxcore/friend_requests.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef FRIEND_REQUESTS_H -#define FRIEND_REQUESTS_H +#ifndef C_TOXCORE_TOXCORE_FRIEND_REQUESTS_H +#define C_TOXCORE_TOXCORE_FRIEND_REQUESTS_H #include "friend_connection.h" diff --git a/toxcore/group.h b/toxcore/group.h index 110f5d44..7acd4637 100644 --- a/toxcore/group.h +++ b/toxcore/group.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef GROUP_H -#define GROUP_H +#ifndef C_TOXCORE_TOXCORE_GROUP_H +#define C_TOXCORE_TOXCORE_GROUP_H #include "Messenger.h" diff --git a/toxcore/list.h b/toxcore/list.h index 6ec67505..c9c72c2a 100644 --- a/toxcore/list.h +++ b/toxcore/list.h @@ -23,8 +23,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef LIST_H -#define LIST_H +#ifndef C_TOXCORE_TOXCORE_LIST_H +#define C_TOXCORE_TOXCORE_LIST_H #include diff --git a/toxcore/logger.h b/toxcore/logger.h index aaca7612..6231ca4b 100644 --- a/toxcore/logger.h +++ b/toxcore/logger.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOXLOGGER_H -#define TOXLOGGER_H +#ifndef C_TOXCORE_TOXCORE_LOGGER_H +#define C_TOXCORE_TOXCORE_LOGGER_H #include @@ -90,4 +90,4 @@ void logger_write( #define LOGGER_WARNING(log, ...) LOGGER_WRITE(log, LOGGER_LEVEL_WARNING, __VA_ARGS__) #define LOGGER_ERROR(log, ...) LOGGER_WRITE(log, LOGGER_LEVEL_ERROR , __VA_ARGS__) -#endif /* TOXLOGGER_H */ +#endif // C_TOXCORE_TOXCORE_LOGGER_H diff --git a/toxcore/mono_time.h b/toxcore/mono_time.h index c2934d06..503548f2 100644 --- a/toxcore/mono_time.h +++ b/toxcore/mono_time.h @@ -66,4 +66,4 @@ void mono_time_set_current_time_callback(Mono_Time *mono_time, } #endif -#endif // C_TOXCORE_TOXCORE_MONO_TIME_H +#endif // C_TOXCORE_TOXCORE_MONO_TIME_H diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 9fd47014..45e1a05e 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef NET_CRYPTO_H -#define NET_CRYPTO_H +#ifndef C_TOXCORE_TOXCORE_NET_CRYPTO_H +#define C_TOXCORE_TOXCORE_NET_CRYPTO_H #include "DHT.h" #include "LAN_discovery.h" diff --git a/toxcore/network.h b/toxcore/network.h index 6c5b6781..a1d83842 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef NETWORK_H -#define NETWORK_H +#ifndef C_TOXCORE_TOXCORE_NETWORK_H +#define C_TOXCORE_TOXCORE_NETWORK_H #include "logger.h" diff --git a/toxcore/onion.h b/toxcore/onion.h index c48d6566..26cf0039 100644 --- a/toxcore/onion.h +++ b/toxcore/onion.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef ONION_H -#define ONION_H +#ifndef C_TOXCORE_TOXCORE_ONION_H +#define C_TOXCORE_TOXCORE_ONION_H #include "DHT.h" #include "mono_time.h" diff --git a/toxcore/onion_announce.h b/toxcore/onion_announce.h index adbffc6a..2eb5051b 100644 --- a/toxcore/onion_announce.h +++ b/toxcore/onion_announce.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef ONION_ANNOUNCE_H -#define ONION_ANNOUNCE_H +#ifndef C_TOXCORE_TOXCORE_ONION_ANNOUNCE_H +#define C_TOXCORE_TOXCORE_ONION_ANNOUNCE_H #include "onion.h" diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index ff090ba2..66e417d7 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef ONION_CLIENT_H -#define ONION_CLIENT_H +#ifndef C_TOXCORE_TOXCORE_ONION_CLIENT_H +#define C_TOXCORE_TOXCORE_ONION_CLIENT_H #include "net_crypto.h" #include "onion_announce.h" diff --git a/toxcore/ping.api.h b/toxcore/ping.api.h index 9f8d319c..2ae5b365 100644 --- a/toxcore/ping.api.h +++ b/toxcore/ping.api.h @@ -24,8 +24,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef PING_H -#define PING_H +#ifndef C_TOXCORE_TOXCORE_PING_H +#define C_TOXCORE_TOXCORE_PING_H #include "DHT.h" #include "network.h" @@ -62,5 +62,5 @@ int32_t send_request(iP_Port::this ipp, const uint8_t *public_key); } %{ -#endif /* PING_H */ +#endif // C_TOXCORE_TOXCORE_PING_H %} diff --git a/toxcore/ping.h b/toxcore/ping.h index da9a53f2..0413e285 100644 --- a/toxcore/ping.h +++ b/toxcore/ping.h @@ -23,8 +23,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef PING_H -#define PING_H +#ifndef C_TOXCORE_TOXCORE_PING_H +#define C_TOXCORE_TOXCORE_PING_H #include "DHT.h" #include "network.h" @@ -71,4 +71,4 @@ void ping_iterate(Ping *ping); int32_t ping_send_request(Ping *ping, struct IP_Port ipp, const uint8_t *public_key); -#endif /* PING_H */ +#endif // C_TOXCORE_TOXCORE_PING_H diff --git a/toxcore/ping_array.api.h b/toxcore/ping_array.api.h index b153db25..e0ac333b 100644 --- a/toxcore/ping_array.api.h +++ b/toxcore/ping_array.api.h @@ -77,5 +77,5 @@ int32_t check(const mono_Time::this *mono_time, uint8_t[length] data, uint64_t p } // extern "C" #endif -#endif // C_TOXCORE_TOXCORE_PING_ARRAY_H +#endif // C_TOXCORE_TOXCORE_PING_ARRAY_H %} diff --git a/toxcore/ping_array.h b/toxcore/ping_array.h index 90e10460..a2e57856 100644 --- a/toxcore/ping_array.h +++ b/toxcore/ping_array.h @@ -78,4 +78,4 @@ int32_t ping_array_check(struct Ping_Array *_array, const struct Mono_Time *mono } // extern "C" #endif -#endif // C_TOXCORE_TOXCORE_PING_ARRAY_H +#endif // C_TOXCORE_TOXCORE_PING_ARRAY_H diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h index d960ee74..8beb86b7 100644 --- a/toxcore/tox.api.h +++ b/toxcore/tox.api.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOX_H -#define TOX_H +#ifndef C_TOXCORE_TOXCORE_TOX_H +#define C_TOXCORE_TOXCORE_TOX_H #include #include @@ -2772,5 +2772,5 @@ typedef TOX_CONNECTION Tox_Connection; typedef TOX_FILE_CONTROL Tox_File_Control; typedef TOX_CONFERENCE_TYPE Tox_Conference_Type; -#endif +#endif // C_TOXCORE_TOXCORE_TOX_H %} diff --git a/toxcore/tox.h b/toxcore/tox.h index 5dcdd7f0..5a9ca450 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOX_H -#define TOX_H +#ifndef C_TOXCORE_TOXCORE_TOX_H +#define C_TOXCORE_TOXCORE_TOX_H #include #include @@ -3167,4 +3167,4 @@ typedef TOX_CONNECTION Tox_Connection; typedef TOX_FILE_CONTROL Tox_File_Control; typedef TOX_CONFERENCE_TYPE Tox_Conference_Type; -#endif +#endif // C_TOXCORE_TOXCORE_TOX_H diff --git a/toxcore/util.h b/toxcore/util.h index b4ba407d..85586724 100644 --- a/toxcore/util.h +++ b/toxcore/util.h @@ -23,8 +23,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef UTIL_H -#define UTIL_H +#ifndef C_TOXCORE_TOXCORE_UTIL_H +#define C_TOXCORE_TOXCORE_UTIL_H #include #include @@ -55,4 +55,4 @@ uint64_t min_u64(uint64_t a, uint64_t b); } // extern "C" #endif -#endif /* UTIL_H */ +#endif // C_TOXCORE_TOXCORE_UTIL_H diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h index 5cb32f8d..8249fa1c 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -90,3 +93,5 @@ int crypto_pwhash_scryptsalsa208sha256_ll(const uint8_t * passwd, size_t passwdl #endif #endif + +#endif diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_scrypt.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_scrypt.h index 3f0b7d72..978ac918 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_scrypt.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_scrypt.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_CRYPTO_SCRYPT_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_CRYPTO_SCRYPT_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -91,3 +94,5 @@ extern uint8_t * escrypt_gensalt_r( #endif /* !_CRYPTO_SCRYPT_H_ */ #endif + +#endif diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h index ee5b30f7..ebf8d9df 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_EXPORT_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_EXPORT_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -36,3 +39,5 @@ #endif #endif + +#endif diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/pbkdf2-sha256.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/pbkdf2-sha256.h index b74bc6a3..17cd2112 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/pbkdf2-sha256.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/pbkdf2-sha256.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_PBKDF2_SHA256_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_PBKDF2_SHA256_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -50,3 +53,5 @@ void PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t, #endif /* !_SHA256_H_ */ #endif + +#endif diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h index 874915ef..260a4550 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_RUNTIME_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_RUNTIME_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -31,3 +34,5 @@ int sodium_runtime_has_sse3(void); #endif #endif + +#endif diff --git a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/sysendian.h b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/sysendian.h index 04e5c1ed..4deca4c6 100644 --- a/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/sysendian.h +++ b/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/sysendian.h @@ -1,3 +1,6 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SYSENDIAN_H +#define C_TOXCORE_TOXENCRYPTSAVE_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SYSENDIAN_H + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -151,3 +154,5 @@ le64enc(void *pp, uint64_t x) #endif /* !_SYSENDIAN_H_ */ #endif + +#endif diff --git a/toxencryptsave/defines.h b/toxencryptsave/defines.h index e3fca073..0bc1d9ed 100644 --- a/toxencryptsave/defines.h +++ b/toxencryptsave/defines.h @@ -1,2 +1,7 @@ +#ifndef C_TOXCORE_TOXENCRYPTSAVE_DEFINES_H +#define C_TOXCORE_TOXENCRYPTSAVE_DEFINES_H + #define TOX_ENC_SAVE_MAGIC_NUMBER "toxEsave" #define TOX_ENC_SAVE_MAGIC_LENGTH 8 + +#endif diff --git a/toxencryptsave/toxencryptsave.api.h b/toxencryptsave/toxencryptsave.api.h index b034288a..28d7a650 100644 --- a/toxencryptsave/toxencryptsave.api.h +++ b/toxencryptsave/toxencryptsave.api.h @@ -22,8 +22,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOXENCRYPTSAVE_H -#define TOXENCRYPTSAVE_H +#ifndef C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H +#define C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H #ifdef __cplusplus extern "C" { @@ -313,5 +313,5 @@ static bool is_data_encrypted(const uint8_t *data); } #endif -#endif +#endif // C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H %} diff --git a/toxencryptsave/toxencryptsave.h b/toxencryptsave/toxencryptsave.h index 78d377e5..400483cb 100644 --- a/toxencryptsave/toxencryptsave.h +++ b/toxencryptsave/toxencryptsave.h @@ -21,8 +21,8 @@ * You should have received a copy of the GNU General Public License * along with Tox. If not, see . */ -#ifndef TOXENCRYPTSAVE_H -#define TOXENCRYPTSAVE_H +#ifndef C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H +#define C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H #ifdef __cplusplus extern "C" { @@ -375,4 +375,4 @@ bool tox_is_data_encrypted(const uint8_t *data); } #endif -#endif +#endif // C_TOXCORE_TOXENCRYPTSAVE_TOXENCRYPTSAVE_H