Skip to content

Commit

Permalink
Standardise header guards.
Browse files Browse the repository at this point in the history
Using the full path including the repo name.
  • Loading branch information
iphydf committed Sep 9, 2018
1 parent 33c2f51 commit 2f8210e
Show file tree
Hide file tree
Showing 55 changed files with 160 additions and 120 deletions.
6 changes: 3 additions & 3 deletions auto_tests/check_compat.h
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions auto_tests/run_auto_test.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef C_TOXCORE_AUTO_TESTS_RUN_AUTO_TEST_H
#define C_TOXCORE_AUTO_TESTS_RUN_AUTO_TEST_H

#include <stdlib.h> // calloc, free

#include "check_compat.h"
Expand Down Expand Up @@ -124,3 +127,5 @@ static void run_auto_test(uint32_t tox_count, void test(Tox **toxes, State *stat
free(state);
free(toxes);
}

#endif
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/command_line_arguments.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand All @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand All @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/config_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand All @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <stdbool.h>

Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/log_backend_stdout.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

#include <stdarg.h>

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
6 changes: 3 additions & 3 deletions other/bootstrap_daemon/src/log_backend_syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand All @@ -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
6 changes: 3 additions & 3 deletions other/bootstrap_node_packets.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

#define MAX_MOTD_LENGTH 256 /* I recommend you use a maximum of 96 bytes. The hard maximum is this though. */

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
6 changes: 3 additions & 3 deletions toxav/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AUDIO_H
#define AUDIO_H
#ifndef C_TOXCORE_TOXAV_AUDIO_H
#define C_TOXCORE_TOXAV_AUDIO_H

#include "toxav.h"

Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions toxav/bwcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BWCONROLLER_H
#define BWCONROLLER_H
#ifndef C_TOXCORE_TOXAV_BWCONTROLLER_H
#define C_TOXCORE_TOXAV_BWCONTROLLER_H

#include "../toxcore/Messenger.h"

Expand All @@ -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
6 changes: 3 additions & 3 deletions toxav/msi.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MSI_H
#define MSI_H
#ifndef C_TOXCORE_TOXAV_MSI_H
#define C_TOXCORE_TOXAV_MSI_H

#include "audio.h"
#include "video.h"
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions toxav/ring_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RING_BUFFER_H
#define RING_BUFFER_H
#ifndef C_TOXCORE_TOXAV_RING_BUFFER_H
#define C_TOXCORE_TOXAV_RING_BUFFER_H

#include <stdbool.h>
#include <stdint.h>
Expand All @@ -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
6 changes: 3 additions & 3 deletions toxav/rtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RTP_H
#define RTP_H
#ifndef C_TOXCORE_TOXAV_RTP_H
#define C_TOXCORE_TOXAV_RTP_H

#include "bwcontroller.h"

Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions toxav/toxav.api.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXAV_H
#define TOXAV_H
#ifndef C_TOXCORE_TOXAV_TOXAV_H
#define C_TOXCORE_TOXAV_TOXAV_H

#include <stdbool.h>
#include <stddef.h>
Expand Down Expand Up @@ -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
%}
6 changes: 3 additions & 3 deletions toxav/toxav.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXAV_H
#define TOXAV_H
#ifndef C_TOXCORE_TOXAV_TOXAV_H
#define C_TOXCORE_TOXAV_TOXAV_H

#include <stdbool.h>
#include <stddef.h>
Expand Down Expand Up @@ -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
6 changes: 3 additions & 3 deletions toxav/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VIDEO_H
#define VIDEO_H
#ifndef C_TOXCORE_TOXAV_VIDEO_H
#define C_TOXCORE_TOXAV_VIDEO_H

#include "toxav.h"

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions toxcore/DHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"
Expand Down
6 changes: 3 additions & 3 deletions toxcore/LAN_discovery.api.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"
%}
Expand Down Expand Up @@ -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
%}
4 changes: 2 additions & 2 deletions toxcore/LAN_discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand Down
4 changes: 2 additions & 2 deletions toxcore/Messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"
Expand Down
4 changes: 2 additions & 2 deletions toxcore/TCP_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"
Expand Down
4 changes: 2 additions & 2 deletions toxcore/TCP_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"

Expand Down
4 changes: 2 additions & 2 deletions toxcore/TCP_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* You should have received a copy of the GNU General Public License
* along with Tox. If not, see <http://www.gnu.org/licenses/>.
*/
#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"
Expand Down
Loading

0 comments on commit 2f8210e

Please sign in to comment.