summaryrefslogtreecommitdiff
path: root/lib/dirname.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-07-05 18:06:13 +0200
committerBruno Haible <bruno@clisp.org>2020-07-05 20:01:02 +0200
commitb32e203eee9c9259996310b6bcf55a13b102348a (patch)
treee11bd40c81768363c638e3237713ee57629e304d /lib/dirname.h
parentdc4b3181b30ece859f68902610f2ce0c613e85d1 (diff)
downloadgnulib-b32e203eee9c9259996310b6bcf55a13b102348a.tar.gz
basename-lgpl: New module.
* lib/basename-lgpl.h: New file, based on lib/dirname.h and lib/basename-lgpl.c. * lib/basename-lgpl.c: Include basename-lgpl.h, not dirname.h. Include <stdbool.h>, filename.h. (last_component): Rename a local variable. * lib/dirname.h: Include basename-lgpl.h. (DOUBLE_SLASH_IS_DISTINCT_ROOT): Remove macro. (last_component, base_len): Remove declarations. * modules/basename-lgpl: New file. * modules/dirname-lgpl (Files): Remove lib/basename-lgpl.c. (Depends-on): Add basename-lgpl. Remove double-slash-root. (Makefile.am): Don't compile basename-lgpl.c. * doc/posix-functions/basename.texi: Mention the module 'basename-lgpl', not 'dirname'.
Diffstat (limited to 'lib/dirname.h')
-rw-r--r--lib/dirname.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/dirname.h b/lib/dirname.h
index 5379e8e3d2..b2a91fd535 100644
--- a/lib/dirname.h
+++ b/lib/dirname.h
@@ -22,15 +22,12 @@
# include <stdbool.h>
# include <stddef.h>
# include "filename.h"
+# include "basename-lgpl.h"
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
# endif
-# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
-# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
-# endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -41,9 +38,7 @@ char *dir_name (char const *file);
# endif
char *mdir_name (char const *file);
-size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
-char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
bool strip_trailing_slashes (char *file);