From: Bruno Haible Date: Tue, 2 Sep 2008 01:15:52 +0000 (+0000) Subject: Use xconcatenated_filename. X-Git-Tag: v0.18~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0640414cb67a0755673536bdfa75b06169f5899;p=thirdparty%2Fgettext.git Use xconcatenated_filename. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index c91fd670a..ada81639a 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,36 @@ +2008-09-01 Bruno Haible + + * color.c: Include concat-filename.h. + (style_file_lookup, style_file_prepare): Use xconcatenated_filename + instead of concatenated_filename. + * msginit.c: Include concat-filename.h instead of filename.h. + (project_id, project_id_version): Use xconcatenated_filename instead of + concatenated_filename. + * open-catalog.c: Include concat-filename.h. + (try_open_catalog_file): Use xconcatenated_filename instead of + concatenated_filename. + * read-csharp.c: Include concat-filename.h instead of filename.h. + (msgdomain_read_csharp): Use xconcatenated_filename instead of + concatenated_filename. + * read-resources.c: Include concat-filename.h instead of filename.h. + (read_resources_file): Use xconcatenated_filename instead of + concatenated_filename. + * read-tcl.c: Include concat-filename.h instead of filename.h. + (msgdomain_read_tcl): Use xconcatenated_filename instead of + concatenated_filename. + * write-resources.c: Include concat-filename.h instead of filename.h. + (msgdomain_write_csharp_resources): Use xconcatenated_filename instead of + concatenated_filename. + * write-csharp.c: Include concat-filename.h instead of filename.h. + (msgdomain_write_csharp): Use xconcatenated_filename instead of + concatenated_filename. + * write-java.c: Include concat-filename.h instead of filename.h. + (msgdomain_write_java): Use xconcatenated_filename instead of + concatenated_filename. + * write-tcl.c: Include concat-filename.h instead of filename.h. + (msgdomain_write_tcl: Use xconcatenated_filename instead of + concatenated_filename. + 2008-08-31 Bruno Haible * msgexec.c: Include . diff --git a/gettext-tools/src/color.c b/gettext-tools/src/color.c index ed548a963..7b52ea7e5 100644 --- a/gettext-tools/src/color.c +++ b/gettext-tools/src/color.c @@ -1,5 +1,5 @@ /* Color and styling handling. - Copyright (C) 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2006-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software: you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include "xalloc.h" #include "relocatable.h" #include "filename.h" +#include "concat-filename.h" /* Whether to output a test page. */ @@ -399,7 +400,7 @@ style_file_lookup (const char *file_name) /* ... but it exists in the styles installation location... */ const char *gettextstylesdir = relocate (GETTEXTDATADIR "/styles"); char *possible_file_name = - concatenated_filename (gettextstylesdir, file_name, NULL); + xconcatenated_filename (gettextstylesdir, file_name, NULL); if (stat (possible_file_name, &statbuf) >= 0) { @@ -435,7 +436,7 @@ style_file_prepare () gettextdatadir = relocate (GETTEXTDATADIR); style_file_name = - concatenated_filename (gettextdatadir, "styles/po-default.css", + xconcatenated_filename (gettextdatadir, "styles/po-default.css", NULL); } } diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 13182dc8e..d244eb449 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -73,7 +73,7 @@ #include "lang-table.h" #include "xalloc.h" #include "xmalloca.h" -#include "filename.h" +#include "concat-filename.h" #include "xerror.h" #include "xvasprintf.h" #include "msgl-english.h" @@ -822,7 +822,7 @@ project_id () if (gettextlibdir == NULL || gettextlibdir[0] == '\0') gettextlibdir = relocate (LIBDIR "/gettext"); - prog = concatenated_filename (gettextlibdir, "project-id", NULL); + prog = xconcatenated_filename (gettextlibdir, "project-id", NULL); /* Call the project-id shell script. */ argv[0] = "/bin/sh"; @@ -896,7 +896,7 @@ project_id_version (const char *header) if (gettextlibdir == NULL || gettextlibdir[0] == '\0') gettextlibdir = relocate (LIBDIR "/gettext"); - prog = concatenated_filename (gettextlibdir, "project-id", NULL); + prog = xconcatenated_filename (gettextlibdir, "project-id", NULL); /* Call the project-id shell script. */ argv[0] = "/bin/sh"; diff --git a/gettext-tools/src/open-catalog.c b/gettext-tools/src/open-catalog.c index c3673b01a..1f8470019 100644 --- a/gettext-tools/src/open-catalog.c +++ b/gettext-tools/src/open-catalog.c @@ -1,5 +1,5 @@ /* open-po - search for .po file along search path list and open for reading - Copyright (C) 1995-1996, 2000-2003, 2005-2007 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2000-2003, 2005-2008 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software: you can redistribute it and/or modify @@ -30,6 +30,7 @@ #include "dir-list.h" #include "filename.h" +#include "concat-filename.h" #include "xalloc.h" #include "xvasprintf.h" #include "po-xerror.h" @@ -62,7 +63,7 @@ try_open_catalog_file (const char *input_name, char **real_file_name_p) { for (k = 0; k < SIZEOF (extension); ++k) { - file_name = concatenated_filename ("", input_name, extension[k]); + file_name = xconcatenated_filename ("", input_name, extension[k]); ret_val = fopen (file_name, "r"); if (ret_val != NULL || errno != ENOENT) @@ -83,7 +84,7 @@ try_open_catalog_file (const char *input_name, char **real_file_name_p) for (j = 0; (dir = dir_list_nth (j)) != NULL; ++j) for (k = 0; k < SIZEOF (extension); ++k) { - file_name = concatenated_filename (dir, input_name, extension[k]); + file_name = xconcatenated_filename (dir, input_name, extension[k]); ret_val = fopen (file_name, "r"); if (ret_val != NULL || errno != ENOENT) diff --git a/gettext-tools/src/read-csharp.c b/gettext-tools/src/read-csharp.c index 14197c540..e79c7c777 100644 --- a/gettext-tools/src/read-csharp.c +++ b/gettext-tools/src/read-csharp.c @@ -35,7 +35,7 @@ #include "read-catalog.h" #include "read-po.h" #include "xalloc.h" -#include "filename.h" +#include "concat-filename.h" #include "error.h" #include "gettext.h" @@ -151,7 +151,8 @@ msgdomain_read_csharp (const char *resource_name, const char *locale_name, gettextlibdir = relocate (LIBDIR); /* Dump the resource and retrieve the resulting output. */ - assembly_path = concatenated_filename (gettextexedir, "msgunfmt.net", ".exe"); + assembly_path = + xconcatenated_filename (gettextexedir, "msgunfmt.net", ".exe"); libdirs[0] = gettextlibdir; if (execute_csharp_program (assembly_path, libdirs, 1, args, diff --git a/gettext-tools/src/read-resources.c b/gettext-tools/src/read-resources.c index 559a90e40..621c8e699 100644 --- a/gettext-tools/src/read-resources.c +++ b/gettext-tools/src/read-resources.c @@ -35,7 +35,7 @@ #include "read-catalog.h" #include "read-po.h" #include "message.h" -#include "filename.h" +#include "concat-filename.h" #include "error.h" #include "gettext.h" @@ -115,7 +115,8 @@ read_resources_file (message_list_ty *mlp, const char *filename) gettextlibdir = relocate (LIBDIR); /* Dump the resource and retrieve the resulting output. */ - assembly_path = concatenated_filename (gettextexedir, "msgunfmt.net", ".exe"); + assembly_path = + xconcatenated_filename (gettextexedir, "msgunfmt.net", ".exe"); libdirs[0] = gettextlibdir; if (execute_csharp_program (assembly_path, libdirs, 1, args, diff --git a/gettext-tools/src/read-tcl.c b/gettext-tools/src/read-tcl.c index 53485a5d5..3b99490b0 100644 --- a/gettext-tools/src/read-tcl.c +++ b/gettext-tools/src/read-tcl.c @@ -29,7 +29,7 @@ #include "msgunfmt.h" #include "relocatable.h" -#include "filename.h" +#include "concat-filename.h" #include "sh-quote.h" #include "pipe.h" #include "wait-process.h" @@ -69,7 +69,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory) if (gettextdatadir == NULL || gettextdatadir[0] == '\0') gettextdatadir = relocate (GETTEXTDATADIR); - tclscript = concatenated_filename (gettextdatadir, "msgunfmt.tcl", NULL); + tclscript = xconcatenated_filename (gettextdatadir, "msgunfmt.tcl", NULL); /* Convert the locale name to lowercase and remove any encoding. */ len = strlen (locale_name); @@ -84,7 +84,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory) break; } - file_name = concatenated_filename (directory, frobbed_locale_name, ".msg"); + file_name = xconcatenated_filename (directory, frobbed_locale_name, ".msg"); freea (frobbed_locale_name); diff --git a/gettext-tools/src/write-csharp.c b/gettext-tools/src/write-csharp.c index 134af0384..82c0c80fc 100644 --- a/gettext-tools/src/write-csharp.c +++ b/gettext-tools/src/write-csharp.c @@ -1,5 +1,5 @@ /* Writing C# satellite assemblies. - Copyright (C) 2003-2007 Free Software Foundation, Inc. + Copyright (C) 2003-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software: you can redistribute it and/or modify @@ -82,7 +82,7 @@ #include "po-charset.h" #include "xalloc.h" #include "xmalloca.h" -#include "filename.h" +#include "concat-filename.h" #include "fwriteerror.h" #include "clean-temp.h" #include "unistr.h" @@ -676,7 +676,7 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding, /* Compute the output file name. This code must be kept consistent with intl.cs, function GetSatelliteAssembly(). */ { - char *output_dir = concatenated_filename (directory, culture_name, NULL); + char *output_dir = xconcatenated_filename (directory, culture_name, NULL); struct stat statbuf; /* Try to create the output directory if it does not yet exist. */ @@ -691,7 +691,7 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding, } output_file = - concatenated_filename (output_dir, resource_name, ".resources.dll"); + xconcatenated_filename (output_dir, resource_name, ".resources.dll"); free (output_dir); } @@ -714,7 +714,7 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding, /* Compute the temporary C# file name. It must end in ".cs", so that the C# compiler recognizes that it is C# source code. */ csharp_file_name = - concatenated_filename (tmpdir->dir_name, "resset.cs", NULL); + xconcatenated_filename (tmpdir->dir_name, "resset.cs", NULL); /* Create the C# file. */ register_temp_file (tmpdir, csharp_file_name); diff --git a/gettext-tools/src/write-java.c b/gettext-tools/src/write-java.c index 5c3e5e95f..f343e994a 100644 --- a/gettext-tools/src/write-java.c +++ b/gettext-tools/src/write-java.c @@ -1,5 +1,5 @@ /* Writing Java ResourceBundles. - Copyright (C) 2001-2003, 2005-2007 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software: you can redistribute it and/or modify @@ -65,7 +65,7 @@ #include "po-charset.h" #include "xalloc.h" #include "xmalloca.h" -#include "filename.h" +#include "concat-filename.h" #include "fwriteerror.h" #include "clean-temp.h" #include "unistr.h" @@ -996,7 +996,7 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding, char *part = (char *) xmalloca (n + 1); memcpy (part, p, n); part[n] = '\0'; - subdirs[i] = concatenated_filename (last_dir, part, NULL); + subdirs[i] = xconcatenated_filename (last_dir, part, NULL); freea (part); last_dir = subdirs[i]; p = q + 1; @@ -1005,11 +1005,11 @@ msgdomain_write_java (message_list_ty *mlp, const char *canon_encoding, if (locale_name != NULL) { char *suffix = xasprintf ("_%s.java", locale_name); - java_file_name = concatenated_filename (last_dir, p, suffix); + java_file_name = xconcatenated_filename (last_dir, p, suffix); free (suffix); } else - java_file_name = concatenated_filename (last_dir, p, ".java"); + java_file_name = xconcatenated_filename (last_dir, p, ".java"); } /* Create the subdirectories. This is needed because some older Java diff --git a/gettext-tools/src/write-resources.c b/gettext-tools/src/write-resources.c index 3b9fdabbd..9899c7227 100644 --- a/gettext-tools/src/write-resources.c +++ b/gettext-tools/src/write-resources.c @@ -39,7 +39,7 @@ #include "msgl-iconv.h" #include "po-charset.h" #include "xalloc.h" -#include "filename.h" +#include "concat-filename.h" #include "fwriteerror.h" #include "gettext.h" @@ -175,7 +175,7 @@ but the C# .resources format doesn't support plural handling\n"))); gettextexedir = relocate (LIBDIR "/gettext"); assembly_path = - concatenated_filename (gettextexedir, "msgfmt.net", ".exe"); + xconcatenated_filename (gettextexedir, "msgfmt.net", ".exe"); locals.mlp = mlp; diff --git a/gettext-tools/src/write-tcl.c b/gettext-tools/src/write-tcl.c index 6eb8c157f..ead0605de 100644 --- a/gettext-tools/src/write-tcl.c +++ b/gettext-tools/src/write-tcl.c @@ -1,5 +1,5 @@ /* Writing tcl/msgcat .msg files. - Copyright (C) 2002-2003, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005, 2007-2008 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ #include "po-charset.h" #include "xalloc.h" #include "xmalloca.h" -#include "filename.h" +#include "concat-filename.h" #include "fwriteerror.h" #include "unistr.h" #include "gettext.h" @@ -204,7 +204,7 @@ but the Tcl message catalog format doesn't support plural handling\n"))); break; } - file_name = concatenated_filename (directory, frobbed_locale_name, ".msg"); + file_name = xconcatenated_filename (directory, frobbed_locale_name, ".msg"); output_file = fopen (file_name, "w"); if (output_file == NULL)