Use xconcatenated_filename.

This commit is contained in:
Bruno Haible 2008-09-02 01:15:52 +00:00
parent e75e2d9bdf
commit e0640414cb
11 changed files with 68 additions and 31 deletions

View File

@ -1,3 +1,36 @@
2008-09-01 Bruno Haible <bruno@clisp.org>
* 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 <bruno@clisp.org>
* msgexec.c: Include <signal.h>.

View File

@ -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 <bruno@clisp.org>, 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);
}
}

View File

@ -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";

View File

@ -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 <drepper@gnu.ai.mit.edu>, 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)

View File

@ -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,

View File

@ -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,

View File

@ -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);

View File

@ -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 <bruno@clisp.org>, 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);

View File

@ -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 <haible@clisp.cons.org>, 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

View File

@ -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;

View File

@ -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 <bruno@clisp.org>, 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)