From cf8201a709e0ca8ebc91f959244664e47c35ac90 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Wed, 5 Aug 2026 12:33:56 +1000 Subject: [PATCH 1/7] feature: added implicit_link header files for **AnsiConsole** --- .../be.AnsiConsole.WithCallback.h | 113 ++++++++++++++++++ .../pantheios/implicit_link/be.AnsiConsole.h | 113 ++++++++++++++++++ .../bec.AnsiConsole.WithCallback.h | 110 +++++++++++++++++ .../pantheios/implicit_link/bec.AnsiConsole.h | 110 +++++++++++++++++ .../bel.AnsiConsole.WithCallback.h | 113 ++++++++++++++++++ .../pantheios/implicit_link/bel.AnsiConsole.h | 113 ++++++++++++++++++ .../ber.AnsiConsole.WithCallback.h | 113 ++++++++++++++++++ .../pantheios/implicit_link/ber.AnsiConsole.h | 113 ++++++++++++++++++ 8 files changed, 898 insertions(+) create mode 100644 include/pantheios/implicit_link/be.AnsiConsole.WithCallback.h create mode 100644 include/pantheios/implicit_link/be.AnsiConsole.h create mode 100644 include/pantheios/implicit_link/bec.AnsiConsole.WithCallback.h create mode 100644 include/pantheios/implicit_link/bec.AnsiConsole.h create mode 100644 include/pantheios/implicit_link/bel.AnsiConsole.WithCallback.h create mode 100644 include/pantheios/implicit_link/bel.AnsiConsole.h create mode 100644 include/pantheios/implicit_link/ber.AnsiConsole.WithCallback.h create mode 100644 include/pantheios/implicit_link/ber.AnsiConsole.h 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/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/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/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 //////////////////////////// */ + From eccd5b43dfe2d9f3789c8e95cf53ab055db84d68 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Wed, 5 Aug 2026 16:05:07 +1000 Subject: [PATCH 2/7] Adopt be.AnsiConsole as the default console sink for examples and scratch tests. Replace platform-split fprintf/WindowsConsole wiring with be/bec.AnsiConsole across demos, multiplex backends, and callback/format samples; add bec.AnsiConsole.WithCallback and open the 1.0.1-rc2 CHANGES/NEWS entries. --- CHANGES.md | 3 ++ NEWS.md | 1 + examples/c/example.c.101/implicit_link.cpp | 8 +---- examples/c/example.c.N/CMakeLists.txt | 2 +- examples/c/example.c.N/example.c.N.c | 6 ++-- examples/c/example.c.N/implicit_link.cpp | 8 +---- examples/c/example.c.assert/implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- examples/c/example.c.log_n/implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../example.cpp.backends.callback.cpp | 36 +++---------------- .../implicit_link.cpp | 8 +---- .../example.cpp.backends.mx.1/CMakeLists.txt | 2 +- .../example.cpp.backends.mx.1.cpp | 8 ++--- .../implicit_link.cpp | 3 +- .../example.cpp.backends.mx.2/CMakeLists.txt | 2 +- .../example.cpp.backends.mx.2.cpp | 8 ++--- .../implicit_link.cpp | 3 +- .../CMakeLists.txt | 4 +-- .../CMakeLists.txt | 4 +-- .../example.cpp.format.highres/CMakeLists.txt | 4 +-- .../example.cpp.format.highres.cpp | 11 +++--- .../implicit_link.cpp | 2 +- .../example.cpp.format.lowres/CMakeLists.txt | 4 +-- .../example.cpp.format.lowres.cpp | 10 +++--- .../implicit_link.cpp | 2 +- .../example.cpp.format.pad/implicit_link.cpp | 8 +---- .../CMakeLists.txt | 4 +-- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 2 +- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../example.cpp.inserter.i/implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../example.cpp.inserter.p/implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../implicit_link.cpp | 8 +---- .../example.cpp.inserter.xi/implicit_link.cpp | 8 +---- .../example.cpp.inserter.xp/implicit_link.cpp | 8 +---- .../example.cpp.linking.implicit_link_1.cpp | 10 +++--- ...cpp.misc.extended_severity_information.cpp | 4 ++- .../CMakeLists.txt | 34 ++++++++++++++++++ test/scratch/test.scratch.I18N/CMakeLists.txt | 4 +-- .../test.scratch.WideString/CMakeLists.txt | 4 +-- test/scratch/test.scratch.api/CMakeLists.txt | 4 +-- .../test.scratch.api/implicit_link.cpp | 2 +- .../test.scratch.be.N.fail/CMakeLists.txt | 2 +- .../test.scratch.be.N.fail/implicit_link.cpp | 2 +- .../test.scratch.be.N.fail.cpp | 6 ++-- test/scratch/test.scratch.be.N/CMakeLists.txt | 2 +- .../test.scratch.be.N/implicit_link.cpp | 2 +- .../test.scratch.be.N/test.scratch.be.N.cpp | 6 ++-- .../implicit_link.cpp | 2 +- .../scratch/test.scratch.c_api/CMakeLists.txt | 4 +-- .../test.scratch.c_api/implicit_link.cpp | 2 +- .../implicit_link.cpp | 2 +- .../CMakeLists.txt | 4 +-- .../implicit_link.cpp | 2 +- .../CMakeLists.txt | 4 +-- .../test.scratch.implicit_link.cpp | 4 +-- .../test.scratch.pseudoUNIX.c | 11 ++---- .../CMakeLists.txt | 4 +-- .../implicit_link.cpp | 2 +- .../scratch/test.scratch.trace/CMakeLists.txt | 4 +-- .../test.scratch.tstring/CMakeLists.txt | 4 +-- 71 files changed, 150 insertions(+), 294 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3b522f23..78efbc24 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,9 @@ # Pantheios - CHANGES +## 1.0.1-rc2 - 6th August 2026 + + ## 1.0.1-rc1 - 5th August 2026 * modular GitHub Actions CI via **`.github/workflows/ci.yml`** and **`ci-cell.yml`** (Linux **Clang**/**GCC**, macOS **Clang**/**GCC**, Windows **cl**/**MinGW**; install-smoke consumer build/run; examples / unit / component / scratch as separate cells); diff --git a/NEWS.md b/NEWS.md index 2cf4c59d..ca6d3ee0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ | Date | News Item | | -------------- | -------------------------------------------------------------------------------- | +| 6th Aug 2026 | [Pantheios 1.0.1-rc2 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc2) | | 5th Aug 2026 | [Pantheios 1.0.1-rc1 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc1) | | 18th Nov 2024 | Pantheios 1.0.1-beta222 released | | 24th Oct 2024 | Pantheios 1.0.1-beta221 released | 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..99fba3ef 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.AnsiConsole + 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..83422bd3 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.AnsiConsole + 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..4c117eb7 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.AnsiConsole + 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/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/test/scratch/test.scratch.I18N/CMakeLists.txt b/test/scratch/test.scratch.I18N/CMakeLists.txt index a9e77274..04d92eab 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.AnsiConsole + 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/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..a9fd4a6f 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.AnsiConsole + 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..73855621 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.AnsiConsole + Pantheios.bec.AnsiConsole ) target_link_libraries(test.scratch.tstring From a09bb6d311c0823ff9dbe10352da4d3116b66702 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Wed, 5 Aug 2026 16:26:53 +1000 Subject: [PATCH 3/7] chore: further clarification of use of **be.AnsiConsole** --- CHANGES.md | 2 + cmake/TargetMacros.cmake | 8 ++-- .../CMakeLists.txt | 4 +- .../CMakeLists.txt | 4 +- .../CMakeLists.txt | 4 +- include/pantheios/backends/bec.console.h | 38 ++++++++++--------- include/pantheios/implicit_link/be.console.h | 14 +++---- .../implicit_link/bec.console.WithCallback.h | 10 ++--- include/pantheios/implicit_link/bec.console.h | 10 ++--- include/pantheios/implicit_link/bel.console.h | 10 ++--- include/pantheios/implicit_link/ber.console.h | 10 ++--- .../CMakeLists.txt | 2 +- .../test.component.be.file.threading.cpp | 4 +- test/scratch/test.scratch.I18N/CMakeLists.txt | 4 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 4 +- .../test.scratch.tstring/CMakeLists.txt | 4 +- 17 files changed, 69 insertions(+), 65 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 78efbc24..c7952fcd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,8 @@ ## 1.0.1-rc2 - 6th August 2026 +* 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; + ## 1.0.1-rc1 - 5th August 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/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt b/examples/cpp/contract/example.cpp.contract.PANTHEIOS_ASSERT/CMakeLists.txt index 99fba3ef..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,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 83422bd3..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,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/frontends/example.cpp.frontends.custom/CMakeLists.txt b/examples/cpp/frontends/example.cpp.frontends.custom/CMakeLists.txt index 4c117eb7..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_Pantheios_util(example.cpp.frontends.custom) 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.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.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.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.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/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..968293c7 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 diff --git a/test/scratch/test.scratch.I18N/CMakeLists.txt b/test/scratch/test.scratch.I18N/CMakeLists.txt index 04d92eab..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,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.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.fe.simple.WithCallback/CMakeLists.txt b/test/scratch/test.scratch.fe.simple.WithCallback/CMakeLists.txt index a9fd4a6f..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,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.tstring/CMakeLists.txt b/test/scratch/test.scratch.tstring/CMakeLists.txt index 73855621..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.AnsiConsole - Pantheios.bec.AnsiConsole + $,Pantheios.be.WindowsConsole,Pantheios.be.AnsiConsole> + $,Pantheios.bec.WindowsConsole,Pantheios.bec.AnsiConsole> ) target_link_libraries(test.scratch.tstring From bf54440ff22131c760c5e72fdbcc050e4bd35b06 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Wed, 5 Aug 2026 16:31:20 +1000 Subject: [PATCH 4/7] Enable Windows VT-aware ANSI colouring in bec.AnsiConsole. Gate escape sequences on host capability (Win11 ready, Win10 via SetConsoleMode, older hosts plain) so colours work safely across XP through modern Command Box. --- CHANGES.md | 1 + src/backends/bec.AnsiConsole.cpp | 117 ++++++++++++++++++++++++++++--- 2 files changed, 110 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c7952fcd..47fbda18 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ ## 1.0.1-rc2 - 6th August 2026 +* **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; 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) { From 21b3f72fe6a82c8c2b8a5f9585fe39f8ff19c149 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Wed, 5 Aug 2026 16:39:02 +1000 Subject: [PATCH 5/7] fix --- CHANGES.md | 1 + .../test.component.be.file.threading.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 47fbda18..58a4348f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * **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-rc1 - 5th August 2026 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 968293c7..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 @@ -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 From 15f73a714a71acc53c3f4b8db47fb6f8cb352660 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Mon, 7 Sep 2026 08:40:35 +1000 Subject: [PATCH 6/7] squash-commit --- .github/workflows/ci.yml | 46 +++++++++++- .vscode/settings.json | 15 ++++ CHANGES.md | 16 +++- INSTALL.md | 12 +-- KNOWN_ISSUES.md | 4 +- NEWS.md | 3 +- TODO.md | 19 ++++- cmake/pantheios-config.cmake.in | 74 +++++++++++++++++++ include/pantheios/pantheios.h | 17 +++-- projects/core/CMakeLists.txt | 14 +++- .../test.unit.getversion.c | 4 +- 11 files changed, 196 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1864533..a3fd669d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,13 +3,17 @@ name: CI on: push: branches: - - boilerplate + - master - dev + - boilerplate + - cmake-fix - idiomatic - - master - rc1 - rc2 - rc3 + - rc4 + - rc5 + - update pull_request: concurrency: @@ -100,13 +104,15 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-make - - name: Install STLSoft dependency + - name: Install STLSoft and b64 dependencies shell: bash run: | set -euo pipefail DEPS="${RUNNER_TEMP}/sis-deps" STLSRC="${RUNNER_TEMP}/stlsoft-src" STLBUILD="${RUNNER_TEMP}/stlsoft-build" + B64SRC="${RUNNER_TEMP}/b64-src" + B64BUILD="${RUNNER_TEMP}/b64-build" mkdir -p "$DEPS" git clone --depth 1 https://github.com/synesissoftware/STLSoft "$STLSRC" if [ "${{ matrix.c_compiler }}" = "cl" ]; then @@ -137,6 +143,38 @@ jobs: cmake --build "$STLBUILD" --parallel cmake --install "$STLBUILD" fi + git clone --depth 1 https://github.com/synesissoftware/b64 "$B64SRC" + if [ "${{ matrix.c_compiler }}" = "cl" ]; then + cmake -S "$B64SRC" -B "$B64BUILD" \ + -DCMAKE_DISABLE_FIND_PACKAGE_MFC=TRUE \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TESTING=OFF + cmake --build "$B64BUILD" --config "${{ env.BUILD_TYPE }}" --parallel + cmake --install "$B64BUILD" --config "${{ env.BUILD_TYPE }}" + elif [ "${{ matrix.c_compiler }}" = "mingw" ]; then + export PATH="/mingw64/bin:$PATH" + cmake -S "$B64SRC" -B "$B64BUILD" -G "MinGW Makefiles" \ + -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TESTING=OFF + cmake --build "$B64BUILD" --parallel 2 + cmake --install "$B64BUILD" + else + cmake -S "$B64SRC" -B "$B64BUILD" \ + -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ + -DCMAKE_C_COMPILER="${{ matrix.c_compiler }}" \ + -DCMAKE_CXX_COMPILER="${{ matrix.cpp_compiler }}" \ + -DCMAKE_PREFIX_PATH="$DEPS" \ + -DCMAKE_INSTALL_PREFIX="$DEPS" \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TESTING=OFF + cmake --build "$B64BUILD" --parallel + cmake --install "$B64BUILD" + fi echo "SIS_DEPS=$DEPS" >> "$GITHUB_ENV" - name: Configure @@ -209,7 +247,7 @@ jobs: cat > "$CONSUMER/CMakeLists.txt" <<'EOF' cmake_minimum_required(VERSION 3.13) project(pantheios_install_smoke CXX) - find_package(STLSoft REQUIRED) + # STLSoft and b64 must come from pantheios-config.cmake's find_dependency(). find_package(Pantheios REQUIRED) add_executable(consumer consumer.cpp) # Link order matters for GNU ld (static archives are single-pass): diff --git a/.vscode/settings.json b/.vscode/settings.json index 3fe51d2b..a20fc3ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,8 @@ "editor.tabSize": 4, }, "[c]": { + "editor.defaultFormatter": "ms-vscode.cpptools", + "editor.formatOnSave": true, "editor.insertSpaces": true, "editor.rulers": [ 60, 64, 68, 72, 76 ], "editor.tabSize": 4, @@ -14,6 +16,8 @@ "editor.tabSize": 4, }, "[cpp]": { + "editor.defaultFormatter": "ms-vscode.cpptools", + "editor.formatOnSave": true, "editor.insertSpaces": true, "editor.rulers": [ 60, 64, 68, 72, 76 ], "editor.tabSize": 4, @@ -49,7 +53,17 @@ "editor.insertSpaces": true, "editor.tabSize": 2, }, + "C_Cpp.autocompleteAddParentheses": true, + "C_Cpp.clang_format_fallbackStyle": "none", + "C_Cpp.clang_format_style": "file", + "C_Cpp.default.cStandard": "c17", + "C_Cpp.default.cppStandard": "c++17", + "C_Cpp.enhancedColorization": "enabled", + "C_Cpp.errorSquiggles": "enabled", + "C_Cpp.formatting": "clangFormat", + "C_Cpp.intelliSenseEngine": "default", "cmake.configureOnOpen": false, + "debug.allowBreakpointsEverywhere": true, "editor.detectIndentation": false, "editor.insertSpaces": false, "editor.renderWhitespace": "all", @@ -128,6 +142,7 @@ "numeric": "cpp", "optional": "cpp", "ostream": "cpp", + "print": "cpp", "queue": "cpp", "random": "cpp", "ranges": "cpp", diff --git a/CHANGES.md b/CHANGES.md index 58a4348f..caf09186 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,17 @@ -# Pantheios - CHANGES +# Pantheios - Changes + + +## 1.0.1-rc3 - 10th September 2026 + +T.B.C. + + +## 1.0.1-rc2 - 6th September 2026 + +* **CMake** package configuration: loaded `CMakeFindDependencyMacro` and added conditional `find_dependency()` calls for **STLSoft** and **b64** in **`pantheios-config.cmake`**; ensures exported static targets (such as `Pantheios::Pantheios.core`) provide transitive interface link dependencies (`b64::core`, `STLSoft::STLSoft`) to downstream consumers without requiring callers to invoke `find_package(b64)` manually; +* version definition: added `PANTHEIOS_VER_1_0_1_RC2` (`0x010001e2`) and updated `PANTHEIOS_VER` to RC2 in **include/pantheios/pantheios.h**; +* tooling and configuration: added **`.vscode/settings.json`**; +* documentation and release alignment: updated **NEWS.md**, **INSTALL.md**, and **KNOWN_ISSUES.md** for the 1.0.1-rc2 release; ## 1.0.1-rc2 - 6th August 2026 @@ -14,6 +27,7 @@ * documentation modernisation: **CHANGES.md** (from **CHANGES.txt**), removal of **HISTORY.md** and **README.txt**, and updates to **README.md**, **FAQ.md**, **INSTALL.md**, **TODO.md**, **KNOWN_ISSUES.md**, **AUTHORS.md**, and **HOW_YOU_CAN_HELP.md**; * new stock back-end **bec.AnsiConsole** / **be.AnsiConsole** (bel/ber, colouring flags, argument parsing, unit and scratch tests); * **CMake** enhancements: **Threads** / `PANTHEIOS_FORCE_MT`, `BUILD_TESTING`, optional **b64** via `NO_B64` / **`--no-b64`**, CMP0177, lowercase export package (**`pantheios-config.cmake`**), improved **STLSoft** include handling, and **`_BUILD_AS_UNIX`** / **`_BUILD_AS_WIN32`** OS discrimination; +* **CMake** package config: `find_dependency()` for **STLSoft** and (when built with it) **b64**, so consumers of **`Pantheios::Pantheios.core`** no longer see a missing **`b64::core`** imported target; * modern composite **`PANTHEIOS_VER`** (`MAJOR` / `MINOR` / `PATCH` / `ALPHABETA`); **`test.unit.getversion`** covers those fields via **xTests** terse-api assertions; scratch **`libver`** + top-level **`libver.sh`**; * helper scripts: **`.sis/project_name.txt`** / **`.sis/script_info_lines.txt`** wired into **`--help`** and status messages; **run_all_examples.sh**; **run_all_unit_tests.sh** gains **`--unit-only`** / **`--component-only`**; test runners exclude **`*.log`** from discovery; * **bec.file**: create log files without execute permission (was `S_IRWXU`/`S_IRWXG`, which made suite-named logs executable and runnable by test discovery); diff --git a/INSTALL.md b/INSTALL.md index 3987dedd..dca7224d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -46,7 +46,7 @@ The **prepare_cmake.sh** script has a bunch of command-line flags/options to cus ```plaintext Pantheios is an efficient, flexible, and robust C/C++ diagnostic logging library -Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems +Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems Copyright (c) 2005-2019, Matthew Wilson and Synesis Software Creates/reinitialises the CMake build script(s) @@ -128,7 +128,7 @@ $ sudo cmake --install ${SIS_CMAKE_BUILD_DIR:-./_build} --config Release 1. Download the latest distributions; Obtain the latest releases of **Pantheios** and **STLSoft** from: -* [Pantheios GitHub project](https://github.com/synesissoftware/Pantheios/tags), e.g. [**Pantheios-1.0.1-rc1.zip**](https://github.com/synesissoftware/Pantheios/archive/refs/tags/1.0.1-rc1.zip); +* [Pantheios GitHub project](https://github.com/synesissoftware/Pantheios/tags), e.g. [**Pantheios-1.0.1-rc3.zip**](https://github.com/synesissoftware/Pantheios/archive/refs/tags/1.0.1-rc3.zip); * [STLSoft GitHub project](https://github.com/synesissoftware/STLSoft/tags), e.g. [**STLSoft-1.11.1-rc4**](https://github.com/synesissoftware/STLSoft/archive/refs/tags/STLSoft-1.11.1-rc4); @@ -137,7 +137,7 @@ Obtain the latest releases of **Pantheios** and **STLSoft** from: ```bash $ mkdir -p ~/open-source $ cd ~/open-source -$ unzip Pantheios-1.0.1-rc1.zip +$ unzip Pantheios-1.0.1-rc3.zip $ unzip STLSoft-1.11.1-rc4 ``` @@ -146,7 +146,7 @@ $ unzip STLSoft-1.11.1-rc4 4. Select and change to the appropriate build subdirectory under your **Pantheios** directory, e.g. **build/gcc48.unix**, and then execute make ```bash -$ cd Pantheios-1.0.1-rc1 +$ cd Pantheios-1.0.1-rc3 $ cd build/gcc48.unix $ make ``` @@ -185,8 +185,8 @@ $ make This project comes with a number of scripts useful for building with **CMake**, as follows: -| Script | Purpose | -| ------------------------- | ------- | +| Script | Purpose | +| ------ | ------- | | **build_cmake.sh** | Executes **CMake**-generated artefacts to (re)build project.

