summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-13 22:34:23 (GMT)
commit08359be858ae9e4595dab1f4a7718017d9af7663 (patch)
treebbe033fd134cfda5943dff96ef2a7f5f10d743e9 /src/H5private.h
parent55822485c64197a6c2c4a623824fcdcd10a57d31 (diff)
downloadhdf5-08359be858ae9e4595dab1f4a7718017d9af7663.zip
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.gz
hdf5-08359be858ae9e4595dab1f4a7718017d9af7663.tar.bz2
[svn-r23347] ported revision 23248:23346 from the trunk
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 3bc8722..f1f5dbb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1473,19 +1473,20 @@ extern char *strdup(const char *s);
#if defined(H5_HAVE_WINDOW_PATH)
/* directory delimiter for Windows: slash and backslash are acceptable on Windows */
-#define DIR_SLASH_SEPC '/'
-#define DIR_SEPC '\\'
-#define DIR_SEPS "\\"
-#define CHECK_DELIMITER(SS) ((SS == DIR_SEPC)||(SS == DIR_SLASH_SEPC))
-#define CHECK_ABSOLUTE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':') && (CHECK_DELIMITER(NAME[2])))
-#define CHECK_ABS_DRIVE(NAME) ((isalpha(NAME[0])) && (NAME[1] == ':'))
-#define CHECK_ABS_PATH(NAME) (CHECK_DELIMITER(NAME[0]))
-
-#define GET_LAST_DELIMITER(NAME, ptr) { \
+#define H5_DIR_SLASH_SEPC '/'
+#define H5_DIR_SEPC '\\'
+#define H5_DIR_SEPS "\\"
+#define H5_CHECK_DELIMITER(SS) ((SS == H5_DIR_SEPC) || (SS == H5_DIR_SLASH_SEPC))
+#define H5_CHECK_ABSOLUTE(NAME) ((HDisalpha(NAME[0])) && (NAME[1] == ':') && (H5_CHECK_DELIMITER(NAME[2])))
+#define H5_CHECK_ABS_DRIVE(NAME) ((HDisalpha(NAME[0])) && (NAME[1] == ':'))
+#define H5_CHECK_ABS_PATH(NAME) (H5_CHECK_DELIMITER(NAME[0]))
+
+#define H5_GET_LAST_DELIMITER(NAME, ptr) { \
char *slash, *backslash; \
- slash = strrchr(NAME, DIR_SLASH_SEPC); \
- backslash = strrchr(NAME, DIR_SEPC); \
- if (backslash > slash) \
+ \
+ slash = HDstrrchr(NAME, H5_DIR_SLASH_SEPC); \
+ backslash = HDstrrchr(NAME, H5_DIR_SEPC); \
+ if(backslash > slash) \
(ptr = backslash); \
else \
(ptr = slash); \
@@ -1495,27 +1496,27 @@ extern char *strdup(const char *s);
/* OpenVMS pathname: <disk name>$<partition>:[path]<file name>
* i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */
-#define DIR_SEPC ']'
-#define DIR_SEPS "]"
-#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
-#define CHECK_ABSOLUTE(NAME) (strrchr(NAME, ':') && strrchr(NAME, '['))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
-#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
+#define H5_DIR_SEPC ']'
+#define H5_DIR_SEPS "]"
+#define H5_CHECK_DELIMITER(SS) (SS == H5_DIR_SEPC)
+#define H5_CHECK_ABSOLUTE(NAME) (HDstrrchr(NAME, ':') && HDstrrchr(NAME, '['))
+#define H5_CHECK_ABS_DRIVE(NAME) (0)
+#define H5_CHECK_ABS_PATH(NAME) (0)
+#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
#else
-#define DIR_SEPC '/'
-#define DIR_SEPS "/"
-#define CHECK_DELIMITER(SS) (SS == DIR_SEPC)
-#define CHECK_ABSOLUTE(NAME) (CHECK_DELIMITER(*NAME))
-#define CHECK_ABS_DRIVE(NAME) (0)
-#define CHECK_ABS_PATH(NAME) (0)
-#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, DIR_SEPC);
+#define H5_DIR_SEPC '/'
+#define H5_DIR_SEPS "/"
+#define H5_CHECK_DELIMITER(SS) (SS == H5_DIR_SEPC)
+#define H5_CHECK_ABSOLUTE(NAME) (H5_CHECK_DELIMITER(*NAME))
+#define H5_CHECK_ABS_DRIVE(NAME) (0)
+#define H5_CHECK_ABS_PATH(NAME) (0)
+#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
#endif
-#define COLON_SEPC ':'
+#define H5_COLON_SEPC ':'
/* Use FUNC to safely handle variations of C99 __func__ keyword handling */