]> git.ipfire.org Git - thirdparty/gettext.git/commit
libtextstyle: Add support for Windows consoles.
authorBruno Haible <bruno@clisp.org>
Wed, 27 Mar 2019 20:38:20 +0000 (21:38 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 27 Mar 2019 20:38:20 +0000 (21:38 +0100)
commitfaf61124fb5fb1c47a3e2f7ea6106768a0078a24
tree5ff7e16b2800cd6e5564a36aa21bd703dfbbb56d
parentb25d79f323d1e5c6cfe51922acb76e82e6a5e737
libtextstyle: Add support for Windows consoles.

* gnulib-local/lib/term-ostream.oo.c: Include <windows.h>, msvc-nothrow.h,
<io.h>.
(struct term_ostream): Add fields handle, is_windows_console,
default_console_attributes, current_console_attributes.
(out_color_change, out_bgcolor_change, out_underline_change, out_attr_change,
restore, async_restore, async_set_attributes_from_default, term_ostream::flush):
Add separate code path for Windows consoles.
(term_ostream_create): On Windows, test whether the handle refers to a console,
and initialize the new fields.
* gnulib-local/modules/term-ostream (Depends-on): Add msvc-nothrow.
* libtextstyle/NEWS: Mention it.
gnulib-local/lib/term-ostream.oo.c
gnulib-local/modules/term-ostream
libtextstyle/NEWS