diff --git a/.clang-format b/.clang-format index 19acc21..bc877c6 100644 --- a/.clang-format +++ b/.clang-format @@ -6,3 +6,6 @@ AllowShortIfStatementsOnASingleLine: WithoutElse AlignAfterOpenBracket: Align BinPackParameters: true AllowAllParametersOfDeclarationOnNextLine: true + +IndentPPDirectives: BeforeHash +IndentGotoLabels: true diff --git a/include/macros.h b/include/macros.h index ad0f718..56f3fb3 100644 --- a/include/macros.h +++ b/include/macros.h @@ -3,31 +3,31 @@ // Do we just replace the compiler with clang?? #if defined(__clang__) -#define NULLABLE _Nullable + #define NULLABLE _Nullable #else -#define NULLABLE + #define NULLABLE #endif #if defined(__clang__) -#define NNULLABLE _Nonnull + #define NNULLABLE _Nonnull #else -#define NNULLABLE + #define NNULLABLE #endif #if defined(__clang__) -#define UNULLABLE _Null_unspecified + #define UNULLABLE _Null_unspecified #else -#define UNULLABLE + #define UNULLABLE #endif #if defined(__clang__) -#define COMPILER_VERSION __VERSION__ + #define COMPILER_VERSION __VERSION__ #elif defined(__GNUC__) -#define xstr(s) str(s) -#define str(s) #s + #define xstr(s) str(s) + #define str(s) #s -#define COMPILER_VERSION \ -"GCC " xstr(__GNUC__) "." xstr(__GNUC_MINOR__) "." xstr(__GNUC_PATCHLEVEL__) + #define COMPILER_VERSION \ + "GCC " xstr(__GNUC__) "." xstr(__GNUC_MINOR__) "." xstr(__GNUC_PATCHLEVEL__) #endif #define LEN(X) (sizeof(X) / sizeof((X)[0]))