Group common includes into common.h

Include config.h and compat.h in common.h, and include common.h from all
source files.
This commit is contained in:
Romain Vimont
2021-01-08 19:18:02 +01:00
parent 6385b8c162
commit 59feb2a15c
53 changed files with 30 additions and 63 deletions

View File

@@ -4,7 +4,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "config.h"
#include "common.h"
static inline void
buffer_write16be(uint8_t *buf, uint16_t value) {

View File

@@ -5,7 +5,7 @@
#include <stdbool.h>
#include <unistd.h>
#include "config.h"
#include "common.h"
// To define a circular buffer type of 20 ints:
// struct cbuf_int CBUF(int, 20);

View File

@@ -4,7 +4,7 @@
#include <stdint.h>
#include <SDL2/SDL_mutex.h>
#include "config.h"
#include "common.h"
#include "log.h"
static inline void

View File

@@ -3,7 +3,6 @@
#include <stdio.h>
#include <SDL2/SDL_platform.h>
#include "config.h"
#include "log.h"
#ifdef __WINDOWS__

View File

@@ -17,7 +17,7 @@
typedef int socket_t;
#endif
#include "config.h"
#include "common.h"
bool
net_init(void);

View File

@@ -3,7 +3,7 @@
#include <stdbool.h>
#include "config.h"
#include "common.h"
#ifdef _WIN32

View File

@@ -6,7 +6,7 @@
#include <stdbool.h>
#include <stddef.h>
#include "config.h"
#include "common.h"
// To define a queue type of "struct foo":
// struct queue_foo QUEUE(struct foo);

View File

@@ -12,8 +12,6 @@
#include <SDL2/SDL_stdinc.h>
#include "config.h"
size_t
xstrncpy(char *dest, const char *src, size_t n) {
size_t i;

View File

@@ -4,7 +4,7 @@
#include <stdbool.h>
#include <stddef.h>
#include "config.h"
#include "common.h"
// like strncpy, except:
// - it copies at most n-1 chars