changeset 5164:773a21466082

Rename FILESYSTEM_PREFIX_LEN.
author Bruno Haible <bruno@clisp.org>
date Sun, 08 Aug 2004 16:53:10 +0000
parents b8139e37c5bd
children 9d7fe6ace357
files lib/ChangeLog lib/concatpath.c lib/pathname.h lib/progreloc.c
diffstat 4 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,10 @@
+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.
--- a/lib/concatpath.c
+++ b/lib/concatpath.c
@@ -1,5 +1,5 @@
 /* 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
@@ -53,7 +53,7 @@
     {
       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)
--- a/lib/pathname.h
+++ b/lib/pathname.h
@@ -38,13 +38,13 @@
 # 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
--- a/lib/progreloc.c
+++ b/lib/progreloc.c
@@ -1,5 +1,5 @@
 /* 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
@@ -67,12 +67,12 @@
      && (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