Fix formatting of #includes
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "basic.h"
|
#include "basic.h"
|
||||||
|
|
||||||
bool streq(string s1, string s2)
|
bool streq(string s1, string s2)
|
||||||
|
|||||||
+4
-4
@@ -6,13 +6,13 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "sha256.h"
|
|
||||||
#include "file_system.h"
|
|
||||||
#include "hash_set.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "tcp.h"
|
#include "tcp.h"
|
||||||
|
#include "sha256.h"
|
||||||
|
#include "config.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
#include "hash_set.h"
|
||||||
#include "byte_queue.h"
|
#include "byte_queue.h"
|
||||||
|
#include "file_system.h"
|
||||||
#include "chunk_server.h"
|
#include "chunk_server.h"
|
||||||
|
|
||||||
static string hash2path(ChunkServer *state, SHA256 hash, char *out)
|
static string hash2path(ChunkServer *state, SHA256 hash, char *out)
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#ifndef CHUNK_SERVER_INCLUDED
|
#ifndef CHUNK_SERVER_INCLUDED
|
||||||
#define CHUNK_SERVER_INCLUDED
|
#define CHUNK_SERVER_INCLUDED
|
||||||
|
|
||||||
|
#include "tcp.h"
|
||||||
|
#include "basic.h"
|
||||||
|
#include "hash_set.h"
|
||||||
|
|
||||||
#define TAG_METADATA_SERVER 1
|
#define TAG_METADATA_SERVER 1
|
||||||
#define TAG_CHUNK_SERVER 2
|
#define TAG_CHUNK_SERVER 2
|
||||||
|
|
||||||
|
|||||||
@@ -5,13 +5,9 @@
|
|||||||
#define MAX_CHUNK_SERVERS 128
|
#define MAX_CHUNK_SERVERS 128
|
||||||
#define MAX_OPERATIONS 128
|
#define MAX_OPERATIONS 128
|
||||||
#define MAX_REQUESTS_PER_QUEUE 128
|
#define MAX_REQUESTS_PER_QUEUE 128
|
||||||
|
|
||||||
#define REPLICATION_FACTOR 3
|
#define REPLICATION_FACTOR 3
|
||||||
|
|
||||||
|
|
||||||
#define SYNC_INTERVAL 10
|
#define SYNC_INTERVAL 10
|
||||||
#define RESPONSE_TIME_LIMIT 90
|
#define RESPONSE_TIME_LIMIT 90
|
||||||
|
|
||||||
#define DELETION_TIMEOUT 30
|
#define DELETION_TIMEOUT 30
|
||||||
|
|
||||||
#endif // CONFIG_INCLUDED
|
#endif // CONFIG_INCLUDED
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "basic.h"
|
#include "basic.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "hash_set.h"
|
#include "hash_set.h"
|
||||||
|
|
||||||
void hash_set_init(HashSet *set)
|
void hash_set_init(HashSet *set)
|
||||||
|
|||||||
+2
-1
@@ -3,12 +3,13 @@
|
|||||||
#else
|
#else
|
||||||
#define POLL_CAPACITY 1024
|
#define POLL_CAPACITY 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "metadata_server.h"
|
|
||||||
#include "chunk_server.h"
|
#include "chunk_server.h"
|
||||||
#include "random_client.h"
|
#include "random_client.h"
|
||||||
|
#include "metadata_server.h"
|
||||||
|
|
||||||
#ifdef MAIN_METADATA_SERVER
|
#ifdef MAIN_METADATA_SERVER
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
|
|
||||||
bool binary_read(BinaryReader *reader, void *dst, int len)
|
bool binary_read(BinaryReader *reader, void *dst, int len)
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <quakey.h>
|
#include <quakey.h>
|
||||||
|
|
||||||
#include "basic.h"
|
#include "basic.h"
|
||||||
#include "byte_queue.h"
|
#include "byte_queue.h"
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
#include "tcp.h"
|
#include "tcp.h"
|
||||||
#include "wal.h"
|
#include "wal.h"
|
||||||
#include "file_tree.h"
|
|
||||||
#include "config.h"
|
|
||||||
#include "basic.h"
|
#include "basic.h"
|
||||||
|
#include "config.h"
|
||||||
#include "hash_set.h"
|
#include "hash_set.h"
|
||||||
|
#include "file_tree.h"
|
||||||
|
|
||||||
#define CONNECTION_TAG_CLIENT -2
|
#define CONNECTION_TAG_CLIENT -2
|
||||||
#define CONNECTION_TAG_UNKNOWN -3
|
#define CONNECTION_TAG_UNKNOWN -3
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
#if defined(MAIN_SIMULATION) || defined(MAIN_TEST)
|
||||||
#define QUAKEY_ENABLE_MOCKS
|
#define QUAKEY_ENABLE_MOCKS
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "wal.h"
|
#include "wal.h"
|
||||||
#include "file_system.h"
|
|
||||||
#include "file_tree.h"
|
#include "file_tree.h"
|
||||||
|
#include "file_system.h"
|
||||||
|
|
||||||
#define WAL_MAGIC 0xcafebebe
|
#define WAL_MAGIC 0xcafebebe
|
||||||
#define WAL_VERSION 1
|
#define WAL_VERSION 1
|
||||||
|
|||||||
Reference in New Issue
Block a user