mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-23 16:20:57 +08:00
[svn-r13841] Description:
Add a little more information to the debugging routine, for VL datatypes. Minor code cleanups Tested on: Mac OS X/32 10.4.9 (duty) Too minor to require h5committest
This commit is contained in:
parent
58c565aee7
commit
ccea4bb7b5
34
src/H5T.c
34
src/H5T.c
@ -5176,6 +5176,12 @@ H5T_debug(const H5T_t *dt, FILE *stream)
|
||||
case H5T_ENUM:
|
||||
s1 = "enum";
|
||||
break;
|
||||
case H5T_VLEN:
|
||||
if(H5T_IS_VL_STRING(dt->shared))
|
||||
s1 = "str";
|
||||
else
|
||||
s1 = "vlen";
|
||||
break;
|
||||
default:
|
||||
s1 = "";
|
||||
break;
|
||||
@ -5297,11 +5303,31 @@ H5T_debug(const H5T_t *dt, FILE *stream)
|
||||
fprintf(stream, "\n");
|
||||
|
||||
} else if (H5T_VLEN==dt->shared->type) {
|
||||
/* Variable data type */
|
||||
fprintf(stream, " VLEN ");
|
||||
H5T_debug(dt->shared->parent, stream);
|
||||
fprintf(stream, "\n");
|
||||
switch(dt->shared->u.vlen.loc) {
|
||||
case H5T_LOC_MEMORY:
|
||||
fprintf(stream, ", loc=memory");
|
||||
break;
|
||||
|
||||
case H5T_LOC_DISK:
|
||||
fprintf(stream, ", loc=disk");
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stream, ", loc=UNKNOWN");
|
||||
break;
|
||||
} /* end switch */
|
||||
|
||||
if(H5T_IS_VL_STRING(dt->shared)) {
|
||||
/* Variable length string datatype */
|
||||
fprintf(stream, ", variable-length");
|
||||
} /* end if */
|
||||
else {
|
||||
/* Variable length sequence datatype */
|
||||
fprintf(stream, " VLEN ");
|
||||
H5T_debug(dt->shared->parent, stream);
|
||||
fprintf(stream, "\n");
|
||||
} /* end else */
|
||||
|
||||
} else if (H5T_ENUM==dt->shared->type) {
|
||||
/* Enumeration data type */
|
||||
fprintf(stream, " ");
|
||||
|
@ -2851,11 +2851,11 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
|
||||
|
||||
/* Set flags to indicate we are writing to or reading from the file */
|
||||
if(dst->shared->u.vlen.f!=NULL)
|
||||
write_to_file=TRUE;
|
||||
write_to_file = TRUE;
|
||||
|
||||
/* Set the flag for nested VL case */
|
||||
if(write_to_file && parent_is_vlen && bkg!=NULL)
|
||||
nested=1;
|
||||
nested = TRUE;
|
||||
|
||||
/* The outer loop of the type conversion macro, controlling which */
|
||||
/* direction the buffer is walked */
|
||||
|
Loading…
Reference in New Issue
Block a user