* gettext-tools/src/xg-pos.h: New file.
* gettext-tools/src/xg-pos.c: New file.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add xg-pos.h.
(xgettext_SOURCES): Add xg-pos.c.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/x-awk.c: Include xg-pos.h.
(real_file_name, logical_file_name, line_number): Remove variables.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
| Declarations used by the backends.
| rc-str-list.h
| A reference-counted list-of-immutable-strings type.
+| xg-pos.h
+| xg-pos.c
+| The source file position.
| xg-encoding.h
| xg-encoding.c
| Keeping track of the encoding of strings to be extracted.
write-xml.h \
po-time.h plural-table.h lang-table.h format.h filters.h \
xgettext.h \
-rc-str-list.h xg-encoding.h xg-mixed-string.h xg-arglist-context.h \
+rc-str-list.h xg-pos.h xg-encoding.h xg-mixed-string.h xg-arglist-context.h \
xg-arglist-callshape.h xg-arglist-parser.h xg-message.h \
x-c.h x-po.h x-sh.h x-python.h x-lisp.h x-elisp.h x-librep.h \
x-scheme.h x-smalltalk.h x-java.h x-properties.h x-csharp.h x-awk.h x-ycp.h \
xgettext_SOURCES = ../woe32dll/c++xgettext.cc
endif
xgettext_SOURCES += \
+ xg-pos.c \
xg-encoding.c \
xg-mixed-string.c \
xg-arglist-context.c xg-arglist-callshape.c xg-arglist-parser.c \
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-arglist-context.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-arglist-context.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-arglist-context.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "c-ctype.h"
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
xgettext_record_flag ("string.format:1:lua-format");
}
-/* ======================== Reading of characters. ======================== */
-
-
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
+/* ======================== Reading of characters. ======================== */
/* The input file stream. */
static FILE *fp;
return c;
}
+
/* ========================== Reading of tokens. ========================== */
enum token_type_ty
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-arglist-context.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "po-charset.h"
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-message.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
#include "xg-arglist-parser.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-message.h"
#include "error.h"
#include "xalloc.h"
/* ======================== Reading of characters. ======================== */
-
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-arglist-context.h"
#include "xg-arglist-callshape.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-encoding.h"
#include "xg-mixed-string.h"
#include "xg-arglist-context.h"
/* ======================== Reading of characters. ======================== */
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
-
/* The input file stream. */
static FILE *fp;
#include "message.h"
#include "rc-str-list.h"
#include "xgettext.h"
+#include "xg-pos.h"
#include "xg-arglist-context.h"
#include "xg-message.h"
#include "error.h"
/* ======================== Reading of characters. ======================== */
-
-/* Real filename, used in error messages about the input file. */
-static const char *real_file_name;
-
-/* Logical filename and line number, used to label the extracted messages. */
-static char *logical_file_name;
-static int line_number;
+/* Position in the current line. */
static int char_in_line;
/* The input file stream. */
--- /dev/null
+/* The source file position.
+ Copyright (C) 2001-2018 Free Software Foundation, Inc.
+
+ 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 "xg-pos.h"
+
+
+const char *real_file_name;
+
+char *logical_file_name;
+int line_number;
--- /dev/null
+/* The source file position.
+ Copyright (C) 1995-2018 Free Software Foundation, Inc.
+
+ 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 _XGETTEXT_POS_H
+#define _XGETTEXT_POS_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These variables are set by the extractor and used by the extractor and
+ its auxiliary functions. They are *not* meant to be used by xgettext.c. */
+
+
+/* Real filename, used in error messages about the input file. */
+extern const char *real_file_name;
+
+/* Logical filename and line number, used to label the extracted messages. */
+extern char *logical_file_name;
+extern int line_number;
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _XGETTEXT_POS_H */