Repository navigation
C++ IOStreams support: inserters and manipulators - #12
Merged
Merged
Conversation
Map the standard iostreams onto the C streams woad already understands: cout and wcout to stdout, and cerr, clog, and their wide counterparts to stderr. woad_seq_for() then calls woad_seq_for_stream(), so policy, terminal attachment, and Windows virtual-terminal gating stay in the C API. An unrecognised buffer is passed as NULL. Enable C++ in the CMake project and add example.c++.colour_for. Bump the library version to 0.2.0 with RELSTATUS 0x41, and update the version unit test to match.
Add stream manipulators and message inserters for the standard SGR sequences. Each writes its sequence only when woad_seq_for_stream() says the destination warrants colour, and a chain of inserters shares one conditional trailing reset. example.c++.colour_for now shows macros, manipulators, and inserters. The C colour_for example uses the same magenta-on-bright_black stderr line.
mwsis
approved these changes
Oct 23, 2026
…amples/iostreams**
* chore(examples, test): removed unnecessary copyright information * feat(woad): release 0.1.2 with C++ framing and richer version example * feature(examples): added C++ examples * feature(API): C++ namespace methods
Promote the unreleased 0.1.2 to 0.2.0 following the merged C++ work. - woad.h: set WOAD_VER_MINOR to 2 and WOAD_VER_PATCH to 0; bump the header revision macros (patch 6, edit 13); - test/unit/version: expect 0.2.0; - Doxyfile, INSTALL.md: refer to 0.2.0; - CHANGES.md: retitle 0.1.2 as 0.2.0 and record the woad:: C++ API, removal of the extern "C" blocks, the C++ examples, and the CXX language enablement; - NEWS.md: retitle the 0.1.2 row as 0.2.0;
mwsis
approved these changes
Oct 25, 2026
Add Doxygen markup for every function in woad/iostreams.hpp, group the IOStreams API into manipulator and inserter modules, and describe the C++ and IOStreams support in the README. - iostreams.hpp: document the stream-mapping helpers, apply_sequence(), the woad_seq_for() overload, woad_inserter_t, and all manipulators and inserters; add group__woad__iostreams with sub-groups group__woad__iostreams__manipulators and group__woad__iostreams__inserters; - Doxyfile: stop excluding iostreams.hpp; expand the two WOAD_DEFINE_* macros to one prototype each so that the comment before each invocation documents that function; - doc/mainpage.md: list the three IOStreams modules; - README.md: add C++ API and IOStreams interface sections, and update the introduction, table of contents, and examples table; - examples/iostreams/colour_for: rename the target to example.iostreams.colour_for; - CHANGES.md: record the above under 0.3.0;
mwsis
approved these changes
Oct 25, 2026
GarthJL1965
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.