# These are auxiliary sources whose symbols should not be exported.
libgettextpo_la_AUXSOURCES = \
../src/str-list.c \
- ../src/dir-list.c \
../src/message.c \
../src/pos.c \
../src/msgl-ascii.c \
../src/po-xerror.c \
../src/write-catalog.c \
../src/write-po.c \
- ../src/open-catalog.c \
../src/po-charset.c \
../src/po-lex.c \
../src/po-gram-gen.c \
|
| read-catalog.h
| read-catalog.c
+| read-catalog-file.h
+| read-catalog-file.c
| Reading of a PO file, returning a list-of-messages.
|
| read-desktop.h
noinst_HEADERS = \
pos.h message.h po-error.h po-xerror.h po-gram.h po-charset.h \
po-lex.h open-catalog.h read-catalog-abstract.h read-catalog.h \
- read-po.h read-properties.h read-stringtable.h \
+ read-catalog-file.h read-po.h read-properties.h read-stringtable.h \
str-list.h \
write-catalog.h write-po.h write-properties.h write-stringtable.h \
dir-list.h file-list.h po-gram-gen.h po-gram-gen2.h cldr-plural.h \
# read-csharp.c and read-resources.c.)
# message.c -> str-list.c.
# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> str-list.c.
-# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> open-catalog.c -> dir-list.c -> str-list.c.
# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> po-charset.c.
# (read-catalog-abstract.c <--> po-gram-gen.y <--> po-lex.c) -> message.c -> str-list.c.
+# read-catalog-file.c -> open-catalog.c -> dir-list.c -> str-list.c.
COMMON_SOURCE = message.c pos.c po-error.c po-xerror.c \
read-catalog-abstract.c po-lex.c po-gram-gen.y po-charset.c \
read-po.c read-properties.c read-stringtable.c open-catalog.c \
# libgettextsrc contains all code that is needed by at least two programs.
libgettextsrc_la_SOURCES = \
$(COMMON_SOURCE) \
- read-catalog.c \
+ read-catalog.c read-catalog-file.c \
write-catalog.c write-properties.c write-stringtable.c write-po.c \
msgl-ascii.c \
msgl-ofn.c \
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "propername.h"
#include "message.h"
#include "open-catalog.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "c-strstr.h"
#include "c-strcase.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
#include "xerror.h"
#include "xvasprintf.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "po-charset.h"
#include "msgl-ascii.h"
#include "msgl-ofn.h"
#include "relocatable.h"
#include "basename-lgpl.h"
#include "message.h"
-#include "read-catalog.h"
+#include "read-catalog-file.h"
#include "read-po.h"
#include "read-properties.h"
#include "read-stringtable.h"
--- /dev/null
+/* Reading PO files.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
+ This file was written by Peter Miller <millerp@canb.auug.org.au>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification. */
+#include "read-catalog-file.h"
+
+#include "open-catalog.h"
+
+
+msgdomain_list_ty *
+read_catalog_file (const char *filename, catalog_input_format_ty input_syntax)
+{
+ char *real_filename;
+ FILE *fp = open_catalog_file (filename, &real_filename, true);
+ msgdomain_list_ty *result;
+
+ result = read_catalog_stream (fp, real_filename, filename, input_syntax);
+
+ if (fp != stdin)
+ fclose (fp);
+
+ return result;
+}
--- /dev/null
+/* Reading PO files.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
+ This file was written by Bruno Haible <haible@clisp.cons.org>.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _READ_CATALOG_FILE_H
+#define _READ_CATALOG_FILE_H
+
+#include "read-catalog.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Read the input file with the name INPUT_NAME. The ending .po is added
+ if necessary. If INPUT_NAME is not an absolute file name and the file is
+ not found, the list of directories in "dir-list.h" is searched. Returns
+ a list of messages. */
+extern msgdomain_list_ty *
+ read_catalog_file (const char *input_name,
+ catalog_input_format_ty input_syntax);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _READ_CATALOG_FILE_H */
#include <stdlib.h>
#include <string.h>
-#include "open-catalog.h"
#include "po-charset.h"
#include "po-xerror.h"
#include "xalloc.h"
catalog_reader_free ((abstract_catalog_reader_ty *) pop);
return mdlp;
}
-
-
-msgdomain_list_ty *
-read_catalog_file (const char *filename, catalog_input_format_ty input_syntax)
-{
- char *real_filename;
- FILE *fp = open_catalog_file (filename, &real_filename, true);
- msgdomain_list_ty *result;
-
- result = read_catalog_stream (fp, real_filename, filename, input_syntax);
-
- if (fp != stdin)
- fclose (fp);
-
- return result;
-}
/* Reading PO files.
- Copyright (C) 1995-1998, 2000-2003, 2005-2006, 2008-2009, 2014-2015 Free
- Software Foundation, Inc.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file was written by Bruno Haible <haible@clisp.cons.org>.
This program is free software: you can redistribute it and/or modify
const char *logical_filename,
catalog_input_format_ty input_syntax);
-/* Read the input file with the name INPUT_NAME. The ending .po is added
- if necessary. If INPUT_NAME is not an absolute file name and the file is
- not found, the list of directories in "dir-list.h" is searched. Returns
- a list of messages. */
-extern msgdomain_list_ty *
- read_catalog_file (const char *input_name,
- catalog_input_format_ty input_syntax);
-
#ifdef __cplusplus
}