+2004-08-08 Bruno Haible <bruno@clisp.org>
+
+ * pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
+ FILESYSTEM_PREFIX_LEN.
+ * progreloc.c: Likewise.
+ * concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
+
2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
Merge from tar.
/* Construct a full pathname from a directory and a filename.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004 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
{
size_t directory_len = strlen (directory);
int need_slash =
- (directory_len > FILESYSTEM_PREFIX_LEN (directory)
+ (directory_len > FILE_SYSTEM_PREFIX_LEN (directory)
&& !ISSLASH (directory[directory_len - 1]));
result = (char *) xmalloc (directory_len + need_slash
+ strlen (filename)
# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
# define IS_PATH_WITH_DIR(P) \
(strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
#else
/* Unix */
# define ISSLASH(C) ((C) == '/')
# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-# define FILESYSTEM_PREFIX_LEN(P) 0
+# define FILE_SYSTEM_PREFIX_LEN(P) 0
#endif
/* Concatenate a directory pathname, a relative pathname and an optional
/* Provide relocatable programs.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify it
&& (P)[1] == ':')
# define IS_PATH_WITH_DIR(P) \
(strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+# define FILE_SYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
#else
/* Unix */
# define ISSLASH(C) ((C) == '/')
# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-# define FILESYSTEM_PREFIX_LEN(P) 0
+# define FILE_SYSTEM_PREFIX_LEN(P) 0
#endif
#undef set_program_name