|
Packit Service |
a2ae7a |
/* Take file names apart into directory and base names.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
Copyright (C) 1998, 2001, 2003-2006, 2009-2019 Free Software Foundation,
|
|
Packit Service |
a2ae7a |
Inc.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
This program is free software: you can redistribute it and/or modify
|
|
Packit Service |
a2ae7a |
it under the terms of the GNU Lesser General Public License as published by
|
|
Packit Service |
a2ae7a |
the Free Software Foundation; either version 2.1 of the License, or
|
|
Packit Service |
a2ae7a |
(at your option) any later version.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
This program is distributed in the hope that it will be useful,
|
|
Packit Service |
a2ae7a |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
a2ae7a |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
a2ae7a |
GNU Lesser General Public License for more details.
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
a2ae7a |
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
#ifndef DIRNAME_H_
|
|
Packit Service |
a2ae7a |
# define DIRNAME_H_ 1
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# include <stdbool.h>
|
|
Packit Service |
a2ae7a |
# include <stddef.h>
|
|
Packit Service |
a2ae7a |
# include "dosname.h"
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# ifndef DIRECTORY_SEPARATOR
|
|
Packit Service |
a2ae7a |
# define DIRECTORY_SEPARATOR '/'
|
|
Packit Service |
a2ae7a |
# endif
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
|
|
Packit Service |
a2ae7a |
# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
|
|
Packit Service |
a2ae7a |
# endif
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
#ifdef __cplusplus
|
|
Packit Service |
a2ae7a |
extern "C" {
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
# if GNULIB_DIRNAME
|
|
Packit Service |
a2ae7a |
char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC;
|
|
Packit Service |
a2ae7a |
char *dir_name (char const *file);
|
|
Packit Service |
a2ae7a |
# endif
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
char *mdir_name (char const *file);
|
|
Packit Service |
a2ae7a |
size_t base_len (char const *file) _GL_ATTRIBUTE_PURE;
|
|
Packit Service |
a2ae7a |
size_t dir_len (char const *file) _GL_ATTRIBUTE_PURE;
|
|
Packit Service |
a2ae7a |
char *last_component (char const *file) _GL_ATTRIBUTE_PURE;
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
bool strip_trailing_slashes (char *file);
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
#ifdef __cplusplus
|
|
Packit Service |
a2ae7a |
} /* extern "C" */
|
|
Packit Service |
a2ae7a |
#endif
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
#endif /* not DIRNAME_H_ */
|