1 /* GNU gettext - internationalization aids 2 Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2014, 2018-2019 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 <https://www.gnu.org/licenses/>. */ 19 20 #ifndef _WRITE_PO_H 21 #define _WRITE_PO_H 22 23 #include <stdbool.h> 24 25 #include <textstyle.h> 26 27 #include "message.h" 28 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 35 enum filepos_comment_type 36 { 37 filepos_comment_none, 38 filepos_comment_full, 39 filepos_comment_file 40 }; 41 42 /* These functions are used to output a #, flags line. */ 43 extern const char * 44 make_format_description_string (enum is_format is_format, 45 const char *lang, bool debug); 46 extern bool 47 significant_format_p (enum is_format is_format); 48 49 extern char * 50 make_range_description_string (struct argument_range range); 51 52 /* These functions output parts of a message, as comments. */ 53 extern void 54 message_print_comment (const message_ty *mp, ostream_t stream); 55 extern void 56 message_print_comment_dot (const message_ty *mp, ostream_t stream); 57 extern void 58 message_print_comment_filepos (const message_ty *mp, ostream_t stream, 59 bool uniforum, size_t page_width); 60 extern void 61 message_print_comment_flags (const message_ty *mp, ostream_t stream, 62 bool debug); 63 64 /* These functions set some parameters for use by 'output_format_po.print'. */ 65 extern void 66 message_page_width_ignore (void); 67 extern void 68 message_print_style_indent (void); 69 extern void 70 message_print_style_uniforum (void); 71 extern void 72 message_print_style_escape (bool flag); 73 extern void 74 message_print_style_comment (bool flag); 75 extern void 76 message_print_style_filepos (enum filepos_comment_type type); 77 78 /* --add-location argument handling. Return an error indicator. */ 79 extern bool handle_filepos_comment_option (const char *option); 80 81 82 /* Describes a PO file in .po syntax. */ 83 extern DLL_VARIABLE const struct catalog_output_format output_format_po; 84 85 86 #ifdef __cplusplus 87 } 88 #endif 89 90 91 #endif /* _WRITE_PO_H */ 92