diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-03-24 18:33:45 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-03-24 18:33:45 (GMT) |
commit | 3e8dc8cccc5b907d93e7eeb61d26088142b3d982 (patch) | |
tree | af10d7b3e3ec99b809fa880af89e8fe8b48777b0 /test/H5srcdir.h | |
parent | f960ff573ea4d7c324be7a392f0b0c85bc796030 (diff) | |
download | hdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.zip hdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.tar.gz hdf5-3e8dc8cccc5b907d93e7eeb61d26088142b3d982.tar.bz2 |
[svn-r20315] brought revisions 19868:20300 from the 1.8.6_vms branch to the trunk for VMS work
Diffstat (limited to 'test/H5srcdir.h')
-rw-r--r-- | test/H5srcdir.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 55700cb..8bc8780 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -32,7 +32,11 @@ static char srcdir_path[1024] = ""; static char srcdir_testpath[1024] = ""; /* Append the test file name to the srcdir path and return the whole string */ +#ifdef H5_VMS +static const char *H5_get_srcdir_filename(char *filename) +#else static const char *H5_get_srcdir_filename(const char *filename) +#endif { const char *srcdir = HDgetenv("srcdir"); @@ -43,8 +47,17 @@ static const char *H5_get_srcdir_filename(const char *filename) /* Build path to test file */ if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) { HDstrcpy(srcdir_testpath, srcdir); +#ifdef H5_VMS + if(filename[0] == '[') { + char *tmp = filename; + srcdir_testpath[strlen(srcdir)-1] = '\0'; + strcat(srcdir_testpath, ++tmp); + } else + strcat(srcdir_testpath, filename); +#else HDstrcat(srcdir_testpath, "/"); HDstrcat(srcdir_testpath, filename); +#endif return(srcdir_testpath); } /* end if */ else |