/src/gettext/gettext-tools/libgettextpo/textstyle.h
Line | Count | Source |
1 | | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
2 | | /* Dummy replacement for part of the public API of the libtextstyle library. |
3 | | Copyright (C) 2006-2007, 2019-2026 Free Software Foundation, Inc. |
4 | | |
5 | | This program is free software: you can redistribute it and/or modify |
6 | | it under the terms of the GNU General Public License as published by |
7 | | the Free Software Foundation, either version 3 of the License, or |
8 | | (at your option) any later version. |
9 | | |
10 | | This program is distributed in the hope that it will be useful, |
11 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | | GNU General Public License for more details. |
14 | | |
15 | | You should have received a copy of the GNU General Public License |
16 | | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
17 | | |
18 | | /* Written by Bruno Haible <bruno@clisp.org>, 2019. */ |
19 | | |
20 | | /* This file is used as replacement when libtextstyle with its include file |
21 | | <textstyle.h> is not found. |
22 | | It supports the essential API and implements it in a way that does not |
23 | | provide text styling. That is, it produces plain text output via <stdio.h> |
24 | | FILE objects. |
25 | | Thus, it allows a package to be build with or without a dependency to |
26 | | libtextstyle, with very few occurrences of '#if HAVE_LIBTEXTSTYLE'. |
27 | | |
28 | | Restriction: |
29 | | It assumes that freopen() is not being called on stdout and stderr. */ |
30 | | |
31 | | #ifndef _TEXTSTYLE_H |
32 | | #define _TEXTSTYLE_H |
33 | | |
34 | | /* This file uses _GL_UNNAMED, HAVE_TCDRAIN. */ |
35 | | #if !_GL_CONFIG_H_INCLUDED |
36 | | #error "Please include config.h first." |
37 | | #endif |
38 | | |
39 | | #include <errno.h> |
40 | | #include <stdarg.h> |
41 | | #include <stddef.h> |
42 | | #include <stdio.h> |
43 | | #include <stdlib.h> |
44 | | #include <string.h> |
45 | | #include <unistd.h> |
46 | | #if HAVE_TCDRAIN |
47 | | # include <termios.h> |
48 | | #endif |
49 | | |
50 | | /* An __attribute__ __format__ specifier for a function that takes a format |
51 | | string and arguments, where the format string directives are the ones |
52 | | standardized by ISO C99 and POSIX. |
53 | | _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD */ |
54 | | /* __gnu_printf__ is supported in GCC >= 4.4. */ |
55 | | #ifndef _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD |
56 | | # if (__GNUC__ + (__GNUC_MINOR__ >= 4) > 4) && !defined __clang__ |
57 | | # define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __gnu_printf__ |
58 | | # else |
59 | | # define _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD __printf__ |
60 | | # endif |
61 | | #endif |
62 | | |
63 | | /* _GL_UNNAMED (ID) is the "name" of an unnamed function parameter. */ |
64 | | #ifndef _GL_UNNAMED |
65 | | # if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \ |
66 | | && !defined __cplusplus) |
67 | | # define _GL_UNNAMED(id) unnamed_##id _GL_ATTRIBUTE_UNUSED |
68 | | # else |
69 | | # define _GL_UNNAMED(id) |
70 | | # endif |
71 | | #endif |
72 | | |
73 | | /* ----------------------------- From ostream.h ----------------------------- */ |
74 | | |
75 | | /* Describes the scope of a flush operation. */ |
76 | | typedef enum |
77 | | { |
78 | | /* Flushes buffers in this ostream_t. |
79 | | Use this value if you want to write to the underlying ostream_t. */ |
80 | | FLUSH_THIS_STREAM = 0, |
81 | | /* Flushes all buffers in the current process. |
82 | | Use this value if you want to write to the same target through a |
83 | | different file descriptor or a FILE stream. */ |
84 | | FLUSH_THIS_PROCESS = 1, |
85 | | /* Flushes buffers in the current process and attempts to flush the buffers |
86 | | in the kernel. |
87 | | Use this value so that some other process (or the kernel itself) |
88 | | may write to the same target. */ |
89 | | FLUSH_ALL = 2 |
90 | | } ostream_flush_scope_t; |
91 | | |
92 | | |
93 | | /* An output stream is an object to which one can feed a sequence of bytes. */ |
94 | | |
95 | | typedef FILE * ostream_t; |
96 | | |
97 | | static inline void |
98 | | ostream_write_mem (ostream_t stream, const void *data, size_t len) |
99 | 0 | { |
100 | 0 | if (len > 0) |
101 | 0 | fwrite (data, 1, len, stream); |
102 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_write_mem Unexecuted instantiation: write-catalog.c:ostream_write_mem Unexecuted instantiation: write-po.c:ostream_write_mem |
103 | | |
104 | | static inline void |
105 | | ostream_flush (ostream_t stream, ostream_flush_scope_t scope) |
106 | 0 | { |
107 | 0 | fflush (stream); |
108 | 0 | if (scope == FLUSH_ALL) |
109 | 0 | { |
110 | 0 | int fd = fileno (stream); |
111 | 0 | if (fd >= 0) |
112 | 0 | { |
113 | 0 | /* For streams connected to a disk file: */ |
114 | 0 | fsync (fd); |
115 | 0 | #if HAVE_TCDRAIN |
116 | 0 | /* For streams connected to a terminal: */ |
117 | 0 | { |
118 | 0 | int retval; |
119 | 0 |
|
120 | 0 | do |
121 | 0 | retval = tcdrain (fd); |
122 | 0 | while (retval < 0 && errno == EINTR); |
123 | 0 | } |
124 | 0 | #endif |
125 | 0 | } |
126 | 0 | } |
127 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_flush Unexecuted instantiation: write-catalog.c:ostream_flush Unexecuted instantiation: write-po.c:ostream_flush |
128 | | |
129 | | static inline void |
130 | | ostream_free (ostream_t stream) |
131 | 0 | { |
132 | 0 | if (stream == stdin || stream == stderr) |
133 | 0 | fflush (stream); |
134 | 0 | else |
135 | 0 | fclose (stream); |
136 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_free Unexecuted instantiation: write-catalog.c:ostream_free Unexecuted instantiation: write-po.c:ostream_free |
137 | | |
138 | | static inline void |
139 | | ostream_write_str (ostream_t stream, const char *string) |
140 | 0 | { |
141 | 0 | ostream_write_mem (stream, string, strlen (string)); |
142 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_write_str Unexecuted instantiation: write-catalog.c:ostream_write_str Unexecuted instantiation: write-po.c:ostream_write_str |
143 | | |
144 | | static inline ptrdiff_t ostream_printf (ostream_t stream, |
145 | | const char *format, ...) |
146 | | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__ |
147 | | __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 3))) |
148 | | #endif |
149 | | ; |
150 | | static inline ptrdiff_t |
151 | | ostream_printf (ostream_t stream, const char *format, ...) |
152 | 0 | { |
153 | 0 | va_list args; |
154 | 0 |
|
155 | 0 | va_start (args, format); |
156 | 0 | char *temp_string; |
157 | 0 | ptrdiff_t ret = vasprintf (&temp_string, format, args); |
158 | 0 | va_end (args); |
159 | 0 | if (ret >= 0) |
160 | 0 | { |
161 | 0 | if (ret > 0) |
162 | 0 | ostream_write_str (stream, temp_string); |
163 | 0 | free (temp_string); |
164 | 0 | } |
165 | 0 | return ret; |
166 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_printf Unexecuted instantiation: write-catalog.c:ostream_printf Unexecuted instantiation: write-po.c:ostream_printf |
167 | | |
168 | | static inline ptrdiff_t ostream_vprintf (ostream_t stream, |
169 | | const char *format, va_list args) |
170 | | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined __clang__ |
171 | | __attribute__ ((__format__ (_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 2, 0))) |
172 | | #endif |
173 | | ; |
174 | | static inline ptrdiff_t |
175 | | ostream_vprintf (ostream_t stream, const char *format, va_list args) |
176 | 0 | { |
177 | 0 | char *temp_string; |
178 | 0 | ptrdiff_t ret = vasprintf (&temp_string, format, args); |
179 | 0 | if (ret >= 0) |
180 | 0 | { |
181 | 0 | if (ret > 0) |
182 | 0 | ostream_write_str (stream, temp_string); |
183 | 0 | free (temp_string); |
184 | 0 | } |
185 | 0 | return ret; |
186 | 0 | } Unexecuted instantiation: gettext-po.c:ostream_vprintf Unexecuted instantiation: write-catalog.c:ostream_vprintf Unexecuted instantiation: write-po.c:ostream_vprintf |
187 | | |
188 | | /* ------------------------- From styled-ostream.h ------------------------- */ |
189 | | |
190 | | typedef ostream_t styled_ostream_t; |
191 | | |
192 | | #define styled_ostream_write_mem ostream_write_mem |
193 | | #define styled_ostream_flush ostream_flush |
194 | | #define styled_ostream_free ostream_free |
195 | | |
196 | | static inline void |
197 | | styled_ostream_begin_use_class (styled_ostream_t _GL_UNNAMED (stream), |
198 | | const char *_GL_UNNAMED (classname)) |
199 | 0 | { |
200 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_begin_use_class Unexecuted instantiation: write-catalog.c:styled_ostream_begin_use_class Unexecuted instantiation: write-po.c:styled_ostream_begin_use_class |
201 | | |
202 | | static inline void |
203 | | styled_ostream_end_use_class (styled_ostream_t _GL_UNNAMED (stream), |
204 | | const char *_GL_UNNAMED (classname)) |
205 | 0 | { |
206 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_end_use_class Unexecuted instantiation: write-catalog.c:styled_ostream_end_use_class Unexecuted instantiation: write-po.c:styled_ostream_end_use_class |
207 | | |
208 | | static inline const char * |
209 | | styled_ostream_get_hyperlink_ref (styled_ostream_t _GL_UNNAMED (stream)) |
210 | 0 | { |
211 | 0 | return NULL; |
212 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_get_hyperlink_ref Unexecuted instantiation: write-catalog.c:styled_ostream_get_hyperlink_ref Unexecuted instantiation: write-po.c:styled_ostream_get_hyperlink_ref |
213 | | |
214 | | static inline const char * |
215 | | styled_ostream_get_hyperlink_id (styled_ostream_t _GL_UNNAMED (stream)) |
216 | 0 | { |
217 | 0 | return NULL; |
218 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_get_hyperlink_id Unexecuted instantiation: write-catalog.c:styled_ostream_get_hyperlink_id Unexecuted instantiation: write-po.c:styled_ostream_get_hyperlink_id |
219 | | |
220 | | static inline void |
221 | | styled_ostream_set_hyperlink (styled_ostream_t _GL_UNNAMED (stream), |
222 | | const char *_GL_UNNAMED (ref), |
223 | | const char *_GL_UNNAMED (id)) |
224 | 0 | { |
225 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_set_hyperlink Unexecuted instantiation: write-catalog.c:styled_ostream_set_hyperlink Unexecuted instantiation: write-po.c:styled_ostream_set_hyperlink |
226 | | |
227 | | static inline void |
228 | | styled_ostream_flush_to_current_style (styled_ostream_t _GL_UNNAMED (stream)) |
229 | 0 | { |
230 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_flush_to_current_style Unexecuted instantiation: write-catalog.c:styled_ostream_flush_to_current_style Unexecuted instantiation: write-po.c:styled_ostream_flush_to_current_style |
231 | | |
232 | | static inline bool |
233 | | is_instance_of_styled_ostream (ostream_t _GL_UNNAMED (stream)) |
234 | 0 | { |
235 | 0 | return false; |
236 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_styled_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_styled_ostream Unexecuted instantiation: write-po.c:is_instance_of_styled_ostream |
237 | | |
238 | | /* -------------------------- From file-ostream.h -------------------------- */ |
239 | | |
240 | | typedef ostream_t file_ostream_t; |
241 | | |
242 | | #define file_ostream_write_mem ostream_write_mem |
243 | | #define file_ostream_flush ostream_flush |
244 | | #define file_ostream_free ostream_free |
245 | | |
246 | | static inline FILE * |
247 | | file_ostream_get_stdio_stream (file_ostream_t stream) |
248 | 0 | { |
249 | 0 | return stream; |
250 | 0 | } Unexecuted instantiation: gettext-po.c:file_ostream_get_stdio_stream Unexecuted instantiation: write-catalog.c:file_ostream_get_stdio_stream Unexecuted instantiation: write-po.c:file_ostream_get_stdio_stream |
251 | | |
252 | | static inline file_ostream_t |
253 | | file_ostream_create (FILE *fp) |
254 | 0 | { |
255 | 0 | return fp; |
256 | 0 | } Unexecuted instantiation: gettext-po.c:file_ostream_create Unexecuted instantiation: write-catalog.c:file_ostream_create Unexecuted instantiation: write-po.c:file_ostream_create |
257 | | |
258 | | static inline bool |
259 | | is_instance_of_file_ostream (ostream_t _GL_UNNAMED (stream)) |
260 | 0 | { |
261 | 0 | return true; |
262 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_file_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_file_ostream Unexecuted instantiation: write-po.c:is_instance_of_file_ostream |
263 | | |
264 | | /* --------------------------- From fd-ostream.h --------------------------- */ |
265 | | |
266 | | typedef ostream_t fd_ostream_t; |
267 | | |
268 | | #define fd_ostream_write_mem ostream_write_mem |
269 | | #define fd_ostream_flush ostream_flush |
270 | | #define fd_ostream_free ostream_free |
271 | | |
272 | | static inline int |
273 | | fd_ostream_get_descriptor (fd_ostream_t stream) |
274 | 0 | { |
275 | 0 | return fileno (stream); |
276 | 0 | } Unexecuted instantiation: gettext-po.c:fd_ostream_get_descriptor Unexecuted instantiation: write-catalog.c:fd_ostream_get_descriptor Unexecuted instantiation: write-po.c:fd_ostream_get_descriptor |
277 | | |
278 | | static inline const char * |
279 | | fd_ostream_get_filename (fd_ostream_t _GL_UNNAMED (stream)) |
280 | 0 | { |
281 | 0 | return NULL; |
282 | 0 | } Unexecuted instantiation: gettext-po.c:fd_ostream_get_filename Unexecuted instantiation: write-catalog.c:fd_ostream_get_filename Unexecuted instantiation: write-po.c:fd_ostream_get_filename |
283 | | |
284 | | static inline bool |
285 | | fd_ostream_is_buffered (fd_ostream_t _GL_UNNAMED (stream)) |
286 | 0 | { |
287 | 0 | return false; |
288 | 0 | } Unexecuted instantiation: gettext-po.c:fd_ostream_is_buffered Unexecuted instantiation: write-catalog.c:fd_ostream_is_buffered Unexecuted instantiation: write-po.c:fd_ostream_is_buffered |
289 | | |
290 | | static inline fd_ostream_t |
291 | | fd_ostream_create (int fd, const char *_GL_UNNAMED (filename), |
292 | | bool _GL_UNNAMED (buffered)) |
293 | 0 | { |
294 | 0 | if (fd == 1) |
295 | 0 | return stdout; |
296 | 0 | else if (fd == 2) |
297 | 0 | return stderr; |
298 | 0 | else |
299 | 0 | return fdopen (fd, "w"); |
300 | 0 | } Unexecuted instantiation: gettext-po.c:fd_ostream_create Unexecuted instantiation: write-catalog.c:fd_ostream_create Unexecuted instantiation: write-po.c:fd_ostream_create |
301 | | |
302 | | static inline bool |
303 | | is_instance_of_fd_ostream (ostream_t stream) |
304 | 0 | { |
305 | 0 | return fileno (stream) >= 0; |
306 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_fd_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_fd_ostream Unexecuted instantiation: write-po.c:is_instance_of_fd_ostream |
307 | | |
308 | | /* -------------------------- From term-ostream.h -------------------------- */ |
309 | | |
310 | | typedef int term_color_t; |
311 | | enum |
312 | | { |
313 | | COLOR_DEFAULT = -1 /* unknown */ |
314 | | }; |
315 | | |
316 | | typedef enum |
317 | | { |
318 | | WEIGHT_NORMAL = 0, |
319 | | WEIGHT_BOLD, |
320 | | WEIGHT_DEFAULT = WEIGHT_NORMAL |
321 | | } term_weight_t; |
322 | | |
323 | | typedef enum |
324 | | { |
325 | | POSTURE_NORMAL = 0, |
326 | | POSTURE_ITALIC, /* same as oblique */ |
327 | | POSTURE_DEFAULT = POSTURE_NORMAL |
328 | | } term_posture_t; |
329 | | |
330 | | typedef enum |
331 | | { |
332 | | UNDERLINE_OFF = 0, |
333 | | UNDERLINE_ON, |
334 | | UNDERLINE_DEFAULT = UNDERLINE_OFF |
335 | | } term_underline_t; |
336 | | |
337 | | typedef enum |
338 | | { |
339 | | TTYCTL_AUTO = 0, /* Automatic best-possible choice. */ |
340 | | TTYCTL_NONE, /* No control. |
341 | | Result: Garbled output can occur, and the terminal can |
342 | | be left in any state when the program is interrupted. */ |
343 | | TTYCTL_PARTIAL, /* Signal handling. |
344 | | Result: Garbled output can occur, but the terminal will |
345 | | be left in the default state when the program is |
346 | | interrupted. */ |
347 | | TTYCTL_FULL /* Signal handling and disabling echo and flush-upon-signal. |
348 | | Result: No garbled output, and the terminal will |
349 | | be left in the default state when the program is |
350 | | interrupted. */ |
351 | | } ttyctl_t; |
352 | | |
353 | | typedef ostream_t term_ostream_t; |
354 | | |
355 | | #define term_ostream_write_mem ostream_write_mem |
356 | | #define term_ostream_flush ostream_flush |
357 | | #define term_ostream_free ostream_free |
358 | | |
359 | | static inline term_color_t |
360 | | term_ostream_rgb_to_color (term_ostream_t _GL_UNNAMED (stream), |
361 | | int _GL_UNNAMED (red), |
362 | | int _GL_UNNAMED (green), |
363 | | int _GL_UNNAMED (blue)) |
364 | 0 | { |
365 | 0 | return COLOR_DEFAULT; |
366 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_rgb_to_color Unexecuted instantiation: write-catalog.c:term_ostream_rgb_to_color Unexecuted instantiation: write-po.c:term_ostream_rgb_to_color |
367 | | |
368 | | static inline term_color_t |
369 | | term_ostream_get_color (term_ostream_t _GL_UNNAMED (stream)) |
370 | 0 | { |
371 | 0 | return COLOR_DEFAULT; |
372 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_color Unexecuted instantiation: write-catalog.c:term_ostream_get_color Unexecuted instantiation: write-po.c:term_ostream_get_color |
373 | | |
374 | | static inline void |
375 | | term_ostream_set_color (term_ostream_t _GL_UNNAMED (stream), |
376 | | term_color_t _GL_UNNAMED (color)) |
377 | 0 | { |
378 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_color Unexecuted instantiation: write-catalog.c:term_ostream_set_color Unexecuted instantiation: write-po.c:term_ostream_set_color |
379 | | |
380 | | static inline term_color_t |
381 | | term_ostream_get_bgcolor (term_ostream_t _GL_UNNAMED (stream)) |
382 | 0 | { |
383 | 0 | return COLOR_DEFAULT; |
384 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_bgcolor Unexecuted instantiation: write-catalog.c:term_ostream_get_bgcolor Unexecuted instantiation: write-po.c:term_ostream_get_bgcolor |
385 | | |
386 | | static inline void |
387 | | term_ostream_set_bgcolor (term_ostream_t _GL_UNNAMED (stream), |
388 | | term_color_t _GL_UNNAMED (color)) |
389 | 0 | { |
390 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_bgcolor Unexecuted instantiation: write-catalog.c:term_ostream_set_bgcolor Unexecuted instantiation: write-po.c:term_ostream_set_bgcolor |
391 | | |
392 | | static inline term_weight_t |
393 | | term_ostream_get_weight (term_ostream_t _GL_UNNAMED (stream)) |
394 | 0 | { |
395 | 0 | return WEIGHT_DEFAULT; |
396 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_weight Unexecuted instantiation: write-catalog.c:term_ostream_get_weight Unexecuted instantiation: write-po.c:term_ostream_get_weight |
397 | | |
398 | | static inline void |
399 | | term_ostream_set_weight (term_ostream_t _GL_UNNAMED (stream), |
400 | | term_weight_t _GL_UNNAMED (weight)) |
401 | 0 | { |
402 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_weight Unexecuted instantiation: write-catalog.c:term_ostream_set_weight Unexecuted instantiation: write-po.c:term_ostream_set_weight |
403 | | |
404 | | static inline term_posture_t |
405 | | term_ostream_get_posture (term_ostream_t _GL_UNNAMED (stream)) |
406 | 0 | { |
407 | 0 | return POSTURE_DEFAULT; |
408 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_posture Unexecuted instantiation: write-catalog.c:term_ostream_get_posture Unexecuted instantiation: write-po.c:term_ostream_get_posture |
409 | | |
410 | | static inline void |
411 | | term_ostream_set_posture (term_ostream_t _GL_UNNAMED (stream), |
412 | | term_posture_t _GL_UNNAMED (posture)) |
413 | 0 | { |
414 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_posture Unexecuted instantiation: write-catalog.c:term_ostream_set_posture Unexecuted instantiation: write-po.c:term_ostream_set_posture |
415 | | |
416 | | static inline term_underline_t |
417 | | term_ostream_get_underline (term_ostream_t _GL_UNNAMED (stream)) |
418 | 0 | { |
419 | 0 | return UNDERLINE_DEFAULT; |
420 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_underline Unexecuted instantiation: write-catalog.c:term_ostream_get_underline Unexecuted instantiation: write-po.c:term_ostream_get_underline |
421 | | |
422 | | static inline void |
423 | | term_ostream_set_underline (term_ostream_t _GL_UNNAMED (stream), |
424 | | term_underline_t _GL_UNNAMED (underline)) |
425 | 0 | { |
426 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_underline Unexecuted instantiation: write-catalog.c:term_ostream_set_underline Unexecuted instantiation: write-po.c:term_ostream_set_underline |
427 | | |
428 | | static inline const char * |
429 | | term_ostream_get_hyperlink_ref (term_ostream_t _GL_UNNAMED (stream)) |
430 | 0 | { |
431 | 0 | return NULL; |
432 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_hyperlink_ref Unexecuted instantiation: write-catalog.c:term_ostream_get_hyperlink_ref Unexecuted instantiation: write-po.c:term_ostream_get_hyperlink_ref |
433 | | |
434 | | static inline const char * |
435 | | term_ostream_get_hyperlink_id (term_ostream_t _GL_UNNAMED (stream)) |
436 | 0 | { |
437 | 0 | return NULL; |
438 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_hyperlink_id Unexecuted instantiation: write-catalog.c:term_ostream_get_hyperlink_id Unexecuted instantiation: write-po.c:term_ostream_get_hyperlink_id |
439 | | |
440 | | static inline void |
441 | | term_ostream_set_hyperlink (term_ostream_t _GL_UNNAMED (stream), |
442 | | const char *_GL_UNNAMED (ref), |
443 | | const char *_GL_UNNAMED (id)) |
444 | 0 | { |
445 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_set_hyperlink Unexecuted instantiation: write-catalog.c:term_ostream_set_hyperlink Unexecuted instantiation: write-po.c:term_ostream_set_hyperlink |
446 | | |
447 | | static inline void |
448 | | term_ostream_flush_to_current_style (term_ostream_t stream) |
449 | 0 | { |
450 | 0 | fflush (stream); |
451 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_flush_to_current_style Unexecuted instantiation: write-catalog.c:term_ostream_flush_to_current_style Unexecuted instantiation: write-po.c:term_ostream_flush_to_current_style |
452 | | |
453 | | #define term_ostream_get_descriptor fd_ostream_get_descriptor |
454 | | #define term_ostream_get_filename fd_ostream_get_filename |
455 | | |
456 | | static inline ttyctl_t |
457 | | term_ostream_get_tty_control (term_ostream_t _GL_UNNAMED (stream)) |
458 | 0 | { |
459 | 0 | return TTYCTL_NONE; |
460 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_tty_control Unexecuted instantiation: write-catalog.c:term_ostream_get_tty_control Unexecuted instantiation: write-po.c:term_ostream_get_tty_control |
461 | | |
462 | | static inline ttyctl_t |
463 | | term_ostream_get_effective_tty_control (term_ostream_t _GL_UNNAMED (stream)) |
464 | 0 | { |
465 | 0 | return TTYCTL_NONE; |
466 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_get_effective_tty_control Unexecuted instantiation: write-catalog.c:term_ostream_get_effective_tty_control Unexecuted instantiation: write-po.c:term_ostream_get_effective_tty_control |
467 | | |
468 | | static inline term_ostream_t |
469 | | term_ostream_create (int fd, const char *filename, |
470 | | ttyctl_t _GL_UNNAMED (tty_control)) |
471 | 0 | { |
472 | 0 | return fd_ostream_create (fd, filename, true); |
473 | 0 | } Unexecuted instantiation: gettext-po.c:term_ostream_create Unexecuted instantiation: write-catalog.c:term_ostream_create Unexecuted instantiation: write-po.c:term_ostream_create |
474 | | |
475 | | #define is_instance_of_term_ostream is_instance_of_fd_ostream |
476 | | |
477 | | /* ------------------------- From memory-ostream.h ------------------------- */ |
478 | | |
479 | | typedef ostream_t memory_ostream_t; |
480 | | |
481 | | #define memory_ostream_write_mem ostream_write_mem |
482 | | #define memory_ostream_flush ostream_flush |
483 | | #define memory_ostream_free ostream_free |
484 | | |
485 | | static inline void |
486 | | memory_ostream_contents (memory_ostream_t _GL_UNNAMED (stream), |
487 | | const void **bufp, size_t *buflenp) |
488 | 0 | { |
489 | 0 | *bufp = NULL; |
490 | 0 | *buflenp = 0; |
491 | 0 | } Unexecuted instantiation: gettext-po.c:memory_ostream_contents Unexecuted instantiation: write-catalog.c:memory_ostream_contents Unexecuted instantiation: write-po.c:memory_ostream_contents |
492 | | |
493 | | static inline memory_ostream_t |
494 | | memory_ostream_create (void) |
495 | 0 | { |
496 | 0 | /* Not supported without the real libtextstyle. */ |
497 | 0 | abort (); |
498 | 0 | return NULL; |
499 | 0 | } Unexecuted instantiation: gettext-po.c:memory_ostream_create Unexecuted instantiation: write-catalog.c:memory_ostream_create Unexecuted instantiation: write-po.c:memory_ostream_create |
500 | | |
501 | | static inline bool |
502 | | is_instance_of_memory_ostream (ostream_t _GL_UNNAMED (stream)) |
503 | 0 | { |
504 | 0 | return false; |
505 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_memory_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_memory_ostream Unexecuted instantiation: write-po.c:is_instance_of_memory_ostream |
506 | | |
507 | | /* -------------------------- From html-ostream.h -------------------------- */ |
508 | | |
509 | | typedef ostream_t html_ostream_t; |
510 | | |
511 | | #define html_ostream_write_mem ostream_write_mem |
512 | | #define html_ostream_flush ostream_flush |
513 | | #define html_ostream_free ostream_free |
514 | | |
515 | | static inline void |
516 | | html_ostream_begin_span (html_ostream_t _GL_UNNAMED (stream), |
517 | | const char *_GL_UNNAMED (classname)) |
518 | 0 | { |
519 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_begin_span Unexecuted instantiation: write-catalog.c:html_ostream_begin_span Unexecuted instantiation: write-po.c:html_ostream_begin_span |
520 | | |
521 | | static inline void |
522 | | html_ostream_end_span (html_ostream_t _GL_UNNAMED (stream), |
523 | | const char *_GL_UNNAMED (classname)) |
524 | 0 | { |
525 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_end_span Unexecuted instantiation: write-catalog.c:html_ostream_end_span Unexecuted instantiation: write-po.c:html_ostream_end_span |
526 | | |
527 | | static inline const char * |
528 | | html_ostream_get_hyperlink_ref (html_ostream_t _GL_UNNAMED (stream)) |
529 | 0 | { |
530 | 0 | return NULL; |
531 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_get_hyperlink_ref Unexecuted instantiation: write-catalog.c:html_ostream_get_hyperlink_ref Unexecuted instantiation: write-po.c:html_ostream_get_hyperlink_ref |
532 | | |
533 | | static inline void |
534 | | html_ostream_set_hyperlink_ref (html_ostream_t _GL_UNNAMED (stream), |
535 | | const char *_GL_UNNAMED (ref)) |
536 | 0 | { |
537 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_set_hyperlink_ref Unexecuted instantiation: write-catalog.c:html_ostream_set_hyperlink_ref Unexecuted instantiation: write-po.c:html_ostream_set_hyperlink_ref |
538 | | |
539 | | static inline void |
540 | | html_ostream_flush_to_current_style (html_ostream_t _GL_UNNAMED (stream)) |
541 | 0 | { |
542 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_flush_to_current_style Unexecuted instantiation: write-catalog.c:html_ostream_flush_to_current_style Unexecuted instantiation: write-po.c:html_ostream_flush_to_current_style |
543 | | |
544 | | static inline ostream_t |
545 | | html_ostream_get_destination (html_ostream_t _GL_UNNAMED (stream)) |
546 | 0 | { |
547 | 0 | return NULL; |
548 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_get_destination Unexecuted instantiation: write-catalog.c:html_ostream_get_destination Unexecuted instantiation: write-po.c:html_ostream_get_destination |
549 | | |
550 | | static inline html_ostream_t |
551 | | html_ostream_create (ostream_t _GL_UNNAMED (destination)) |
552 | 0 | { |
553 | 0 | /* Not supported without the real libtextstyle. */ |
554 | 0 | abort (); |
555 | 0 | return NULL; |
556 | 0 | } Unexecuted instantiation: gettext-po.c:html_ostream_create Unexecuted instantiation: write-catalog.c:html_ostream_create Unexecuted instantiation: write-po.c:html_ostream_create |
557 | | |
558 | | static inline bool |
559 | | is_instance_of_html_ostream (ostream_t _GL_UNNAMED (stream)) |
560 | 0 | { |
561 | 0 | return false; |
562 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_html_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_html_ostream Unexecuted instantiation: write-po.c:is_instance_of_html_ostream |
563 | | |
564 | | /* ----------------------- From term-styled-ostream.h ----------------------- */ |
565 | | |
566 | | typedef styled_ostream_t term_styled_ostream_t; |
567 | | |
568 | | #define term_styled_ostream_write_mem ostream_write_mem |
569 | | #define term_styled_ostream_flush ostream_flush |
570 | | #define term_styled_ostream_free ostream_free |
571 | | #define term_styled_ostream_begin_use_class styled_ostream_begin_use_class |
572 | | #define term_styled_ostream_end_use_class styled_ostream_end_use_class |
573 | | #define term_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref |
574 | | #define term_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id |
575 | | #define term_styled_ostream_set_hyperlink styled_ostream_set_hyperlink |
576 | | #define term_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style |
577 | | |
578 | | static inline term_ostream_t |
579 | | term_styled_ostream_get_destination (term_styled_ostream_t stream) |
580 | 0 | { |
581 | 0 | return stream; |
582 | 0 | } Unexecuted instantiation: gettext-po.c:term_styled_ostream_get_destination Unexecuted instantiation: write-catalog.c:term_styled_ostream_get_destination Unexecuted instantiation: write-po.c:term_styled_ostream_get_destination |
583 | | |
584 | | static inline const char * |
585 | | term_styled_ostream_get_css_filename (term_styled_ostream_t _GL_UNNAMED (stream)) |
586 | 0 | { |
587 | 0 | return NULL; |
588 | 0 | } Unexecuted instantiation: gettext-po.c:term_styled_ostream_get_css_filename Unexecuted instantiation: write-catalog.c:term_styled_ostream_get_css_filename Unexecuted instantiation: write-po.c:term_styled_ostream_get_css_filename |
589 | | |
590 | | static inline term_styled_ostream_t |
591 | | term_styled_ostream_create (int fd, const char *filename, |
592 | | ttyctl_t _GL_UNNAMED (tty_control), |
593 | | const char *_GL_UNNAMED (css_filename)) |
594 | 0 | { |
595 | 0 | return fd_ostream_create (fd, filename, true); |
596 | 0 | } Unexecuted instantiation: gettext-po.c:term_styled_ostream_create Unexecuted instantiation: write-catalog.c:term_styled_ostream_create Unexecuted instantiation: write-po.c:term_styled_ostream_create |
597 | | |
598 | | #define is_instance_of_term_styled_ostream is_instance_of_term_ostream |
599 | | |
600 | | /* ----------------------- From html-styled-ostream.h ----------------------- */ |
601 | | |
602 | | typedef styled_ostream_t html_styled_ostream_t; |
603 | | |
604 | | #define html_styled_ostream_write_mem ostream_write_mem |
605 | | #define html_styled_ostream_flush ostream_flush |
606 | | #define html_styled_ostream_free ostream_free |
607 | | #define html_styled_ostream_begin_use_class styled_ostream_begin_use_class |
608 | | #define html_styled_ostream_end_use_class styled_ostream_end_use_class |
609 | | #define html_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref |
610 | | #define html_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id |
611 | | #define html_styled_ostream_set_hyperlink styled_ostream_set_hyperlink |
612 | | #define html_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style |
613 | | |
614 | | static inline ostream_t |
615 | | html_styled_ostream_get_destination (html_styled_ostream_t _GL_UNNAMED (stream)) |
616 | 0 | { |
617 | 0 | return NULL; |
618 | 0 | } Unexecuted instantiation: gettext-po.c:html_styled_ostream_get_destination Unexecuted instantiation: write-catalog.c:html_styled_ostream_get_destination Unexecuted instantiation: write-po.c:html_styled_ostream_get_destination |
619 | | |
620 | | static inline html_ostream_t |
621 | | html_styled_ostream_get_html_destination (html_styled_ostream_t _GL_UNNAMED (stream)) |
622 | 0 | { |
623 | 0 | return NULL; |
624 | 0 | } Unexecuted instantiation: gettext-po.c:html_styled_ostream_get_html_destination Unexecuted instantiation: write-catalog.c:html_styled_ostream_get_html_destination Unexecuted instantiation: write-po.c:html_styled_ostream_get_html_destination |
625 | | |
626 | | static inline const char * |
627 | | html_styled_ostream_get_css_filename (html_styled_ostream_t _GL_UNNAMED (stream)) |
628 | 0 | { |
629 | 0 | return NULL; |
630 | 0 | } Unexecuted instantiation: gettext-po.c:html_styled_ostream_get_css_filename Unexecuted instantiation: write-catalog.c:html_styled_ostream_get_css_filename Unexecuted instantiation: write-po.c:html_styled_ostream_get_css_filename |
631 | | |
632 | | static inline html_styled_ostream_t |
633 | | html_styled_ostream_create (ostream_t _GL_UNNAMED (destination), |
634 | | const char *_GL_UNNAMED (css_filename)) |
635 | 0 | { |
636 | 0 | /* Not supported without the real libtextstyle. */ |
637 | 0 | abort (); |
638 | 0 | return NULL; |
639 | 0 | } Unexecuted instantiation: gettext-po.c:html_styled_ostream_create Unexecuted instantiation: write-catalog.c:html_styled_ostream_create Unexecuted instantiation: write-po.c:html_styled_ostream_create |
640 | | |
641 | | static inline bool |
642 | | is_instance_of_html_styled_ostream (ostream_t _GL_UNNAMED (stream)) |
643 | 0 | { |
644 | 0 | return false; |
645 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_html_styled_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_html_styled_ostream Unexecuted instantiation: write-po.c:is_instance_of_html_styled_ostream |
646 | | |
647 | | /* ----------------------- From noop-styled-ostream.h ----------------------- */ |
648 | | |
649 | | typedef styled_ostream_t noop_styled_ostream_t; |
650 | | |
651 | | #define noop_styled_ostream_write_mem ostream_write_mem |
652 | | #define noop_styled_ostream_flush ostream_flush |
653 | | #define noop_styled_ostream_free ostream_free |
654 | | #define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class |
655 | | #define noop_styled_ostream_end_use_class styled_ostream_end_use_class |
656 | | #define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref |
657 | | #define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id |
658 | | #define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink |
659 | | #define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style |
660 | | |
661 | | static inline ostream_t |
662 | | noop_styled_ostream_get_destination (noop_styled_ostream_t stream) |
663 | 0 | { |
664 | 0 | return stream; |
665 | 0 | } Unexecuted instantiation: gettext-po.c:noop_styled_ostream_get_destination Unexecuted instantiation: write-catalog.c:noop_styled_ostream_get_destination Unexecuted instantiation: write-po.c:noop_styled_ostream_get_destination |
666 | | |
667 | | static inline bool |
668 | | noop_styled_ostream_is_owning_destination (noop_styled_ostream_t _GL_UNNAMED (stream)) |
669 | 0 | { |
670 | 0 | return true; |
671 | 0 | } Unexecuted instantiation: gettext-po.c:noop_styled_ostream_is_owning_destination Unexecuted instantiation: write-catalog.c:noop_styled_ostream_is_owning_destination Unexecuted instantiation: write-po.c:noop_styled_ostream_is_owning_destination |
672 | | |
673 | | static inline noop_styled_ostream_t |
674 | | noop_styled_ostream_create (ostream_t destination, bool pass_ownership) |
675 | 0 | { |
676 | 0 | if (!pass_ownership) |
677 | 0 | /* Not supported without the real libtextstyle. */ |
678 | 0 | abort (); |
679 | 0 | return destination; |
680 | 0 | } Unexecuted instantiation: gettext-po.c:noop_styled_ostream_create Unexecuted instantiation: write-catalog.c:noop_styled_ostream_create Unexecuted instantiation: write-po.c:noop_styled_ostream_create |
681 | | |
682 | | static inline bool |
683 | | is_instance_of_noop_styled_ostream (ostream_t _GL_UNNAMED (stream)) |
684 | 0 | { |
685 | 0 | return false; |
686 | 0 | } Unexecuted instantiation: gettext-po.c:is_instance_of_noop_styled_ostream Unexecuted instantiation: write-catalog.c:is_instance_of_noop_styled_ostream Unexecuted instantiation: write-po.c:is_instance_of_noop_styled_ostream |
687 | | |
688 | | /* ------------------------------ From color.h ------------------------------ */ |
689 | | |
690 | | #define color_test_mode false |
691 | | |
692 | | enum color_option { color_no, color_tty, color_yes, color_html }; |
693 | | #define color_mode color_no |
694 | | |
695 | | #define style_file_name NULL |
696 | | |
697 | | static inline bool |
698 | | handle_color_option (const char *_GL_UNNAMED (option)) |
699 | 0 | { |
700 | 0 | return false; |
701 | 0 | } Unexecuted instantiation: gettext-po.c:handle_color_option Unexecuted instantiation: write-catalog.c:handle_color_option Unexecuted instantiation: write-po.c:handle_color_option |
702 | | |
703 | | static inline void |
704 | | handle_style_option (const char *_GL_UNNAMED (option)) |
705 | 0 | { |
706 | 0 | } Unexecuted instantiation: gettext-po.c:handle_style_option Unexecuted instantiation: write-catalog.c:handle_style_option Unexecuted instantiation: write-po.c:handle_style_option |
707 | | |
708 | | static inline void |
709 | | print_color_test (void) |
710 | 0 | { |
711 | 0 | /* Not supported without the real libtextstyle. */ |
712 | 0 | abort (); |
713 | 0 | } Unexecuted instantiation: gettext-po.c:print_color_test Unexecuted instantiation: write-catalog.c:print_color_test Unexecuted instantiation: write-po.c:print_color_test |
714 | | |
715 | | static inline void |
716 | | style_file_prepare (const char *_GL_UNNAMED (style_file_envvar), |
717 | | const char *_GL_UNNAMED (stylesdir_envvar), |
718 | | const char *_GL_UNNAMED (stylesdir_after_install), |
719 | | const char *_GL_UNNAMED (default_style_file)) |
720 | 0 | { |
721 | 0 | } Unexecuted instantiation: gettext-po.c:style_file_prepare Unexecuted instantiation: write-catalog.c:style_file_prepare Unexecuted instantiation: write-po.c:style_file_prepare |
722 | | |
723 | | /* ------------------------------ From misc.h ------------------------------ */ |
724 | | |
725 | | static inline styled_ostream_t |
726 | | styled_ostream_create (int fd, const char *filename, |
727 | | ttyctl_t _GL_UNNAMED (tty_control), |
728 | | const char *_GL_UNNAMED (css_filename)) |
729 | 0 | { |
730 | 0 | return fd_ostream_create (fd, filename, true); |
731 | 0 | } Unexecuted instantiation: gettext-po.c:styled_ostream_create Unexecuted instantiation: write-catalog.c:styled_ostream_create Unexecuted instantiation: write-po.c:styled_ostream_create |
732 | | |
733 | | static inline void |
734 | | libtextstyle_set_failure_exit_code (int _GL_UNNAMED (exit_code)) |
735 | 0 | { |
736 | 0 | } Unexecuted instantiation: gettext-po.c:libtextstyle_set_failure_exit_code Unexecuted instantiation: write-catalog.c:libtextstyle_set_failure_exit_code Unexecuted instantiation: write-po.c:libtextstyle_set_failure_exit_code |
737 | | |
738 | | #endif /* _TEXTSTYLE_H */ |