Coverage Report

Created: 2026-01-25 07:18

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