• 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/* Checking of messages in PO files.
2   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
3   Written by Bruno Haible <bruno@clisp.org>, 2005.
4
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.
9
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.
14
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/>.  */
17
18#ifndef _MSGL_CHECK_H
19#define _MSGL_CHECK_H 1
20
21#include "message.h"
22#include "pos.h"
23#include "plural-eval.h"
24
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30
31/* Check the values returned by plural_eval.
32   Signals the errors through po_xerror.
33   Return the number of errors that were seen.
34   If no errors, returns in *PLURAL_DISTRIBUTION either NULL or an array
35   of length NPLURALS_VALUE describing which plural formula values appear
36   infinitely often and in *PLURAL_DISTRIBUTION_LENGTH the length of this
37   array.  */
38extern int check_plural_eval (const struct expression *plural_expr,
39			      unsigned long nplurals_value,
40			      const message_ty *header,
41			      unsigned char **plural_distribution,
42			      unsigned long *plural_distribution_length);
43
44/* Perform all checks on a non-obsolete message.
45   PLURAL_DISTRIBUTION is either NULL or an array of nplurals elements,
46   PLURAL_DISTRIBUTION[j] being true if the value j appears to be assumed
47   infinitely often by the plural formula.
48   PLURAL_DISTRIBUTION_LENGTH is the length of the PLURAL_DISTRIBUTION array.
49   Return the number of errors that were seen.  */
50extern int check_message (const message_ty *mp,
51			  const lex_pos_ty *msgid_pos,
52			  int check_newlines,
53			  int check_format_strings,
54			  const unsigned char *plural_distribution,
55			  unsigned long plural_distribution_length,
56			  int check_header,
57			  int check_compatibility,
58			  int check_accelerators, char accelerator_char);
59
60/* Perform all checks on a message list.
61   Return the number of errors that were seen.  */
62extern int check_message_list (message_list_ty *mlp,
63			       int check_newlines,
64			       int check_format_strings,
65			       int check_header,
66			       int check_compatibility,
67			       int check_accelerators, char accelerator_char);
68
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif /* _MSGL_CHECK_H */
75