diff --git a/CHANGES.md b/CHANGES.md index bca37124..7edb8f0e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,9 @@ ## 1.0.1-rc3 - 10th September 2026 -T.B.C. +* **bec.AnsiConsole**: on Windows, emit ANSI colours only when the host supports them — Win11 assumed ready, Win10 VT builds opt in via **`SetConsoleMode(... | ENABLE_VIRTUAL_TERMINAL_PROCESSING)`**, older hosts (e.g. XP) stay plain; +* examples and scratch tests: non-Windows console sink moved from **be.fprintf** to **be.AnsiConsole** for simple console demos (via **`define_simple_console_example_*`**, **be.console** / **bec.console** aliases, matching implicit-link headers, and per-project **CMakeLists.txt** / **implicit_link** updates); multiplex / callback / **be.N** cases deferred; +* **test.component.be.file.threading**: **be.N** console entry uses **`pantheios_be_console`** (platform alias) to match **bec.console.h** / Windows **bec.WindowsConsole** linkage; ## 1.0.1-rc2 - 6th September 2026 diff --git a/cmake/TargetMacros.cmake b/cmake/TargetMacros.cmake index 8a0f0389..c015afac 100644 --- a/cmake/TargetMacros.cmake +++ b/cmake/TargetMacros.cmake @@ -94,8 +94,8 @@ function(define_simple_console_example_c program_and_main_source_stem) target_link_libraries(${program_and_main_source_stem} PRIVATE - $,Pantheios.be.WindowsConsole,Pantheios.be.fprintf> - $,Pantheios.bec.WindowsConsole,Pantheios.bec.fprintf> + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(${program_and_main_source_stem} @@ -158,8 +158,8 @@ function(define_simple_console_example_cpp program_and_main_source_stem) target_link_libraries(${program_and_main_source_stem} PRIVATE - $,Pantheios.be.WindowsConsole,Pantheios.be.fprintf> - $,Pantheios.bec.WindowsConsole,Pantheios.bec.fprintf> + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(${program_and_main_source_stem} diff --git a/examples/c/example.c.101/implicit_link.cpp b/examples/c/example.c.101/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.101/implicit_link.cpp +++ b/examples/c/example.c.101/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/example.c.N/CMakeLists.txt b/examples/c/example.c.N/CMakeLists.txt index fa5b0efd..eec56be8 100644 --- a/examples/c/example.c.N/CMakeLists.txt +++ b/examples/c/example.c.N/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(example.c.N PRIVATE Pantheios.be.N Pantheios.bec.file - Pantheios.bec.fprintf + Pantheios.bec.AnsiConsole Pantheios.bec.null ) diff --git a/examples/c/example.c.N/example.c.N.c b/examples/c/example.c.N/example.c.N.c index 32e8b062..fb9edc22 100644 --- a/examples/c/example.c.N/example.c.N.c +++ b/examples/c/example.c.N/example.c.N.c @@ -9,7 +9,7 @@ * for be.N * * Created: 5th December 2006 - * Updated: 14th July 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #if defined(PLATFORMSTL_OS_IS_UNIX) # include @@ -55,7 +55,7 @@ pan_fe_N_t PAN_FE_N_SEVERITY_CEILINGS[] = pan_be_N_t PAN_BE_N_BACKEND_LIST[] = { PANTHEIOS_BE_N_STDFORM_ENTRY(1, pantheios_be_file, 0) - , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_fprintf, 0) + , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_AnsiConsole, 0) , PANTHEIOS_BE_N_STDFORM_ENTRY(3, pantheios_be_null, 0) #if defined(PLATFORMSTL_OS_IS_UNIX) , PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_syslog, 0) diff --git a/examples/c/example.c.N/implicit_link.cpp b/examples/c/example.c.N/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.N/implicit_link.cpp +++ b/examples/c/example.c.N/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/example.c.assert/implicit_link.cpp b/examples/c/example.c.assert/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.assert/implicit_link.cpp +++ b/examples/c/example.c.assert/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/example.c.core.pantheios_logprintf/implicit_link.cpp b/examples/c/example.c.core.pantheios_logprintf/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.core.pantheios_logprintf/implicit_link.cpp +++ b/examples/c/example.c.core.pantheios_logprintf/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/example.c.extended_severity/implicit_link.cpp b/examples/c/example.c.extended_severity/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.extended_severity/implicit_link.cpp +++ b/examples/c/example.c.extended_severity/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/example.c.log_n/implicit_link.cpp b/examples/c/example.c.log_n/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/example.c.log_n/implicit_link.cpp +++ b/examples/c/example.c.log_n/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/util/example.c.util.getcurrenttime/implicit_link.cpp b/examples/c/util/example.c.util.getcurrenttime/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/util/example.c.util.getcurrenttime/implicit_link.cpp +++ b/examples/c/util/example.c.util.getcurrenttime/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/c/util/example.c.util.gethostname/implicit_link.cpp b/examples/c/util/example.c.util.gethostname/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/c/util/example.c.util.gethostname/implicit_link.cpp +++ b/examples/c/util/example.c.util.gethostname/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/backends/example.cpp.backends.callback/example.cpp.backends.callback.cpp b/examples/cpp/backends/example.cpp.backends.callback/example.cpp.backends.callback.cpp index a3aba9f8..f28fa623 100644 --- a/examples/cpp/backends/example.cpp.backends.callback/example.cpp.backends.callback.cpp +++ b/examples/cpp/backends/example.cpp.backends.callback/example.cpp.backends.callback.cpp @@ -7,7 +7,7 @@ * - use of pantheios::logputs() in bail-out conditions * * Created: 25th August 2006 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -19,13 +19,7 @@ /* Pantheios header files */ #include // Pantheios C++ main header #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include // Include the API for bec.fprintf -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include // Include the API for bec.WindowsConsole -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include // Include the API for bec.AnsiConsole /* Standard C/C++ header files */ #include // for std::exception @@ -50,33 +44,13 @@ PANTHEIOS_EXTERN const PAN_CHAR_T PANTHEIOS_FE_PROCESS_IDENTITY[] = PANTHEIOS_LI /* ////////////////////////////////////////////////////////////////////// */ -#if defined(PLATFORMSTL_OS_IS_UNIX) - -PANTHEIOS_CALL(void) pantheios_be_fprintf_getAppInit( - int /* backEndId */ -, pan_be_fprintf_init_t* init) /* throw() */ +PANTHEIOS_CALL(void) pantheios_be_AnsiConsole_getAppInit( + int /* backEndId */ +, pan_be_AnsiConsole_init_t* init) /* throw() */ { init->flags |= PANTHEIOS_BE_INIT_F_NO_DATETIME; // Don't show date/time } -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) - -PANTHEIOS_CALL(void) pantheios_be_WindowsConsole_getAppInit( - int /* backEndId */ -, pan_be_WindowsConsole_init_t* init -) /* throw() */ -{ - init->flags |= PANTHEIOS_BE_INIT_F_NO_DATETIME; // Don't show date/time - - init->colours[pantheios::debug] = FOREGROUND_BLUE | FOREGROUND_INTENSITY; // Lose the white background - init->colours[pantheios::notice] = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; // Lose the intensity -} - -#else /* ? OS */ - -# error Platform not discriminated -#endif /* OS */ - /* ///////////////////////////////////////////////////////////////////////// * globals diff --git a/examples/cpp/backends/example.cpp.backends.callback/implicit_link.cpp b/examples/cpp/backends/example.cpp.backends.callback/implicit_link.cpp index 8613f31a..29a2668d 100644 --- a/examples/cpp/backends/example.cpp.backends.callback/implicit_link.cpp +++ b/examples/cpp/backends/example.cpp.backends.callback/implicit_link.cpp @@ -3,13 +3,7 @@ #include #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/backends/example.cpp.backends.mx.1/CMakeLists.txt b/examples/cpp/backends/example.cpp.backends.mx.1/CMakeLists.txt index 292cea7d..e5e234fb 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.1/CMakeLists.txt +++ b/examples/cpp/backends/example.cpp.backends.mx.1/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(example.cpp.backends.mx.1 target_link_libraries(example.cpp.backends.mx.1 PRIVATE - $,Pantheios.bec.WindowsConsole,Pantheios.bec.fprintf> + Pantheios.bec.AnsiConsole $,Pantheios.bec.WindowsSyslog,Pantheios.bec.syslog> ) diff --git a/examples/cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp b/examples/cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp index 11e4496e..cf9dc978 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp +++ b/examples/cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the example.cpp.backends.mx.1 project. * * Created: 19th September 2008 - * Updated: 27th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -18,11 +18,10 @@ #include #include #include +#include #if defined(PLATFORMSTL_OS_IS_UNIX) -# include # include #elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include # include #else /* ? OS */ # error Platform not discriminated @@ -63,11 +62,10 @@ enum pan_be_N_t PAN_BE_N_BACKEND_LIST[] = { + PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_AnsiConsole, 0), #if defined(PLATFORMSTL_OS_IS_UNIX) - PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_fprintf, 0), PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Syslog, pantheios_be_syslog, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28), #elif defined(PLATFORMSTL_OS_IS_WINDOWS) - PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_WindowsConsole, 0), PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Syslog, pantheios_be_WindowsSyslog, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28), #else /* ? OS */ # error Platform not discriminated diff --git a/examples/cpp/backends/example.cpp.backends.mx.1/implicit_link.cpp b/examples/cpp/backends/example.cpp.backends.mx.1/implicit_link.cpp index ffde1f13..67cebdb6 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.1/implicit_link.cpp +++ b/examples/cpp/backends/example.cpp.backends.mx.1/implicit_link.cpp @@ -3,11 +3,10 @@ #include #include #include +#include #if defined(PLATFORMSTL_OS_IS_UNIX) -# include # include #elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include # include #else /* ? OS */ # error Platform not discriminated diff --git a/examples/cpp/backends/example.cpp.backends.mx.2/CMakeLists.txt b/examples/cpp/backends/example.cpp.backends.mx.2/CMakeLists.txt index 87ea588e..7b2fdb33 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.2/CMakeLists.txt +++ b/examples/cpp/backends/example.cpp.backends.mx.2/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(example.cpp.backends.mx.2 target_link_libraries(example.cpp.backends.mx.2 PRIVATE - $,Pantheios.bec.WindowsConsole,Pantheios.bec.fprintf> + Pantheios.bec.AnsiConsole $,Pantheios.bec.WindowsSyslog,Pantheios.bec.syslog> ) diff --git a/examples/cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp b/examples/cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp index 3e80c073..5b54bdda 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp +++ b/examples/cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the example.cpp.backends.mx.2 project. * * Created: 19th September 2008 - * Updated: 27th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -18,11 +18,10 @@ #include #include #include +#include #if defined(PLATFORMSTL_OS_IS_UNIX) -# include # include #elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include # include #else /* ? OS */ # error Platform not discriminated @@ -65,11 +64,10 @@ enum pan_be_N_t PAN_BE_N_BACKEND_LIST[] = { + PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_AnsiConsole, PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID), #if defined(PLATFORMSTL_OS_IS_UNIX) - PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_fprintf, PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID), PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Syslog, pantheios_be_syslog, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28), #elif defined(PLATFORMSTL_OS_IS_WINDOWS) - PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Console, pantheios_be_WindowsConsole, PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID), PANTHEIOS_BE_N_STDFORM_ENTRY(beid_Syslog, pantheios_be_WindowsSyslog, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28), #else /* ? OS */ # error Platform not discriminated diff --git a/examples/cpp/backends/example.cpp.backends.mx.2/implicit_link.cpp b/examples/cpp/backends/example.cpp.backends.mx.2/implicit_link.cpp index ffde1f13..67cebdb6 100644 --- a/examples/cpp/backends/example.cpp.backends.mx.2/implicit_link.cpp +++ b/examples/cpp/backends/example.cpp.backends.mx.2/implicit_link.cpp @@ -3,11 +3,10 @@ #include #include #include +#include #if defined(PLATFORMSTL_OS_IS_UNIX) -# include # include #elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include # include #else /* ? OS */ # error Platform not discriminated diff --git a/examples/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt b/examples/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt index 88e05566..88b49781 100644 --- a/examples/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt +++ b/examples/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(example.cpp.contract.PANTHEIOS_ASSERT) target_link_libraries(example.cpp.contract.PANTHEIOS_ASSERT PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(example.cpp.contract.PANTHEIOS_ASSERT diff --git a/examples/cpp/contract/example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT/CMakeLists.txt b/examples/cpp/contract/example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT/CMakeLists.txt index 60944efd..786250ed 100644 --- a/examples/cpp/contract/example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT/CMakeLists.txt +++ b/examples/cpp/contract/example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT) target_link_libraries(example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(example.cpp.contract.PANTHEIOS_MESSAGE_ASSERT diff --git a/examples/cpp/format/example.cpp.format.highres/CMakeLists.txt b/examples/cpp/format/example.cpp.format.highres/CMakeLists.txt index 4211ca99..b75ef141 100644 --- a/examples/cpp/format/example.cpp.format.highres/CMakeLists.txt +++ b/examples/cpp/format/example.cpp.format.highres/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(example.cpp.format.highres) target_link_libraries(example.cpp.format.highres PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf.WithCallback + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole.WithCallback ) target_link_libraries(example.cpp.format.highres diff --git a/examples/cpp/format/example.cpp.format.highres/example.cpp.format.highres.cpp b/examples/cpp/format/example.cpp.format.highres/example.cpp.format.highres.cpp index 3c86b1cb..3119e67f 100644 --- a/examples/cpp/format/example.cpp.format.highres/example.cpp.format.highres.cpp +++ b/examples/cpp/format/example.cpp.format.highres/example.cpp.format.highres.cpp @@ -6,8 +6,7 @@ * - high-resolution date/time fields in statements * * Created: 12th November 2007 - * Updated: 28th October 2024 - * + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -15,9 +14,9 @@ #define PANTHEIOS_NO_INCLUDE_OS_AND_3PTYLIB_STRING_ACCESS // Faster compilation /* Pantheios header files */ -#include // Pantheios C++ main header -#include // for pantheios::integer -#include // for be.fprintf +#include // Pantheios C++ main header +#include // for pantheios::integer +#include // for be.AnsiConsole /* Standard C/C++ header files */ #include // for std::exception @@ -30,7 +29,7 @@ * application-defined callbacks */ -PANTHEIOS_CALL(void) pantheios_be_fprintf_getAppInit(int /* backEndId */, pan_be_fprintf_init_t* init) /* throw() */ +PANTHEIOS_CALL(void) pantheios_be_AnsiConsole_getAppInit(int /* backEndId */, pan_be_AnsiConsole_init_t* init) /* throw() */ { /* init->flags |= PANTHEIOS_BE_INIT_F_USE_SYSTEM_TIME; */ init->flags |= PANTHEIOS_BE_INIT_F_USE_UNIX_FORMAT; diff --git a/examples/cpp/format/example.cpp.format.highres/implicit_link.cpp b/examples/cpp/format/example.cpp.format.highres/implicit_link.cpp index ce4fe4ec..6a66f58e 100644 --- a/examples/cpp/format/example.cpp.format.highres/implicit_link.cpp +++ b/examples/cpp/format/example.cpp.format.highres/implicit_link.cpp @@ -2,7 +2,7 @@ /* Pantheios header files */ #include #include -#include +#include /* UNIXem header files */ #include diff --git a/examples/cpp/format/example.cpp.format.lowres/CMakeLists.txt b/examples/cpp/format/example.cpp.format.lowres/CMakeLists.txt index c774a9da..eb41eb3c 100644 --- a/examples/cpp/format/example.cpp.format.lowres/CMakeLists.txt +++ b/examples/cpp/format/example.cpp.format.lowres/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(example.cpp.format.lowres) target_link_libraries(example.cpp.format.lowres PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(example.cpp.format.lowres diff --git a/examples/cpp/format/example.cpp.format.lowres/example.cpp.format.lowres.cpp b/examples/cpp/format/example.cpp.format.lowres/example.cpp.format.lowres.cpp index 80296a42..4467cb16 100644 --- a/examples/cpp/format/example.cpp.format.lowres/example.cpp.format.lowres.cpp +++ b/examples/cpp/format/example.cpp.format.lowres/example.cpp.format.lowres.cpp @@ -6,7 +6,7 @@ * - low-resolution date/time fields in statements * * Created: 12th November 2007 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -14,9 +14,9 @@ #define PANTHEIOS_NO_INCLUDE_OS_AND_3PTYLIB_STRING_ACCESS // Faster compilation /* Pantheios header files */ -#include // Pantheios C++ main header -#include // for pantheios::integer -#include // for be.fprintf +#include // Pantheios C++ main header +#include // for pantheios::integer +#include // for be.AnsiConsole /* Standard C/C++ header files */ #include // for std::exception @@ -29,7 +29,7 @@ * application-defined functions */ -PANTHEIOS_CALL(void) pantheios_be_fprintf_getAppInit(int /* backEndId */, pan_be_fprintf_init_t* init) /* throw() */ +PANTHEIOS_CALL(void) pantheios_be_AnsiConsole_getAppInit(int /* backEndId */, pan_be_AnsiConsole_init_t* init) /* throw() */ { /* init->flags |= PANTHEIOS_BE_INIT_F_USE_SYSTEM_TIME; */ init->flags |= PANTHEIOS_BE_INIT_F_USE_UNIX_FORMAT; diff --git a/examples/cpp/format/example.cpp.format.lowres/implicit_link.cpp b/examples/cpp/format/example.cpp.format.lowres/implicit_link.cpp index ce4fe4ec..6a66f58e 100644 --- a/examples/cpp/format/example.cpp.format.lowres/implicit_link.cpp +++ b/examples/cpp/format/example.cpp.format.lowres/implicit_link.cpp @@ -2,7 +2,7 @@ /* Pantheios header files */ #include #include -#include +#include /* UNIXem header files */ #include diff --git a/examples/cpp/format/example.cpp.format.pad/implicit_link.cpp b/examples/cpp/format/example.cpp.format.pad/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/format/example.cpp.format.pad/implicit_link.cpp +++ b/examples/cpp/format/example.cpp.format.pad/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/frontends/example.cpp.frontends.custom/CMakeLists.txt b/examples/cpp/frontends/example.cpp.frontends.custom/CMakeLists.txt index b304aa40..7eb3505a 100644 --- a/examples/cpp/frontends/example.cpp.frontends.custom/CMakeLists.txt +++ b/examples/cpp/frontends/example.cpp.frontends.custom/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(example.cpp.frontends.custom) target_link_libraries(example.cpp.frontends.custom PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_Pantheios_util(example.cpp.frontends.custom) diff --git a/examples/cpp/inserters/example.cpp.inserter.args/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.args/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.args/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.args/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.b64/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.b64/implicit_link.cpp index 8c46325f..b43b74b2 100644 --- a/examples/cpp/inserters/example.cpp.inserter.b64/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.b64/implicit_link.cpp @@ -6,7 +6,7 @@ #include #include #if defined(PLATFORMSTL_OS_IS_UNIX) -# include +# include #elif defined(PLATFORMSTL_OS_IS_WINDOWS) # include #else /* ? OS */ diff --git a/examples/cpp/inserters/example.cpp.inserter.blob/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.blob/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.blob/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.blob/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.character/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.character/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.character/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.character/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.hex_ptr/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.hex_ptr/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.hex_ptr/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.hex_ptr/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.hostid/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.hostid/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.hostid/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.hostid/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.i/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.i/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.i/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.i/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.integer/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.integer/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.integer/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.integer/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.p/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.p/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.p/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.p/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.pointer/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.pointer/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.pointer/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.pointer/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.processid/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.processid/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.processid/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.processid/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.real/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.real/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.real/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.real/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.threadid/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.threadid/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.threadid/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.threadid/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.xi/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.xi/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.xi/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.xi/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/inserters/example.cpp.inserter.xp/implicit_link.cpp b/examples/cpp/inserters/example.cpp.inserter.xp/implicit_link.cpp index 4e5acd6d..6a66f58e 100644 --- a/examples/cpp/inserters/example.cpp.inserter.xp/implicit_link.cpp +++ b/examples/cpp/inserters/example.cpp.inserter.xp/implicit_link.cpp @@ -2,13 +2,7 @@ /* Pantheios header files */ #include #include -#if defined(PLATFORMSTL_OS_IS_UNIX) -# include -#elif defined(PLATFORMSTL_OS_IS_WINDOWS) -# include -#else /* ? OS */ -# error Platform not discriminated -#endif /* OS */ +#include /* UNIXem header files */ #include diff --git a/examples/cpp/linking/example.cpp.linking.implicit_link_1/example.cpp.linking.implicit_link_1.cpp b/examples/cpp/linking/example.cpp.linking.implicit_link_1/example.cpp.linking.implicit_link_1.cpp index 48f92f5d..cafc4787 100644 --- a/examples/cpp/linking/example.cpp.linking.implicit_link_1/example.cpp.linking.implicit_link_1.cpp +++ b/examples/cpp/linking/example.cpp.linking.implicit_link_1/example.cpp.linking.implicit_link_1.cpp @@ -6,7 +6,7 @@ * - use of implicit linking to bind in front-end and back-end * * Created: 31st August 2006 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -23,10 +23,10 @@ */ /* Pantheios header files */ -#include // Pantheios C++ main header -#include // Implicitly link the core -#include // Implicitly link the stock front-end fe.simple -#include // Implicitly link the stock back-end be.fprintf +#include // Pantheios C++ main header +#include // Implicitly link the core +#include // Implicitly link the stock front-end fe.simple +#include // Implicitly link the stock back-end be.AnsiConsole /* Standard C/C++ header files */ #include // for std::string diff --git a/examples/cpp/misc/example.cpp.misc.extended_severity_information/example.cpp.misc.extended_severity_information.cpp b/examples/cpp/misc/example.cpp.misc.extended_severity_information/example.cpp.misc.extended_severity_information.cpp index aa904a02..01188aee 100644 --- a/examples/cpp/misc/example.cpp.misc.extended_severity_information/example.cpp.misc.extended_severity_information.cpp +++ b/examples/cpp/misc/example.cpp.misc.extended_severity_information/example.cpp.misc.extended_severity_information.cpp @@ -8,7 +8,7 @@ * - use of pantheios::logputs() in bail-out conditions * * Created: 31st August 2006 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -141,12 +141,14 @@ PANTHEIOS_CALL(int) pantheios_be_logEntry( platformstl::system_traits::str_set(&prefixes[0], prefixes.size(), ' '); #ifdef PANTHEIOS_USE_WIDE_STRINGS + return ::fwprintf(stm , L"[%s; %s]:%.*s %.*s\n" , processId, severity_s , int(prefixes.size()), prefixes.data() , int(cchEntry), entry); #else /* ? PANTHEIOS_USE_WIDE_STRINGS */ + return ::fprintf( stm , "[%s; %s]:%.*s %.*s\n" , processId, severity_s diff --git a/include/pantheios/backends/bec.console.h b/include/pantheios/backends/bec.console.h index 8ce4839d..a6392645 100644 --- a/include/pantheios/backends/bec.console.h +++ b/include/pantheios/backends/bec.console.h @@ -4,7 +4,7 @@ * Purpose: Platform-specific console back-end * * Created: 3rd July 2009 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * Home: http://www.pantheios.org/ * @@ -57,7 +57,7 @@ # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_CONSOLE_MAJOR 1 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_CONSOLE_MINOR 0 # define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_CONSOLE_REVISION 1 -# define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_CONSOLE_EDIT 5 +# define PANTHEIOS_VER_PANTHEIOS_BACKENDS_H_BEC_CONSOLE_EDIT 6 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -81,9 +81,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BEC_WINDOWSCONSOLE */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BEC_FPRINTF -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_BEC_FPRINTF */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_ANSICONSOLE +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_BACKENDS_H_ANSICONSOLE */ #endif /* OS */ @@ -98,7 +98,7 @@ * * \note The Console back-end does not actually exist; rather it is the * \ref group__backend__stock_backends__WindowsConsole for Windows, or the - * \ref group__backend__stock_backends__fprintf otherwise. All types, + * \ref group__backend__stock_backends__AnsiConsole otherwise. All types, * functions and constants are actually those of the underlying * platform-specific back-end. */ @@ -124,7 +124,7 @@ # define PANTHEIOS_BE_CONSOLE_F_NO_COLOURS PANTHEIOS_BE_WINDOWSCONSOLE_F_NO_COLOURS #else /* ? OS */ -# define PANTHEIOS_BE_CONSOLE_F_NO_COLOURS (0) +# define PANTHEIOS_BE_CONSOLE_F_NO_COLOURS PANTHEIOS_BE_ANSICONSOLE_F_NO_COLOURS #endif /* OS */ @@ -142,7 +142,7 @@ typedef pan_be_WindowsConsole_init_t pan_be_console_init_t; #else /* ? OS */ -typedef pan_be_fprintf_init_t pan_be_console_init_t; +typedef pan_be_AnsiConsole_init_t pan_be_console_init_t; #endif /* OS */ @@ -186,9 +186,9 @@ typedef pan_be_fprintf_init_t pan_be_console_init_ * that the name of the callback function will be * pantheios_be_WindowsConsole_getAppInit(); if your * operating system is UNIX, then you are actually using - * the \ref group__backend__stock_backends__fprintf, which means that the + * the \ref group__backend__stock_backends__AnsiConsole, which means that the * name of the callback function will be - * pantheios_be_fprintf_getAppInit(). + * pantheios_be_AnsiConsole_getAppInit(). */ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( @@ -202,7 +202,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_getAppInit(backEndId, init) pantheios_be_WindowsConsole_getAppInit(backEndId, init) # else /* ? OS */ -# define pantheios_be_console_getAppInit(backEndId, init) pantheios_be_fprintf_getAppInit(backEndId, init) +# define pantheios_be_console_getAppInit(backEndId, init) pantheios_be_AnsiConsole_getAppInit(backEndId, init) # endif /* OS */ #endif /* PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -229,7 +229,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_getDefaultAppInit(init) pantheios_be_WindowsConsole_getAppInit(init) #else /* ? OS */ -# define pantheios_be_console_getDefaultAppInit(init) pantheios_be_fprintf_getAppInit(init) +# define pantheios_be_console_getDefaultAppInit(init) pantheios_be_AnsiConsole_getDefaultAppInit(init) #endif /* OS */ @@ -244,7 +244,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_init pantheios_be_WindowsConsole_init #else /* ? OS */ -# define pantheios_be_console_init pantheios_be_fprintf_init +# define pantheios_be_console_init pantheios_be_AnsiConsole_init #endif /* OS */ @@ -259,7 +259,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_uninit pantheios_be_WindowsConsole_uninit #else /* ? OS */ -# define pantheios_be_console_uninit pantheios_be_fprintf_uninit +# define pantheios_be_console_uninit pantheios_be_AnsiConsole_uninit #endif /* OS */ @@ -274,7 +274,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_logEntry pantheios_be_WindowsConsole_logEntry #else /* ? OS */ -# define pantheios_be_console_logEntry pantheios_be_fprintf_logEntry +# define pantheios_be_console_logEntry pantheios_be_AnsiConsole_logEntry #endif /* OS */ @@ -302,8 +302,10 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( * - "lowResolution" (Boolean) * * Recognises the following back-end specific argument names: - * - "noColours" (Boolean) - Windows-only - * - "noColors" (Boolean) - Windows-only + * - "noColours" / "noColors" (Boolean) + * - "forceAnsiEscapeSequences" (Boolean) - non-Windows (AnsiConsole) + * - "colourWholePrefix" (Boolean) - non-Windows (AnsiConsole) + * - "colourMessage" (Boolean) - non-Windows (AnsiConsole) */ #if defined(PLATFORMSTL_OS_IS_WINDOWS) @@ -311,7 +313,7 @@ PANTHEIOS_CALL(void) pantheios_be_console_getAppInit( # define pantheios_be_console_parseArgs(numArgs, args, init) pantheios_be_WindowsConsole_parseArgs(numArgs, args, init) #else /* ? OS */ -# define pantheios_be_console_parseArgs(numArgs, args, init) pantheios_be_fprintf_parseArgs(numArgs, args, init) +# define pantheios_be_console_parseArgs(numArgs, args, init) pantheios_be_AnsiConsole_parseArgs(numArgs, args, init) #endif /* OS */ diff --git a/include/pantheios/implicit_link/be.AnsiConsole.WithCallback.h b/include/pantheios/implicit_link/be.AnsiConsole.WithCallback.h new file mode 100644 index 00000000..729c5932 --- /dev/null +++ b/include/pantheios/implicit_link/be.AnsiConsole.WithCallback.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/be.AnsiConsole.WithCallback.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/be.AnsiConsole.WithCallback.h + * + * [C, C++] Implicitly links in the \ref page__backend__callbacks "callback" version of the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Back-End Library" + * as the sole back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK_EDIT 8 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_WITHCALLBACK */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/be.AnsiConsole.h b/include/pantheios/implicit_link/be.AnsiConsole.h new file mode 100644 index 00000000..ff7e6cdf --- /dev/null +++ b/include/pantheios/implicit_link/be.AnsiConsole.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/be.AnsiConsole.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/be.AnsiConsole.h + * + * [C, C++] Implicitly links in the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Back-End Library" + * as the sole back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE_EDIT 7 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("be.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/be.console.h b/include/pantheios/implicit_link/be.console.h index 6df4a0d9..56ad4b11 100644 --- a/include/pantheios/implicit_link/be.console.h +++ b/include/pantheios/implicit_link/be.console.h @@ -4,7 +4,7 @@ * Purpose: Implicitly links in the Pantheios Console Back-End Library * * Created: 4th July 2009 - * Updated: 16th December 2023 + * Updated: 5th August 2026 * * Home: http://pantheios.org/ * @@ -57,9 +57,9 @@ #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_MAJOR 1 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_MINOR 0 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_REVISION 1 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_EDIT 3 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_MINOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_REVISION 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BE_CONSOLE_EDIT 4 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -80,9 +80,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_WINDOWSCONSOLE */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_FPRINTF -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_FPRINTF */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BE_ANSICONSOLE */ #endif /* OS */ /* ////////////////////////////////////////////////////////////////////// */ diff --git a/include/pantheios/implicit_link/bec.AnsiConsole.WithCallback.h b/include/pantheios/implicit_link/bec.AnsiConsole.WithCallback.h new file mode 100644 index 00000000..493d4c37 --- /dev/null +++ b/include/pantheios/implicit_link/bec.AnsiConsole.WithCallback.h @@ -0,0 +1,110 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/bec.AnsiConsole.WithCallback.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Back-End Common Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/bec.AnsiConsole.WithCallback.h + * + * [C, C++] Implicitly links in the \ref page__backend__callbacks "callback" version of the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Back-End Common Library" + * common implementation (that may be used by sole/local/remote back-end). + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK_EDIT 8 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole.WithCallback")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole.WithCallback")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole.WithCallback")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole.WithCallback")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/bec.AnsiConsole.h b/include/pantheios/implicit_link/bec.AnsiConsole.h new file mode 100644 index 00000000..b4081ae1 --- /dev/null +++ b/include/pantheios/implicit_link/bec.AnsiConsole.h @@ -0,0 +1,110 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/bec.AnsiConsole.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Back-End Common Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/bec.AnsiConsole.h + * + * [C, C++] Implicitly links in the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Back-End Common Library" + * common implementation (that may be used by sole/local/remote back-end). + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_EDIT 7 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bec.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/bec.console.WithCallback.h b/include/pantheios/implicit_link/bec.console.WithCallback.h index f218da8f..b166f883 100644 --- a/include/pantheios/implicit_link/bec.console.WithCallback.h +++ b/include/pantheios/implicit_link/bec.console.WithCallback.h @@ -4,7 +4,7 @@ * Purpose: Implicitly links in the Pantheios Console Back-End Common Library * * Created: 7th December 2010 - * Updated: 16th December 2023 + * Updated: 5th August 2026 * * Home: http://pantheios.org/ * @@ -59,7 +59,7 @@ # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_WITHCALLBACK_MAJOR 1 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_WITHCALLBACK_MINOR 0 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_WITHCALLBACK_REVISION 2 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_WITHCALLBACK_EDIT 4 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_WITHCALLBACK_EDIT 5 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -80,9 +80,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_WINDOWSCONSOLE_WITHCALLBACK */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_FPRINTF_WITHCALLBACK -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_FPRINTF_WITHCALLBACK */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK */ #endif /* OS */ /* ////////////////////////////////////////////////////////////////////// */ diff --git a/include/pantheios/implicit_link/bec.console.h b/include/pantheios/implicit_link/bec.console.h index a91ff717..10a3ecde 100644 --- a/include/pantheios/implicit_link/bec.console.h +++ b/include/pantheios/implicit_link/bec.console.h @@ -4,7 +4,7 @@ * Purpose: Implicitly links in the Pantheios Console Back-End Common Library * * Created: 3rd July 2009 - * Updated: 16th December 2023 + * Updated: 5th August 2026 * * Home: http://pantheios.org/ * @@ -59,7 +59,7 @@ # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_MAJOR 1 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_MINOR 0 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_REVISION 1 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_EDIT 4 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEC_CONSOLE_EDIT 5 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -80,9 +80,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_WINDOWSCONSOLE */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_FPRINTF -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_FPRINTF */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE */ #endif /* OS */ /* ////////////////////////////////////////////////////////////////////// */ diff --git a/include/pantheios/implicit_link/bel.AnsiConsole.WithCallback.h b/include/pantheios/implicit_link/bel.AnsiConsole.WithCallback.h new file mode 100644 index 00000000..a1f7ff00 --- /dev/null +++ b/include/pantheios/implicit_link/bel.AnsiConsole.WithCallback.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/bel.AnsiConsole.WithCallback.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Local Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/bel.AnsiConsole.WithCallback.h + * + * [C, C++] Implicitly links in the \ref page__backend__callbacks "callback" version of the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Local Back-End Library" + * as the local back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK_EDIT 8 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_WITHCALLBACK */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/bel.AnsiConsole.h b/include/pantheios/implicit_link/bel.AnsiConsole.h new file mode 100644 index 00000000..c1ecad71 --- /dev/null +++ b/include/pantheios/implicit_link/bel.AnsiConsole.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/bel.AnsiConsole.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Local Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/bel.AnsiConsole.h + * + * [C, C++] Implicitly links in the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Local Back-End Library" + * as the local back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE_EDIT 7 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("bel.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/bel.console.h b/include/pantheios/implicit_link/bel.console.h index 0dedd41d..7b1e9552 100644 --- a/include/pantheios/implicit_link/bel.console.h +++ b/include/pantheios/implicit_link/bel.console.h @@ -4,7 +4,7 @@ * Purpose: Implicitly links in the Pantheios Console Local Back-End Library * * Created: 3rd July 2009 - * Updated: 16th December 2023 + * Updated: 5th August 2026 * * Home: http://pantheios.org/ * @@ -59,7 +59,7 @@ # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_CONSOLE_MAJOR 1 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_CONSOLE_MINOR 0 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_CONSOLE_REVISION 1 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_CONSOLE_EDIT 3 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BEL_CONSOLE_EDIT 4 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -80,9 +80,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_WINDOWSCONSOLE */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_FPRINTF -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_FPRINTF */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEL_ANSICONSOLE */ #endif /* OS */ /* ////////////////////////////////////////////////////////////////////// */ diff --git a/include/pantheios/implicit_link/ber.AnsiConsole.WithCallback.h b/include/pantheios/implicit_link/ber.AnsiConsole.WithCallback.h new file mode 100644 index 00000000..c2694044 --- /dev/null +++ b/include/pantheios/implicit_link/ber.AnsiConsole.WithCallback.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/ber.AnsiConsole.WithCallback.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Remote Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/ber.AnsiConsole.WithCallback.h + * + * [C, C++] Implicitly links in the \ref page__backend__callbacks "callback" version of the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Remote Back-End Library" + * as the remote back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK_EDIT 9 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE_WITHCALLBACK */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_WITHCALLBACK */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/ber.AnsiConsole.h b/include/pantheios/implicit_link/ber.AnsiConsole.h new file mode 100644 index 00000000..d26380f3 --- /dev/null +++ b/include/pantheios/implicit_link/ber.AnsiConsole.h @@ -0,0 +1,113 @@ +/* ///////////////////////////////////////////////////////////////////////// + * File: pantheios/implicit_link/ber.AnsiConsole.h + * + * Purpose: Implicitly links in the Pantheios ANSI Console Remote Back-End Library + * + * Created: 5th August 2026 + * Updated: 5th August 2026 + * + * Home: http://pantheios.org/ + * + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * - Neither the name(s) of Matthew Wilson and Synesis Software nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ////////////////////////////////////////////////////////////////////// */ + + +/** \file pantheios/implicit_link/ber.AnsiConsole.h + * + * [C, C++] Implicitly links in the + * \ref group__backend__stock_backends__AnsiConsole "Pantheios ANSI Console Remote Back-End Library" + * as the remote back-end for the given link-unit. + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE +#define PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE + + +/* ///////////////////////////////////////////////////////////////////////// + * version information + */ + +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_MAJOR 1 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_MINOR 0 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_REVISION 2 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE_EDIT 8 +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ + + +/* ///////////////////////////////////////////////////////////////////////// + * includes + */ + +#ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_IMPLICIT_LINK_BASE_ */ +#ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE +# include +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BEC_ANSICONSOLE */ + + +/* ///////////////////////////////////////////////////////////////////////// + * implicit-linking directives + */ + +#ifdef PANTHEIOS_IMPLICIT_LINK_SUPPORT + +# if defined(__BORLANDC__) +# elif defined(__COMO__) +# elif defined(__DMC__) +# elif defined(__GNUC__) +# elif defined(__INTEL_COMPILER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) + +# elif defined(__MWERKS__) +# elif defined(__WATCOMC__) +# elif defined(_MSC_VER) + +# pragma comment(lib, PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) +# pragma message(" " PANTHEIOS_IMPL_LINK_LIBRARY_NAME_("ber.AnsiConsole")) + +# else /* ? compiler */ +# error Compiler not recognised +# endif /* compiler */ + +#endif /* PANTHEIOS_IMPLICIT_LINK_SUPPORT */ + +/* ////////////////////////////////////////////////////////////////////// */ + +#endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE */ + +/* ///////////////////////////// end of file //////////////////////////// */ + diff --git a/include/pantheios/implicit_link/ber.console.h b/include/pantheios/implicit_link/ber.console.h index a5182527..0d46650f 100644 --- a/include/pantheios/implicit_link/ber.console.h +++ b/include/pantheios/implicit_link/ber.console.h @@ -4,7 +4,7 @@ * Purpose: Implicitly links in the Pantheios Console Remote Back-End Library * * Created: 3rd July 2009 - * Updated: 16th December 2023 + * Updated: 5th August 2026 * * Home: http://pantheios.org/ * @@ -59,7 +59,7 @@ # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_CONSOLE_MAJOR 1 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_CONSOLE_MINOR 0 # define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_CONSOLE_REVISION 1 -# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_CONSOLE_EDIT 3 +# define PANTHEIOS_VER_PANTHEIOS_IMPLICIT_LINK_H_BER_CONSOLE_EDIT 4 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ @@ -80,9 +80,9 @@ # include # endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_WINDOWSCONSOLE */ #else /* ? OS */ -# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_FPRINTF -# include -# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_FPRINTF */ +# ifndef PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE +# include +# endif /* !PANTHEIOS_INCL_PANTHEIOS_IMPLICIT_LINK_H_BER_ANSICONSOLE */ #endif /* OS */ /* ////////////////////////////////////////////////////////////////////// */ diff --git a/include/pantheios/pantheios.h b/include/pantheios/pantheios.h index 852d879a..5ca12426 100644 --- a/include/pantheios/pantheios.h +++ b/include/pantheios/pantheios.h @@ -126,17 +126,20 @@ #define PANTHEIOS_VER_MAJOR 1 #define PANTHEIOS_VER_MINOR 0 #define PANTHEIOS_VER_PATCH 1 -#define PANTHEIOS_VER_ALPHABETA 0xE3 +#define PANTHEIOS_VER_AB 0xE3 #define PANTHEIOS_VER \ (0\ | ( PANTHEIOS_VER_MAJOR << 24 ) \ | ( PANTHEIOS_VER_MINOR << 16 ) \ | ( PANTHEIOS_VER_PATCH << 8 ) \ - | ( PANTHEIOS_VER_ALPHABETA << 0 ) \ + | ( PANTHEIOS_VER_AB << 0 ) \ ) -#define PANTHEIOS_VER_REVISION PANTHEIOS_VER_PATCH +#ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION +# define PANTHEIOS_VER_ALPHABETA PANTHEIOS_VER_AB +# define PANTHEIOS_VER_REVISION PANTHEIOS_VER_PATCH +#endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ /* ///////////////////////////////////////////////////////////////////////// diff --git a/projects/backends/bec.AnsiConsole.WithCallback/CMakeLists.txt b/projects/backends/bec.AnsiConsole.WithCallback/CMakeLists.txt index e69de29b..bd7a9f23 100644 --- a/projects/backends/bec.AnsiConsole.WithCallback/CMakeLists.txt +++ b/projects/backends/bec.AnsiConsole.WithCallback/CMakeLists.txt @@ -0,0 +1,34 @@ + +set(BEC_FPRINTF_SRC_DIR ../../../src/backends) + +file(GLOB BEC_FPRINTF_SRCS + ${BEC_FPRINTF_SRC_DIR}/bec.AnsiConsole.cpp +) + +add_library(Pantheios.bec.AnsiConsole.WithCallback + ${BEC_FPRINTF_SRCS} +) + +target_link_STLSoft(Pantheios.bec.AnsiConsole.WithCallback) + +target_compile_options(Pantheios.bec.AnsiConsole.WithCallback + PRIVATE + $<$,$,$>: + -Werror -Wall -Wextra -pedantic + + -DPANTHEIOS_BE_USE_CALLBACK + > + $<$: + /WX /W4 + + -DPANTHEIOS_BE_USE_CALLBACK + > +) + +install(TARGETS Pantheios.bec.AnsiConsole.WithCallback + EXPORT project-targets +) + + +# ############################## end of file ############################# # + diff --git a/src/backends/bec.AnsiConsole.cpp b/src/backends/bec.AnsiConsole.cpp index 9aa463e4..09c692eb 100644 --- a/src/backends/bec.AnsiConsole.cpp +++ b/src/backends/bec.AnsiConsole.cpp @@ -4,11 +4,11 @@ * Purpose: Implementation of the Pantheios ANSI-Console Stock Back-end API. * * Created: 20th October 2024 - * Updated: 30th January 2025 + * Updated: 5th August 2026 * * Home: http://www.pantheios.org/ * - * Copyright (c) 2024-2025, Matthew Wilson and Synesis Information Systems + * Copyright (c) 2024-2026, Matthew Wilson and Synesis Information Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,13 +54,28 @@ #include #include +#include #include +#if defined(PLATFORMSTL_OS_IS_WINDOWS) +# include +#endif #include #include +/* ///////////////////////////////////////////////////////////////////////// + * compatibility + */ + +#if defined(PLATFORMSTL_OS_IS_WINDOWS) +# ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING +# define ENABLE_VIRTUAL_TERMINAL_PROCESSING (0x0004) +# endif +#endif + + /* ///////////////////////////////////////////////////////////////////////// * string encoding compatibility */ @@ -79,11 +94,6 @@ */ -/* ///////////////////////////////////////////////////////////////////////// - * compatibility - */ - - /* ///////////////////////////////////////////////////////////////////////// * namespace */ @@ -99,6 +109,96 @@ namespace { using platformstl::platformstl_C_isatty_stm; #endif /* !PLATFORMSTL_NO_NAMESPACE */ + /* Intended to ensure that, on Windows, we are not emitting ANSI colour + * codes when on an old terminal that cannot be instructed to accept + * them. Pattern mirrors BDUT (`BDUT_console_supports_ansi_`) and + * xTests (`tty::ansi_supporter`). + * + * - Windows 11 (build >= 22000): ANSI typically accepted without + * opt-in (e.g. modern Command Box / console hosts); + * - Windows 10 VT-capable builds (>= 16257), or unknown build (0): + * attempt `SetConsoleMode(... | ENABLE_VIRTUAL_TERMINAL_PROCESSING)` + * on the standard output and error handles; + * - Older Windows (e.g. XP): do not emit ANSI sequences. + */ + struct ansi_supporter + { + private: +#if defined(PLATFORMSTL_OS_IS_WINDOWS) + + static + bool + try_enable_console_vt_( + HANDLE h + ) + { + DWORD mode; + + if (NULL == h || + INVALID_HANDLE_VALUE == h) + { + return false; + } + + if (!::GetConsoleMode(h, &mode)) + { + return false; + } + + if (0 != (mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)) + { + return true; + } + + return !!::SetConsoleMode(h, mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING); + } +#endif /* PLATFORMSTL_OS_IS_WINDOWS */ + + public: + static + bool + determine_support() + { +#if defined(PLATFORMSTL_OS_IS_WINDOWS) + + using winstl::system_version; + + /* Cache: `SetConsoleMode` is a process-wide console side-effect. */ + static bool s_determined; + static bool s_supports; + + if (!s_determined) + { + DWORD const build = system_version::build_number(); + + if (build >= 22000) + { + s_supports = true; + } + else if (build >= 16257 || + 0 == build) + { + bool const out_ok = try_enable_console_vt_(::GetStdHandle(STD_OUTPUT_HANDLE)); + bool const err_ok = try_enable_console_vt_(::GetStdHandle(STD_ERROR_HANDLE)); + + s_supports = out_ok || err_ok; + } + else + { + s_supports = false; + } + + s_determined = true; + } + + return s_supports; +#else /* ? PLATFORMSTL_OS_IS_WINDOWS */ + + return true; +#endif /* PLATFORMSTL_OS_IS_WINDOWS */ + } + }; + struct AnsiConsole_Context : public Context { @@ -428,7 +528,8 @@ namespace { if (0 == (PANTHEIOS_BE_ANSICONSOLE_F_NO_COLOURS & flags)) { if (0 != (PANTHEIOS_BE_ANSICONSOLE_F_FORCE_ANSI_ESCAPE_SEQUENCES & flags) || - platformstl_C_isatty_stm(stm)) + (platformstl_C_isatty_stm(stm) && + ansi_supporter::determine_support())) { switch (severity4 & 0xf) { diff --git a/test/component/test.component.be.file.threading/CMakeLists.txt b/test/component/test.component.be.file.threading/CMakeLists.txt index 36cc8f29..630a71e7 100644 --- a/test/component/test.component.be.file.threading/CMakeLists.txt +++ b/test/component/test.component.be.file.threading/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(test.component.be.file.threading PRIVATE Pantheios.be.N Pantheios.bec.file - Pantheios.bec.AnsiConsole + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(test.component.be.file.threading diff --git a/test/component/test.component.be.file.threading/test.component.be.file.threading.cpp b/test/component/test.component.be.file.threading/test.component.be.file.threading.cpp index bf2c8275..c23282a7 100644 --- a/test/component/test.component.be.file.threading/test.component.be.file.threading.cpp +++ b/test/component/test.component.be.file.threading/test.component.be.file.threading.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.component.be.file.threading project. * * Created: 3rd July 2009 - * Updated: 9th May 2025 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -14,7 +14,7 @@ /* Pantheios header files */ #include #include -#include +#include #include #include #include @@ -200,7 +200,7 @@ pan_fe_N_t PAN_FE_N_SEVERITY_CEILINGS[] = pan_be_N_t PAN_BE_N_BACKEND_LIST[] = { - PANTHEIOS_BE_N_STDFORM_ENTRY(beid_console, pantheios_be_AnsiConsole, PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID), + PANTHEIOS_BE_N_STDFORM_ENTRY(beid_console, pantheios_be_console, PANTHEIOS_BE_N_F_IGNORE_NONMATCHED_CUSTOM28_ID), PANTHEIOS_BE_N_STDFORM_ENTRY(beid_file, pantheios_be_file, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28), PANTHEIOS_BE_N_TERMINATOR_ENTRY diff --git a/test/scratch/test.scratch.I18N/CMakeLists.txt b/test/scratch/test.scratch.I18N/CMakeLists.txt index a9e77274..1ebb76a6 100644 --- a/test/scratch/test.scratch.I18N/CMakeLists.txt +++ b/test/scratch/test.scratch.I18N/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.I18N) target_link_libraries(test.scratch.I18N PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(test.scratch.I18N diff --git a/test/scratch/test.scratch.WideString/CMakeLists.txt b/test/scratch/test.scratch.WideString/CMakeLists.txt index 5d3ffd01..6d9bf6d4 100644 --- a/test/scratch/test.scratch.WideString/CMakeLists.txt +++ b/test/scratch/test.scratch.WideString/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.WideString) target_link_libraries(test.scratch.WideString PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(test.scratch.WideString diff --git a/test/scratch/test.scratch.api/CMakeLists.txt b/test/scratch/test.scratch.api/CMakeLists.txt index 85767a76..ef31b114 100644 --- a/test/scratch/test.scratch.api/CMakeLists.txt +++ b/test/scratch/test.scratch.api/CMakeLists.txt @@ -8,9 +8,9 @@ target_link_Pantheios_core(test.scratch.api) target_link_libraries(test.scratch.api PRIVATE Pantheios.be.lrsplit - Pantheios.bec.fprintf + Pantheios.bec.AnsiConsole Pantheios.bec.null - Pantheios.bel.fprintf + Pantheios.bel.AnsiConsole Pantheios.ber.null ) diff --git a/test/scratch/test.scratch.api/implicit_link.cpp b/test/scratch/test.scratch.api/implicit_link.cpp index 32d1c3f9..0286b88e 100644 --- a/test/scratch/test.scratch.api/implicit_link.cpp +++ b/test/scratch/test.scratch.api/implicit_link.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include diff --git a/test/scratch/test.scratch.be.N.fail/CMakeLists.txt b/test/scratch/test.scratch.be.N.fail/CMakeLists.txt index 92e6b230..e3eb07d2 100644 --- a/test/scratch/test.scratch.be.N.fail/CMakeLists.txt +++ b/test/scratch/test.scratch.be.N.fail/CMakeLists.txt @@ -10,7 +10,7 @@ target_link_libraries(test.scratch.be.N.fail Pantheios.be.N Pantheios.bec.fail Pantheios.bec.file - Pantheios.bec.fprintf + Pantheios.bec.AnsiConsole Pantheios.bec.null ) diff --git a/test/scratch/test.scratch.be.N.fail/implicit_link.cpp b/test/scratch/test.scratch.be.N.fail/implicit_link.cpp index 2ddb436d..f12f5c8d 100644 --- a/test/scratch/test.scratch.be.N.fail/implicit_link.cpp +++ b/test/scratch/test.scratch.be.N.fail/implicit_link.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include /* UNIXem header files */ diff --git a/test/scratch/test.scratch.be.N.fail/test.scratch.be.N.fail.cpp b/test/scratch/test.scratch.be.N.fail/test.scratch.be.N.fail.cpp index f142f03b..9c8b6cc8 100644 --- a/test/scratch/test.scratch.be.N.fail/test.scratch.be.N.fail.cpp +++ b/test/scratch/test.scratch.be.N.fail/test.scratch.be.N.fail.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the be.N.fail.test project. * * Created: 9th January 2007 - * Updated: 15th July 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -22,7 +22,7 @@ #include #include #include -#include +#include /* Standard C++ header files */ #ifdef STLSOFT_CF_EXCEPTION_SUPPORT @@ -64,7 +64,7 @@ pan_be_N_t PAN_BE_N_BACKEND_LIST[] = PANTHEIOS_BE_N_STDFORM_ENTRY(1, pantheios_be_fail, PANTHEIOS_BE_N_F_IGNORE_INIT_FAILURE), PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_file, 0), PANTHEIOS_BE_N_STDFORM_ENTRY(3, pantheios_be_fail, PANTHEIOS_BE_N_F_IGNORE_INIT_FAILURE), - PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_fprintf, 0), + PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_AnsiConsole, 0), PANTHEIOS_BE_N_TERMINATOR_ENTRY }; diff --git a/test/scratch/test.scratch.be.N.with.custom.fe/CMakeLists.txt b/test/scratch/test.scratch.be.N.with.custom.fe/CMakeLists.txt index 6c0a44f2..d22a6e95 100644 --- a/test/scratch/test.scratch.be.N.with.custom.fe/CMakeLists.txt +++ b/test/scratch/test.scratch.be.N.with.custom.fe/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(test.scratch.be.N.with.custom.fe PRIVATE Pantheios.be.N Pantheios.bec.file - $,Pantheios.bec.WindowsConsole,Pantheios.bec.fprintf> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_Pantheios_util(test.scratch.be.N.with.custom.fe) diff --git a/test/scratch/test.scratch.be.N/CMakeLists.txt b/test/scratch/test.scratch.be.N/CMakeLists.txt index 2410dbee..489ce538 100644 --- a/test/scratch/test.scratch.be.N/CMakeLists.txt +++ b/test/scratch/test.scratch.be.N/CMakeLists.txt @@ -9,7 +9,7 @@ target_link_libraries(test.scratch.be.N PRIVATE Pantheios.be.N Pantheios.bec.file - Pantheios.bec.fprintf + Pantheios.bec.AnsiConsole ) if(_BUILD_AS_UNIX) diff --git a/test/scratch/test.scratch.be.N/implicit_link.cpp b/test/scratch/test.scratch.be.N/implicit_link.cpp index d9f2a0db..72ce5ca2 100644 --- a/test/scratch/test.scratch.be.N/implicit_link.cpp +++ b/test/scratch/test.scratch.be.N/implicit_link.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #if defined(PLATFORMSTL_OS_IS_UNIX) # include diff --git a/test/scratch/test.scratch.be.N/test.scratch.be.N.cpp b/test/scratch/test.scratch.be.N/test.scratch.be.N.cpp index b2985882..2ee04d6a 100644 --- a/test/scratch/test.scratch.be.N/test.scratch.be.N.cpp +++ b/test/scratch/test.scratch.be.N/test.scratch.be.N.cpp @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.scratch.be.N project. * * Created: 18th October 2006 - * Updated: 16th July 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -17,7 +17,7 @@ #include #include #include -#include +#include #if defined(PLATFORMSTL_OS_IS_UNIX) # include @@ -61,7 +61,7 @@ pan_fe_N_t PAN_FE_N_SEVERITY_CEILINGS[] = pan_be_N_t PAN_BE_N_BACKEND_LIST[] = { PANTHEIOS_BE_N_STDFORM_ENTRY(1, pantheios_be_file, 0) - , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_fprintf, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28) + , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_AnsiConsole, PANTHEIOS_BE_N_F_ID_MUST_MATCH_CUSTOM28) #if defined(PLATFORMSTL_OS_IS_UNIX) , PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_syslog, PANTHEIOS_BE_N_F_IGNORE_INIT_FAILURE) #elif defined(PLATFORMSTL_OS_IS_WINDOWS) diff --git a/test/scratch/test.scratch.be.file.rolling/implicit_link.cpp b/test/scratch/test.scratch.be.file.rolling/implicit_link.cpp index b8ce0de6..c0a97df1 100644 --- a/test/scratch/test.scratch.be.file.rolling/implicit_link.cpp +++ b/test/scratch/test.scratch.be.file.rolling/implicit_link.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include /* ///////////////////////////// end of file //////////////////////////// */ diff --git a/test/scratch/test.scratch.c_api/CMakeLists.txt b/test/scratch/test.scratch.c_api/CMakeLists.txt index 8f24a022..cf376b95 100644 --- a/test/scratch/test.scratch.c_api/CMakeLists.txt +++ b/test/scratch/test.scratch.c_api/CMakeLists.txt @@ -8,9 +8,9 @@ target_link_Pantheios_core(test.scratch.c_api) target_link_libraries(test.scratch.c_api PRIVATE Pantheios.be.lrsplit - Pantheios.bel.fprintf + Pantheios.bel.AnsiConsole Pantheios.ber.null - Pantheios.bec.fprintf + Pantheios.bec.AnsiConsole Pantheios.bec.null ) diff --git a/test/scratch/test.scratch.c_api/implicit_link.cpp b/test/scratch/test.scratch.c_api/implicit_link.cpp index 32d1c3f9..0286b88e 100644 --- a/test/scratch/test.scratch.c_api/implicit_link.cpp +++ b/test/scratch/test.scratch.c_api/implicit_link.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include diff --git a/test/scratch/test.scratch.extras.com.invoke_nothrow_method/implicit_link.cpp b/test/scratch/test.scratch.extras.com.invoke_nothrow_method/implicit_link.cpp index 6f9d3a55..a53e463f 100644 --- a/test/scratch/test.scratch.extras.com.invoke_nothrow_method/implicit_link.cpp +++ b/test/scratch/test.scratch.extras.com.invoke_nothrow_method/implicit_link.cpp @@ -2,7 +2,7 @@ /* Pantheios header files */ #include #include -#include +#include /* ///////////////////////////// end of file //////////////////////////// */ diff --git a/test/scratch/test.scratch.extras.com_exception_helpers/CMakeLists.txt b/test/scratch/test.scratch.extras.com_exception_helpers/CMakeLists.txt index f1d1004a..76f435b6 100644 --- a/test/scratch/test.scratch.extras.com_exception_helpers/CMakeLists.txt +++ b/test/scratch/test.scratch.extras.com_exception_helpers/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.extras.com_exception_helpers) target_link_libraries(test.scratch.extras.com_exception_helpers PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(test.scratch.extras.com_exception_helpers diff --git a/test/scratch/test.scratch.extras.com_exception_helpers/implicit_link.cpp b/test/scratch/test.scratch.extras.com_exception_helpers/implicit_link.cpp index cbde30fe..2d63f54e 100644 --- a/test/scratch/test.scratch.extras.com_exception_helpers/implicit_link.cpp +++ b/test/scratch/test.scratch.extras.com_exception_helpers/implicit_link.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include /* ///////////////////////////// end of file //////////////////////////// */ diff --git a/test/scratch/test.scratch.fe.simple.WithCallback/CMakeLists.txt b/test/scratch/test.scratch.fe.simple.WithCallback/CMakeLists.txt index 93444f9e..8e945a6c 100644 --- a/test/scratch/test.scratch.fe.simple.WithCallback/CMakeLists.txt +++ b/test/scratch/test.scratch.fe.simple.WithCallback/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.fe.simple.WithCallback) target_link_libraries(test.scratch.fe.simple.WithCallback PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(test.scratch.fe.simple.WithCallback diff --git a/test/scratch/test.scratch.implicit_link/test.scratch.implicit_link.cpp b/test/scratch/test.scratch.implicit_link/test.scratch.implicit_link.cpp index c9764273..d66bf24d 100644 --- a/test/scratch/test.scratch.implicit_link/test.scratch.implicit_link.cpp +++ b/test/scratch/test.scratch.implicit_link/test.scratch.implicit_link.cpp @@ -4,7 +4,7 @@ * Purpose: Implicit link file for the test.scratch.implicit_link project. * * Created: 18th July 2007 - * Updated: 28th October 2024 + * Updated: 5th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -20,7 +20,7 @@ #include -#include +#include /* ///////////////////////////////////////////////////////////////////////// diff --git a/test/scratch/test.scratch.pseudoUNIX/test.scratch.pseudoUNIX.c b/test/scratch/test.scratch.pseudoUNIX/test.scratch.pseudoUNIX.c index 701bdd91..ea10d303 100644 --- a/test/scratch/test.scratch.pseudoUNIX/test.scratch.pseudoUNIX.c +++ b/test/scratch/test.scratch.pseudoUNIX/test.scratch.pseudoUNIX.c @@ -4,7 +4,7 @@ * Purpose: Implementation file for the pseudoUNIX.test project. * * Created: 23rd September 2006 - * Updated: 16th July 2024 + * Updated: 6th August 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -12,14 +12,7 @@ #include #include #include -#if defined(unix) || \ - defined(__unix) || \ - defined(__unix__) -# include -#elif defined(_WIN32) || \ - defined(WIN32) -# include -#endif /* operating system */ +#include /* STLSoft header files */ #include diff --git a/test/scratch/test.scratch.showPlus.integer/CMakeLists.txt b/test/scratch/test.scratch.showPlus.integer/CMakeLists.txt index b65b2104..6d754182 100644 --- a/test/scratch/test.scratch.showPlus.integer/CMakeLists.txt +++ b/test/scratch/test.scratch.showPlus.integer/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.showPlus.integer) target_link_libraries(test.scratch.showPlus.integer PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(test.scratch.showPlus.integer diff --git a/test/scratch/test.scratch.showPlus.integer/implicit_link.cpp b/test/scratch/test.scratch.showPlus.integer/implicit_link.cpp index 6aaf9de1..d564cd7a 100644 --- a/test/scratch/test.scratch.showPlus.integer/implicit_link.cpp +++ b/test/scratch/test.scratch.showPlus.integer/implicit_link.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include /* ///////////////////////////// end of file //////////////////////////// */ diff --git a/test/scratch/test.scratch.trace/CMakeLists.txt b/test/scratch/test.scratch.trace/CMakeLists.txt index e20cff8a..e2ed1071 100644 --- a/test/scratch/test.scratch.trace/CMakeLists.txt +++ b/test/scratch/test.scratch.trace/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.trace) target_link_libraries(test.scratch.trace PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + Pantheios.be.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(test.scratch.trace diff --git a/test/scratch/test.scratch.tstring/CMakeLists.txt b/test/scratch/test.scratch.tstring/CMakeLists.txt index f6eb082f..6d2bcb48 100644 --- a/test/scratch/test.scratch.tstring/CMakeLists.txt +++ b/test/scratch/test.scratch.tstring/CMakeLists.txt @@ -7,8 +7,8 @@ target_link_Pantheios_core(test.scratch.tstring) target_link_libraries(test.scratch.tstring PRIVATE - Pantheios.be.fprintf - Pantheios.bec.fprintf + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(test.scratch.tstring diff --git a/test/unit/test.unit.getversion/test.unit.getversion.c b/test/unit/test.unit.getversion/test.unit.getversion.c index f888a7b3..3deaf977 100644 --- a/test/unit/test.unit.getversion/test.unit.getversion.c +++ b/test/unit/test.unit.getversion/test.unit.getversion.c @@ -136,6 +136,7 @@ static void test_alphabeta(void) { pan_uint32_t const verAlphabeta = pantheios_getVersion() & 0x000000ff; + TEST_INT_EQ(PANTHEIOS_VER_AB, verAlphabeta); TEST_INT_EQ(PANTHEIOS_VER_ALPHABETA, verAlphabeta); } @@ -143,15 +144,15 @@ static void test_composite(void) { pan_uint32_t const expected = (pan_uint32_t)( 0 - | (PANTHEIOS_VER_MAJOR << 24) - | (PANTHEIOS_VER_MINOR << 16) - | (PANTHEIOS_VER_PATCH << 8) - | (PANTHEIOS_VER_ALPHABETA << 0) + | (PANTHEIOS_VER_MAJOR << 24) + | (PANTHEIOS_VER_MINOR << 16) + | (PANTHEIOS_VER_PATCH << 8) + | (PANTHEIOS_VER_AB << 0) ); TEST_INT_EQ(expected, PANTHEIOS_VER); TEST_INT_EQ(expected, pantheios_getVersion()); - TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC2, PANTHEIOS_VER); + TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC3, PANTHEIOS_VER); }