CSTR
v1.2.0-build
Simple yet powerful string manipulation in C
Loading...
Searching...
No Matches
CSTRpredefines.h
Go to the documentation of this file.
1
/**
2
* CSTRpredefines.h - pcannonProjectStandards
3
* Predefines for C and C++ projects
4
* STD Information: 20250723 - 1.0S
5
*/
6
7
#pragma once
8
9
// Project setup
10
#define CSTR_DEFAULT_C_STD 201112L
11
12
// Versioning
13
#define CSTR_VERSION_MAJOR 1
14
#define CSTR_VERSION_MINOR 2
15
#define CSTR_VERSION_PATCH 0
16
17
#define CSTR_VERSION_STD 20260303
18
19
// Version states:
20
// * dev
21
// * beta
22
// * build
23
#define CSTR_VERSION_STATE "build"
24
25
#define CSTR_VERSION ((CSTR_VERSION_MAJOR<<16)|(CSTR_VERSION_MINOR<<8)|(CSTR_VERSION_PATCH)|(CSTR_VERSION_STATE << 24))
26
27
#define CSTR_VERSION_CHECK(CSTR_VERSION_MAJOR, CSTR_VERSION_MINOR, CSTR_VERSION_PATCH, CSTR_VERSION_STATE) \
28
(((CSTR_VERSION_MAJOR)<<16)|((CSTR_VERSION_MINOR)<<8)|(CSTR_VERSION_PATCH)|((CSTR_VERSION_STATE) << 24))
29
30
// Macro utils
31
#define CSTR_STRINGIFY(x) #x
32
#define CSTR_TOSTRING(x) CSTR_STRINGIFY(x)
33
34
#ifndef CSTR_DEV
35
# define CSTR_DEV 1
36
#endif
37
38
#define CSTR_FREE(x) free(x); x = NULL
39
40
#if defined(WIN32) || defined(_WIN32)
41
# define CSTR_OS_WIN32
42
#elif defined(__APPLE__) || defined(__MACH__) || defined(Macintosh)
43
# define CSTR_OS_MACOS
44
#elif defined(__linux__) || defined(__unix) || defined(__unix__)
45
# define CSTR_OS_UNIX_LINUX
46
#elif defined(__FreeBSD__)
47
# define CSTR_OS_FREEBSD
48
#else
49
# warning "Current platform might not be supported"
50
#endif
// defined(WIN32) // Platform check
51
inc
cstr
CSTRpredefines.h
Generated by
1.16.1