summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/write-po.h
blob: ef947c75a6ffed65a237a670904f920ee5b2c29f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* GNU gettext - internationalization aids
   Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.

   This file was written by Peter Miller <millerp@canb.auug.org.au>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */

#ifndef _WRITE_PO_H
#define _WRITE_PO_H

#include "message.h"

#include <stdbool.h>
#include <stdio.h>


#ifdef __cplusplus
extern "C" {
#endif


/* These functions are used to output a #, flags line.  */
extern const char *
       make_format_description_string (enum is_format is_format,
				       const char *lang, bool debug);
extern bool
       significant_format_p (enum is_format is_format);


/* These functions output parts of a message, as comments.  */
extern void
       message_print_comment (const message_ty *mp, FILE *fp);
extern void
       message_print_comment_dot (const message_ty *mp, FILE *fp);
extern void
       message_print_comment_filepos (const message_ty *mp, FILE *fp,
				      bool uniforum, size_t page_width);
extern void
       message_print_comment_flags (const message_ty *mp, FILE *fp,
				    bool debug);

/* These functions set some parameters for use by 'msgdomain_list_print'.  */
extern void
       message_page_width_set (size_t width);
extern void
       message_page_width_ignore (void);
extern void
       message_print_style_indent (void);
extern void
       message_print_style_uniforum (void);
extern void
       message_print_style_escape (bool flag);
extern void
       message_print_syntax_properties (void);
extern void
       message_print_syntax_stringtable (void);

/* Output MDLP into a PO file with the given FILENAME, according to the
   parameters set by the functions above.  */
extern void
       msgdomain_list_print (msgdomain_list_ty *mdlp,
			     const char *filename,
			     bool force, bool debug);

/* Sort MDLP destructively according to the given criterion.  */
extern void
       msgdomain_list_sort_by_msgid (msgdomain_list_ty *mdlp);
extern void
       msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp);


#ifdef __cplusplus
}
#endif


#endif /* _WRITE_PO_H */