diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-12-04 02:29:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-12-04 02:29:06 (GMT) |
commit | fcd8d9b878071ea0e1d834e1e2a192cfec90586f (patch) | |
tree | 8ddb35ce78c1046839bc38e58c728397e2c5a781 /src/H5Oattr.c | |
parent | 4dd379f637a411eb1ae564dc9f993b556d9a65e3 (diff) | |
download | hdf5-fcd8d9b878071ea0e1d834e1e2a192cfec90586f.zip hdf5-fcd8d9b878071ea0e1d834e1e2a192cfec90586f.tar.gz hdf5-fcd8d9b878071ea0e1d834e1e2a192cfec90586f.tar.bz2 |
[svn-r11759] Purpose:
New feature
Description:
Add in a combination of Peter's & my code to support copying
variable-length data from one file to another, although currently only
supported with contiguous data storage.
Platforms tested:
FreeBSD 4.11 (sleipnir)
h5committest
Diffstat (limited to 'src/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index 7d278db..013ebb5 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -38,8 +38,8 @@ static herr_t H5O_attr_link(H5F_t *f, hid_t dxpl_id, const void *_mesg); static herr_t H5O_attr_debug (H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); -/* This message derives from H5O */ -const H5O_class_t H5O_ATTR[1] = {{ +/* This message derives from H5O message class */ +const H5O_msg_class_t H5O_MSG_ATTR[1] = {{ H5O_ATTR_ID, /* message id number */ "attribute", /* message name for debugging */ sizeof(H5A_t), /* native message size */ @@ -151,18 +151,18 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p) H5O_shared_t *shared; /* Shared information */ /* Get the shared information */ - if (NULL == (shared = (H5O_SHARED->decode) (f, dxpl_id, p))) + if (NULL == (shared = (H5O_MSG_SHARED->decode) (f, dxpl_id, p))) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message"); /* Get the actual datatype information */ - if((attr->dt= H5O_shared_read(f, dxpl_id, shared, H5O_DTYPE, NULL))==NULL) + if((attr->dt= H5O_shared_read(f, dxpl_id, shared, H5O_MSG_DTYPE, NULL))==NULL) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype"); /* Free the shared information */ - H5O_free_real(H5O_SHARED, shared); + H5O_free_real(H5O_MSG_SHARED, shared); } /* end if */ else { - if((attr->dt=(H5O_DTYPE->decode)(f,dxpl_id,p))==NULL) + if((attr->dt=(H5O_MSG_DTYPE->decode)(f,dxpl_id,p))==NULL) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute datatype"); } /* end else */ if(version < H5O_ATTR_VERSION_NEW) @@ -174,7 +174,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p) if (NULL==(attr->ds = H5FL_CALLOC(H5S_t))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - if((extent=(H5O_SDSPACE->decode)(f,dxpl_id,p))==NULL) + if((extent=(H5O_MSG_SDSPACE->decode)(f,dxpl_id,p))==NULL) HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace"); /* Copy the extent information */ @@ -307,16 +307,16 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg) HDmemset(&sh_mesg,0,sizeof(H5O_shared_t)); /* Get shared message information from datatype */ - if ((H5O_DTYPE->get_share)(f, attr->dt, &sh_mesg/*out*/)<0) + if ((H5O_MSG_DTYPE->get_share)(f, attr->dt, &sh_mesg/*out*/)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode shared attribute datatype"); /* Encode shared message information for datatype */ - if((H5O_SHARED->encode)(f,p,&sh_mesg)<0) + if((H5O_MSG_SHARED->encode)(f,p,&sh_mesg)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode shared attribute datatype"); } /* end if */ else { /* Encode datatype information */ - if((H5O_DTYPE->encode)(f,p,attr->dt)<0) + if((H5O_MSG_DTYPE->encode)(f,p,attr->dt)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute datatype"); } /* end else */ if(version < H5O_ATTR_VERSION_NEW) { @@ -327,7 +327,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg) p += attr->dt_size; /* encode the attribute dataspace */ - if((H5O_SDSPACE->encode)(f,p,&(attr->ds->extent))<0) + if((H5O_MSG_SDSPACE->encode)(f,p,&(attr->ds->extent))<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't encode attribute dataspace"); if(version < H5O_ATTR_VERSION_NEW) { HDmemset(p+attr->ds_size, 0, H5O_ALIGN(attr->ds_size)-attr->ds_size); @@ -651,14 +651,14 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in HDmemset(&sh_mesg,0,sizeof(H5O_shared_t)); /* Get shared message information from datatype */ - if ((H5O_DTYPE->get_share)(f, mesg->dt, &sh_mesg/*out*/)<0) + if ((H5O_MSG_DTYPE->get_share)(f, mesg->dt, &sh_mesg/*out*/)<0) HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "can't retrieve shared message information"); - debug=H5O_SHARED->debug; + debug=H5O_MSG_SHARED->debug; dt_mesg=&sh_mesg; } /* end if */ else { - debug=H5O_DTYPE->debug; + debug=H5O_MSG_DTYPE->debug; dt_mesg=mesg->dt; } /* end else */ if(debug) |