1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 3*7c478bd9Sstevel@tonic-gate * All rights reserved. 4*7c478bd9Sstevel@tonic-gate * 5*7c478bd9Sstevel@tonic-gate * By using this file, you agree to the terms and conditions set 6*7c478bd9Sstevel@tonic-gate * forth in the LICENSE file which can be found at the top level of 7*7c478bd9Sstevel@tonic-gate * the sendmail distribution. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * $Id: path.h,v 1.6 2001/04/03 01:53:00 gshapiro Exp $ 10*7c478bd9Sstevel@tonic-gate */ 11*7c478bd9Sstevel@tonic-gate 12*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 13*7c478bd9Sstevel@tonic-gate 14*7c478bd9Sstevel@tonic-gate /* 15*7c478bd9Sstevel@tonic-gate ** Portable names for standard filesystem paths 16*7c478bd9Sstevel@tonic-gate ** and macros for directories. 17*7c478bd9Sstevel@tonic-gate */ 18*7c478bd9Sstevel@tonic-gate 19*7c478bd9Sstevel@tonic-gate #ifndef SM_PATH_H 20*7c478bd9Sstevel@tonic-gate # define SM_PATH_H 21*7c478bd9Sstevel@tonic-gate 22*7c478bd9Sstevel@tonic-gate # include <sm/gen.h> 23*7c478bd9Sstevel@tonic-gate 24*7c478bd9Sstevel@tonic-gate # define SM_PATH_DEVNULL "/dev/null" 25*7c478bd9Sstevel@tonic-gate # define SM_IS_DIR_DELIM(c) ((c) == '/') 26*7c478bd9Sstevel@tonic-gate # define SM_FIRST_DIR_DELIM(s) strchr(s, '/') 27*7c478bd9Sstevel@tonic-gate # define SM_LAST_DIR_DELIM(s) strrchr(s, '/') 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate /* Warning: this must be accessible as array */ 30*7c478bd9Sstevel@tonic-gate # define SM_IS_DIR_START(s) ((s)[0] == '/') 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate # define sm_path_isdevnull(path) (strcmp(path, "/dev/null") == 0) 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #endif /* ! SM_PATH_H */ 35