X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdirname.h;h=fb19508f751f384dc5fe9365e0f69b17042d7a48;hb=d913c90f6a01f889db65cbb516683aab2f28c533;hp=90a1f0c2c1220e0faebe8ce599e631e59b920998;hpb=c6dc1761b3e928d2de0a6116cd933b3147ffd7d8;p=gnulib.git diff --git a/lib/dirname.h b/lib/dirname.h index 90a1f0c2c..fb19508f7 100644 --- a/lib/dirname.h +++ b/lib/dirname.h @@ -1,6 +1,7 @@ /* 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 @@ -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,13 +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 *mdir_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);