diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-15 17:54:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 1997-09-15 17:54:15 (GMT) |
commit | 4dd2b367d5718689009ff67e2e665b7e61863331 (patch) | |
tree | 7f89717daf9e810a268dfb02ee46e250d851ce28 /src/H5Osdim.c | |
parent | 9e1e3eadbe2644670371333b4602cd184a01703e (diff) | |
download | hdf5-4dd2b367d5718689009ff67e2e665b7e61863331.zip hdf5-4dd2b367d5718689009ff67e2e665b7e61863331.tar.gz hdf5-4dd2b367d5718689009ff67e2e665b7e61863331.tar.bz2 |
[svn-r78] Checkpointing dataset code. Everything is currently working, except writing
a second dataset out to the file seems to loose the first one.
Diffstat (limited to 'src/H5Osdim.c')
-rw-r--r-- | src/H5Osdim.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/H5Osdim.c b/src/H5Osdim.c index 56a0be7..6ab0519 100644 --- a/src/H5Osdim.c +++ b/src/H5Osdim.c @@ -171,16 +171,16 @@ H5O_sim_dim_encode (hdf5_file_t *f, size_t raw_size, uint8 *p, const void *mesg) UINT32ENCODE(p,sdim->dim_flags); if(sdim->rank>0) { - for(u=0; u<sdim->rank; u++); + for(u=0; u<sdim->rank; u++) UINT32ENCODE(p,sdim->size[u]); if(sdim->dim_flags&0x01) { - for(u=0; u<sdim->rank; u++); + for(u=0; u<sdim->rank; u++) UINT32ENCODE(p,sdim->max[u]); } /* end if */ if(sdim->dim_flags&0x02) { - for(u=0; u<sdim->rank; u++); + for(u=0; u<sdim->rank; u++) UINT32ENCODE(p,sdim->perm[u]); } /* end if */ } /* end if */ @@ -338,6 +338,23 @@ H5O_sim_dim_copy (const void *mesg, void *dest) /* copy */ HDmemcpy(dst,src,sizeof(H5O_sim_dim_t)); + if(src->rank>0) + { + dst->size = H5MM_xcalloc (src->rank, sizeof(uint32)); + HDmemcpy(dst->size,src->size,src->rank*sizeof(uint32)); + /* Check for maximum dimensions and copy those */ + if((src->dim_flags&0x01)>0) + { + dst->max = H5MM_xcalloc (src->rank, sizeof(uint32)); + HDmemcpy(dst->max,src->max,src->rank*sizeof(uint32)); + } /* end if */ + /* Check for dimension permutation and copy those */ + if((src->dim_flags&0x02)>0) + { + dst->perm = H5MM_xcalloc (src->rank, sizeof(uint32)); + HDmemcpy(dst->perm,src->perm,src->rank*sizeof(uint32)); + } /* end if */ + } /* end if */ FUNC_LEAVE ((void*)dst); } /* end H5O_sim_dim_copy() */ |