Performs a (re)build, meaningful only once `prepare_cmake.sh` has been run once to generate all the **CMake** build artefacts.

Use `./build_cmake.sh --help` for further information. | | **clean_cmake.sh** | Executes **CMake**-generated artefacts to clean project.

Performs a (re)build, meaningful only once `prepare_cmake.sh` has been run once to generate all the **CMake** build artefacts and a build has been run.

Use `./clean_cmake.sh --help` for further information. | | **libver.sh** | Builds (unless suppressed) and runs the **libver** scratch program, which prints composite version macros for **Pantheios** and its discovered dependencies.

Use `./libver.sh --help` for further information. | diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index 40c0e6a5..210c1344 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -1,13 +1,13 @@ # Pantheios - Known Issues -## Pantheios 1.0.1-rc1 Known Issues +## Pantheios 1.0.1-rc2 Known Issues * still a few build artefacts not cleaned up for some makefiles; * distribution contains makefiles and project files for obsolete compilers (such as VC++ 5, Comeau, …); -## Pantheios 1.0.1-rc1 Suspected Issues +## Pantheios 1.0.1-rc2 Suspected Issues * \ diff --git a/NEWS.md b/NEWS.md index ca6d3ee0..994d59fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,7 +3,8 @@ | Date | News Item | | -------------- | -------------------------------------------------------------------------------- | -| 6th Aug 2026 | [Pantheios 1.0.1-rc2 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc2) | +| 10th Sep 2026 | [Pantheios 1.0.1-rc3 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc3) | +| 6th Sep 2026 | [Pantheios 1.0.1-rc2 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc2) | | 5th Aug 2026 | [Pantheios 1.0.1-rc1 released](https://github.com/synesissoftware/Pantheios/releases/tag/1.0.1-rc1) | | 18th Nov 2024 | Pantheios 1.0.1-beta222 released | | 24th Oct 2024 | Pantheios 1.0.1-beta221 released | diff --git a/TODO.md b/TODO.md index da06c0b3..2998a755 100644 --- a/TODO.md +++ b/TODO.md @@ -4,9 +4,24 @@ ## Functional improvements -### CI / tooling +### 1.0.1-rc3 (10th September 2026) -* [ ] Re-enable **test.unit.bec.COMErrorObject** on MinGW once **xTests** fixes multibyte string-equality helpers for GCC two-phase lookup (shim overloads declared after **xtests.h** is included); currently skipped in **test/unit/CMakeLists.txt**; +* [ ] CI refactoring; +* [ ] **README.md** (and other project markdown) significant enhancement (in a similar vein as has been done for **xqsr3** (Ruby)); +* [ ] Integration of **woad**; +* [ ] Using **AnsiConsole**; +* [ ] Using **ACE**; + + +### 1.0.1 final release (nice-to-have / non-mandatory) + +Candidates to consider for the final 1.0.1 release if time permits, but non-blocking: + +* [ ] Re-enable **test.unit.bec.COMErrorObject** on **MinGW** once **xTests** fixes multibyte string-equality helpers for GCC two-phase lookup (shim overloads declared after **xtests.h** is included); currently skipped in **test/unit/CMakeLists.txt**; +* [ ] Review all download/build/install documentation (**INSTALL.md**); +* [ ] Component test for **be.WindowsSyslog**; +* [ ] Sort out `\file` Doxygen fields across headers; +* [ ] Prune obsolete compiler and IDE project-file items from **TODO.md** (VS '98 through 2010, Turbo C++, Comeau, Xcode project-file generators); ### Pantheios 1.0 TODOs diff --git a/cmake/pantheios-config.cmake.in b/cmake/pantheios-config.cmake.in index 82620719..a1761369 100644 --- a/cmake/pantheios-config.cmake.in +++ b/cmake/pantheios-config.cmake.in @@ -1,3 +1,77 @@ @PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +# ########################################################################## +# Transitive Dependencies +# +# Pantheios builds and exports static library targets +# (Pantheios::Pantheios.core, Pantheios::Pantheios.util, back-ends, +# front-ends, and utilities). +# +# In CMake, private link dependencies of static libraries are exported into +# INTERFACE_LINK_LIBRARIES (wrapped in $) in the generated +# pantheios-targets.cmake file so downstream consumers linking static +# archives can resolve all referenced symbols at final link time. +# +# When downstream consumers call find_package(pantheios), CMake loads +# pantheios-targets.cmake and verifies that any targets named in +# INTERFACE_LINK_LIBRARIES already exist in the imported target namespace. +# If an imported target (e.g. b64::core or STLSoft::STLSoft) has not been +# defined yet, CMake reports a configuration error: +# +# "The link interface of target ... contains: ... but the target was not found." +# +# and the build fails during linking because the linker attempts to resolve +# the target name as a literal file or library flag (e.g. -lb64::core). +# +# Using CMakeFindDependencyMacro's find_dependency() solves this by loading +# cleanly the required imported target definitions while forwarding the +# calling project's QUIET and REQUIRED flags. +# +# Why these calls are strictly CONDITIONAL: +# +# 1. STLSoft (@STLSoft_FOUND@): +# Pantheios public headers and internals depend on STLSoft. When +# Pantheios was configured and built with STLSoft discovered via CMake +# find_package() (@STLSoft_FOUND@ is true), exported targets reference +# STLSoft::STLSoft, and downstream consumers must find that CMake +# package. If STLSoft was provided via a manual include path (e.g. via +# the STLSOFT variable or environment variable without CMake package +# export), @STLSoft_FOUND@ is empty/false and no CMake target dependency +# is exported or required. +# +# 2. b64 (@b64_FOUND@): +# b64 is an OPTIONAL dependency for Pantheios, providing the +# pantheios::b64 inserter class in Pantheios.core. +# - If Pantheios was built WITH b64 (@b64_FOUND@ is true), Pantheios.core +# compiles b64 support and links b64::core. The exported targets file +# therefore requires b64::core in its link interface, and downstream +# consumers must locate b64. +# - If Pantheios was built WITHOUT b64 (e.g. via NO_B64 or because b64 +# was not present at build time), b64 support is omitted and +# pantheios-targets.cmake contains no reference to b64::core. In that +# scenario, calling find_dependency(b64) unconditionally would fail on +# systems where b64 is not installed, needlessly breaking downstream +# consumers. +# +# Guarding with @STLSoft_FOUND@ and @b64_FOUND@ ensures downstream discovery +# precisely mirrors the dependencies linked into the installed Pantheios +# binary. +# ########################################################################## + +if(@STLSoft_FOUND@) + + find_dependency(STLSoft) +endif() + +if(@b64_FOUND@) + + find_dependency(b64) +endif() + include("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@-targets.cmake") + +# ############################## end of file ############################# # + diff --git a/include/pantheios/pantheios.h b/include/pantheios/pantheios.h index 0c367acf..5ca12426 100644 --- a/include/pantheios/pantheios.h +++ b/include/pantheios/pantheios.h @@ -4,7 +4,7 @@ * Purpose: Pantheios Core and Util APIs. * * Created: 21st June 2005 - * Updated: 5th August 2026 + * Updated: 10th September 2026 * * Home: http://www.pantheios.org/ * @@ -59,8 +59,8 @@ #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION # define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_MAJOR 3 # define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_MINOR 54 -# define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_REVISION 12 -# define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_EDIT 395 +# define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_REVISION 13 +# define PANTHEIOS_VER_PANTHEIOS_H_PANTHEIOS_EDIT 396 #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ /** @@ -118,23 +118,28 @@ # endif # define PANTHEIOS_VER_1_0_1_B224 0x010001e0 # define PANTHEIOS_VER_1_0_1_RC1 0x010001e1 /* NOTE: e1 is required just to step over the prior 1.0.1 beta version values */ +# define PANTHEIOS_VER_1_0_1_RC2 0x010001e2 +# define PANTHEIOS_VER_1_0_1_RC3 0x010001e3 # define PANTHEIOS_VER_1_0_1 0x010001ff #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */ #define PANTHEIOS_VER_MAJOR 1 #define PANTHEIOS_VER_MINOR 0 #define PANTHEIOS_VER_PATCH 1 -#define PANTHEIOS_VER_ALPHABETA 0xE1 +#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/core/CMakeLists.txt b/projects/core/CMakeLists.txt index b802b1f9..b2cf817b 100644 --- a/projects/core/CMakeLists.txt +++ b/projects/core/CMakeLists.txt @@ -36,10 +36,16 @@ target_include_directories(Pantheios.core target_link_STLSoft(Pantheios.core) -target_link_libraries(Pantheios.core - PRIVATE - $<$: b64::core > -) +# Link b64 only when discovered at configure time. Prefer a plain +# target_link_libraries() over a generator expression so the exported +# interface records `$` cleanly (static lib). +if(b64_FOUND) + + target_link_libraries(Pantheios.core + PRIVATE + b64::core + ) +endif(b64_FOUND) define_target_compile_options(Pantheios.core) diff --git a/test/unit/test.unit.getversion/test.unit.getversion.c b/test/unit/test.unit.getversion/test.unit.getversion.c index 79f70892..43542e91 100644 --- a/test/unit/test.unit.getversion/test.unit.getversion.c +++ b/test/unit/test.unit.getversion/test.unit.getversion.c @@ -4,7 +4,7 @@ * Purpose: Implementation file for the test.unit.getversion project. * * Created: 28th August 2008 - * Updated: 4th August 2026 + * Updated: 6th September 2026 * * ////////////////////////////////////////////////////////////////////// */ @@ -151,7 +151,7 @@ static void test_composite(void) TEST_INT_EQ(expected, PANTHEIOS_VER); TEST_INT_EQ(expected, pantheios_getVersion()); - TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC1, PANTHEIOS_VER); + TEST_INT_EQ(PANTHEIOS_VER_1_0_1_RC3, PANTHEIOS_VER); } From 9fee059cc1a3435b663dd86f051681260b45087e Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Mon, 7 Sep 2026 10:05:06 +1000 Subject: [PATCH 7/7] CHANGES.md --- CHANGES.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 196a0da1..7edb8f0e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,14 +3,13 @@ ## 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 -* **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; * **CMake** package configuration: loaded `CMakeFindDependencyMacro` and added conditional `find_dependency()` calls for **STLSoft** and **b64** in **`pantheios-config.cmake`**; ensures exported static targets (such as `Pantheios::Pantheios.core`) provide transitive interface link dependencies (`b64::core`, `STLSoft::STLSoft`) to downstream consumers without requiring callers to invoke `find_package(b64)` manually; * version definition: added `PANTHEIOS_VER_1_0_1_RC2` (`0x010001e2`) and updated `PANTHEIOS_VER` to RC2 in **include/pantheios/pantheios.h**; * tooling and configuration: added **`.vscode/settings.json`**;