190792Sgshapiro/*
2261194Sgshapiro * Copyright (c) 2000-2001 Proofpoint, Inc. and its suppliers.
390792Sgshapiro *	All rights reserved.
490792Sgshapiro *
590792Sgshapiro * By using this file, you agree to the terms and conditions set
690792Sgshapiro * forth in the LICENSE file which can be found at the top level of
790792Sgshapiro * the sendmail distribution.
890792Sgshapiro *
9266527Sgshapiro *	$Id: path.h,v 1.7 2013-11-22 20:51:31 ca Exp $
1090792Sgshapiro */
1190792Sgshapiro
1290792Sgshapiro/*
1390792Sgshapiro**  Portable names for standard filesystem paths
1490792Sgshapiro**  and macros for directories.
1590792Sgshapiro*/
1690792Sgshapiro
1790792Sgshapiro#ifndef SM_PATH_H
1890792Sgshapiro# define SM_PATH_H
1990792Sgshapiro
2090792Sgshapiro# include <sm/gen.h>
2190792Sgshapiro
2290792Sgshapiro#  define SM_PATH_DEVNULL	"/dev/null"
2390792Sgshapiro#  define SM_IS_DIR_DELIM(c)	((c) == '/')
2490792Sgshapiro#  define SM_FIRST_DIR_DELIM(s)	strchr(s, '/')
2590792Sgshapiro#  define SM_LAST_DIR_DELIM(s)	strrchr(s, '/')
2690792Sgshapiro
2790792Sgshapiro/* Warning: this must be accessible as array */
2890792Sgshapiro#  define SM_IS_DIR_START(s)	((s)[0] == '/')
2990792Sgshapiro
3090792Sgshapiro#  define sm_path_isdevnull(path)	(strcmp(path, "/dev/null") == 0)
3190792Sgshapiro
3290792Sgshapiro#endif /* ! SM_PATH_H */
33