diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-11-23 15:35:14 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-11-23 15:35:14 +0100 |
commit | fbcd3f6f87cefd4cd621ab4c5cb518f410189e53 (patch) | |
tree | 165b2bca4cbcfce00faeb4be0eabc01a636ff64c | |
parent | a059440035093f0a649db4bc8af83fae208f746d (diff) | |
download | bxgen-fbcd3f6f87cefd4cd621ab4c5cb518f410189e53.zip |
Update include guards
-rwxr-xr-x | bxgen.c | 98 |
1 files changed, 58 insertions, 40 deletions
@@ -128,54 +128,37 @@ exit $? # */ #endif // ================================================================ // -// Compilation options -// -// ================================================================ - -#ifndef IMPLEMENTATION -#define IMPLEMENTATION 1 -#endif - -#ifndef HELPERS -#define HELPERS 1 -#endif - -#ifndef TESTING -#define TESTING 1 -#endif - -#ifndef LOG_LEVEL -#define LOG_LEVEL 5 -#endif - -#ifndef LOG_BLOCKING -#define LOG_BLOCKING 0 -#endif - -#ifndef TRACE_BLOCKING -#define TRACE_BLOCKING 1 -#endif - -// ================================================================ -// -// Basic declarations +// Types // // ================================================================ -#define VERSION "dev" +#ifndef TYPES_HEADER_GUARD_ +#define TYPES_HEADER_GUARD_ typedef signed char i8; typedef signed short i16; -typedef signed int i32; +typedef signed i32; typedef signed long long i64; typedef unsigned char u8; typedef unsigned short u16; -typedef unsigned int u32; +typedef unsigned u32; typedef unsigned long long u64; +typedef char c8; +typedef int c32; +typedef signed char b8; typedef float f32; typedef double f64; -typedef signed char b8; // 8-bit boolean -typedef char c8; // 8-bit character + +#endif // TYPES_HEADER_GUARD_ + +// ================================================================ +// +// Version +// +// ================================================================ + +#ifndef BXGEN_HEADER_GUARD_ +#define BXGEN_HEADER_GUARD_ // ================================================================ // @@ -554,22 +537,56 @@ c8 * l_find(c8 *name, b8 silent); } #endif +#endif // BXGEN_HEADER_GUARD_ + // ================================================================ // // IMPLEMENTATION // // ================================================================ + +#ifndef BXGEN_HEADER +#ifndef BXGEN_IMPL_GUARD_ +#define BXGEN_IMPL_GUARD_ + +// ================================================================ // -// * Basic utilities +// Compilation options // // ================================================================ -#if IMPLEMENTATION - #ifdef __cplusplus #error Implementation code should be compiled with a C compiler! #endif +#ifndef HELPERS +#define HELPERS 1 +#endif + +#ifndef TESTING +#define TESTING 1 +#endif + +#ifndef LOG_LEVEL +#define LOG_LEVEL 5 +#endif + +#ifndef LOG_BLOCKING +#define LOG_BLOCKING 0 +#endif + +#ifndef TRACE_BLOCKING +#define TRACE_BLOCKING 1 +#endif + +#define VERSION "dev" + +// ================================================================ +// +// * Basic utilities +// +// ================================================================ + #ifndef NULL #define NULL ((void *) 0) #endif @@ -5710,4 +5727,5 @@ i32 main(i32 argc, c8 **argv) { #endif // TESTING -#endif // IMPLEMENTATION +#endif // BXGEN_IMPL_GUARD_ +#endif // BXGEN_HEADER |