1170754Sdelphij/*  Take file names apart into directory and base names.
2170754Sdelphij
3170754Sdelphij    Copyright (C) 1998, 2001, 2003 Free Software Foundation, Inc.
4170754Sdelphij
5170754Sdelphij    This program is free software; you can redistribute it and/or modify
6170754Sdelphij    it under the terms of the GNU General Public License as published by
7170754Sdelphij    the Free Software Foundation; either version 2, or (at your option)
8170754Sdelphij    any later version.
9170754Sdelphij
10170754Sdelphij    This program is distributed in the hope that it will be useful,
11170754Sdelphij    but WITHOUT ANY WARRANTY; without even the implied warranty of
12170754Sdelphij    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13170754Sdelphij    GNU General Public License for more details.
14170754Sdelphij
15170754Sdelphij    You should have received a copy of the GNU General Public License
16170754Sdelphij    along with this program; if not, write to the Free Software Foundation,
17170754Sdelphij    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
18170754Sdelphij
19170754Sdelphij#ifndef DIRNAME_H_
20170754Sdelphij# define DIRNAME_H_ 1
21170754Sdelphij
22170754Sdelphij# include <stddef.h>
23170754Sdelphij
24170754Sdelphij# ifndef DIRECTORY_SEPARATOR
25170754Sdelphij#  define DIRECTORY_SEPARATOR '/'
26170754Sdelphij# endif
27170754Sdelphij
28170754Sdelphij# ifndef ISSLASH
29170754Sdelphij#  define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
30170754Sdelphij# endif
31170754Sdelphij
32170754Sdelphij# ifndef FILESYSTEM_PREFIX_LEN
33170754Sdelphij#  define FILESYSTEM_PREFIX_LEN(Filename) 0
34170754Sdelphij# endif
35170754Sdelphij
36170754Sdelphijchar *base_name (char const *path);
37170754Sdelphijchar *dir_name (char const *path);
38170754Sdelphijsize_t base_len (char const *path);
39170754Sdelphijsize_t dir_len (char const *path);
40170754Sdelphij
41170754Sdelphijint strip_trailing_slashes (char *path);
42170754Sdelphij
43170754Sdelphij#endif /* not DIRNAME_H_ */
44