diff options
Diffstat (limited to 'gl/dirname.h')
-rw-r--r-- | gl/dirname.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gl/dirname.h b/gl/dirname.h index f592350b..fb19508f 100644 --- a/gl/dirname.h +++ b/gl/dirname.h @@ -1,6 +1,7 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006 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 @@ -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' \ - <= 'z' - 'a') + <= 'z' - 'a') # 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 @@ -54,12 +55,16 @@ # 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)) +# if GNULIB_DIRNAME char *base_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); |