Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / src / write-po.h
1 /* GNU gettext - internationalization aids
2    Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2015 Free Software
3    Foundation, Inc.
4
5    This file was written by Peter Miller <millerp@canb.auug.org.au>
6
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 #ifndef _WRITE_PO_H
21 #define _WRITE_PO_H
22
23 #include "ostream.h"
24 #include "message.h"
25
26 #include <stdbool.h>
27
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33
34 enum filepos_comment_type
35   {
36     filepos_comment_none,
37     filepos_comment_full,
38     filepos_comment_file
39   };
40
41 /* These functions are used to output a #, flags line.  */
42 extern const char *
43        make_format_description_string (enum is_format is_format,
44                                        const char *lang, bool debug);
45 extern bool
46        significant_format_p (enum is_format is_format);
47
48 extern char *
49        make_range_description_string (struct argument_range range);
50
51 /* These functions output parts of a message, as comments.  */
52 extern void
53        message_print_comment (const message_ty *mp, ostream_t stream);
54 extern void
55        message_print_comment_dot (const message_ty *mp, ostream_t stream);
56 extern void
57        message_print_comment_filepos (const message_ty *mp, ostream_t stream,
58                                       bool uniforum, size_t page_width);
59 extern void
60        message_print_comment_flags (const message_ty *mp, ostream_t stream,
61                                     bool debug);
62
63 /* These functions set some parameters for use by 'output_format_po.print'.  */
64 extern void
65        message_page_width_ignore (void);
66 extern void
67        message_print_style_indent (void);
68 extern void
69        message_print_style_uniforum (void);
70 extern void
71        message_print_style_escape (bool flag);
72 extern void
73        message_print_style_filepos (enum filepos_comment_type type);
74
75 /* --add-location argument handling.  Return an error indicator.  */
76 extern bool handle_filepos_comment_option (const char *option);
77
78
79 /* Describes a PO file in .po syntax.  */
80 extern DLL_VARIABLE const struct catalog_output_format output_format_po;
81
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87
88 #endif /* _WRITE_PO_H */