gnulib-tool.py: Make --megatest behaviour more similar to shell impl.
[gnulib.git] / lib / textstyle.in.h
blob3cbd5c04c3dd21495b82b3e01119bfde4e0404dd
1 /* Dummy replacement for part of the public API of the libtextstyle library.
2 Copyright (C) 2006-2007, 2019-2024 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2019. */
19 /* This file is used as replacement when libtextstyle with its include file
20 <textstyle.h> is not found.
21 It supports the essential API and implements it in a way that does not
22 provide text styling. That is, it produces plain text output via <stdio.h>
23 FILE objects.
24 Thus, it allows a package to be build with or without a dependency to
25 libtextstyle, with very few occurrences of '#if HAVE_LIBTEXTSTYLE'.
27 Restriction:
28 It assumes that freopen() is not being called on stdout and stderr. */
30 #ifndef _TEXTSTYLE_H
31 #define _TEXTSTYLE_H
33 /* This file uses _GL_ATTRIBUTE_MAYBE_UNUSED, HAVE_TCDRAIN. */
34 #if !_GL_CONFIG_H_INCLUDED
35 #error "Please include config.h first."
36 #endif
38 #include <errno.h>
39 #include <stdarg.h>
40 #include <stddef.h>
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <string.h>
44 #include <unistd.h>
45 #if HAVE_TCDRAIN
46 # include <termios.h>
47 #endif
49 /* An __attribute__ __format__ specifier for a function that takes a format
50 string and arguments, where the format string directives are the ones
51 standardized by ISO C99 and POSIX.
52 _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */
53 /* __gnu_printf__ is supported in GCC >= 4.4. */
54 #ifndef _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD
55 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
56 # define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__
57 # else
58 # define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__
59 # endif
60 #endif
62 /* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
63 the entity is not used. The compiler should not warn if the entity is not
64 used. */
65 #ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
66 # if 0 /* no GCC or clang version supports this yet */
67 # define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
68 # elif defined __GNUC__ || defined __clang__
69 # define _GL_ATTRIBUTE_MAYBE_UNUSED __attribute__ ((__unused__))
70 # else
71 # define _GL_ATTRIBUTE_MAYBE_UNUSED
72 # endif
73 #endif
75 /* ----------------------------- From ostream.h ----------------------------- */
77 /* Describes the scope of a flush operation. */
78 typedef enum
80 /* Flushes buffers in this ostream_t.
81 Use this value if you want to write to the underlying ostream_t. */
82 FLUSH_THIS_STREAM = 0,
83 /* Flushes all buffers in the current process.
84 Use this value if you want to write to the same target through a
85 different file descriptor or a FILE stream. */
86 FLUSH_THIS_PROCESS = 1,
87 /* Flushes buffers in the current process and attempts to flush the buffers
88 in the kernel.
89 Use this value so that some other process (or the kernel itself)
90 may write to the same target. */
91 FLUSH_ALL = 2
92 } ostream_flush_scope_t;
95 /* An output stream is an object to which one can feed a sequence of bytes. */
97 typedef FILE * ostream_t;
99 static inline void
100 ostream_write_mem (ostream_t stream, const void *data, size_t len)
102 if (len > 0)
103 fwrite (data, 1, len, stream);
106 static inline void
107 ostream_flush (ostream_t stream, ostream_flush_scope_t scope)
109 fflush (stream);
110 if (scope == FLUSH_ALL)
112 int fd = fileno (stream);
113 if (fd >= 0)
115 /* For streams connected to a disk file: */
116 fsync (fd);
117 #if HAVE_TCDRAIN
118 /* For streams connected to a terminal: */
120 int retval;
123 retval = tcdrain (fd);
124 while (retval < 0 && errno == EINTR);
126 #endif
131 static inline void
132 ostream_free (ostream_t stream)
134 if (stream == stdin || stream == stderr)
135 fflush (stream);
136 else
137 fclose (stream);
140 static inline void
141 ostream_write_str (ostream_t stream, const char *string)
143 ostream_write_mem (stream, string, strlen (string));
146 static inline ptrdiff_t ostream_printf (ostream_t stream,
147 const char *format, ...)
148 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__
149 __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 3)))
150 #endif
152 static inline ptrdiff_t
153 ostream_printf (ostream_t stream, const char *format, ...)
155 va_list args;
156 char *temp_string;
157 ptrdiff_t ret;
159 va_start (args, format);
160 ret = vasprintf (&temp_string, format, args);
161 va_end (args);
162 if (ret >= 0)
164 if (ret > 0)
165 ostream_write_str (stream, temp_string);
166 free (temp_string);
168 return ret;
171 static inline ptrdiff_t ostream_vprintf (ostream_t stream,
172 const char *format, va_list args)
173 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__
174 __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 0)))
175 #endif
177 static inline ptrdiff_t
178 ostream_vprintf (ostream_t stream, const char *format, va_list args)
180 char *temp_string;
181 ptrdiff_t ret = vasprintf (&temp_string, format, args);
182 if (ret >= 0)
184 if (ret > 0)
185 ostream_write_str (stream, temp_string);
186 free (temp_string);
188 return ret;
191 /* ------------------------- From styled-ostream.h ------------------------- */
193 typedef ostream_t styled_ostream_t;
195 #define styled_ostream_write_mem ostream_write_mem
196 #define styled_ostream_flush ostream_flush
197 #define styled_ostream_free ostream_free
199 static inline void
200 styled_ostream_begin_use_class (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream,
201 _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname)
205 static inline void
206 styled_ostream_end_use_class (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream,
207 _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname)
211 static inline const char *
212 styled_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream)
214 return NULL;
217 static inline const char *
218 styled_ostream_get_hyperlink_id (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream)
220 return NULL;
223 static inline void
224 styled_ostream_set_hyperlink (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream,
225 _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref,
226 _GL_ATTRIBUTE_MAYBE_UNUSED const char *id)
230 static inline void
231 styled_ostream_flush_to_current_style (_GL_ATTRIBUTE_MAYBE_UNUSED styled_ostream_t stream)
235 static inline bool
236 is_instance_of_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
238 return false;
241 /* -------------------------- From file-ostream.h -------------------------- */
243 typedef ostream_t file_ostream_t;
245 #define file_ostream_write_mem ostream_write_mem
246 #define file_ostream_flush ostream_flush
247 #define file_ostream_free ostream_free
249 static inline FILE *
250 file_ostream_get_stdio_stream (file_ostream_t stream)
252 return stream;
255 static inline file_ostream_t
256 file_ostream_create (FILE *fp)
258 return fp;
261 static inline bool
262 is_instance_of_file_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
264 return true;
267 /* --------------------------- From fd-ostream.h --------------------------- */
269 typedef ostream_t fd_ostream_t;
271 #define fd_ostream_write_mem ostream_write_mem
272 #define fd_ostream_flush ostream_flush
273 #define fd_ostream_free ostream_free
275 static inline int
276 fd_ostream_get_descriptor (fd_ostream_t stream)
278 return fileno (stream);
281 static inline const char *
282 fd_ostream_get_filename (_GL_ATTRIBUTE_MAYBE_UNUSED fd_ostream_t stream)
284 return NULL;
287 static inline bool
288 fd_ostream_is_buffered (_GL_ATTRIBUTE_MAYBE_UNUSED fd_ostream_t stream)
290 return false;
293 static inline fd_ostream_t
294 fd_ostream_create (int fd, _GL_ATTRIBUTE_MAYBE_UNUSED const char *filename,
295 _GL_ATTRIBUTE_MAYBE_UNUSED bool buffered)
297 if (fd == 1)
298 return stdout;
299 else if (fd == 2)
300 return stderr;
301 else
302 return fdopen (fd, "w");
305 static inline bool
306 is_instance_of_fd_ostream (ostream_t stream)
308 return fileno (stream) >= 0;
311 /* -------------------------- From term-ostream.h -------------------------- */
313 typedef int term_color_t;
314 enum
316 COLOR_DEFAULT = -1 /* unknown */
319 typedef enum
321 WEIGHT_NORMAL = 0,
322 WEIGHT_BOLD,
323 WEIGHT_DEFAULT = WEIGHT_NORMAL
324 } term_weight_t;
326 typedef enum
328 POSTURE_NORMAL = 0,
329 POSTURE_ITALIC, /* same as oblique */
330 POSTURE_DEFAULT = POSTURE_NORMAL
331 } term_posture_t;
333 typedef enum
335 UNDERLINE_OFF = 0,
336 UNDERLINE_ON,
337 UNDERLINE_DEFAULT = UNDERLINE_OFF
338 } term_underline_t;
340 typedef enum
342 TTYCTL_AUTO = 0, /* Automatic best-possible choice. */
343 TTYCTL_NONE, /* No control.
344 Result: Garbled output can occur, and the terminal can
345 be left in any state when the program is interrupted. */
346 TTYCTL_PARTIAL, /* Signal handling.
347 Result: Garbled output can occur, but the terminal will
348 be left in the default state when the program is
349 interrupted. */
350 TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal.
351 Result: No garbled output, and the terminal will
352 be left in the default state when the program is
353 interrupted. */
354 } ttyctl_t;
356 typedef ostream_t term_ostream_t;
358 #define term_ostream_write_mem ostream_write_mem
359 #define term_ostream_flush ostream_flush
360 #define term_ostream_free ostream_free
362 static inline term_color_t
363 term_ostream_rgb_to_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
364 _GL_ATTRIBUTE_MAYBE_UNUSED int red,
365 _GL_ATTRIBUTE_MAYBE_UNUSED int green,
366 _GL_ATTRIBUTE_MAYBE_UNUSED int blue)
368 return COLOR_DEFAULT;
371 static inline term_color_t
372 term_ostream_get_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
374 return COLOR_DEFAULT;
377 static inline void
378 term_ostream_set_color (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
379 _GL_ATTRIBUTE_MAYBE_UNUSED term_color_t color)
383 static inline term_color_t
384 term_ostream_get_bgcolor (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
386 return COLOR_DEFAULT;
389 static inline void
390 term_ostream_set_bgcolor (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
391 _GL_ATTRIBUTE_MAYBE_UNUSED term_color_t color)
395 static inline term_weight_t
396 term_ostream_get_weight (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
398 return WEIGHT_DEFAULT;
401 static inline void
402 term_ostream_set_weight (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
403 _GL_ATTRIBUTE_MAYBE_UNUSED term_weight_t weight)
407 static inline term_posture_t
408 term_ostream_get_posture (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
410 return POSTURE_DEFAULT;
413 static inline void
414 term_ostream_set_posture (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
415 _GL_ATTRIBUTE_MAYBE_UNUSED term_posture_t posture)
419 static inline term_underline_t
420 term_ostream_get_underline (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
422 return UNDERLINE_DEFAULT;
425 static inline void
426 term_ostream_set_underline (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
427 _GL_ATTRIBUTE_MAYBE_UNUSED term_underline_t underline)
431 static inline const char *
432 term_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
434 return NULL;
437 static inline const char *
438 term_ostream_get_hyperlink_id (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
440 return NULL;
443 static inline void
444 term_ostream_set_hyperlink (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream,
445 _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref,
446 _GL_ATTRIBUTE_MAYBE_UNUSED const char *id)
450 static inline void
451 term_ostream_flush_to_current_style (term_ostream_t stream)
453 fflush (stream);
456 #define term_ostream_get_descriptor fd_ostream_get_descriptor
457 #define term_ostream_get_filename fd_ostream_get_filename
459 static inline ttyctl_t
460 term_ostream_get_tty_control (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
462 return TTYCTL_NONE;
465 static inline ttyctl_t
466 term_ostream_get_effective_tty_control (_GL_ATTRIBUTE_MAYBE_UNUSED term_ostream_t stream)
468 return TTYCTL_NONE;
471 static inline term_ostream_t
472 term_ostream_create (int fd, const char *filename,
473 _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control)
475 return fd_ostream_create (fd, filename, true);
478 #define is_instance_of_term_ostream is_instance_of_fd_ostream
480 /* ------------------------- From memory-ostream.h ------------------------- */
482 typedef ostream_t memory_ostream_t;
484 #define memory_ostream_write_mem ostream_write_mem
485 #define memory_ostream_flush ostream_flush
486 #define memory_ostream_free ostream_free
488 static inline void
489 memory_ostream_contents (_GL_ATTRIBUTE_MAYBE_UNUSED memory_ostream_t stream,
490 const void **bufp, size_t *buflenp)
492 *bufp = NULL;
493 *buflenp = 0;
496 static inline memory_ostream_t
497 memory_ostream_create (void)
499 /* Not supported without the real libtextstyle. */
500 abort ();
501 return NULL;
504 static inline bool
505 is_instance_of_memory_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
507 return false;
510 /* -------------------------- From html-ostream.h -------------------------- */
512 typedef ostream_t html_ostream_t;
514 #define html_ostream_write_mem ostream_write_mem
515 #define html_ostream_flush ostream_flush
516 #define html_ostream_free ostream_free
518 static inline void
519 html_ostream_begin_span (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream,
520 _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname)
524 static inline void
525 html_ostream_end_span (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream,
526 _GL_ATTRIBUTE_MAYBE_UNUSED const char *classname)
530 static inline const char *
531 html_ostream_get_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream)
533 return NULL;
536 static inline void
537 html_ostream_set_hyperlink_ref (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream,
538 _GL_ATTRIBUTE_MAYBE_UNUSED const char *ref)
542 static inline void
543 html_ostream_flush_to_current_style (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream)
547 static inline ostream_t
548 html_ostream_get_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_ostream_t stream)
550 return NULL;
553 static inline html_ostream_t
554 html_ostream_create (ostream_t destination)
556 /* Not supported without the real libtextstyle. */
557 abort ();
558 return NULL;
561 static inline bool
562 is_instance_of_html_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
564 return false;
567 /* ----------------------- From term-styled-ostream.h ----------------------- */
569 typedef styled_ostream_t term_styled_ostream_t;
571 #define term_styled_ostream_write_mem ostream_write_mem
572 #define term_styled_ostream_flush ostream_flush
573 #define term_styled_ostream_free ostream_free
574 #define term_styled_ostream_begin_use_class styled_ostream_begin_use_class
575 #define term_styled_ostream_end_use_class styled_ostream_end_use_class
576 #define term_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
577 #define term_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
578 #define term_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
579 #define term_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
581 static inline term_ostream_t
582 term_styled_ostream_get_destination (term_styled_ostream_t stream)
584 return stream;
587 static inline const char *
588 term_styled_ostream_get_css_filename (_GL_ATTRIBUTE_MAYBE_UNUSED term_styled_ostream_t stream)
590 return NULL;
593 static inline term_styled_ostream_t
594 term_styled_ostream_create (int fd, const char *filename,
595 _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control,
596 _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename)
598 return fd_ostream_create (fd, filename, true);
601 #define is_instance_of_term_styled_ostream is_instance_of_term_ostream
603 /* ----------------------- From html-styled-ostream.h ----------------------- */
605 typedef styled_ostream_t html_styled_ostream_t;
607 #define html_styled_ostream_write_mem ostream_write_mem
608 #define html_styled_ostream_flush ostream_flush
609 #define html_styled_ostream_free ostream_free
610 #define html_styled_ostream_begin_use_class styled_ostream_begin_use_class
611 #define html_styled_ostream_end_use_class styled_ostream_end_use_class
612 #define html_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
613 #define html_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
614 #define html_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
615 #define html_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
617 static inline ostream_t
618 html_styled_ostream_get_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream)
620 return NULL;
623 static inline html_ostream_t
624 html_styled_ostream_get_html_destination (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream)
626 return NULL;
629 static inline const char *
630 html_styled_ostream_get_css_filename (_GL_ATTRIBUTE_MAYBE_UNUSED html_styled_ostream_t stream)
632 return NULL;
635 static inline html_styled_ostream_t
636 html_styled_ostream_create (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t destination,
637 _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename)
639 /* Not supported without the real libtextstyle. */
640 abort ();
641 return NULL;
644 static inline bool
645 is_instance_of_html_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
647 return false;
650 /* ----------------------- From noop-styled-ostream.h ----------------------- */
652 typedef styled_ostream_t noop_styled_ostream_t;
654 #define noop_styled_ostream_write_mem ostream_write_mem
655 #define noop_styled_ostream_flush ostream_flush
656 #define noop_styled_ostream_free ostream_free
657 #define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class
658 #define noop_styled_ostream_end_use_class styled_ostream_end_use_class
659 #define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
660 #define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
661 #define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
662 #define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
664 static inline ostream_t
665 noop_styled_ostream_get_destination (noop_styled_ostream_t stream)
667 return stream;
670 static inline bool
671 noop_styled_ostream_is_owning_destination (_GL_ATTRIBUTE_MAYBE_UNUSED noop_styled_ostream_t stream)
673 return true;
676 static inline noop_styled_ostream_t
677 noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
679 if (!pass_ownership)
680 /* Not supported without the real libtextstyle. */
681 abort ();
682 return destination;
685 static inline bool
686 is_instance_of_noop_styled_ostream (_GL_ATTRIBUTE_MAYBE_UNUSED ostream_t stream)
688 return false;
691 /* ------------------------------ From color.h ------------------------------ */
693 #define color_test_mode false
695 enum color_option { color_no, color_tty, color_yes, color_html };
696 #define color_mode color_no
698 #define style_file_name NULL
700 static inline bool
701 handle_color_option (_GL_ATTRIBUTE_MAYBE_UNUSED const char *option)
703 return false;
706 static inline void
707 handle_style_option (_GL_ATTRIBUTE_MAYBE_UNUSED const char *option)
711 static inline void
712 print_color_test (void)
714 /* Not supported without the real libtextstyle. */
715 abort ();
718 static inline void
719 style_file_prepare (_GL_ATTRIBUTE_MAYBE_UNUSED const char *style_file_envvar,
720 _GL_ATTRIBUTE_MAYBE_UNUSED const char *stylesdir_envvar,
721 _GL_ATTRIBUTE_MAYBE_UNUSED const char *stylesdir_after_install,
722 _GL_ATTRIBUTE_MAYBE_UNUSED const char *default_style_file)
726 /* ------------------------------ From misc.h ------------------------------ */
728 static inline styled_ostream_t
729 styled_ostream_create (int fd, const char *filename,
730 _GL_ATTRIBUTE_MAYBE_UNUSED ttyctl_t tty_control,
731 _GL_ATTRIBUTE_MAYBE_UNUSED const char *css_filename)
733 return fd_ostream_create (fd, filename, true);
736 static inline void
737 libtextstyle_set_failure_exit_code (_GL_ATTRIBUTE_MAYBE_UNUSED int exit_code)
741 #endif /* _TEXTSTYLE_H */