abort ();
}
+static void
+html_ostream::flush_to_current_style (html_ostream_t stream)
+{
+ verify_invariants (stream);
+ /* stream->buf[] contains only a few bytes that don't correspond to a
+ character. Can't flush it. */
+ /* Open all requested <span> tags. */
+ emit_pending_spans (stream, true);
+ verify_invariants (stream);
+}
+
/* Constructor. */
html_ostream_t
/* Output stream that produces HTML output.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
/* End a <span class="CLASSNAME"> element.
The begin_span / end_span calls must match properly. */
void end_span (html_ostream_t stream, const char *classname);
+
+ /* Like html_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it
+ leaves the destination with the current text style enabled, instead
+ of with the default text style.
+ After calling this function, you can output strings without newlines(!)
+ to the underlying stream, and they will be rendered like strings passed
+ to 'ostream_write_mem' or 'ostream_write_str'. */
+ void flush_to_current_style (html_ostream_t stream);
};
ostream_flush_scope_t.
* The term_ostream_t type supports a new function
term_ostream_flush_to_current_style.
+* The html_ostream_t type supports a new function
+ html_ostream_flush_to_current_style.
New in 0.5:
must match properly.
@end deftypefn
+@deftypefn Function void html_ostream_flush_to_current_style (html_ostream_t@tie{}@var{stream})
+This function acts like @code{ostream_flush (@var{stream}, FLUSH_THIS_STREAM)},
+except that it leaves the destination with the current text style enabled,
+instead of with the default text style.
+
+After calling this function, you can output strings without newlines(!) to the
+underlying stream, and they will be rendered like strings passed to
+@code{ostream_write_mem} or @code{ostream_write_str}.
+@end deftypefn
+
@node The memory_ostream class
@subsubsection The @code{memory_ostream} class
extern void html_ostream_free (html_ostream_t first_arg);
extern void html_ostream_begin_span (html_ostream_t first_arg, const char *classname);
extern void html_ostream_end_span (html_ostream_t first_arg, const char *classname);
+/* Like html_ostream_flush (first_arg, FLUSH_THIS_STREAM), except that it
+ leaves the destination with the current text style enabled, instead
+ of with the default text style.
+ After calling this function, you can output strings without newlines(!)
+ to the underlying stream, and they will be rendered like strings passed
+ to 'ostream_write_mem' or 'ostream_write_str'. */
+extern void html_ostream_flush_to_current_style (html_ostream_t stream);
#ifdef __cplusplus
}
#endif