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