Changeset 10 for python/trunk/Include/osdefs.h
- Timestamp:
- Sep 3, 2010, 5:33:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Include/osdefs.h
r2 r10 20 20 #define MAXPATHLEN 256 21 21 #endif 22 #define DRVSEP ':' /* (bird) */ 22 23 #define DELIM ';' 23 24 #endif … … 34 35 #ifndef SEP 35 36 #define SEP '/' 37 #endif 38 39 /* Test if `ch' is a filename separator (bird) */ 40 #ifdef ALTSEP 41 #define IS_SEP(ch) ((ch) == SEP || (ch) == ALTSEP) 42 #else 43 #define IS_SEP(ch) ((ch) == SEP) 44 #endif 45 46 /* Test if `path' has a drive letter or not. (bird) */ 47 #ifdef DRVSEP 48 #define HAS_DRV(path) (*(path) && (path)[1] == DRVSEP) 49 #else 50 #define HAS_DRV(path) 0 51 #endif 52 53 /* Test if `path' is absolute or not. (bird) */ 54 #ifdef DRVSEP 55 #define IS_ABSPATH(path) (IS_SEP((path)[0]) || HAS_DRV(path)) 56 #else 57 #define IS_ABSPATH(path) (IS_SEP((path)[0])) 58 #endif 59 60 /* Test if `path' contains any of the path separators including drive letter. (bird) */ 61 #ifdef ALTSEP 62 #define HAS_ANYSEP(path) ( strchr((path), SEP) || strchr((path), ALTSEP) || HAS_DRV(path) ) 63 #else 64 #define HAS_ANYSEP(path) ( strchr((path), SEP) || HAS_DRV(path) ) 36 65 #endif 37 66
Note:
See TracChangeset
for help on using the changeset viewer.