From b491f039cee6e585ca4e1dd5d4144e474da8acdf Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 28 Mar 2025 21:06:13 +0100 Subject: 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 --- lib/Macros.h | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'lib') 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 +extern "C" +{ +#include +} + +#include #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; + } +} -- cgit v1.2.3