(root)/
gettext-0.22.4/
gettext-tools/
src/
read-po.c
       1  /* Reading PO files.
       2     Copyright (C) 1995-1996, 1998, 2000-2006 Free Software Foundation, Inc.
       3  
       4     This program is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU General Public License as published by
       6     the Free Software Foundation; either version 3 of the License, or
       7     (at your option) any later version.
       8  
       9     This program is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU General Public License for more details.
      13  
      14     You should have received a copy of the GNU General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      16  
      17  #ifdef HAVE_CONFIG_H
      18  # include <config.h>
      19  #endif
      20  
      21  /* Specification.  */
      22  #include "read-po.h"
      23  
      24  #include "po-lex.h"
      25  #include "po-gram.h"
      26  
      27  /* For compiling this file in C++ mode.  */
      28  #ifdef __cplusplus
      29  # define this thiss
      30  #endif
      31  
      32  
      33  /* Read a .po / .pot file from a stream, and dispatch to the various
      34     abstract_catalog_reader_class_ty methods.  */
      35  static void
      36  po_parse (abstract_catalog_reader_ty *this, FILE *fp,
      37            const char *real_filename, const char *logical_filename)
      38  {
      39    lex_start (fp, real_filename, logical_filename);
      40    po_gram_parse ();
      41    lex_end ();
      42  }
      43  
      44  const struct catalog_input_format input_format_po =
      45  {
      46    po_parse,                             /* parse */
      47    false                                 /* produces_utf8 */
      48  };