diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 21:06:13 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-28 21:07:10 +0100 |
| commit | b491f039cee6e585ca4e1dd5d4144e474da8acdf (patch) | |
| tree | 29a1a173b76719abac61d84ae22a74e208a16e59 /lib | |
| parent | f8bf9c5e54224274399af0693477c9b6e6b248e4 (diff) | |
vendor: add: Use rang library now.
cli: fix: always check if builder has been allocated after (presumably)
allocating one.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Macros.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/Macros.h b/lib/Macros.h index e9adddb..fb6e77e 100644 --- a/lib/Macros.h +++ b/lib/Macros.h @@ -5,17 +5,32 @@ #pragma once -#include <cassert> +extern "C" +{ +#include <assert.h> +} + +#include <rang.h> #define LIKELY(ARG) (ARG) ? assert(false) : ((void)0) #define UNLIKELY(ARG) LIKELY(!(ARG)) -#define BTBKIT_VERSION "1.2.0" +#define LIBBTB_VERSION "1.2.0" + +#define LIBBTB_VERSION_BCD 0x0120 -#define BTBKIT_VERSION_BCD 0x0120 +#define LIBBTB_VERSION_MAJOR 1 +#define LIBBTB_VERSION_MINOR 0 +#define LIBBTB_VERSION_PATCH 0 -#define BTBKIT_VERSION_MAJOR 1 -#define BTBKIT_VERSION_MINOR 0 -#define BTBKIT_VERSION_PATCH 0 +#define LIBBTB_UNUSED(X) ((void)X) -#define BTB_UNUSED(X) ((void)X) +namespace logger +{ + inline std::ostream& info() noexcept + { + auto& out = std::cout; + out << rang::style::bold << rang::fg::red << "btb: " << rang::style::reset; + return out; + } +} |
