From b3b06d2703eea051b0025c075f8c6742fcca1200 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sat, 12 Sep 2015 13:09:08 -0500 Subject: [svn-r27765] Merges from trunk: - VMS code removal: 27572 - Dataspace memory error: 27605 - Extraneous dataset flush: 27615 - Warning quieting: 27623 - Hyperslab error clarity: 27631 - Duplicate attribute macros: 27753 Tested on: koala w/ C++ and Fortran --- MANIFEST | 1 - README.txt | 2 +- bin/chkcopyright | 43 --------------- c++/src/H5IdComponent.cpp | 6 --- c++/test/tfile.cpp | 12 ++--- c++/test/tlinks.cpp | 61 --------------------- fortran/src/H5f90proto.h | 3 -- release_docs/INSTALL_VMS.txt | 77 --------------------------- src/H5Dint.c | 87 ++++++++++++++++-------------- src/H5Dpkg.h | 1 + src/H5Edefin.h | 1 + src/H5Einit.h | 5 ++ src/H5Epubgen.h | 2 + src/H5Eterm.h | 3 +- src/H5FDcore.c | 22 -------- src/H5FDdirect.c | 15 ------ src/H5FDlog.c | 24 +-------- src/H5FDsec2.c | 22 +------- src/H5FDstdio.c | 15 ------ src/H5Lexternal.c | 2 - src/H5Ocache.c | 22 +++++++- src/H5S.c | 2 +- src/H5Shyper.c | 96 ++++++++++++++++----------------- src/H5Tconv.c | 7 ++- src/H5api_adpt.h | 22 -------- src/H5err.txt | 1 + src/H5private.h | 52 +++++++----------- src/H5system.c | 62 +--------------------- test/H5srcdir.h | 16 ------ test/dt_arith.c | 118 ++--------------------------------------- test/dtypes.c | 4 -- test/fheap.c | 2 - test/flush2.c | 4 -- test/gen_cross.c | 4 ++ test/getname.c | 2 - test/lheap.c | 4 -- test/links.c | 29 +--------- test/links_env.c | 4 -- test/objcopy.c | 2 - test/stab.c | 2 - test/tconfig.c | 9 ---- test/tfile.c | 12 ----- test/th5o.c | 2 - test/th5s.c | 43 +++++++++++++++ test/tsohm.c | 3 -- tools/lib/h5diff_array.c | 22 -------- tools/lib/h5tools_str.c | 4 -- tools/perform/sio_standalone.h | 11 ---- tools/perform/zip_perf.c | 9 ---- 49 files changed, 212 insertions(+), 762 deletions(-) delete mode 100644 release_docs/INSTALL_VMS.txt diff --git a/MANIFEST b/MANIFEST index 565ad44..d589eca 100644 --- a/MANIFEST +++ b/MANIFEST @@ -529,7 +529,6 @@ ./release_docs/INSTALL_CMake.txt ./release_docs/INSTALL_Cygwin.txt ./release_docs/INSTALL_parallel -./release_docs/INSTALL_VMS.txt ./release_docs/INSTALL_Windows.txt ./release_docs/RELEASE.txt ./release_docs/USING_HDF5_CMake.txt diff --git a/README.txt b/README.txt index dd3624c..932c3e4 100644 --- a/README.txt +++ b/README.txt @@ -8,7 +8,7 @@ specific to this release of the library. Several INSTALL* files can also be found in the release_docs/ directory: INSTALL contains instructions for compiling and installing the library; INSTALL_parallel contains instructions for installing the parallel version of the library; similarly-named files -contain instructions for VMS and several environments on MS Windows systems. +contain instructions for several environments on MS Windows systems. Documentation for this release can be found at the following URL: http://www.hdfgroup.org/HDF5/doc/. diff --git a/bin/chkcopyright b/bin/chkcopyright index fe9fe49..07fcb24 100755 --- a/bin/chkcopyright +++ b/bin/chkcopyright @@ -56,7 +56,6 @@ HTM_COPYRIGHT=/tmp/h5chkright_HTM.$$ # HTML style copyright SH_COPYRIGHT=/tmp/h5chkright_SH.$$ # SHELL style copyright SH_COPYRIGHT2=/tmp/h5chkright_SH2.$$ # SHELL style copyright, 2nd style. WINBAT_COPYRIGHT=/tmp/h5chkright_WINBAT.$$ # Windows Batch file Copyright notice -VMSCMD_COPYRIGHT=/tmp/h5chkright_VMSCMD.$$ # VMS command file Copyright notice CONFIGURE_AC_COPYRIGHT=/tmp/h5chkright_CONFIGURE_AC.$$ # configure.ac file Copyright notice tmpfixfile=/tmp/h5chkright_fix.$$ # Temporary fixed copy of file @@ -223,22 +222,6 @@ dnl http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have dnl access to either file, you may request a copy from help@hdfgroup.org. EOF - # VMS command file Copyright notice - cat > ${VMSCMD_COPYRIGHT} << \EOF -$!# Copyright by The HDF Group. -$!# Copyright by the Board of Trustees of the University of Illinois. -$!# All rights reserved. -$!# -$!# This file is part of HDF5. The full HDF5 copyright notice, including -$!# terms governing use, modification, and redistribution, is contained in -$!# the files COPYING and Copyright.html. COPYING can be found at the root -$!# of the source code distribution tree; Copyright.html can be found at the -$!# root level of an installed copy of the electronic HDF5 document set and -$!# is linked from the top-level documents page. It can also be found at -$!# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have -$!# access to either file, you may request a copy from help@hdfgroup.org. -EOF - } # Initialization @@ -611,28 +594,6 @@ BATCH_FILE() } -# Check Windows Batch files -# -VMSCMD_FILE() -{ - f=$1 - case `MATCH_COPYRIGHT $VMSCMD_COPYRIGHT $f` in - PASSED) - PASSED $f - return - ;; - FAILED) - # show the difference - FAILED $f - $DIFF ${EXTRACTEDFILE} ${VMSCMD_COPYRIGHT} - if [ -n "$FIXIT" ]; then - FIX_COPYRIGHT $VMSCMD_COPYRIGHT $f - fi - ;; - esac -} - - # Check Configure.in type files # CONFIGURE_AC_FILE() @@ -834,10 +795,6 @@ while read file; do # Windows Batch files BATCH_FILE ${file} ;; - *.com ) - # VMS Command files - VMSCMD_FILE ${file} - ;; *.h5 | *.hdf5 ) # Ignore HDF5 data files continue diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index c01d41e..bcd69c4 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -285,15 +285,9 @@ IdComponent::~IdComponent() {} //-------------------------------------------------------------------------- H5std_string IdComponent::inMemFunc(const char* func_name) const { -#ifdef H5_VMS - H5std_string full_name = fromClass(); - full_name.append("::"); - full_name.append(func_name); -#else H5std_string full_name = func_name; full_name.insert(0, "::"); full_name.insert(0, fromClass()); -#endif /*H5_VMS*/ return (full_name); } diff --git a/c++/test/tfile.cpp b/c++/test/tfile.cpp index f3bbb16..f84ce3a 100644 --- a/c++/test/tfile.cpp +++ b/c++/test/tfile.cpp @@ -109,9 +109,7 @@ static void test_file_create() file1 = new H5File (FILE1, H5F_ACC_EXCL); // Try to create the same file with H5F_ACC_TRUNC. This should fail - // because file1 is the same file and is currently open. Skip it on - // OpenVMS because it creates another version of the file. -#ifndef H5_HAVE_FILE_VERSIONS + // because file1 is the same file and is currently open. try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E @@ -120,7 +118,6 @@ static void test_file_create() } catch( FileIException E ) // catch truncating existing file {} // do nothing, FAIL expected -#endif // H5_HAVE_FILE_VERSIONS // Close file1 delete file1; @@ -141,9 +138,7 @@ static void test_file_create() file1 = new H5File (FILE1, H5F_ACC_TRUNC); // Try to create first file again. This should fail because file1 - // is the same file and is currently open. Skip it on OpenVMS because - // it creates another version of the file. -#ifndef H5_HAVE_FILE_VERSIONS + // is the same file and is currently open. try { H5File file2 (FILE1, H5F_ACC_TRUNC); // should throw E @@ -154,7 +149,7 @@ static void test_file_create() {} // do nothing, FAIL expected // Try with H5F_ACC_EXCL. This should fail too because the file already - // exists. Skip it on OpenVMS because it creates another version of the file. + // exists. try { H5File file3 (FILE1, H5F_ACC_EXCL); // should throw E @@ -163,7 +158,6 @@ static void test_file_create() } catch( FileIException E ) // catching H5F_ACC_EXCL on existing file {} // do nothing, FAIL expected -#endif /*H5_HAVE_FILE_VERSIONS*/ // Get the file-creation template FileCreatPropList tmpl1 = file1->getCreatePlist(); diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 291b649..33d10ea 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -58,60 +58,6 @@ /* File for external link test. Created with gen_udlinks.c */ #define LINKED_FILE "be_extlink2.h5" -#ifdef H5_VMS -#if 0 -const char *FILENAME[] = { - "links0", - "links1", - "links2", - "links3", - "links4a", /* 4 */ - "links4b", /* 5 */ - "links4c", /* 6 */ - "links4d", /* 7 */ - "links5", /* 8 */ - "links6", /* 9 */ - "links7", /* 10 */ - "links8", /* 11 */ - "extlinks0", /* 12: main files */ - "[.tmp]extlinks0", /* 13: */ - "extlinks1", /* 14: target files */ - "[.tmp]extlinks1", /* 15: */ - "extlinks2", /* 16: */ - "[.tmp]extlinks2", /* 17: */ - "extlinks3", /* 18: */ - "[.tmp]extlinks3", /* 19: */ - "extlinks4", /* 20: */ - "[.tmp]extlinks4", /* 21: */ - "extlinks5", /* 22: */ - "[.tmp]extlinks6", /* 23: */ - "extlinks7", /* 24: */ - "[.tmp]extlinks7", /* 25: */ - "[.tmp]extlinks8", /* 26: */ - "extlinks9", /* 27: */ - "[.tmp]extlinks9", /* 28: */ - "extlinks10", /* 29: */ /* TESTS for windows */ - "[.tmp]extlinks10", /* 30: */ - "[.tmp]extlinks11", /* 31: */ - "[.tmp]extlinks12", /* 32: */ - "extlinks13", /* 33: */ - "[.tmp]extlinks13", /* 34: */ - "[.tmp]extlinks14", /* 35: */ - "[.tmp]extlinks15", /* 36: */ - "extlinks16A", /* 37: */ /* TESTS for H5P_set_elink_fapl */ - "extlinks16B", /* 38: */ - "extlinks17", /* 39: */ - "extlinks18A", /* 40: */ - "extlinks18B", /* 41: */ - "extlinks19A", /* 42: */ - "extlinks19B", /* 43: */ - "extlinks20", /* 44: */ - NULL -}; -#endif // 0 - -#define TMPDIR "[.tmp]" -#else #if 0 const char *FILENAME[] = { "links0", @@ -165,7 +111,6 @@ const char *FILENAME[] = { #endif // 0 #define TMPDIR "tmp" -#endif #define FAMILY_SIZE 1024 #define CORE_INCREMENT 1024 @@ -574,16 +519,12 @@ void test_links() #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += test_deprec(my_fapl, new_format); #endif /* H5_NO_DEPRECATED_SYMBOLS */ -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_self(envval, my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_pingpong(envval, my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0; @@ -591,9 +532,7 @@ void test_links() nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_closing(envval, my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_endian(new_format) < 0 ? 1 : 0; nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0; diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 6bde877..4784440 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -22,9 +22,6 @@ H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len); H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len); -#ifdef H5_VMS -#define H5_FC_FUNC_(name, NAME) NAME -#endif /*H5_VMS*/ /* * Storage info struct used by H5O_info_t and H5F_info_t diff --git a/release_docs/INSTALL_VMS.txt b/release_docs/INSTALL_VMS.txt deleted file mode 100644 index c2a1463..0000000 --- a/release_docs/INSTALL_VMS.txt +++ /dev/null @@ -1,77 +0,0 @@ - Building and installation instructions for Alpha Open VMS - HDF5 1.8.6 release - 18 February 2011 - - - - CONTENTS - -------- - - 1. Obtaining HDF5 - 2. Building and testing HDF5 C, Fortran and C++ libraries, - and utilities - 3. Installing HDF5 libraries - 4. Known problems - - - 1.Obtaining HDF5 - - Please see INSTALL file in this directory for downloading instructions. - - 2. Building and testing HDF5 C, Fortran and C++ libraries and utilities. - - IMPORTANT: This version REQUIRES GNU ZLIB library to be installed - on a system. You may download the source code from - http://www.zlib.net/ - - - Use tar command to untar HDF5 source ball - - tar -xvf .tar - - - Change default directory to [..vms] - - Specify top HDF5 source directory in the build.com file - - Edit make.com: - specify path to ZLIB library - if necessary, modify compilation flags - Do NOT REMOVE /define=H5_VMS and /standard=strict_ansi qualifiers. - - Run build.com command file - @build - We recommend using batch queue to build and test this distribution. - The command file runs make.com and builds - C library, tests, and utilities - Fortran library and tests - C++ library and tests - It also runs test scripts to test C, Fortran and C++ libraries, and - h5dump, h5diff, h5ls, h5repack and h5import utilities. - - 3. Installing HDF5 libraries - - Modify install.com file to specify installation directory and run - @install - to install HDF5 C, Fortran, and C++ libraries, and utilities. - The script will create the directories shown below in the - installation directory: - - [.HDF5]... - [.HDF5.INCLUDE] - [.HDF5.LIB] - [.HDF5.BIN] - [.HDF5.EXAMPLES] - [.HDF5.EXAMPLES.C] - [.HDF5.EXAMPLES.F90] - [.HDF5.EXAMPLES.CXX] - - [.HDF5.EXAMPLES.*] directories contain make.com and check.com files - to build examples against the installed libraries and to verify - the installation. - - 3. Known problems - - - dsets test fails for test_scleoffset_double and - test_scleoffset_double_2 tests when G_FLOAT double is used - - There is no support for szip compression filter. - - Fortran multifile driver test fails; similar C test passes. - - - For help contact help@hdfgroup.org - diff --git a/src/H5Dint.c b/src/H5Dint.c index 45d6ac9..2bf43d4 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1634,7 +1634,7 @@ done: herr_t H5D_close(H5D_t *dataset) { - unsigned free_failed = FALSE; + hbool_t free_failed = FALSE; hbool_t corked; /* Whether the dataset is corked or not */ herr_t ret_value = SUCCEED; /* Return value */ @@ -1655,16 +1655,18 @@ H5D_close(H5D_t *dataset) if(H5D__flush_real(dataset, H5AC_dxpl_id) < 0) HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info") - /* Free the data sieve buffer, if it's been allocated */ - if(dataset->shared->cache.contig.sieve_buf) { - HDassert(dataset->shared->layout.type != H5D_COMPACT); /* We should never have a sieve buffer for compact storage */ - - dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf); - } /* end if */ + /* Set a flag to indicate the dataset is closing, before we start freeing things */ + /* (Avoids problems with flushing datasets twice, when one is holding + * the file open and it iterates through dataset to flush them -QAK) + */ + dataset->shared->closing = TRUE; /* Free cached information for each kind of dataset */ switch(dataset->shared->layout.type) { case H5D_CONTIGUOUS: + /* Free the data sieve buffer, if it's been allocated */ + if(dataset->shared->cache.contig.sieve_buf) + dataset->shared->cache.contig.sieve_buf = (unsigned char *)H5FL_BLK_FREE(sieve_buf,dataset->shared->cache.contig.sieve_buf); break; case H5D_CHUNKED: @@ -1724,8 +1726,9 @@ H5D_close(H5D_t *dataset) * Release datatype, dataspace and creation property list -- there isn't * much we can do if one of these fails, so we just continue. */ - free_failed = (unsigned)(H5I_dec_ref(dataset->shared->type_id) < 0 || H5S_close(dataset->shared->space) < 0 || - H5I_dec_ref(dataset->shared->dcpl_id) < 0); + free_failed = (H5I_dec_ref(dataset->shared->type_id) < 0) || + (H5S_close(dataset->shared->space) < 0) || + (H5I_dec_ref(dataset->shared->dcpl_id) < 0); /* Remove the dataset from the list of opened objects in the file */ if(H5FO_top_decr(dataset->oloc.file, dataset->oloc.addr) < 0) @@ -2629,44 +2632,48 @@ H5D__flush_real(H5D_t *dataset, hid_t dxpl_id) /* Check args */ HDassert(dataset); + HDassert(dataset->shared); + + /* Avoid flushing the dataset (again) if it's closing */ + if(!dataset->shared->closing) { + /* Check for metadata changes that will require updating the object's modification time */ + if(dataset->shared->layout_dirty || dataset->shared->space_dirty) { + unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */ + + /* Pin the object header */ + if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") + + /* Update the layout on disk, if it's been changed */ + if(dataset->shared->layout_dirty) { + if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info") + dataset->shared->layout_dirty = FALSE; + + /* Reset the "update the modification time" flag, so we only do it once */ + update_flags = 0; + } /* end if */ - /* Check for metadata changes that will require updating the object's modification time */ - if(dataset->shared->layout_dirty || dataset->shared->space_dirty) { - unsigned update_flags = H5O_UPDATE_TIME; /* Modification time flag */ - - /* Pin the object header */ - if(NULL == (oh = H5O_pin(&dataset->oloc, dxpl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTPIN, FAIL, "unable to pin dataset object header") - - /* Update the layout on disk, if it's been changed */ - if(dataset->shared->layout_dirty) { - if(H5D__layout_oh_write(dataset, dxpl_id, oh, update_flags) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update layout/pline/efl info") - dataset->shared->layout_dirty = FALSE; - - /* Reset the "update the modification time" flag, so we only do it once */ - update_flags = 0; - } /* end if */ + /* Update the dataspace on disk, if it's been changed */ + if(dataset->shared->space_dirty) { + if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace") + dataset->shared->space_dirty = FALSE; - /* Update the dataspace on disk, if it's been changed */ - if(dataset->shared->space_dirty) { - if(H5S_write(dataset->oloc.file, dxpl_id, oh, update_flags, dataset->shared->space) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update file with new dataspace") - dataset->shared->space_dirty = FALSE; + /* Reset the "update the modification time" flag, so we only do it once */ + update_flags = 0; + } /* end if */ - /* Reset the "update the modification time" flag, so we only do it once */ - update_flags = 0; + /* _Somebody_ should have update the modification time! */ + HDassert(update_flags == 0); } /* end if */ - /* _Somebody_ should have update the modification time! */ - HDassert(update_flags == 0); + /* Flush cached raw data for each kind of dataset layout */ + if(dataset->shared->layout.ops->flush && + (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data") } /* end if */ - /* Flush cached raw data for each kind of dataset layout */ - if(dataset->shared->layout.ops->flush && - (dataset->shared->layout.ops->flush)(dataset, dxpl_id) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush raw data") - done: /* Release pointer to object header */ if(oh != NULL) diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 9e8211d..16e16a6 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -439,6 +439,7 @@ typedef struct H5D_rdcdc_t { */ typedef struct H5D_shared_t { size_t fo_count; /* Reference count */ + hbool_t closing; /* Flag to indicate dataset is closing */ hid_t type_id; /* ID for dataset's datatype */ H5T_t *type; /* Datatype for this dataset */ H5S_t *space; /* Dataspace of this dataset */ diff --git a/src/H5Edefin.h b/src/H5Edefin.h index 5135920..8c2717b 100644 --- a/src/H5Edefin.h +++ b/src/H5Edefin.h @@ -195,6 +195,7 @@ hid_t H5E_CANTSELECT_g = FAIL; /* Can't select hyperslab */ hid_t H5E_CANTNEXT_g = FAIL; /* Can't move to next iterator location */ hid_t H5E_BADSELECT_g = FAIL; /* Invalid selection */ hid_t H5E_CANTCOMPARE_g = FAIL; /* Can't compare objects */ +hid_t H5E_CANTAPPEND_g = FAIL; /* Can't append object */ /* Argument errors */ hid_t H5E_UNINITIALIZED_g = FAIL; /* Information is uinitialized */ diff --git a/src/H5Einit.h b/src/H5Einit.h index 4371349..e86f575 100644 --- a/src/H5Einit.h +++ b/src/H5Einit.h @@ -745,6 +745,11 @@ if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't compare objects"))==NULL) HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") if((H5E_CANTCOMPARE_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") +assert(H5E_CANTAPPEND_g==(-1)); +if((msg = H5E_create_msg(cls, H5E_MINOR, "Can't append object"))==NULL) + HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, "error message initialization failed") +if((H5E_CANTAPPEND_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0) + HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, "can't register error message") /* Argument errors */ assert(H5E_UNINITIALIZED_g==(-1)); diff --git a/src/H5Epubgen.h b/src/H5Epubgen.h index a2a90e7..b978097 100644 --- a/src/H5Epubgen.h +++ b/src/H5Epubgen.h @@ -330,12 +330,14 @@ H5_DLLVAR hid_t H5E_CANTRECV_g; /* Can't receive data */ #define H5E_CANTNEXT (H5OPEN H5E_CANTNEXT_g) #define H5E_BADSELECT (H5OPEN H5E_BADSELECT_g) #define H5E_CANTCOMPARE (H5OPEN H5E_CANTCOMPARE_g) +#define H5E_CANTAPPEND (H5OPEN H5E_CANTAPPEND_g) H5_DLLVAR hid_t H5E_CANTCLIP_g; /* Can't clip hyperslab region */ H5_DLLVAR hid_t H5E_CANTCOUNT_g; /* Can't count elements */ H5_DLLVAR hid_t H5E_CANTSELECT_g; /* Can't select hyperslab */ H5_DLLVAR hid_t H5E_CANTNEXT_g; /* Can't move to next iterator location */ H5_DLLVAR hid_t H5E_BADSELECT_g; /* Invalid selection */ H5_DLLVAR hid_t H5E_CANTCOMPARE_g; /* Can't compare objects */ +H5_DLLVAR hid_t H5E_CANTAPPEND_g; /* Can't append object */ /* Argument errors */ #define H5E_UNINITIALIZED (H5OPEN H5E_UNINITIALIZED_g) diff --git a/src/H5Eterm.h b/src/H5Eterm.h index 7acbab3..e367d3b 100644 --- a/src/H5Eterm.h +++ b/src/H5Eterm.h @@ -196,7 +196,8 @@ H5E_CANTCOUNT_g= H5E_CANTSELECT_g= H5E_CANTNEXT_g= H5E_BADSELECT_g= -H5E_CANTCOMPARE_g= +H5E_CANTCOMPARE_g= +H5E_CANTAPPEND_g= /* Argument errors */ H5E_UNINITIALIZED_g= diff --git a/src/H5FDcore.c b/src/H5FDcore.c index dff2bb4..e3f5d92 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -65,11 +65,7 @@ typedef struct H5FD_core_t { * identify a file. */ dev_t device; /*file device number */ -#ifdef H5_VMS - ino_t inode[3]; /*file i-node number */ -#else ino_t inode; /*file i-node number */ -#endif /*H5_VMS*/ #else /* Files in windows are uniquely identified by the volume serial * number and the file index (both low and high parts). @@ -744,14 +740,7 @@ H5FD_core_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; #else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; -#ifdef H5_VMS - file->inode[0] = sb.st_ino[0]; - file->inode[1] = sb.st_ino[1]; - file->inode[2] = sb.st_ino[2]; -#else file->inode = sb.st_ino; -#endif /* H5_VMS */ - #endif /* H5_HAVE_WIN32_API */ } /* end if */ @@ -984,13 +973,8 @@ H5FD_core_cmp(const H5FD_t *_f1, const H5FD_t *_f2) if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1) #endif /* H5_DEV_T_IS_SCALAR */ -#ifndef H5_VMS if (f1->inode < f2->inode) HGOTO_DONE(-1) if (f1->inode > f2->inode) HGOTO_DONE(1) -#else - if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1) - if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1) -#endif /* H5_VMS */ #endif /*H5_HAVE_WIN32_API*/ } /* end if */ @@ -1526,12 +1510,6 @@ H5FD_core_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t closing) if(0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #else /* H5_HAVE_WIN32_API */ -#ifdef H5_VMS - /* Reset seek offset to the beginning of the file, so that the file isn't - * re-extended later. This may happen on Open VMS. */ - if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET)) - HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") -#endif /* H5_VMS */ if(-1 == HDftruncate(file->fd, (HDoff_t)new_eof)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ diff --git a/src/H5FDdirect.c b/src/H5FDdirect.c index 170ddff..c39e850 100644 --- a/src/H5FDdirect.c +++ b/src/H5FDdirect.c @@ -83,11 +83,7 @@ typedef struct H5FD_direct_t { * identify a file. */ dev_t device; /*file device number */ -#ifdef H5_VMS - ino_t inode[3]; /*file i-node number */ -#else ino_t inode; /*file i-node number */ -#endif /*H5_VMS*/ #else /* * On H5_HAVE_WIN32_API the low-order word of a unique identifier associated with the @@ -529,13 +525,7 @@ H5FD_direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxadd file->fileindexlo = fileinfo.nFileIndexLow; #else file->device = sb.st_dev; -#ifdef H5_VMS - file->inode[0] = sb.st_ino[0]; - file->inode[1] = sb.st_ino[1]; - file->inode[2] = sb.st_ino[2]; -#else file->inode = sb.st_ino; -#endif /*H5_VMS*/ #endif /*H5_HAVE_WIN32_API*/ file->fa.mboundary = fa->mboundary; file->fa.fbsize = fa->fbsize; @@ -677,13 +667,8 @@ H5FD_direct_cmp(const H5FD_t *_f1, const H5FD_t *_f2) if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t))>0) HGOTO_DONE(1) #endif /* H5_DEV_T_IS_SCALAR */ -#ifndef H5_VMS if (f1->inode < f2->inode) HGOTO_DONE(-1) if (f1->inode > f2->inode) HGOTO_DONE(1) -#else - if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))<0) HGOTO_DONE(-1) - if(HDmemcmp(&(f1->inode),&(f2->inode),3*sizeof(ino_t))>0) HGOTO_DONE(1) -#endif /*H5_VMS*/ #endif diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 8e431a4..0e9b449 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -92,11 +92,7 @@ typedef struct H5FD_log_t { * Windows code further below. */ dev_t device; /* file device number */ -#ifdef H5_VMS - ino_t inode[3]; /* file i-node number */ -#else ino_t inode; /* file i-node number */ -#endif /*H5_VMS*/ #else /* Files in windows are uniquely identified by the volume serial * number and the file index (both low and high parts). @@ -589,14 +585,7 @@ H5FD_log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; #else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; -#ifdef H5_VMS - file->inode[0] = sb.st_ino[0]; - file->inode[1] = sb.st_ino[1]; - file->inode[2] = sb.st_ino[2]; -#else file->inode = sb.st_ino; -#endif /*H5_VMS*/ - #endif /* H5_HAVE_WIN32_API */ /* Retain a copy of the name used to open the file, for possible error reporting */ @@ -869,13 +858,8 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2) if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1) #endif /* H5_DEV_T_IS_SCALAR */ -#ifndef H5_VMS if(f1->inode < f2->inode) HGOTO_DONE(-1) if(f1->inode > f2->inode) HGOTO_DONE(1) -#else - if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) HGOTO_DONE(-1) - if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) HGOTO_DONE(1) -#endif /*H5_VMS*/ #endif @@ -1556,13 +1540,6 @@ H5FD_log_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_U if(0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #else /* H5_HAVE_WIN32_API */ -#ifdef H5_VMS - /* Reset seek offset to the beginning of the file, so that the file isn't - * re-extended later. This may happen on Open VMS. */ - if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET)) - HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") -#endif - if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ @@ -1647,3 +1624,4 @@ H5FD_log_unlock(H5FD_t *_file) done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_log_unlock() */ + diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 9fc954e..ba03c65 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -69,11 +69,7 @@ typedef struct H5FD_sec2_t { * Windows code further below. */ dev_t device; /* file device number */ -#ifdef H5_VMS - ino_t inode[3]; /* file i-node number */ -#else ino_t inode; /* file i-node number */ -#endif /* H5_VMS */ #else /* Files in windows are uniquely identified by the volume serial * number and the file index (both low and high parts). @@ -377,13 +373,7 @@ H5FD_sec2_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr) file->dwVolumeSerialNumber = fileinfo.dwVolumeSerialNumber; #else /* H5_HAVE_WIN32_API */ file->device = sb.st_dev; -#ifdef H5_VMS - file->inode[0] = sb.st_ino[0]; - file->inode[1] = sb.st_ino[1]; - file->inode[2] = sb.st_ino[2]; -#else /* H5_VMS */ file->inode = sb.st_ino; -#endif /* H5_VMS */ #endif /* H5_HAVE_WIN32_API */ /* Retain a copy of the name used to open the file, for possible error reporting */ @@ -504,13 +494,8 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2) if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) HGOTO_DONE(-1) if(HDmemcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) HGOTO_DONE(1) #endif /* H5_DEV_T_IS_SCALAR */ -#ifdef H5_VMS - if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) HGOTO_DONE(-1) - if(HDmemcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) HGOTO_DONE(1) -#else /* H5_VMS */ if(f1->inode < f2->inode) HGOTO_DONE(-1) if(f1->inode > f2->inode) HGOTO_DONE(1) -#endif /* H5_VMS */ #endif /* H5_HAVE_WIN32_API */ done: @@ -905,12 +890,6 @@ H5FD_sec2_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t H5_ATTR_ if(0 == bError) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #else /* H5_HAVE_WIN32_API */ -#ifdef H5_VMS - /* Reset seek offset to the beginning of the file, so that the file isn't - * re-extended later. This may happen on Open VMS. */ - if(-1 == HDlseek(file->fd, (HDoff_t)0, SEEK_SET)) - HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") -#endif if(-1 == HDftruncate(file->fd, (HDoff_t)file->eoa)) HSYS_GOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to extend file properly") #endif /* H5_HAVE_WIN32_API */ @@ -992,3 +971,4 @@ H5FD_sec2_unlock(H5FD_t *_file) done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FD_sec2_unlock() */ + diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index c9b8ff0..b570f1c 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -97,11 +97,7 @@ typedef struct H5FD_stdio_t { * Windows code further below. */ dev_t device; /* file device number */ -#ifdef H5_VMS - ino_t inode[3]; /* file i-node number */ -#else ino_t inode; /* file i-node number */ -#endif /* H5_VMS */ #else /* Files in windows are uniquely identified by the volume serial * number and the file index (both low and high parts). @@ -453,13 +449,7 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id, H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADFILE, "unable to fstat file", NULL) } /* end if */ file->device = sb.st_dev; -#ifdef H5_VMS - file->inode[0] = sb.st_ino[0]; - file->inode[1] = sb.st_ino[1]; - file->inode[2] = sb.st_ino[2]; -#else /* H5_VMS */ file->inode = sb.st_ino; -#endif /* H5_VMS */ #endif /* H5_HAVE_WIN32_API */ return((H5FD_t*)file); @@ -545,13 +535,8 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2) if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) < 0) return -1; if(memcmp(&(f1->device),&(f2->device),sizeof(dev_t)) > 0) return 1; #endif /* H5_DEV_T_IS_SCALAR */ -#ifdef H5_VMS - if(memcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) < 0) return -1; - if(memcmp(&(f1->inode), &(f2->inode), 3 * sizeof(ino_t)) > 0) return 1; -#else /* H5_VMS */ if(f1->inode < f2->inode) return -1; if(f1->inode > f2->inode) return 1; -#endif /* H5_VMS */ #endif /* H5_HAVE_WIN32_API */ return 0; diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 3a156eb..570719d 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -125,8 +125,6 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/) * * Programmer: Vailin Choi, April 2, 2008 * - * Modification: Raymond Lu, 14 Jan. 2009 - * Added support for OpenVMS pathname --------------------------------------------------------------------------*/ static herr_t H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/) diff --git a/src/H5Ocache.c b/src/H5Ocache.c index c7632bd..c8a7c03 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -754,13 +754,21 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) +#ifdef H5_HAVE_PARALLEL +H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy) +#else +H5O__cache_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy) +#endif /* H5_HAVE_PARALLEL */ { H5O_t *oh = (H5O_t *)_thing; /* Object header to reset */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ +#ifdef H5_HAVE_PARALLEL FUNC_ENTER_STATIC +#else + FUNC_ENTER_STATIC_NOERR +#endif /* H5_HAVE_PARALLEL */ /* Check arguments */ HDassert(oh); @@ -791,7 +799,9 @@ H5O__cache_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) oh->ndecode_dirtied = 0; #endif /* NDEBUG */ +#ifdef H5_HAVE_PARALLEL done: +#endif /* H5_HAVE_PARALLEL */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__cache_clear() */ @@ -1181,14 +1191,22 @@ done: *------------------------------------------------------------------------- */ static herr_t +#ifdef H5_HAVE_PARALLEL H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) +#else +H5O__cache_chk_clear(const H5F_t H5_ATTR_UNUSED *f, void *_thing, hbool_t H5_ATTR_UNUSED about_to_destroy) +#endif /* H5_HAVE_PARALLEL */ { H5O_chunk_proxy_t *chk_proxy = (H5O_chunk_proxy_t *)_thing; /* Object header chunk to reset */ H5O_t *oh; /* Object header for chunk */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ +#ifdef H5_HAVE_PARALLEL FUNC_ENTER_STATIC +#else + FUNC_ENTER_STATIC_NOERR +#endif /* H5_HAVE_PARALLEL */ /* Check arguments */ HDassert(chk_proxy); @@ -1210,7 +1228,9 @@ H5O__cache_chk_clear(const H5F_t *f, void *_thing, hbool_t about_to_destroy) if(chk_proxy->oh->mesg[u].chunkno == chk_proxy->chunkno) chk_proxy->oh->mesg[u].dirty = FALSE; +#ifdef H5_HAVE_PARALLEL done: +#endif /* H5_HAVE_PARALLEL */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__cache_chk_clear() */ diff --git a/src/H5S.c b/src/H5S.c index 9b37797..efb9d34 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -190,7 +190,7 @@ H5S_create(H5S_class_t type) FUNC_ENTER_NOAPI(NULL) /* Create a new dataspace */ - if(NULL == (new_ds = H5FL_MALLOC(H5S_t))) + if(NULL == (new_ds = H5FL_CALLOC(H5S_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Initialize default dataspace state */ diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 51b5ab6..a2eb804 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -4833,7 +4833,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance span 'a', leave span 'b' */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -4848,7 +4848,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Check for overlaps between upper part of span 'a' and lower part of span 'b' */ @@ -4859,7 +4859,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -4876,7 +4876,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_a->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -4886,7 +4886,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_a->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -4896,7 +4896,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -4935,7 +4935,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Check for overlaps between middle part of span 'a' and span 'b' */ @@ -4946,7 +4946,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -4963,7 +4963,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_b->low,span_b->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -4973,7 +4973,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_b->low,span_b->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -4983,7 +4983,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5014,7 +5014,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ else { /* Keep going, nothing to split off */ @@ -5029,7 +5029,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5046,7 +5046,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5056,7 +5056,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_a->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5066,7 +5066,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_a->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5106,7 +5106,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add lower part of span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ else { /* Keep going, nothing to split off */ @@ -5121,7 +5121,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(span_a->down==NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,NULL,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") } /* end if */ /* If there are down spans, check for the overlap in them and add to each appropriate list */ else { @@ -5138,7 +5138,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_not_b!=NULL) { /* Merge/add overlapped part with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_b->high,down_a_not_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_not_b); @@ -5148,7 +5148,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_a_and_b!=NULL) { /* Merge/add overlapped part with/to a_and_b list */ if(H5S_hyper_append_span(&last_a_and_b,a_and_b,span_a->low,span_b->high,down_a_and_b,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_a_and_b); @@ -5158,7 +5158,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s if(down_b_not_a!=NULL) { /* Merge/add overlapped part with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_a->low,span_b->high,down_b_not_a,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Release the down span tree generated */ H5S_hyper_free_span_info(down_b_not_a); @@ -5187,7 +5187,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance span 'b', leave span 'a' */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5201,7 +5201,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'a' with/to a_not_b list */ if(H5S_hyper_append_span(&last_a_not_b,a_not_b,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance to the next 'a' span */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5214,7 +5214,7 @@ H5S_hyper_clip_spans (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s /* Merge/add span 'b' with/to b_not_a list */ if(H5S_hyper_append_span(&last_b_not_a,b_not_a,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, FAIL, "can't allocate hyperslab span") /* Advance to the next 'b' span */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5296,7 +5296,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(span_a->highlow) { /* Merge/add span 'a' with/to the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance span 'a' */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5311,19 +5311,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'a' with/to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Merge/add lower part of span 'a' with/to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Get merged span tree for overlapped section */ tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down); /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5360,19 +5360,19 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'a' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Merge/add lower part of span 'a' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->low-1,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Get merged span tree for overlapped section */ tmp_spans=H5S_hyper_merge_spans_helper(span_a->down,span_b->down); /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5400,14 +5400,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of lower & middle parts of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Check if there is a lower part of span 'b' */ if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -5418,7 +5418,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5455,14 +5455,14 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf if(H5S_hyper_cmp_spans(span_a->down,span_b->down)==TRUE) { /* Merge/add copy of span 'b' to merged spans if so */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* Check if there is a lower part of span 'b' */ if(span_a->low>span_b->low) { /* Merge/add lower part of span 'b' to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_a->low-1,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") } /* end if */ else { /* No lower part of span 'b' , keep going... */ @@ -5473,7 +5473,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf /* Merge/add overlapped section to merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_b->high,tmp_spans,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Release merged span tree for overlapped section */ H5S_hyper_free_span_info(tmp_spans); @@ -5499,7 +5499,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf else { /* Merge/add span 'b' with the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance span 'b' */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -5511,7 +5511,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while(span_a!=NULL) { /* Merge/add all 'a' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_a->low,span_a->high,span_a->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance to next 'a' span, until all processed */ H5S_hyper_recover_span(&recover_a,&span_a,span_a->next); @@ -5523,7 +5523,7 @@ H5S_hyper_merge_spans_helper (H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf while(span_b!=NULL) { /* Merge/add all 'b' spans into the merged spans */ if(H5S_hyper_append_span(&prev_span_merge,&merged_spans,span_b->low,span_b->high,span_b->down,NULL)==FAIL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab span") + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTAPPEND, NULL, "can't allocate hyperslab span") /* Advance to next 'b' span, until all processed */ H5S_hyper_recover_span(&recover_b,&span_b,span_b->next); @@ -7099,8 +7099,8 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't release hyperslab") /* Allocate space for the hyperslab selection information */ - if((space->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info") + if(NULL == (space->select.sel_info.hslab = H5FL_MALLOC(H5S_hyper_sel_t))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info") /* Save the diminfo */ space->select.num_elem=1; @@ -7119,18 +7119,18 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, } /* end for */ /* Indicate that the dimension information is valid */ - space->select.sel_info.hslab->diminfo_valid=TRUE; + space->select.sel_info.hslab->diminfo_valid = TRUE; /* Indicate that there's no slab information */ - space->select.sel_info.hslab->span_lst=NULL; + space->select.sel_info.hslab->span_lst = NULL; } /* end if */ else if(op>=H5S_SELECT_OR && op<=H5S_SELECT_NOTA) { /* Sanity check */ HDassert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS); /* Check if there's no hyperslab span information currently */ - if(space->select.sel_info.hslab->span_lst==NULL) - if(H5S_hyper_generate_spans(space)<0) + if(NULL == space->select.sel_info.hslab->span_lst) + if(H5S_hyper_generate_spans(space) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_UNINITIALIZED, FAIL, "dataspace does not have span tree") /* Add in the new hyperslab information */ @@ -7144,7 +7144,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, FAIL, "invalid selection operation") /* Set selection type */ - space->select.type=H5S_sel_hyper; + space->select.type = H5S_sel_hyper; done: FUNC_LEAVE_NOAPI(ret_value) @@ -8794,7 +8794,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned H5_ATTR_UNUSED flags, H5S_se /* Make certain that we don't write too many */ actual_elem = MIN3(leftover, (size_t)iter->elmt_left, maxelem); - /* initialize row sizes for each dimension */ + /* Initialize row sizes for each dimension */ elem_size = iter->elmt_size; for(i = (int)fast_dim, acc = elem_size; i >= 0; i--) { slab[i] = acc; diff --git a/src/H5Tconv.c b/src/H5Tconv.c index b14f6e5..6847e68 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -4255,7 +4255,11 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") goto padding; -#ifndef H5_VMS /*Temporary solution to handle VAX special values*/ + /* Temporary solution to handle VAX special values. + * Note that even though we don't support VAX anymore, we + * still need to handle legacy VAX files so this code must + * remain in place. + */ } else if (H5T__bit_find (s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE)<0) { /* NaN */ @@ -4280,7 +4284,6 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception") goto padding; -#endif /*H5_VMS*/ } /* diff --git a/src/H5api_adpt.h b/src/H5api_adpt.h index ab7287c..910bef9 100644 --- a/src/H5api_adpt.h +++ b/src/H5api_adpt.h @@ -21,28 +21,6 @@ #ifndef H5API_ADPT_H #define H5API_ADPT_H -/* - * Does the compiler support the __attribute__(()) syntax? It's no - * big deal if we don't. - * - * Note that Solaris Studio supports attribute, but does not support the - * attributes we use. - */ -#ifdef __cplusplus -# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ -# define H5_ATTR_UNUSED /*void*/ -# define H5_ATTR_NORETURN /*void*/ -#else /* __cplusplus */ -#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) -# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) -# define H5_ATTR_UNUSED __attribute__((unused)) -# define H5_ATTR_NORETURN __attribute__((noreturn)) -#else -# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ -# define H5_ATTR_UNUSED /*void*/ -# define H5_ATTR_NORETURN /*void*/ -#endif -#endif /* __cplusplus */ /* This will only be defined if HDF5 was built with CMake */ #ifdef H5_BUILT_AS_DYNAMIC_LIB diff --git a/src/H5err.txt b/src/H5err.txt index 61c1a40..31b18a5 100644 --- a/src/H5err.txt +++ b/src/H5err.txt @@ -218,6 +218,7 @@ MINOR, DSPACE, H5E_CANTSELECT, Can't select hyperslab MINOR, DSPACE, H5E_CANTNEXT, Can't move to next iterator location MINOR, DSPACE, H5E_BADSELECT, Invalid selection MINOR, DSPACE, H5E_CANTCOMPARE, Can't compare objects +MINOR, DSPACE, H5E_CANTAPPEND, Can't append object # Property list errors MINOR, PLIST, H5E_CANTGET, Can't get value diff --git a/src/H5private.h b/src/H5private.h index afc7bb2..10f47a7 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -295,12 +295,23 @@ /* * Does the compiler support the __attribute__(()) syntax? It's no * big deal if we don't. + * + * Note that Solaris Studio supports attribute, but does not support the + * attributes we use. */ #ifdef __cplusplus -# define __attribute__(X) /*void*/ +# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ +# define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_NORETURN /*void*/ #else /* __cplusplus */ -#ifndef H5_HAVE_ATTRIBUTE -# define __attribute__(X) /*void*/ +#if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) +# define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) +# define H5_ATTR_UNUSED __attribute__((unused)) +# define H5_ATTR_NORETURN __attribute__((noreturn)) +#else +# define H5_ATTR_FORMAT(X,Y,Z) /*void*/ +# define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_NORETURN /*void*/ #endif #endif /* __cplusplus */ @@ -1169,22 +1180,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 */ @@ -1604,19 +1602,7 @@ extern char *strdup(const char *s); (ptr = slash); \ } -#elif defined(H5_HAVE_VMS_PATH) - -/* OpenVMS pathname: $:[path] - * 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 "/" @@ -1626,7 +1612,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 ':' diff --git a/src/H5system.c b/src/H5system.c index b3f60ab..2653348 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -582,45 +582,8 @@ void HDsrand(unsigned int seed) { g_seed = seed; } -#endif +#endif /* H5_HAVE_RAND_R */ - -/*------------------------------------------------------------------------- - * 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 - * - *------------------------------------------------------------------------- - */ -#ifdef H5_VMS -int -HDremove_all(const char *fname) -{ - int ret_value = -1; - size_t fname_len; - char *_fname; - - fname_len = HDstrlen(fname) + 3; /* to accomodate ";*" and null terminator */ - _fname = (char *)H5MM_malloc(fname_len); - if(_fname) { - HDsnprintf(_fname, fname_len, "%s;*", fname); - /* Do not use HDremove; function becomes recursive (see H5private.h file)*/ - remove(_fname); - H5MM_xfree(_fname); - ret_value = 0; - } - return ret_value; -} -#endif /*------------------------------------------------------------------------- @@ -872,8 +835,6 @@ H5_build_extpath(const char *name, char **extpath/*out*/) /* * Unix: name[0] is a "/" * Windows: name[0-2] is ":\" or ":/" - * OpenVMS: $:[path] - * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */ if(H5_CHECK_ABSOLUTE(name)) { if(NULL == (full_path = (char *)H5MM_strdup(name))) @@ -894,7 +855,6 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Windows: name[0-1] is ":" * Get current working directory on the drive specified in NAME * Unix: does not apply - * OpenVMS: does not apply */ if(H5_CHECK_ABS_DRIVE(name)) { drive = name[0] - 'A' + 1; @@ -905,14 +865,13 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Windows: name[0] is a '/' or '\' * Get current drive * Unix: does not apply - * OpenVMS: does not apply */ else if(H5_CHECK_ABS_PATH(name) && (0 != (drive = HDgetdrive()))) { HDsnprintf(cwdpath, MAX_PATH_LEN, "%c:%c", (drive + 'A' - 1), name[0]); retcwd = cwdpath; HDstrncpy(new_name, &name[1], name_len); } - /* totally relative for Unix, Windows, and OpenVMS: get current working directory */ + /* totally relative for Unix and Windows: get current working directory */ else { retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN); HDstrncpy(new_name, name, name_len); @@ -931,26 +890,9 @@ H5_build_extpath(const char *name, char **extpath/*out*/) HGOTO_ERROR(H5E_INTERNAL, H5E_NOSPACE, FAIL, "memory allocation failed") HDstrncpy(full_path, cwdpath, cwdlen + 1); -#ifdef H5_VMS - /* If the file name contains relative path, cut off the beginning bracket. Also cut off the - * ending bracket of CWDPATH to combine the full path name. i.g. - * cwdpath = SYS$SYSUSERS:[LU.HDF5.TEST] - * new_name = [.tmp]extlinks.h5 - * full_path = SYS$SYSUSERS:[LU.HDF5.TEST.tmp]extlinks.h5 - */ - if(new_name[0] == '[') { - char *tmp = new_name; - - full_path[cwdlen - 1] = '\0'; - HDstrncat(full_path, ++tmp, HDstrlen(tmp)); - } /* end if */ - else - HDstrncat(full_path, new_name, HDstrlen(new_name)); -#else if(!H5_CHECK_DELIMITER(cwdpath[cwdlen - 1])) HDstrncat(full_path, H5_DIR_SEPS, HDstrlen(H5_DIR_SEPS)); HDstrncat(full_path, new_name, HDstrlen(new_name)); -#endif } /* end if */ } /* end else */ diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 4f0f439..81624d8 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -32,11 +32,7 @@ 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"); @@ -46,19 +42,7 @@ static const char *H5_get_srcdir_filename(const char *filename) /* Build path to test file */ if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) { -#ifdef H5_VMS - HDstrcpy(srcdir_testpath, srcdir); - if(filename[0] == '[') { - char *tmp = filename; - - srcdir_testpath[HDstrlen(srcdir) - 1] = '\0'; - HDstrcat(srcdir_testpath, ++tmp); - } /* end if */ - else - HDstrcat(srcdir_testpath, filename); -#else HDsnprintf(srcdir_testpath, sizeof(srcdir_testpath), "%s/%s", srcdir, filename); -#endif return(srcdir_testpath); } /* end if */ else diff --git a/test/dt_arith.c b/test/dt_arith.c index b3f5cad..eb201d0 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -58,10 +58,9 @@ const char *FILENAME[] = { }; /* - * Count up or down depending on whether the machine is big endian, little - * endian, or VAX (OpenVMS). If local variable `endian' is H5T_ORDER_BE then - * the result will be I, otherwise the result will be Z-(I+1). VAX is printed - * as little endian. + * Count up or down depending on whether the machine is big endian or little + * endian. If local variable `endian' is H5T_ORDER_BE then the result will + * be I, otherwise the result will be Z-(I+1). */ #define ENDIAN(Z,I,E) (H5T_ORDER_BE==E?(I):(Z)-((I)+1)) @@ -88,11 +87,6 @@ static int skip_overflow_tests_g = 0; #define HANDLE_SIGFPE #endif -/* OpenVMS doesn't have this feature. Make sure to disable it*/ -#ifdef H5_VMS -#undef HANDLE_SIGFPE -#endif - /* * Decide what values of floating-point number we want to test. They are * 1 - normalized; 2 - denormalized; 3 - special. @@ -2740,24 +2734,6 @@ my_isnan(dtype_t type, void *val) retval = 1; } -#ifdef H5_VMS - /* For "float" and "double" on OpenVMS/Alpha, NaN is - * actually a valid value of maximal value.*/ - if(!retval) { - if (FLT_FLOAT==type) { - float x; - HDmemcpy(&x, val, sizeof(float)); - retval = (x==FLT_MAX || x==-FLT_MAX); - } else if (FLT_DOUBLE==type) { - double x; - HDmemcpy(&x, val, sizeof(double)); - retval = (x==DBL_MAX || x==-DBL_MAX); - } else { - return 0; - } - } -#endif /*H5_VMS*/ - return retval; } @@ -2786,23 +2762,8 @@ my_isinf(int endian, unsigned char *val, size_t size, bits = (unsigned char*)HDcalloc((size_t)1, size); -#ifdef H5_VMS - if(H5T_ORDER_VAX==endian) { - for (i = 0; i < size; i += 4) { - bits[i] = val[(size-2)-i]; - bits[i+1] = val[(size-1)-i]; - - bits[(size-2)-i] = val[i]; - bits[(size-1)-i] = val[i+1]; - } - } else { - for (i=0; i FLT_MAX; -#ifdef H5_VMS - maximal = HDfabs(*((double*)aligned)) == FLT_MAX; -#endif } else if (FLT_DOUBLE==dst_type) { hw_d = *((double*)aligned); hw = (unsigned char*)&hw_d; @@ -3149,17 +3074,11 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) hw = (unsigned char*)&hw_f; underflow = HDfabsl(*((long double*)aligned)) < FLT_MIN; overflow = HDfabsl(*((long double*)aligned)) > FLT_MAX; -#ifdef H5_VMS - maximal = HDfabs(*((long double*)aligned)) == FLT_MAX; -#endif } else if (FLT_DOUBLE==dst_type) { hw_d = *((long double*)aligned); hw = (unsigned char*)&hw_d; underflow = HDfabsl(*((long double*)aligned)) < DBL_MIN; overflow = HDfabsl(*((long double*)aligned)) > DBL_MAX; -#ifdef H5_VMS - maximal = HDfabs(*((long double*)aligned)) == DBL_MAX; -#endif } else { hw_ld = *((long double*)aligned); hw = (unsigned char*)&hw_ld; @@ -3194,17 +3113,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (k==dst_size) continue; /*no error*/ -#ifdef H5_VMS - /* For "float" and "double" on OpenVMS/Alpha, NaN is - * a valid value of maximal value.*/ - if (FLT_FLOAT==src_type && - my_isnan(src_type, saved+j*sizeof(float))) { - continue; - } else if (FLT_DOUBLE==src_type && - my_isnan(src_type, saved+j*sizeof(double))) { - continue; - } -#endif /*H5_VMS*/ /* * Assume same if both results are NaN. There are many NaN bit @@ -3262,11 +3170,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (overflow && my_isinf(dendian, buf+j*sizeof(float), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* all overflowed, no error */ -#ifdef H5_VMS - if (maximal && my_isinf(dendian, buf+j*sizeof(float), - dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) - continue; /* maximal value, no error */ -#endif /*H5_VMS*/ check_mant[0] = HDfrexpf(x, check_expo+0); check_mant[1] = HDfrexpf(hw_f, check_expo+1); } else if (FLT_DOUBLE==dst_type) { @@ -3278,11 +3181,6 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (overflow && my_isinf(dendian, buf+j*sizeof(double), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* all overflowed, no error */ -#ifdef H5_VMS - if (maximal && my_isinf(dendian, buf+j*sizeof(double), - dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) - continue; /* maximal value, no error */ -#endif /*H5_VMS*/ check_mant[0] = HDfrexp(x, check_expo+0); check_mant[1] = HDfrexp(hw_d, check_expo+1); #if H5_SIZEOF_LONG_DOUBLE !=0 && (H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE) @@ -4924,7 +4822,6 @@ run_fp_tests(const char *name) nerrors += test_conv_flt_1(name, TEST_NORMAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_DOUBLE); #endif -#ifndef H5_VMS /*Test denormalized values. TEST_DENORM indicates denormalized values.*/ nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE); nerrors += test_conv_flt_1(name, TEST_DENORM, H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT); @@ -4944,7 +4841,6 @@ run_fp_tests(const char *name) nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_FLOAT); nerrors += test_conv_flt_1(name, TEST_SPECIAL, H5T_NATIVE_LDOUBLE, H5T_NATIVE_DOUBLE); #endif -#endif /*H5_VMS*/ done: return nerrors; @@ -5085,11 +4981,7 @@ run_fp_int_conv(const char *name) int nerrors = 0; int test_values; -#ifdef H5_VMS - test_values = TEST_NORMAL; -#else for(test_values = TEST_NORMAL; test_values <= TEST_SPECIAL; test_values++) { -#endif /*H5_VMS*/ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_SCHAR); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_SCHAR); @@ -5194,9 +5086,7 @@ run_fp_int_conv(const char *name) #endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ #endif #endif -#ifndef H5_VMS } /* end for */ -#endif /* H5_VMS */ return nerrors; } @@ -5248,10 +5138,8 @@ main(void) * for user-defined integer types */ nerrors += test_derived_integer(); -#ifndef H5_VMS /* Does floating point overflow generate a SIGFPE? */ generates_sigfpe(); -#endif /* Test degenerate cases */ nerrors += run_fp_tests("noop"); diff --git a/test/dtypes.c b/test/dtypes.c index 59cf000..88bbce0 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -3233,11 +3233,7 @@ test_compound_18(void) /* Open Generated File */ /* (generated with gen_bad_compound.c) */ -#ifdef H5_VMS - if((file = H5Fopen(TESTFILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR -#else if((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR -#endif /* Try to open the datatype */ H5E_BEGIN_TRY { diff --git a/test/fheap.c b/test/fheap.c index fee6fdf..c300028 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -16418,9 +16418,7 @@ curr_test = FHEAP_TEST_NORMAL; nerrors += test_id_limits(fapl, &small_cparam); nerrors += test_filtered_create(fapl, &small_cparam); nerrors += test_size(fapl, &small_cparam); -#ifndef H5_CANNOT_OPEN_TWICE nerrors += test_reopen_hdr(fapl, &small_cparam); -#endif /*H5_CANNOT_OPEN_TWICE*/ #else /* QAK */ HDfprintf(stderr, "Uncomment tests!\n"); #endif /* QAK */ diff --git a/test/flush2.c b/test/flush2.c index 4ba2922..c6965ae 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -250,8 +250,6 @@ main(void) #if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS) SKIPPED(); puts(" DLL will flush the file even when calling _exit, skip this test temporarily"); -#elif defined H5_VMS - SKIPPED(); #else H5_FAILED() goto error; @@ -280,8 +278,6 @@ main(void) #if defined H5_HAVE_WIN32_API && !defined (hdf5_EXPORTS) SKIPPED(); puts(" DLL will flush the file even when calling _exit, skip this test temporarily"); -#elif defined H5_VMS - SKIPPED(); #else H5_FAILED() goto error; diff --git a/test/gen_cross.c b/test/gen_cross.c index 1c73016..2d4b788 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -22,6 +22,10 @@ * Run it on an OpenVMS, a little-endian, and a big-endian machine. Change the * output file names to vms_data.h5, le_data.h5, and be_data.h5, and put them * under hdf5/test/ directory. + * + * Note that we no longer support OpenVMS. The OpenVMS file will eventually + * have to go away since we won't be able to re-create it but it's probably + * worth keeping around for now. */ #include diff --git a/test/getname.c b/test/getname.c index dc1ddbe..e1bbc6b 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2995,9 +2995,7 @@ main(void) nerrors += test_main(file_id, fapl); nerrors += test_obj_ref(fapl); nerrors += test_reg_ref(fapl); -#ifndef H5_CANNOT_OPEN_TWICE nerrors += test_elinks(fapl); -#endif /*H5_CANNOT_OPEN_TWICE*/ /* Close file */ H5Fclose(file_id); diff --git a/test/lheap.c b/test/lheap.c index c13a30d..60b29f3 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -180,11 +180,7 @@ main(void) { const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ hid_t dset = -1; -#ifdef H5_VMS - file = H5Fopen(TESTFILE, H5F_ACC_RDONLY, H5P_DEFAULT); -#else file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); -#endif if(file >= 0){ if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0) TEST_ERROR diff --git a/test/links.c b/test/links.c index 7e233a5..2a42dac 100644 --- a/test/links.c +++ b/test/links.c @@ -40,13 +40,8 @@ /* File for external link test. Created with gen_udlinks.c */ #define LINKED_FILE "be_extlink2.h5" -#ifdef H5_VMS -#define TMPDIR "[.tmp]" -#define TMPDIR2 "[.tmp2]" -#else /* H5_VMS */ #define TMPDIR "tmp/" #define TMPDIR2 "tmp2/" -#endif /* H5_VMS */ /* Symlinks for external link symlink test */ #define SYMLINK1 TMPDIR "sym1.h5" @@ -324,7 +319,7 @@ typedef struct { * Function: fix_ext_filename * * Purpose: Internal function to append path to file name. It handles - * path name of Unix, Windows, and OpenVMS. + * path name of Unix and Windows. * * Return: void * @@ -337,17 +332,8 @@ fix_ext_filename(char *path_name, char *cwd, const char *file_name) { HDstrcpy(path_name, cwd); -#ifdef H5_VMS - if(file_name[0] == '[') { - char *tmp = file_name; - path_name[strlen(cwd)-1] = '\0'; - HDstrcat(path_name, ++tmp); - } else - HDstrcat(path_name, file_name); -#else HDstrcat(path_name, "/"); HDstrcat(path_name, file_name); -#endif } @@ -2881,7 +2867,6 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format) * set up name for main file: * Linux: "/CWD/tmp/extlinks0" * Window: ":/CWD/tmp/extlinks0" - * OpenVMS: "$:[CWD.tmp]extlinks0" */ fix_ext_filename(tmpname, cwdpath, FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); @@ -7024,7 +7009,6 @@ external_file_cache(hid_t fapl, hbool_t new_format) /* Verify that all files are now closed */ H5F_sfile_assert_num(0); -#ifndef H5_CANNOT_OPEN_TWICE /* * Test 5: 3 file cycle */ @@ -7126,7 +7110,6 @@ external_file_cache(hid_t fapl, hbool_t new_format) /* Verify that all files are now closed */ H5F_sfile_assert_num(0); -#endif /* H5_CANNOT_OPEN_TWICE */ /* Close fapl */ H5Pclose(my_fapl); @@ -14661,15 +14644,11 @@ main(void) printf("\n---Testing without external file cache---\n"); } /* end else */ -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_path(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_self(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_pingpong(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_toomany(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_dangling(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_recursive(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_query(my_fapl, new_format) < 0 ? 1 : 0; @@ -14677,9 +14656,7 @@ main(void) nerrors += external_link_unlink_dense(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_move(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_link_ride(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_link_closing(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += external_link_endian(new_format) < 0 ? 1 : 0; nerrors += external_link_strong(my_fapl, new_format) < 0 ? 1 : 0; @@ -14709,9 +14686,7 @@ main(void) nerrors += external_symlink(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_copy_invalid_object(my_fapl, new_format) < 0 ? 1 : 0; nerrors += external_dont_fail_to_source(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += external_open_twice(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ } /* end for */ /* These tests assume that external links are a form of UD links, @@ -14735,9 +14710,7 @@ main(void) nerrors += obj_visit_by_name(my_fapl, new_format) < 0 ? 1 : 0; nerrors += obj_visit_stop(my_fapl, new_format) < 0 ? 1 : 0; nerrors += link_filters(my_fapl, new_format) < 0 ? 1 : 0; -#ifndef H5_CANNOT_OPEN_TWICE nerrors += obj_exists(my_fapl, new_format) < 0 ? 1 : 0; -#endif /* H5_CANNOT_OPEN_TWICE */ /* Keep this test last, it's testing files that are used above */ /* do not do this for files used by external link tests */ diff --git a/test/links_env.c b/test/links_env.c index 308d562..6e47667 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -25,11 +25,7 @@ #include "H5Iprivate.h" /* IDs */ #include "H5Lprivate.h" /* Links */ -#ifdef H5_VMS -#define TMPDIR "[.tmp]" -#else /* H5_VMS */ #define TMPDIR "tmp/" -#endif /* H5_VMS */ #define NAME_BUF_SIZE 1024 const char *FILENAME[] = { diff --git a/test/objcopy.c b/test/objcopy.c index 0d90f93..d70ba58 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -12843,9 +12843,7 @@ main(void) nerrors += test_copy_group_wide_loop(fcpl_src, fcpl_dst, src_fapl, dst_fapl); nerrors += test_copy_group_links(fcpl_src, fcpl_dst, src_fapl, dst_fapl); nerrors += test_copy_soft_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl); -#ifndef H5_CANNOT_OPEN_TWICE nerrors += test_copy_ext_link(fcpl_src, fcpl_dst, src_fapl, dst_fapl); -#endif /* H5_CANNOT_OPEN_TWICE */ nerrors += test_copy_exist(fcpl_src, fcpl_dst, src_fapl, dst_fapl); nerrors += test_copy_path(fcpl_src, fcpl_dst, src_fapl, dst_fapl); diff --git a/test/stab.c b/test/stab.c index 48b58b1..95e9722 100644 --- a/test/stab.c +++ b/test/stab.c @@ -57,8 +57,6 @@ const char *FILENAME[] = { /* The group_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory * for version 1.6. To get this data file, simply compile gen_old_group.c with * the HDF5 library in that branch and run it. */ -/* I changed the name "group_old.h5.copy" to "group_old_copy.h5" because OpenVMS - * doesn't like any file name with more than one ".". SLU 2010/12/13 */ #define FILE_OLD_GROUPS "group_old.h5" #define FILE_OLD_GROUPS_COPY "group_old_copy.h5" diff --git a/test/tconfig.c b/test/tconfig.c index f3ac242..14c863e 100644 --- a/test/tconfig.c +++ b/test/tconfig.c @@ -60,13 +60,6 @@ void test_exit_definitions(void); * Programmer: Albert Cheng * September 25, 2001 * - * Modifications: - * Raymond Lu - * 16 Dec 2009 - * On Boeing's OpenVMS, the value of EXIT_FAILURE is 268435458. - * (The test is in test_exit_definitions.) Their document says - * it's supposed to be 2. I commented it out for OpenVMS for - * further consideration. *------------------------------------------------------------------------- */ void @@ -75,9 +68,7 @@ test_configure(void) /* Output message about test being performed */ MESSAGE(5, ("Testing configure definitions\n")); test_config_ctypes(); -#ifndef H5_VMS test_exit_definitions(); -#endif } diff --git a/test/tfile.c b/test/tfile.c index b84ad4e..c7cc943 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -190,19 +190,15 @@ test_file_create(void) * try to create the same file with H5F_ACC_TRUNC. This should fail * because fid1 is the same file and is currently open. */ -#ifndef H5_HAVE_FILE_VERSIONS fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); VERIFY(fid2, FAIL, "H5Fcreate"); -#endif /*H5_DONT_HAVE_FILE_VERSIONS*/ /* Close all files */ ret = H5Fclose(fid1); CHECK(ret, FAIL, "H5Fclose"); -#ifndef H5_HAVE_FILE_VERSIONS ret = H5Fclose(fid2); VERIFY(ret, FAIL, "H5Fclose"); /*file should not have been open */ -#endif /*H5_HAVE_FILE_VERSIONS*/ /* * Try again with H5F_ACC_EXCL. This should fail because the file already @@ -215,7 +211,6 @@ test_file_create(void) fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); -#ifndef H5_HAVE_FILE_VERSIONS /* * Try to truncate first file again. This should fail because fid1 is the * same file and is currently open. @@ -229,7 +224,6 @@ test_file_create(void) */ fid2 = H5Fcreate(FILE1, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT); VERIFY(fid2, FAIL, "H5Fcreate"); -#endif /*H5_HAVE_FILE_VERSIONS*/ /* Get the file-creation template */ tmpl1 = H5Fget_create_plist(fid1); @@ -1379,7 +1373,6 @@ test_file_perm(void) ret = H5Dclose(dset); CHECK(ret, FAIL, "H5Dclose"); -#ifndef H5_CANNOT_OPEN_TWICE /* Open the file (with read-only permission) */ filero = H5Fopen(FILE2, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK(filero, FAIL, "H5Fopen"); @@ -1396,7 +1389,6 @@ test_file_perm(void) ret = H5Fclose(filero); CHECK(ret, FAIL, "H5Fclose"); -#endif /*H5_CANNOT_OPEN_TWICE*/ ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); @@ -3677,16 +3669,12 @@ test_file(void) test_file_freespace(); /* Test file free space information */ test_file_ishdf5(); /* Test detecting HDF5 files correctly */ test_file_open_dot(); /* Test opening objects with "." for a name */ -#ifndef H5_CANNOT_OPEN_TWICE test_file_open_overlap(); /* Test opening files in an overlapping manner */ -#endif /*H5_CANNOT_OPEN_TWICE*/ test_file_getname(); /* Test basic H5Fget_name() functionality */ -#ifndef H5_CANNOT_OPEN_TWICE test_file_double_root_open(); /* Test opening root group from two files works properly */ test_file_double_group_open(); /* Test opening same group from two files works properly */ test_file_double_dataset_open(); /* Test opening same dataset from two files works properly */ test_file_double_datatype_open(); /* Test opening same named datatype from two files works properly */ -#endif /*H5_CANNOT_OPEN_TWICE*/ test_userblock_file_size(); /* Tests that files created with a userblock have the correct size */ test_cached_stab_info(); /* Tests that files are created with cached stab info in the superblock */ test_rw_noupdate(); /* Test to ensure that RW permissions don't write the file unless dirtied */ diff --git a/test/th5o.c b/test/th5o.c index 3e6b8cb..3eb37b8 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -1356,9 +1356,7 @@ test_h5o(void) test_h5o_link(); /* Test object link routine */ test_h5o_comment(); /* Test routines for comment */ test_h5o_comment_by_name(); /* Test routines for comment by name */ -#ifndef H5_CANNOT_OPEN_TWICE /* OpenVMS can't open a file twice */ test_h5o_getinfo_same_file(); /* Test info for objects in the same file */ -#endif /* H5_CANNOT_OPEN_TWICE */ } /* test_h5o() */ diff --git a/test/th5s.c b/test/th5s.c index 1560ef4..9d08abe 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -2326,6 +2326,48 @@ test_h5s_extent_copy(void) /**************************************************************** ** +** test_h5s_bug1(): Test Creating dataspace with H5Screate then +* setting extent with H5Sextent_copy. +** +****************************************************************/ +static void +test_h5s_bug1(void) +{ + hid_t space1; /* Dataspace to copy extent to */ + hid_t space2; /* Scalar dataspace */ + hsize_t dims[2] = {10, 10}; /* Dimensions */ + hsize_t start[2] = {0, 0}; /* Hyperslab start */ + htri_t select_valid; /* Whether the dataspace selection is valid */ + herr_t ret; /* Generic error return */ + + /* Create dataspaces */ + space1 = H5Screate(H5S_SIMPLE); + CHECK(space1, FAIL, "H5Screate"); + space2 = H5Screate_simple(2, dims, NULL); + CHECK(space2, FAIL, "H5Screate"); + + /* Copy extent to space1 */ + ret = H5Sextent_copy(space1, space2); + CHECK(ret, FAIL, "H5Sextent_copy"); + + /* Select hyperslab in space1 containing entire extent */ + ret = H5Sselect_hyperslab(space1, H5S_SELECT_SET, start, NULL, dims, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Check that space1's selection is valid */ + select_valid = H5Sselect_valid(space1); + CHECK(select_valid, FAIL, "H5Sselect_valid"); + VERIFY(select_valid, TRUE, "H5Sselect_valid result"); + + /* Close dataspaces */ + ret = H5Sclose(space1); + CHECK(ret, FAIL, "H5Sclose"); + ret = H5Sclose(space2); + CHECK(ret, FAIL, "H5Sclose"); +} /* test_h5s_bug1() */ + +/**************************************************************** +** ** test_h5s(): Main H5S (dataspace) testing routine. ** ****************************************************************/ @@ -2350,6 +2392,7 @@ test_h5s(void) test_h5s_extent_equal(); /* Test extent comparison code */ test_h5s_extent_copy(); /* Test extent copy code */ + test_h5s_bug1(); /* Test bug in offset initialization */ } /* test_h5s() */ diff --git a/test/tsohm.c b/test/tsohm.c index 9554007..aa7b93f 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -3988,10 +3988,7 @@ test_sohm(void) test_sohm_delete(); /* Test deleting shared messages */ test_sohm_delete_revert(); /* Test that a file with SOHMs becomes an * empty file again when they are deleted. */ -#ifndef H5_CANNOT_OPEN_TWICE /* On VMS this test fails since it tries to - open target file the second time */ test_sohm_extlink(); /* Test SOHMs when external links are used */ -#endif /* H5_CANNOT_OPEN_TWICE */ test_sohm_extend_dset(); /* Test extending shared datasets */ test_sohm_external_dtype(); /* Test using datatype in another file */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index cfd171a..71ada53 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -6090,28 +6090,6 @@ my_isnan(dtype_t type, void *val) } } -#ifdef H5_VMS - /* For "float" and "double" on OpenVMS/Alpha, NaN is - * actually a valid value of maximal value.*/ - if(!retval) - { - if (FLT_FLOAT==type) - { - float x; - - HDmemcpy(&x, val, sizeof(float)); - retval = (x==FLT_MAX || x==-FLT_MAX); - } else if (FLT_DOUBLE==type) { - double x; - - HDmemcpy(&x, val, sizeof(double)); - retval = (x==DBL_MAX || x==-DBL_MAX); - } else - { - return FALSE; - } - } -#endif /*H5_VMS*/ h5difftrace("my_isnan finish\n"); return retval; diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index e2bb9cd..8b7013b 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -875,11 +875,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai else tempchar = (tempchar >> packed_data_offset) & packed_data_mask; } - #ifdef H5_VMS - h5tools_str_append(str, OPT(info->fmt_schar, "%hd"), tempchar); - #else h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar); - #endif } } /* end if (sizeof(char) == nsize) */ else if (sizeof(int) == nsize) { diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index 4eb1ded..8f52eba 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -322,18 +322,7 @@ H5_DLL int HDrand(void); #define HDread(F,M,Z) read(F,M,Z) #define HDreaddir(D) readdir(D) #define HDrealloc(M,Z) realloc(M,Z) -#ifdef H5_VMS -#ifdef __cplusplus -extern "C" { -#endif -int HDremove_all(const char * fname); -#ifdef __cplusplus -} -#endif -#define HDremove(S) HDremove_all(S) -#else #define HDremove(S) remove(S) -#endif /*H5_VMS*/ #define HDrename(OLD,NEW) rename(OLD,NEW) #define HDrewind(F) rewind(F) #define HDrewinddir(D) rewinddir(D) diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c index f73ba40..d025602 100644 --- a/tools/perform/zip_perf.c +++ b/tools/perform/zip_perf.c @@ -30,15 +30,6 @@ #include -#ifdef VMS -# define unlink delete -#endif /* VMS */ - -#ifdef RISCOS -# define unlink remove -# define fileno(file) file->__file -#endif /* RISCOS */ - #define ONE_KB 1024 #define ONE_MB (ONE_KB * ONE_KB) #define ONE_GB (ONE_MB * ONE_KB) -- cgit v0.12