ArgPar-C v1.0.0-build
Simple and powerful Argument Parser for C
Loading...
Searching...
No Matches
APCpredefines.h
Go to the documentation of this file.
1/**
2 * APCpredefines.h - pcannonProjectStandards
3 * Predefines for C and C++ projects
4 * STD Information: 20250723 - 1.0S
5 */
6
7#ifndef INCLUDE_C_APCPREDEFINES_H_
8#define INCLUDE_C_APCPREDEFINES_H_
9
10// Project setup
11#define APC_DEFAULT_C_STD 201112L
12
13// Versioning
14#define APC_VERSION_MAJOR 1
15#define APC_VERSION_MINOR 0
16#define APC_VERSION_PATCH 0
17
18#define APC_VERSION_STD 20260226L
19
20// Version states:
21// * dev
22// * beta
23// * build
24#define APC_VERSION_STATE "dev"
25
26#define APC_VERSION ((EXAMPLE_VERSION_MAJOR<<16)|(EXAMPLE_VERSION_MINOR<<8)|(EXAMPLE_VERSION_PATCH)|(EXAMPLE_VERSION_STATE << 24))
27
28#define APC_VERSION_CHECK(EXAMPLE_VERSION_MAJOR, EXAMPLE_VERSION_MINOR, EXAMPLE_VERSION_PATCH, EXAMPLE_VERSION_STATE) \
29 (((APC_VERSION_MAJOR)<<16)|((EXAMPLE_VERSION_MINOR)<<8)|(EXAMPLE_VERSION_PATCH)|((EXAMPLE_VERSION_STATE) << 24))
30
31// Macro utils
32#define APC_STRINGIFY(x) #x
33#define APC_TOSTRING(x) EXAMPLE_STRINGIFY(x)
34
35#ifndef APC_DEV
36# define APC_DEV true
37#endif
38
39#define APC_FREE(x) free(x); x = NULL
40
41#if defined(WIN32) || defined(_WIN32)
42# define APC_OS_WIN32
43#elif defined(__APPLE__) || defined(__MACH__) || defined(Macintosh)
44# define APC_OS_MACOS
45#elif defined(__linux__)
46# define APC_OS_UNIX_LINUX
47#elif defined(__unix) || defined(__unix__)
48# define APC_OS_UNIX
49#elif defined(__FreeBSD__)
50# define APC_OS_FREEBSD
51#else
52# error "Current platform might not supported"
53#endif // defined(WIN32) // Platform check
54
55#endif // INCLUDE_C_APCPREDEFINES_H_
56