112657Skvn/*
212657Skvn * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
312657Skvn *	All rights reserved.
412657Skvn *
512657Skvn * By using this file, you agree to the terms and conditions set
612657Skvn * forth in the LICENSE file which can be found at the top level of
712657Skvn * the sendmail distribution.
812657Skvn *
912657Skvn *	$Id: path.h,v 1.7 2013-11-22 20:51:31 ca Exp $
1012657Skvn */
1112657Skvn
1212657Skvn/*
1312657Skvn**  Portable names for standard filesystem paths
1412657Skvn**  and macros for directories.
1512657Skvn*/
1612657Skvn
1712657Skvn#ifndef SM_PATH_H
1812657Skvn# define SM_PATH_H
1912657Skvn
2012657Skvn# include <sm/gen.h>
2112657Skvn
2212657Skvn#  define SM_PATH_DEVNULL	"/dev/null"
2312657Skvn#  define SM_IS_DIR_DELIM(c)	((c) == '/')
2412657Skvn#  define SM_FIRST_DIR_DELIM(s)	strchr(s, '/')
2512657Skvn#  define SM_LAST_DIR_DELIM(s)	strrchr(s, '/')
2612657Skvn
2712657Skvn/* Warning: this must be accessible as array */
2812657Skvn#  define SM_IS_DIR_START(s)	((s)[0] == '/')
2912657Skvn
3012657Skvn#  define sm_path_isdevnull(path)	(strcmp(path, "/dev/null") == 0)
3112657Skvn
3212657Skvn#endif /* ! SM_PATH_H */
3312657Skvn