Mercurial > hg > octave-nkf > gnulib-hg
changeset 8251:1e16373508e1
Rename module 'pathname' to 'filename'.
Rename concatenated_pathname to concatenated_filename.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 25 Feb 2007 15:31:15 +0000 |
parents | 3bce4e517b6b |
children | 2b8747d9d9dd |
files | ChangeLog MODULES.html.sh lib/concat-filename.c lib/filename.h lib/findprog.c lib/javacomp.c lib/javaexec.c modules/filename modules/findprog modules/javacomp modules/javaexec |
diffstat | 11 files changed, 88 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2007-02-25 Bruno Haible <bruno@clisp.org> + + * modules/filename: Renamed from modules/pathname. + (Files): Replace lib/pathname.h with lib/filename.h. Replace + lib/concatpath.c with lib/concat-filename.c. + (Makefile.am): Update. + (Include): Replace pathname.h with filename.h. + * lib/filename.h: Renamed from lib/pathname.h. + (concatenated_filename): Renamed from concatenated_pathname. + * lib/concat-filename.c: Renamed from lib/concatpath.c. + (concatenated_filename): Renamed from concatenated_pathname. + * lib/findprog.c: Include filename.h instead of pathname.h. + (find_in_path): Update. + * lib/javacomp.c: Include filename.h instead of pathname.h. + (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable, + is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable, + is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable, + is_oldgcj_14_13_usable, is_javac_usable): Update. + * lib/javaexec.c: Include filename.h instead of pathname.h. + (execute_java_class): Update. + * modules/findprog: Update. + * modules/javacomp: Update. + * modules/javaexec: Update. + * MODULES.html.sh (File system functions): Add 'filename', remove + 'pathname'. + 2007-02-25 Bruno Haible <bruno@clisp.org> * modules/printf-frexpl-tests: New file.
--- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2050,6 +2050,7 @@ func_module file-type func_module fileblocks func_module filemode + func_module filename func_module filenamecat func_module fts func_module fts-lgpl @@ -2061,7 +2062,6 @@ func_module modechange func_module mountlist func_module openat - func_module pathname func_module pathmax func_module same func_module save-cwd
--- a/lib/concat-filename.c +++ b/lib/concat-filename.c @@ -1,5 +1,5 @@ /* Construct a full pathname from a directory and a filename. - Copyright (C) 2001-2004, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007 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 @@ -21,18 +21,18 @@ #include <config.h> /* Specification. */ -#include "pathname.h" +#include "filename.h" #include <string.h> #include "xalloc.h" -/* Concatenate a directory pathname, a relative pathname and an optional +/* Concatenate a directory filename, a relative filename and an optional suffix. The directory may end with the directory separator. The second argument may not start with the directory separator (it is relative). - Return a freshly allocated pathname. */ + Return a freshly allocated filename. */ char * -concatenated_pathname (const char *directory, const char *filename, +concatenated_filename (const char *directory, const char *filename, const char *suffix) { char *result;
--- a/lib/filename.h +++ b/lib/filename.h @@ -1,5 +1,5 @@ /* Pathname support. - Copyright (C) 2001-2004 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2007 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 @@ -15,8 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef _PATHNAME_H -#define _PATHNAME_H +#ifndef _FILENAME_H +#define _FILENAME_H #ifdef __cplusplus extern "C" { @@ -47,13 +47,13 @@ # define FILE_SYSTEM_PREFIX_LEN(P) 0 #endif -/* Concatenate a directory pathname, a relative pathname and an optional - suffix. Return a freshly allocated pathname. */ -extern char *concatenated_pathname (const char *directory, +/* Concatenate a directory filename, a relative filename and an optional + suffix. Return a freshly allocated filename. */ +extern char *concatenated_filename (const char *directory, const char *filename, const char *suffix); #ifdef __cplusplus } #endif -#endif /* _PATHNAME_H */ +#endif /* _FILENAME_H */
--- a/lib/findprog.c +++ b/lib/findprog.c @@ -1,5 +1,5 @@ /* Locating a program in PATH. - Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2006-2007 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 @@ -28,7 +28,7 @@ #include <unistd.h> #include "xalloc.h" -#include "pathname.h" +#include "filename.h" const char * @@ -76,7 +76,7 @@ dir = "."; /* Concatenate dir and progname. */ - progpathname = concatenated_pathname (dir, progname, NULL); + progpathname = concatenated_filename (dir, progname, NULL); /* On systems which have the eaccess() system call, let's use it. On other systems, let's hope that this program is not installed @@ -89,7 +89,7 @@ { free (progpathname); - /* Add the "./" prefix for real, that concatenated_pathname() + /* Add the "./" prefix for real, that concatenated_filename() optimized away. This avoids a second PATH search when the caller uses execlp/execvp. */ progpathname = XNMALLOC (2 + strlen (progname) + 1, char);
--- a/lib/javacomp.c +++ b/lib/javacomp.c @@ -43,7 +43,7 @@ #include "xalloc.h" #include "xallocsa.h" #include "getline.h" -#include "pathname.h" +#include "filename.h" #include "fwriteerror.h" #include "clean-temp.h" #include "error.h" @@ -741,7 +741,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet (source_version))) { @@ -751,7 +751,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -785,7 +785,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, failcode)) @@ -797,7 +797,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -890,7 +890,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet ("1.4"))) { @@ -900,7 +900,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -927,7 +927,7 @@ Return a failure indicator (true upon error). */ static bool is_envjavac_oldgcj_14_13_usable (const char *javac, - bool *usablep, bool *need_no_assert_option_p) + bool *usablep, bool *need_no_assert_option_p) { static bool envjavac_tested; static bool envjavac_usable; @@ -951,7 +951,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet ("1.3"))) { @@ -961,7 +961,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -994,7 +994,7 @@ if (javac_works && javac_noassert_works) { conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftestfail.java", + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_failcode_snippet ("1.3"))) @@ -1006,7 +1006,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftestfail.class", + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1091,7 +1091,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet (source_version))) { @@ -1101,7 +1101,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -1135,7 +1135,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, failcode)) @@ -1147,7 +1147,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1219,7 +1219,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, @@ -1233,7 +1233,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1387,7 +1387,7 @@ char *conftest_file_name; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftestlib.java", + concatenated_filename (tmpdir->dir_name, "conftestlib.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, "public class conftestlib {\n" @@ -1401,7 +1401,7 @@ const char *java_sources[1]; compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestlib.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1531,7 +1531,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet (source_version))) { @@ -1541,7 +1541,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -1571,7 +1571,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, failcode)) @@ -1582,7 +1582,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1670,7 +1670,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet ("1.4"))) { @@ -1680,7 +1680,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -1727,7 +1727,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet ("1.3"))) { @@ -1737,7 +1737,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -1835,7 +1835,7 @@ return true; conftest_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.java", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, get_goodcode_snippet (source_version))) { @@ -1845,7 +1845,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, "conftest.class", NULL); + concatenated_filename (tmpdir->dir_name, "conftest.class", NULL); register_temp_file (tmpdir, compiled_file_name); java_sources[0] = conftest_file_name; @@ -1878,7 +1878,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, failcode)) @@ -1889,7 +1889,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name); @@ -1959,7 +1959,7 @@ free (conftest_file_name); conftest_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.java", NULL); if (write_temp_file (tmpdir, conftest_file_name, @@ -1971,7 +1971,7 @@ } compiled_file_name = - concatenated_pathname (tmpdir->dir_name, + concatenated_filename (tmpdir->dir_name, "conftestfail.class", NULL); register_temp_file (tmpdir, compiled_file_name);
--- a/lib/javaexec.c +++ b/lib/javaexec.c @@ -1,5 +1,5 @@ /* Execute a Java program. - Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2006-2007 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 @@ -30,7 +30,7 @@ #include "classpath.h" #include "xsetenv.h" #include "sh-quote.h" -#include "pathname.h" +#include "filename.h" #include "xalloc.h" #include "xallocsa.h" #include "error.h" @@ -95,7 +95,7 @@ /* First, try a class compiled to a native code executable. */ if (exe_dir != NULL) { - char *exe_pathname = concatenated_pathname (exe_dir, class_name, EXEEXT); + char *exe_pathname = concatenated_filename (exe_dir, class_name, EXEEXT); char *old_classpath; char **argv = (char **) xallocsa ((1 + nargs + 1) * sizeof (char *)); unsigned int i;
--- a/modules/filename +++ b/modules/filename @@ -1,10 +1,10 @@ Description: -Construct a full pathname by concatenating a directory name, a relative +Construct a full filename by concatenating a directory name, a relative filename, and a suffix. Files: -lib/pathname.h -lib/concatpath.c +lib/filename.h +lib/concat-filename.c Depends-on: xalloc @@ -13,10 +13,10 @@ configure.ac: Makefile.am: -lib_SOURCES += pathname.h concatpath.c +lib_SOURCES += concat-filename.c Include: -"pathname.h" +"filename.h" License: GPL
--- a/modules/findprog +++ b/modules/findprog @@ -10,7 +10,7 @@ Depends-on: stdbool xalloc -pathname +filename unistd configure.ac: