This manual provides documentation for the GNU @code{libtextstyle} library.
@copying
-Copyright (C) 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2018-2026 Free Software Foundation, Inc.
This manual is free documentation. It is dually licensed under the
GNU FDL and the GNU GPL. This means that you can redistribute this
@page
@vskip 0pt plus 1filll
@c @insertcopying
-Copyright (C) 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2018-2026 Free Software Foundation, Inc.
This manual is free documentation. It is dually licensed under the
GNU FDL and the GNU GPL. This means that you can redistribute this
Note: The resulting stream must be closed before @code{@var{fd}} can be
closed.
+
+Multithreaded programs that use this function must obey two constraints:
+@itemize @bullet
+@item
+After creating a @code{term_ostream_t} in some thread, all output
+to the @code{@var{fd}} up to the moment where the stream gets closed must be done
+in the same thread.
+@item
+If at the moment of creation of a @code{term_ostream_t} the process is
+single-threaded, it @strong{must not} create additional threads until the stream
+gets closed.
+@end itemize
@end deftypefn
The class adds the following methods:
Note: The resulting stream must be closed before @code{@var{fd}} can be
closed.
+Multithreaded programs that use this function must obey two constraints:
+@itemize @bullet
+@item
+After creating a @code{term_styled_ostream_t} in some thread, all output
+to the @code{@var{fd}} up to the moment where the stream gets closed must be done
+in the same thread.
+@item
+If at the moment of creation of a @code{term_styled_ostream_t} the process is
+single-threaded, it @strong{must not} create additional threads until the stream
+gets closed.
+@end itemize
+
Returns @code{NULL} upon failure.
@end deftypefn
FILENAME is used only for error messages.
TTY_CONTROL specifies the amount of control to take over the underlying tty.
The resulting stream will be line-buffered.
- Note that the resulting stream must be closed before FD can be closed. */
+ Note that the resulting stream must be closed before FD can be closed.
+ Multithreaded programs that use this function must obey two constraints:
+ - After creating a term_ostream_t in some thread, all output
+ to the FD up to the moment where the stream gets closed must be done
+ in the same thread.
+ - If at the moment of creation of a term_ostream_t the process is
+ single-threaded, it MUST NOT create additional threads until the stream
+ gets closed. */
extern term_ostream_t
term_ostream_create (int fd, const char *filename, ttyctl_t tty_control);
FILENAME is used only for error messages.
TTY_CONTROL specifies the amount of control to take over the underlying tty.
Note that the resulting stream must be closed before FD can be closed.
+ Multithreaded programs that use this function must obey two constraints:
+ - After creating a term_styled_ostream_t in some thread, all output
+ to the FD up to the moment where the stream gets closed must be done
+ in the same thread.
+ - If at the moment of creation of a term_styled_ostream_t the process is
+ single-threaded, it MUST NOT create additional threads until the stream
+ gets closed.
Return NULL upon failure. */
extern term_styled_ostream_t
term_styled_ostream_create (int fd, const char *filename,