1 /* Checking of messages in PO files.
2 Copyright (C) 2005, 2008 Free Software Foundation, Inc.
3 Written by Bruno Haible <bruno@clisp.org>, 2005.
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.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 #define _MSGL_CHECK_H 1
23 #include "plural-eval.h"
24 #include "plural-distrib.h"
32 /* Check the values returned by plural_eval.
33 Signals the errors through po_xerror.
34 Return the number of errors that were seen.
35 If no errors, returns in *DISTRIBUTION information about the plural_eval
36 values distribution. */
37 extern int check_plural_eval (const struct expression *plural_expr,
38 unsigned long nplurals_value,
39 const message_ty *header,
40 struct plural_distribution *distribution);
42 /* Perform all checks on a non-obsolete message. */
43 extern int check_message (const message_ty *mp,
44 const lex_pos_ty *msgid_pos,
46 int check_format_strings,
47 const struct plural_distribution *distribution,
49 int check_compatibility,
50 int check_accelerators, char accelerator_char);
52 /* Perform all checks on a message list.
53 Return the number of errors that were seen. */
54 extern int check_message_list (message_list_ty *mlp,
56 int check_format_strings,
58 int check_compatibility,
59 int check_accelerators, char accelerator_char);
66 #endif /* _MSGL_CHECK_H */