X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fdirname.c;h=8651174cada8f627707ecc221d9b4364b2d9d845;hb=911955d8c72adfdba2d2ff7bb3d727e0f18a559e;hp=eddbe97a2b6eecb657af049218c4f6d9347df77c;hpb=522bc28b315887298fdf24b9cc1a6e17ab221577;p=gnulib.git diff --git a/lib/dirname.c b/lib/dirname.c index eddbe97a2..8651174ca 100644 --- a/lib/dirname.c +++ b/lib/dirname.c @@ -49,8 +49,10 @@ void *memrchr (); #define BACKSLASH_IS_PATH_SEPARATOR ISSLASH ('\\') -/* Return the length of the directory part of PATH. - Set *RESULT to point to PATH or to `"."', as appropriate. */ +/* Return the length of `dirname (PATH)' and set *RESULT + to point to PATH or to `"."', as appropriate. + Works properly even if there are trailing slashes + (by effectively ignoring them). */ size_t dir_name_r (const char *path, const char **result) {