summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h56
1 files changed, 23 insertions, 33 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 9efd145..5e968a0 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1130,22 +1130,9 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDrealpath
#define HDrealpath(F1,F2) realpath(F1,F2)
#endif /* HDrealloc */
-#ifdef H5_VMS
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
- int HDremove_all(const char * fname);
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
- #ifndef HDremove
- #define HDremove(S) HDremove_all(S)
- #endif /* HDremove */
-#else /* H5_VMS */
- #ifndef HDremove
- #define HDremove(S) remove(S)
- #endif /* HDremove */
-#endif /*H5_VMS*/
+#ifndef HDremove
+ #define HDremove(S) remove(S)
+#endif /* HDremove */
#ifndef HDrename
#define HDrename(OLD,NEW) rename(OLD,NEW)
#endif /* HDrename */
@@ -1562,19 +1549,7 @@ extern char *strdup(const char *s);
(ptr = slash); \
}
-#elif defined(H5_HAVE_VMS_PATH)
-
-/* OpenVMS pathname: <disk name>$<partition>:[path]<file name>
- * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */
-#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
+#else /* H5_HAVE_WINDOW_PATH */
#define H5_DIR_SEPC '/'
#define H5_DIR_SEPS "/"
@@ -1584,7 +1559,7 @@ extern char *strdup(const char *s);
#define H5_CHECK_ABS_PATH(NAME) (0)
#define H5_GET_LAST_DELIMITER(NAME, ptr) ptr = HDstrrchr(NAME, H5_DIR_SEPC);
-#endif
+#endif /* H5_HAVE_WINDOW_PATH */
#define H5_COLON_SEPC ':'
@@ -1746,9 +1721,24 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
*-------------------------------------------------------------------------
*/
-/* `S' is the name of a function which is being tested to check if its */
-/* an API function */
-#define H5_IS_API(S) ('_'!=((const char *)S)[2] && '_'!=((const char *)S)[3] && (!((const char *)S)[4] || '_'!=((const char *)S)[4]))
+/* `S' is the name of a function which is being tested to check if it's
+ * an API function.
+ *
+ * BADNESS:
+ * - Underscore at positions 2 or 3 (0-indexed string). Handles
+ * H5_ and H5X_.
+ * - Underscore at position 4 if position 3 is uppercase or a digit.
+ * Handles H5XY_.
+ */
+#define H5_IS_API(S) (\
+ '_'!=((const char *)S)[2] /* underscore at position 2 */ \
+ && '_'!=((const char *)S)[3] /* underscore at position 3 */ \
+ && !( /* NOT */ \
+ ((const char *)S)[4] /* pos 4 exists */ \
+ && (HDisupper(S[3]) || HDisdigit(S[3])) /* pos 3 dig | uc */ \
+ && '_'==((const char *)S)[4] /* pos 4 underscore */ \
+ )\
+)
/* `S' is the name of a function which is being tested to check if it's */
/* a public API function */