diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2006-03-22 22:52:07 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2006-03-22 22:52:07 (GMT) |
commit | 391e4743798a3bd02dc0ad673fa2da9dcdaf3510 (patch) | |
tree | 7d4e0153098bd83d4d7e0977f455d0d6aa59d9d5 /src/H5.c | |
parent | 9a560ba31a34ba169e8c46310ca91e04d66d230a (diff) | |
download | hdf5-391e4743798a3bd02dc0ad673fa2da9dcdaf3510.zip hdf5-391e4743798a3bd02dc0ad673fa2da9dcdaf3510.tar.gz hdf5-391e4743798a3bd02dc0ad673fa2da9dcdaf3510.tar.bz2 |
[svn-r12138] Purpose: VMS port
Description: Unix remove function removes only the latest version of a file
on VMS. Some of our tests create multiple versions of the testfiles
and as a result, test programs may be confused, give false negative result,
etc.
Solution: Created HDremove_all function for VMS that removes all versions of the files.
HDremove on VMS is an alias to HDremove_all.
Platforms tested: VMS server and heping (to check that nothing is borken on UNIX side)
Misc. update:
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -3150,3 +3150,39 @@ void HDsrand(unsigned int seed) } #endif +/*------------------------------------------------------------------------- + * Function: HDremove_all + * + * Purpose: Wrapper function for remove on VMS systems + * + * This function deletes all versions of a file + * + * Return: Success: 0; + * + * Failure: -1 + * + * Programmer: Elena Pourmal + * March 22, 2006 + * + * Modifications: + *------------------------------------------------------------------------- + */ +#ifdef H5_VMS + + +int HDremove_all(char *fname) +{ + int ret_value = -1; + char *_fname; + _fname = malloc(strlen(fname)+3); /* to accomodate ;* and null */ + if(_fname) { + strcpy(_fname, fname); + strcat(_fname,";*"); + remove(_fname); + free(_fname); + ret_value = 0; + } + return ret_value; +} +#endif + |