+2013-08-05 Daiki Ueno <ueno@gnu.org>
+
+ * xgettext.c (main): Allow exntension with multiple
+ dots. e.g. .gschema.xml.
+
2013-03-02 Miguel Angel Arruga Vivas <rosen644385@gmail.com>
Extract libexpat compatibility layer.
char *reduced;
const char *extension;
const char *language;
+ const char *p;
base = strrchr (filename, '/');
if (!base)
reduced[strlen (reduced) - 3] = '\0';
/* Work out what the file extension is. */
- extension = strrchr (reduced, '.');
- if (extension)
- ++extension;
- else
- extension = "";
+ language = NULL;
+ p = reduced + strlen (reduced);
+ for (; p > reduced && language == NULL; p--)
+ {
+ if (*p == '.')
+ {
+ extension = p + 1;
+
+ /* Derive the language from the extension, and the extractor
+ function from the language. */
+ language = extension_to_language (extension);
+ }
+ }
- /* Derive the language from the extension, and the extractor
- function from the language. */
- language = extension_to_language (extension);
if (language == NULL)
{
+ extension = strrchr (reduced, '.');
+ if (extension == NULL)
+ extension = "";
+ else
+ extension++;
error (0, 0, _("\
warning: file '%s' extension '%s' is unknown; will try C"), filename, extension);
language = "C";
Copyright (C) YEAR %s\n\
This file is distributed under the same license as the PACKAGE package.\n\
FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n",
- copyright_holder);
+ copyright_holder);
else
comment = xstrdup ("\
SOME DESCRIPTIVE TITLE.\n\