-/* 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)
+/* 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).
+ WARNING: This function doesn't work for cwd-relative names like
+ `a:foo' that are specified with a drive-letter prefix. That case
+ is handled in the caller. */
+static size_t
+dir_name_r (char const *path, char const **result)