diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-22 22:11:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1998-07-22 22:11:22 (GMT) |
commit | b970dce3ec059f86206b275d55fde2b8b6e5fd33 (patch) | |
tree | ae810bf2af451559ced99a17269ec06f8db4dbce /src/H5Sselect.c | |
parent | 29a029d7e7c95be8ded8fb4e0989e3711ab7e3dc (diff) | |
download | hdf5-b970dce3ec059f86206b275d55fde2b8b6e5fd33.zip hdf5-b970dce3ec059f86206b275d55fde2b8b6e5fd33.tar.gz hdf5-b970dce3ec059f86206b275d55fde2b8b6e5fd33.tar.bz2 |
[svn-r530] Added code so H5Scopy copies selections properly.
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index af3dbcd..062b2a1 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -93,14 +93,55 @@ H5S_select_term(void) herr_t H5S_select_copy (H5S_t *dst, const H5S_t *src) { + herr_t ret_value=SUCCEED; /* return value */ + FUNC_ENTER (H5S_select_copy, FAIL); /* Check args */ assert(dst); assert(src); + /* Copy regular fields */ + dst->select=src->select; + +/* Need to copy offset and order information still */ /* Perform correct type of copy based on the type of selection */ + switch (src->extent.type) { + case H5S_SCALAR: + /*nothing needed */ + break; + + case H5S_SIMPLE: + /* Deep copy extra stuff */ + switch(src->select.type) { + case H5S_SEL_NONE: + case H5S_SEL_ALL: + /*nothing needed */ + break; + + case H5S_SEL_POINTS: + ret_value=H5S_point_copy(dst,src); + break; + + case H5S_SEL_HYPERSLABS: + ret_value=H5S_hyper_copy(dst,src); + break; + + default: + assert("unknown selection type" && 0); + break; + } /* end switch */ + break; + + case H5S_COMPLEX: + /*void */ + break; + + default: + assert("unknown data space type" && 0); + break; + } FUNC_LEAVE (SUCCEED); } /* H5S_select_copy() */ |