projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
futimens: fix configure check
[gnulib.git]
/
lib
/
dirname.h
diff --git
a/lib/dirname.h
b/lib/dirname.h
index
90a1f0c
..
fb19508
100644
(file)
--- a/
lib/dirname.h
+++ b/
lib/dirname.h
@@
-1,6
+1,7
@@
/* Take file names apart into directory and base names.
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2010 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
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
@@
-34,9
+35,9
@@
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
/* This internal macro assumes ASCII, but all hosts that support drive
letters use ASCII. */
# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
- <= 'z' - 'a')
+
<= 'z' - 'a')
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
# define FILE_SYSTEM_PREFIX_LEN(Filename) \
- (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
+
(_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
# else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# endif
# else
# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
# endif
@@
-54,13
+55,16
@@
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
# else
# define IS_ABSOLUTE_FILE_NAME(F) \
- (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
+
(ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
# endif
# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
# endif
# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+# if GNULIB_DIRNAME
char *base_name (char const *file);
char *base_name (char const *file);
-char *mdir_name (char const *file);
char *dir_name (char const *file);
char *dir_name (char const *file);
+# endif
+
+char *mdir_name (char const *file);
size_t base_len (char const *file);
size_t dir_len (char const *file);
char *last_component (char const *file);
size_t base_len (char const *file);
size_t dir_len (char const *file);
char *last_component (char const *file);