diff --git a/.gitignore b/.gitignore index 41b784b..1d8c1af 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ deps.mk logger_test snprintf_test +assert_test README.pdf -.vscode +.vscode \ No newline at end of file diff --git a/README.rst b/README.rst index 6e1e211..d166a97 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ Vanilla Squad :Author: Daniel Walker -Version 5.1.0 was released on October 3, 2021. +Version 5.1.1 was released on October 8, 2021. Overview ======== @@ -175,8 +175,9 @@ Placeholders ============ placeholder.h defines a single macro: **PLACEHOLDER()**. If either the **DEBUG** or -**VASQ_ALLOW_PLACEHOLDER** macros are defined, then **PLACEHOLDER()** will resolve to a no op. Otherwise, -it will resolve to a compiler error. The intended use case is +**VASQ_ALLOW_PLACEHOLDER** macros are defined and **VASQ_REJECT_PLACEHOLDER** is not defined, then +**PLACEHOLDER()** will resolve to a no op. Otherwise, it will resolve to a compiler error. The intended use +case is .. code-block:: c diff --git a/changelog b/changelog index 956a77b..30e050c 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +5.1.1: + - The PLACEHOLDER() macro no longer depends upon features.h. + - Fixed how VASQ_REJECT_PLACEHOLDER works. + 5.1.0: - Remove some writes to stderr which occurred when vasqLoggerCreate failed. - Added the VASQ_ASSERT macro. diff --git a/include/vasq/definitions.h b/include/vasq/definitions.h index 7a9d47f..c59c8f6 100644 --- a/include/vasq/definitions.h +++ b/include/vasq/definitions.h @@ -9,7 +9,7 @@ /** * @brief Current version of the library. */ -#define VASQ_VERSION "5.1.0" +#define VASQ_VERSION "5.1.1" #ifndef NO_OP #define NO_OP ((void)0) diff --git a/include/vasq/placeholder.h b/include/vasq/placeholder.h index 872020f..03daae5 100644 --- a/include/vasq/placeholder.h +++ b/include/vasq/placeholder.h @@ -6,39 +6,25 @@ #ifndef VANILLA_SQUAD_PLACEHOLDER_H #define VANILLA_SQUAD_PLACEHOLDER_H -#include - #include "config.h" #include "definitions.h" #ifdef __USE_ISOC99 -#if (defined(DEBUG) || defined(VASQ_ALLOW_PLACEHOLDER)) && !defined(VASQ_REJECT_PLACEHOLDER) +#if defined(VASQ_REJECT_PLACEHOLDER) || (!defined(DEBUG) && !defined(VASQ_ALLOW_PLACEHOLDER)) -#ifdef VASQ_WARN_PLACEHOLDER +#define PLACEHOLDER() _Pragma("GCC error \"Placeholder code left in project.\"") -#ifdef VASQ_REJECT_PLACEHOLDER -#warning "VASQ_WARN_PLACEHOLDER and VASQ_REJECT_PLACEHOLDER are both defined." -#endif +#elif defined(VASQ_WARN_PLACEHOLDER) #define PLACEHOLDER() _Pragma("GCC warning \"Placeholder code left in project.\"") -#else // VASQ_WARN_PLACEHOLDER +#else #define PLACEHOLDER() NO_OP -#endif // VASQ_WARN_PLACEHOLDER - -#else // (defined(DEBUG) || defined(VASQ_ALLOW_PLACEHOLDER)) && !defined(VASQ_REJECT_PLACEHOLDER) - -#ifdef VASQ_ALLOW_PLACEHOLDER -#warning "VASQ_ALLOW_PLACEHOLDER and VASQ_REJECT_PLACEHOLDER are both defined." #endif -#define PLACEHOLDER() _Pragma("GCC error \"Placeholder code left in project.\"") - -#endif // (defined(DEBUG) || defined(VASQ_ALLOW_PLACEHOLDER)) && !defined(VASQ_REJECT_PLACEHOLDER) - #else // __USE_ISOC99 #warning "_Pragma not defined and so PLACEHOLDER() will not work."