aboutsummaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h46
1 files changed, 42 insertions, 4 deletions
diff --git a/src/config.h b/src/config.h
index 92932de..1b2a746 100644
--- a/src/config.h
+++ b/src/config.h
@@ -1,3 +1,10 @@
+/** \file
+ * \brief The general project configuration
+ * \note This header defines "static" macros, which include system config
+ * detection mechanism, option values for external libraries used across the
+ * project and project meta data such as version info.
+ *
+ */
/*
* Copyright (c) 2019-2021 David Timber <mieabby@gmail.com>
*
@@ -32,6 +39,10 @@
#include <zlib.h>
+/** \def PRNE_HOST_WORDSIZE
+ * \brief Th system "word size". 32 if the system is a 32-bit machine. 64 if the
+ * system is a 64-bit machine.
+ */
#if INTPTR_MAX == INT32_MAX
#define PRNE_HOST_WORDSIZE 32
#elif INTPTR_MAX == INT64_MAX
@@ -40,29 +51,51 @@
#error "FIXME!"
#endif
+// The program version
#define PRNE_PROG_VER {\
0x11, 0xf7, 0x6b, 0x87, 0x62, 0x1a, 0x47, 0x9c,\
0xa2, 0x18, 0x5c, 0x55, 0x40, 0x33, 0x7c, 0x9f\
}
+/**
+ * \brief The shared global file name salt value
+ * \note This is the protocol uuid used as the salt value for calculating the
+ * hashed name of the shm file.
+ * \see prne_shared_global
+ */
#define PRNE_SHG_SALT {\
0x31, 0xe4, 0xf1, 0x7c, 0xdb, 0x76, 0x43, 0x32,\
0xaf, 0x48, 0xfd, 0x9f, 0xb8, 0x45, 0x3f, 0x8f\
}
+/**
+ * \brief The version matrix
+ * \note The version matrix is a array of previous known version uuids of
+ * Proone. The byte size of the array must be a multiple of 16.
+ * \note If there's no previous version, the array must contain one or more
+ * placeholder versions because the ISO-C does not allow empty initialiser
+ * lists. The placeholder versions may be used to reserve uuids for future
+ * versions.
+ */
#define PRNE_VER_MAT {\
/* 76f2f748-3b6f-420c-abd7-e9929a0b67d6: placeholder version 1 */\
- /* Remove it when you add the first old version */\
+ /* Remove/replace it when you add the first old version */\
0x76, 0xf2, 0xf7, 0x48, 0x3b, 0x6f, 0x42, 0x0c,\
0xab, 0xd7, 0xe9, 0x92, 0x9a, 0x0b, 0x67, 0xd6,\
/* ce6fe199-5595-49a1-96c6-261d1cce9e32: placeholder version 2 */\
- /* Remove it when you add the first old version */\
+ /* Remove/replace it when you add the first old version */\
0xce, 0x6f, 0xe1, 0x99, 0x55, 0x95, 0x49, 0xa1,\
0x96, 0xc6, 0x26, 0x1d, 0x1c, 0xce, 0x9e, 0x32\
}
+// The common zlib compression level
#define PRNE_PACK_Z_LEVEL Z_DEFAULT_COMPRESSION
-// PRNE_HOST_ARCH
+/** \def PRNE_HOST_ARCH
+ * \brief The system CPU architecture
+ * \note Compiler-specific macros are used. Expand this macro to support other
+ * compilers.
+ * \see prne_arch_t
+ */
#ifdef __GNUC__
#if defined(__i386__)
#define PRNE_HOST_ARCH PRNE_ARCH_I686
@@ -103,7 +136,12 @@
#error "FIXME!"
#endif
-// PRNE_HOST_OS
+/** \def PRNE_HOST_OS
+ * \brief The system operating system
+ * \note Compiler-specific macros are used. Expand this macro to support other
+ * compilers.
+ * \see prne_os_t
+ */
#ifdef __GNUC__
#if defined(__linux__)
#define PRNE_HOST_OS PRNE_OS_LINUX