From a0028d89d917d3faafed7dd20bbd72b077613809 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 25 Feb 2007 15:53:15 +0000 Subject: [PATCH] Module 'pathname' was renamed to 'filename'. --- gettext-tools/src/ChangeLog | 25 +++++++++++++++++++++++++ gettext-tools/src/color.c | 6 +++--- gettext-tools/src/msginit.c | 6 +++--- gettext-tools/src/open-catalog.c | 8 ++++---- gettext-tools/src/read-csharp.c | 4 ++-- gettext-tools/src/read-resources.c | 4 ++-- gettext-tools/src/read-tcl.c | 6 +++--- gettext-tools/src/write-csharp.c | 10 +++++----- gettext-tools/src/write-java.c | 10 +++++----- gettext-tools/src/write-resources.c | 4 ++-- gettext-tools/src/write-tcl.c | 4 ++-- gettext-tools/src/xgettext.c | 8 ++++---- 12 files changed, 60 insertions(+), 35 deletions(-) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 762597d84..def139b7d 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,28 @@ +2007-02-25 Bruno Haible + + * color.c: Include filename.h instead of pathname.h. + (style_file_prepare): Update. + * msginit.c: Include filename.h instead of pathname.h. + (project_id, project_id_version): Update. + * open-catalog.c: Include filename.h instead of pathname.h. + (try_open_catalog_file): Update. + * read-csharp.c: Include filename.h instead of pathname.h. + (msgdomain_read_csharp): Update. + * read-resources.c: Include filename.h instead of pathname.h. + (read_resources_file): Update. + * read-tcl.c: Include filename.h instead of pathname.h. + (msgdomain_read_tcl): Update. + * write-csharp.c: Include filename.h instead of pathname.h. + (msgdomain_write_csharp): Update. + * write-java.c Include filename.h instead of pathname.h. + (msgdomain_write_java): Update. + * write-resources.c: Include filename.h instead of pathname.h. + (msgdomain_write_csharp_resources): Update. + * write-tcl.c: Include filename.h instead of pathname.h. + (msgdomain_write_tcl): Update. + * xgettext.c: Include filename.h instead of pathname.h. + (main, xgettext_open): Update. + 2007-02-19 Bruno Haible * file-list.c: Don't include exit.h. diff --git a/gettext-tools/src/color.c b/gettext-tools/src/color.c index cde37528e..04d14dda2 100644 --- a/gettext-tools/src/color.c +++ b/gettext-tools/src/color.c @@ -1,5 +1,5 @@ /* Color and styling handling. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2006. This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ #include "term-ostream.h" #include "xalloc.h" #include "relocatable.h" -#include "pathname.h" +#include "filename.h" /* Whether to output a test page. */ @@ -404,7 +404,7 @@ style_file_prepare () gettextdatadir = relocate (GETTEXTDATADIR); style_file_name = - concatenated_pathname (gettextdatadir, "styles/po-default.css", + concatenated_filename (gettextdatadir, "styles/po-default.css", NULL); } } diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index de30d9434..248a4497b 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 "xallocsa.h" -#include "pathname.h" +#include "filename.h" #include "xerror.h" #include "xvasprintf.h" #include "msgl-english.h" @@ -818,7 +818,7 @@ project_id () if (gettextlibdir == NULL || gettextlibdir[0] == '\0') gettextlibdir = relocate (LIBDIR "/gettext"); - prog = concatenated_pathname (gettextlibdir, "project-id", NULL); + prog = concatenated_filename (gettextlibdir, "project-id", NULL); /* Call the project-id shell script. */ argv[0] = "/bin/sh"; @@ -885,7 +885,7 @@ project_id_version () if (gettextlibdir == NULL || gettextlibdir[0] == '\0') gettextlibdir = relocate (LIBDIR "/gettext"); - prog = concatenated_pathname (gettextlibdir, "project-id", NULL); + prog = concatenated_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 1d83826d7..441eac750 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-2006 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2000-2003, 2005-2007 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ #include #include "dir-list.h" -#include "pathname.h" +#include "filename.h" #include "xalloc.h" #include "xvasprintf.h" #include "po-xerror.h" @@ -63,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_pathname ("", input_name, extension[k]); + file_name = concatenated_filename ("", input_name, extension[k]); ret_val = fopen (file_name, "r"); if (ret_val != NULL || errno != ENOENT) @@ -84,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_pathname (dir, input_name, extension[k]); + file_name = concatenated_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 7bc4dd255..61a912d66 100644 --- a/gettext-tools/src/read-csharp.c +++ b/gettext-tools/src/read-csharp.c @@ -36,7 +36,7 @@ #include "read-catalog.h" #include "read-po.h" #include "xalloc.h" -#include "pathname.h" +#include "filename.h" #include "error.h" #include "gettext.h" @@ -151,7 +151,7 @@ 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_pathname (gettextexedir, "msgunfmt.net", ".exe"); + assembly_path = concatenated_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 a2c03abb9..002d699c4 100644 --- a/gettext-tools/src/read-resources.c +++ b/gettext-tools/src/read-resources.c @@ -36,7 +36,7 @@ #include "read-catalog.h" #include "read-po.h" #include "message.h" -#include "pathname.h" +#include "filename.h" #include "error.h" #include "gettext.h" @@ -115,7 +115,7 @@ read_resources_file (message_list_ty *mlp, const char *filename) gettextlibdir = relocate (LIBDIR); /* Dump the resource and retrieve the resulting output. */ - assembly_path = concatenated_pathname (gettextexedir, "msgunfmt.net", ".exe"); + assembly_path = concatenated_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 b1e271a14..f98a3e06e 100644 --- a/gettext-tools/src/read-tcl.c +++ b/gettext-tools/src/read-tcl.c @@ -30,7 +30,7 @@ #include "msgunfmt.h" #include "relocatable.h" -#include "pathname.h" +#include "filename.h" #include "sh-quote.h" #include "pipe.h" #include "wait-process.h" @@ -70,7 +70,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory) if (gettextdatadir == NULL || gettextdatadir[0] == '\0') gettextdatadir = relocate (GETTEXTDATADIR); - tclscript = concatenated_pathname (gettextdatadir, "msgunfmt.tcl", NULL); + tclscript = concatenated_filename (gettextdatadir, "msgunfmt.tcl", NULL); /* Convert the locale name to lowercase and remove any encoding. */ len = strlen (locale_name); @@ -85,7 +85,7 @@ msgdomain_read_tcl (const char *locale_name, const char *directory) break; } - file_name = concatenated_pathname (directory, frobbed_locale_name, ".msg"); + file_name = concatenated_filename (directory, frobbed_locale_name, ".msg"); freesa (frobbed_locale_name); diff --git a/gettext-tools/src/write-csharp.c b/gettext-tools/src/write-csharp.c index 45e00c5bb..efd7750b7 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-2006 Free Software Foundation, Inc. + Copyright (C) 2003-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -89,7 +89,7 @@ #include "plural-exp.h" #include "po-charset.h" #include "xalloc.h" -#include "pathname.h" +#include "filename.h" #include "fwriteerror.h" #include "clean-temp.h" #include "utf8-ucs4.h" @@ -673,7 +673,7 @@ but the C# .dll format doesn't support contexts\n"))); /* Compute the output file name. This code must be kept consistent with intl.cs, function GetSatelliteAssembly(). */ { - char *output_dir = concatenated_pathname (directory, culture_name, NULL); + char *output_dir = concatenated_filename (directory, culture_name, NULL); struct stat statbuf; /* Try to create the output directory if it does not yet exist. */ @@ -688,7 +688,7 @@ but the C# .dll format doesn't support contexts\n"))); } output_file = - concatenated_pathname (output_dir, resource_name, ".resources.dll"); + concatenated_filename (output_dir, resource_name, ".resources.dll"); free (output_dir); } @@ -711,7 +711,7 @@ but the C# .dll format doesn't support contexts\n"))); /* 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_pathname (tmpdir->dir_name, "resset.cs", NULL); + concatenated_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 2f3af2549..9e26e45a5 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-2006 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -73,7 +73,7 @@ #include "po-charset.h" #include "xalloc.h" #include "xallocsa.h" -#include "pathname.h" +#include "filename.h" #include "fwriteerror.h" #include "clean-temp.h" #include "utf8-ucs4.h" @@ -965,7 +965,7 @@ but the Java ResourceBundle format doesn't support contexts\n"))); char *part = (char *) xallocsa (n + 1); memcpy (part, p, n); part[n] = '\0'; - subdirs[i] = concatenated_pathname (last_dir, part, NULL); + subdirs[i] = concatenated_filename (last_dir, part, NULL); freesa (part); last_dir = subdirs[i]; p = q + 1; @@ -974,11 +974,11 @@ but the Java ResourceBundle format doesn't support contexts\n"))); if (locale_name != NULL) { char *suffix = xasprintf ("_%s.java", locale_name); - java_file_name = concatenated_pathname (last_dir, p, suffix); + java_file_name = concatenated_filename (last_dir, p, suffix); free (suffix); } else - java_file_name = concatenated_pathname (last_dir, p, ".java"); + java_file_name = concatenated_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 0e999046b..b40ca217f 100644 --- a/gettext-tools/src/write-resources.c +++ b/gettext-tools/src/write-resources.c @@ -40,7 +40,7 @@ #include "msgl-iconv.h" #include "po-charset.h" #include "xalloc.h" -#include "pathname.h" +#include "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_pathname (gettextexedir, "msgfmt.net", ".exe"); + concatenated_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 7371e7d53..7367db829 100644 --- a/gettext-tools/src/write-tcl.c +++ b/gettext-tools/src/write-tcl.c @@ -37,7 +37,7 @@ #include "po-charset.h" #include "xalloc.h" #include "xallocsa.h" -#include "pathname.h" +#include "filename.h" #include "fwriteerror.h" #include "utf8-ucs4.h" #include "gettext.h" @@ -205,7 +205,7 @@ but the Tcl message catalog format doesn't support plural handling\n"))); break; } - file_name = concatenated_pathname (directory, frobbed_locale_name, ".msg"); + file_name = concatenated_filename (directory, frobbed_locale_name, ".msg"); output_file = fopen (file_name, "w"); if (output_file == NULL) diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index 482fb5189..a3e77c1d8 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -49,7 +49,7 @@ #include "xallocsa.h" #include "c-strstr.h" #include "xerror.h" -#include "pathname.h" +#include "filename.h" #include "c-strcase.h" #include "open-catalog.h" #include "read-catalog-abstract.h" @@ -575,12 +575,12 @@ xgettext cannot work without keywords to look for")); file_name = xstrdup (output_file); else /* Please do NOT add a .po suffix! */ - file_name = concatenated_pathname (output_dir, output_file, NULL); + file_name = concatenated_filename (output_dir, output_file, NULL); } else if (strcmp (default_domain, "-") == 0) file_name = "-"; else - file_name = concatenated_pathname (output_dir, default_domain, ".po"); + file_name = concatenated_filename (output_dir, default_domain, ".po"); /* Determine list of files we have to process. */ if (files_from != NULL) @@ -1759,7 +1759,7 @@ error while opening \"%s\" for reading"), fn); error (EXIT_FAILURE, ENOENT, _("\ error while opening \"%s\" for reading"), fn); - new_name = concatenated_pathname (dir, fn, NULL); + new_name = concatenated_filename (dir, fn, NULL); fp = fopen (new_name, "r"); if (fp != NULL) -- 2.47.3