Blame gnulib/lib/dirname.h

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