]> git.ipfire.org Git - thirdparty/gettext.git/commit
libtextstyle: New function term_ostream_flush_to_current_style.
authorBruno Haible <bruno@clisp.org>
Tue, 12 Mar 2019 18:28:14 +0000 (19:28 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 12 Mar 2019 18:28:14 +0000 (19:28 +0100)
commit63b30165deacfea29860d23cc5fbe8c7ffc7da8d
treee8613fd73a6db99616f20b48fe5b6135e495ea07
parent9c52568e711973243d9b4cd075a398c7599f0062
libtextstyle: New function term_ostream_flush_to_current_style.

* gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add method
flush_to_current_style.
* gnulib-local/lib/term-ostream.oo.c (struct term_ostream): Add fields
default_attr, active_attr, non_default_active.
(out_attr_change): Remove second argument. Update active_attr.
(activate_non_default_attr, deactivate_non_default_attr, activate_default_attr):
New functions, extracted from output_buffer.
(output_buffer): Use them. Add a second argument.
(term_ostream::write_mem, term_ostream::flush): Update output_buffer calls.
(term_ostream::free): Add an assertion.
(term_ostream::flush_to_current_style): New method.
(term_ostream_create): Initialize the fields default_attr, active_attr,
non_default_active.
* libtextstyle/lib/textstyle.h (term_ostream_flush_to_current_style): New
declaration.
* libtextstyle/doc/libtextstyle.texi (The term_ostream class): Document
term_ostream_flush_to_current_style.
* libtextstyle/NEWS: Mention the change.
gnulib-local/lib/term-ostream.oo.c
gnulib-local/lib/term-ostream.oo.h
libtextstyle/NEWS
libtextstyle/doc/libtextstyle.texi
libtextstyle/lib/textstyle.h