diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-07-22 18:45:46 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-07-22 18:45:46 (GMT) |
commit | 29a029d7e7c95be8ded8fb4e0989e3711ab7e3dc (patch) | |
tree | 1ade13b398a898accefb0eee491705edff974503 /src/H5A.c | |
parent | c638ee56596bc8ff4908d3fb73a6911ad6181d01 (diff) | |
download | hdf5-29a029d7e7c95be8ded8fb4e0989e3711ab7e3dc.zip hdf5-29a029d7e7c95be8ded8fb4e0989e3711ab7e3dc.tar.gz hdf5-29a029d7e7c95be8ded8fb4e0989e3711ab7e3dc.tar.bz2 |
[svn-r529] Changes since 19980722
----------------------
./src/H5.c
Handle hid_t of type H5_TEMPBUF, arguments usually called tbuf_id.
Added array tracing where the array rank is stored in a simple
data space. Just use the name of the data space argument when
declaring the array argument:
herr_t
H5Sselect_hyperslab (hid_t space_id, H5S_seloper_t op,
const hssize_t start[/*space_id*/],
const hsize_t _stride[/*space_id*/],
const hsize_t count[/*space_id*/],
const hsize_t _block[/*space_id*/])
and when the program runs you'll see array values printed:
H5Sselect_hyperslab(space=218103813, op=H5S_SELECT_SET,
start=0xbfffef4c {0}, _stride=NULL,
count=0xbfffef44 {64},
_block=NULL) = SUCCEED;
Added more symbolic data types to the tracing output.
./src/H5A.c
./src/H5Apublic.h
./src/H5D.c
./src/H5Dpublic.h
./src/H5F.c
./src/H5Fpublic.h
./src/H5G.c
./src/H5Gpublic.h
./src/H5P.c
./src/H5Ppublic.h
./src/H5S.c
./src/H5Sall.c
./src/H5Shyper.c
./src/H5Spoint.c
./src/H5Spublic.h
./src/H5Sselect.c
./src/H5Ssimp.c
./src/H5TB.c
./src/H5V.c
Changed some API argument names to be more consistent with
other API functions and to produce better tracing output.
Reformatted some long lines. Indented printf statements.
./tools/h5ls.c
Fixed warnings about unsigned vs. signed comparisons.
Diffstat (limited to 'src/H5A.c')
-rw-r--r-- | src/H5A.c | 63 |
1 files changed, 32 insertions, 31 deletions
@@ -116,12 +116,12 @@ H5A_term_interface(void) PURPOSE Creates a dataset as an attribute of another dataset or group USAGE - hid_t H5Acreate (loc_id, name, datatype, dataspace, create_plist) + hid_t H5Acreate (loc_id, name, type_id, space_id, plist_id) hid_t loc_id; IN: Object (dataset or group) to be attached to const char *name; IN: Name of attribute to create - hid_t datatype; IN: ID of datatype for attribute - hid_t dataspace; IN: ID of dataspace for attribute - hid_t create_plist; IN: ID of creation property list (currently not used) + hid_t type_id; IN: ID of datatype for attribute + hid_t space_id; IN: ID of dataspace for attribute + hid_t plist_id; IN: ID of creation property list (currently not used) RETURNS SUCCEED/FAIL @@ -133,7 +133,7 @@ H5A_term_interface(void) attribute for an object must be unique for that object. The 'type_id' and 'space_id' are created with the H5T and H5S interfaces respectively. Currently only simple dataspaces are allowed for attribute dataspaces. - The 'create_plist_id' property list is currently un-used, but will be + The 'plist_id' property list is currently un-used, but will be used int the future for optional properties of attributes. The attribute ID returned from this function must be released with H5Aclose or resource leaks will develop. @@ -150,8 +150,8 @@ H5A_term_interface(void) * --------------------------------------------------------------------------*/ hid_t -H5Acreate (hid_t loc_id, const char *name, hid_t datatype, hid_t dataspace, - hid_t create_plist) +H5Acreate (hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, + hid_t plist_id) { void *obj = NULL; H5G_entry_t *ent = NULL; @@ -160,7 +160,7 @@ H5Acreate (hid_t loc_id, const char *name, hid_t datatype, hid_t dataspace, hid_t ret_value = FAIL; FUNC_ENTER(H5Acreate, FAIL); - H5TRACE5("i","isiii",loc_id,name,datatype,dataspace,create_plist); + H5TRACE5("i","isiii",loc_id,name,type_id,space_id,plist_id); /* check arguments */ if (NULL==(obj=H5I_object (loc_id))) { @@ -186,17 +186,17 @@ H5Acreate (hid_t loc_id, const char *name, hid_t datatype, hid_t dataspace, if (!name || !*name) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name"); } - if (H5_DATATYPE != H5I_group(datatype) || - NULL == (type = H5I_object(datatype))) { + if (H5_DATATYPE != H5I_group(type_id) || + NULL == (type = H5I_object(type_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type"); } - if (H5_DATASPACE != H5I_group(dataspace) || - NULL == (space = H5I_object(dataspace))) { + if (H5_DATASPACE != H5I_group(space_id) || + NULL == (space = H5I_object(space_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); } - if (H5P_DEFAULT!=create_plist && - (H5P_DATASET_CREATE != H5P_get_class(create_plist) || - NULL == H5I_object(create_plist))) { + if (H5P_DEFAULT!=plist_id && + (H5P_DATASET_CREATE != H5P_get_class(plist_id) || + NULL == H5I_object(plist_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset creation property list"); } @@ -262,7 +262,8 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type, /* Compute the internal sizes */ attr->dt_size=(H5O_DTYPE[0].raw_size)(attr->ent.file,type); - attr->ds_size=(H5O_SDSPACE[0].raw_size)(attr->ent.file,&(space->extent.u.simple)); + attr->ds_size=(H5O_SDSPACE[0].raw_size)(attr->ent.file, + &(space->extent.u.simple)); attr->data_size=H5S_extent_npoints(space)*H5T_get_size(type); /* Hold the symbol table entry (and file) open */ @@ -581,9 +582,9 @@ done: PURPOSE Write out data to an attribute USAGE - herr_t H5Awrite (attr_id, mem_dt, buf) + herr_t H5Awrite (attr_id, type_id, buf) hid_t attr_id; IN: Attribute to write - hid_t mem_dt; IN: Memory datatype of buffer + hid_t type_id; IN: Memory datatype of buffer void *buf; IN: Buffer of data to write RETURNS SUCCEED/FAIL @@ -594,22 +595,22 @@ done: This function writes a complete attribute to disk. --------------------------------------------------------------------------*/ herr_t -H5Awrite (hid_t attr_id, hid_t mem_dt, void *buf) +H5Awrite (hid_t attr_id, hid_t type_id, void *buf) { H5A_t *attr = NULL; const H5T_t *mem_type = NULL; herr_t ret_value = FAIL; FUNC_ENTER(H5Awrite, FAIL); - H5TRACE3("e","iix",attr_id,mem_dt,buf); + H5TRACE3("e","iix",attr_id,type_id,buf); /* check arguments */ if (H5_ATTR != H5I_group(attr_id) || (NULL == (attr = H5I_object(attr_id)))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); } - if (H5_DATATYPE != H5I_group(mem_dt) || - NULL == (mem_type = H5I_object(mem_dt))) { + if (H5_DATATYPE != H5I_group(type_id) || + NULL == (mem_type = H5I_object(type_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } if (NULL == buf) { @@ -752,9 +753,9 @@ done: PURPOSE Read in data from an attribute USAGE - herr_t H5Aread (attr_id, mem_dt, buf) + herr_t H5Aread (attr_id, type_id, buf) hid_t attr_id; IN: Attribute to read - hid_t mem_dt; IN: Memory datatype of buffer + hid_t type_id; IN: Memory datatype of buffer void *buf; IN: Buffer for data to read RETURNS SUCCEED/FAIL @@ -765,22 +766,22 @@ done: This function reads a complete attribute from disk. --------------------------------------------------------------------------*/ herr_t -H5Aread (hid_t attr_id, hid_t mem_dt, void *buf) +H5Aread (hid_t attr_id, hid_t type_id, void *buf) { - H5A_t *attr = NULL; - const H5T_t *mem_type = NULL; - herr_t ret_value = FAIL; + H5A_t *attr = NULL; + const H5T_t *mem_type = NULL; + herr_t ret_value = FAIL; FUNC_ENTER(H5Aread, FAIL); - H5TRACE3("e","iix",attr_id,mem_dt,buf); + H5TRACE3("e","iix",attr_id,type_id,buf); /* check arguments */ if (H5_ATTR != H5I_group(attr_id) || (NULL == (attr = H5I_object(attr_id)))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an attribute"); } - if (H5_DATATYPE != H5I_group(mem_dt) || - NULL == (mem_type = H5I_object(mem_dt))) { + if (H5_DATATYPE != H5I_group(type_id) || + NULL == (mem_type = H5I_object(type_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } if (NULL == buf) { |