(root)/
gettext-0.22.4/
gettext-tools/
src/
msgl-check.h
       1  /* Checking of messages in PO files.
       2     Copyright (C) 2005, 2008, 2010, 2015 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 <https://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  #include "plural-distrib.h"
      25  
      26  
      27  #ifdef __cplusplus
      28  extern "C" {
      29  #endif
      30  
      31  
      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);
      41  
      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,
      45                            int check_newlines,
      46                            int check_format_strings,
      47                            const struct plural_distribution *distribution,
      48                            int check_header,
      49                            int check_compatibility,
      50                            int check_accelerators, char accelerator_char);
      51  
      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,
      55                                 int ignore_untranslated_messages,
      56                                 int ignore_fuzzy_messages,
      57                                 int check_newlines,
      58                                 int check_format_strings,
      59                                 int check_header,
      60                                 int check_compatibility,
      61                                 int check_accelerators, char accelerator_char);
      62  
      63  /* Perform all syntax checks on a message list.
      64     Return the number of errors that were seen.  */
      65  extern int syntax_check_message_list (message_list_ty *mlp);
      66  
      67  #ifdef __cplusplus
      68  }
      69  #endif
      70  
      71  #endif /* _MSGL_CHECK_H */