• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/src/
1/* GNU gettext - internationalization aids
2   Copyright (C) 1995-1998, 2000-2003, 2006 Free Software Foundation, Inc.
3
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.
8
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.
13
14   You should have received a copy of the GNU General Public License
15   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
16
17#ifndef _WRITE_CATALOG_H
18#define _WRITE_CATALOG_H
19
20#include <stdbool.h>
21
22#include "ostream.h"
23#include "message.h"
24
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30
31/* This structure describes a textual catalog output format.  */
32struct catalog_output_format
33{
34  /* Outputs a list of domains of messages to a stream.  */
35  void (*print) (msgdomain_list_ty *mdlp, ostream_t stream, size_t page_width, bool debug);
36
37  /* Whether the print function requires the MDLP to be encoded in UTF-8
38     encoding.  */
39  bool requires_utf8;
40
41  /* Whether the print function supports styled output.  */
42  bool supports_color;
43
44  /* Whether the format supports multiple domains in a single file.  */
45  bool supports_multiple_domains;
46
47  /* Whether the format supports contexts.  */
48  bool supports_contexts;
49
50  /* Whether the format supports plurals.  */
51  bool supports_plurals;
52
53  /* Whether the PO file format is a suitable alternative output format for
54     this one.  */
55  bool alternative_is_po;
56
57  /* Whether a Java class is a suitable alternative output format for this
58     one.  */
59  bool alternative_is_java_class;
60};
61
62typedef const struct catalog_output_format * catalog_output_format_ty;
63
64/* These functions set some parameters for use by 'msgdomain_list_print'.  */
65extern void
66       message_page_width_set (size_t width);
67
68/* Output MDLP into a PO file with the given FILENAME, according to the
69   parameters set by the functions above.  */
70extern void
71       msgdomain_list_print (msgdomain_list_ty *mdlp,
72			     const char *filename,
73			     catalog_output_format_ty output_syntax,
74			     bool force, bool debug);
75
76/* Sort MDLP destructively according to the given criterion.  */
77extern void
78       msgdomain_list_sort_by_msgid (msgdomain_list_ty *mdlp);
79extern void
80       msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp);
81
82
83#ifdef __cplusplus
84}
85#endif
86
87
88#endif /* _WRITE_CATALOG_H */
89