summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/binread.c4
-rw-r--r--tools/h5dump/h5dump.c286
-rw-r--r--tools/h5dump/h5dumpgentest.c338
3 files changed, 314 insertions, 314 deletions
diff --git a/tools/h5dump/binread.c b/tools/h5dump/binread.c
index ab10af0..5abb9af 100644
--- a/tools/h5dump/binread.c
+++ b/tools/h5dump/binread.c
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <string.h>
-/*
+/*
This program reads binary output from h5dump (-b option).
To use change the following 3 symbols accordingly.
For example, to read 2 elements of a float type , define
@@ -82,7 +82,7 @@ main (int argc, const char *argv[])
{
numread = fread( buf, sizeof( TYPE ), nelmts, stream );
printf( "Number of items read = %d\n", numread );
-
+
for (i = 0; i < nelmts; i++)
{
printf(FORMAT,buf[i]);
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 2e03a25..8ace682 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1233,7 +1233,7 @@ dump_dataspace(hid_t space)
*
*-------------------------------------------------------------------------
*/
-static herr_t
+static herr_t
dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t UNUSED *info, void UNUSED *_op_data)
{
hid_t attr_id;
@@ -1390,7 +1390,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
hid_t obj;
char *obj_path = NULL; /* Full path of object */
herr_t ret = SUCCEED;
-
+
/* Build the object's path name */
obj_path = HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
HDassert(obj_path);
@@ -1409,33 +1409,33 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED
goto done;
} /* end if */
- switch(oinfo.type)
+ switch(oinfo.type)
{
case H5O_TYPE_GROUP:
- if((obj = H5Gopen2(group, name, H5P_DEFAULT)) < 0)
+ if((obj = H5Gopen2(group, name, H5P_DEFAULT)) < 0)
{
error_msg(progname, "unable to dump group \"%s\"\n", name);
d_status = EXIT_FAILURE;
ret = FAIL;
- }
- else
+ }
+ else
{
char *old_prefix; /* Pointer to previous prefix */
-
+
/* Keep copy of prefix before iterating into group */
old_prefix = HDstrdup(prefix);
HDassert(old_prefix);
-
+
/* Append group name to prefix */
add_prefix(&prefix, &prefix_len, name);
-
+
/* Iterate into group */
dump_function_table->dump_group_function(obj, name);
-
+
/* Restore old prefix name */
HDstrcpy(prefix, old_prefix);
HDfree(old_prefix);
-
+
/* Close group */
H5Gclose(obj);
}
@@ -1775,11 +1775,11 @@ done:
*
* Programmer: Ruey-Hsia Li
*
- * Modifications:
+ * Modifications:
* Pedro Vicente, March 27, 2006
* added display of attributes
* Pedro Vicente, October 4, 2007, added parameters to H5Aiterate2() to allow for
- * other iteration orders
+ * other iteration orders
*
*-------------------------------------------------------------------------
*/
@@ -1789,21 +1789,21 @@ dump_named_datatype(hid_t tid, const char *name)
unsigned attr_crt_order_flags;
hid_t tcpl_id; /* datatype creation property list ID */
-
-
+
+
if ((tcpl_id = H5Tget_create_plist(tid)) < 0)
{
error_msg(progname, "error in getting creation property list ID\n");
d_status = EXIT_FAILURE;
}
-
+
/* query the creation properties for attributes */
- if (H5Pget_attr_creation_order(tcpl_id, &attr_crt_order_flags) < 0)
+ if (H5Pget_attr_creation_order(tcpl_id, &attr_crt_order_flags) < 0)
{
error_msg(progname, "error in getting creation properties\n");
d_status = EXIT_FAILURE;
}
-
+
if(H5Pclose(tcpl_id) < 0) {
error_msg(progname, "error in closing creation property list ID\n");
d_status = EXIT_FAILURE;
@@ -1827,7 +1827,7 @@ dump_named_datatype(hid_t tid, const char *name)
/* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the datatype's create property list for attributes, then, sort by creation order, otherwise by name */
-
+
if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(tid, sort_by, sort_order, NULL, dump_attr_cb, NULL);
else
@@ -1872,21 +1872,21 @@ dump_group(hid_t gid, const char *name)
error_msg(progname, "error in getting group creation property list ID\n");
d_status = EXIT_FAILURE;
}
-
+
/* query the group creation properties for attributes */
- if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0)
+ if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0)
{
error_msg(progname, "error in getting group creation properties\n");
d_status = EXIT_FAILURE;
}
/* query the group creation properties */
- if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0)
+ if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0)
{
error_msg(progname, "error in getting group creation properties\n");
d_status = EXIT_FAILURE;
}
-
+
if(H5Pclose(gcpl_id) < 0) {
error_msg(progname, "error in closing group creation property list ID\n");
d_status = EXIT_FAILURE;
@@ -1906,7 +1906,7 @@ dump_group(hid_t gid, const char *name)
if(!HDstrcmp(name, "/") && unamedtype) {
unsigned u; /* Local index variable */
-
+
/* dump unamed type in root group */
for(u = 0; u < type_table->nobjs; u++)
if(!type_table->objs[u].recorded) {
@@ -1923,51 +1923,51 @@ dump_group(hid_t gid, const char *name)
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
-
+
found_obj = search_obj(group_table, oinfo.addr);
-
+
if (found_obj == NULL) {
indentation(indent);
error_msg(progname, "internal error (file %s:line %d)\n",
__FILE__, __LINE__);
d_status = EXIT_FAILURE;
- }
+ }
else if (found_obj->displayed) {
indentation(indent);
printf("%s \"%s\"\n", HARDLINK, found_obj->objname);
- }
+ }
else {
found_obj->displayed = TRUE;
/* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the group for attributes, then, sort by creation order, otherwise by name */
-
+
if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL);
else
H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL);
-
+
/* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the group, then, sort by creation order, otherwise by name */
-
+
if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
else
H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
}
- }
+ }
- else
+ else
{
/* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the group for attributes, then, sort by creation order, otherwise by name */
-
+
if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(gid, sort_by, sort_order, NULL, dump_attr_cb, NULL);
else
- H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL);
+ H5Aiterate2(gid, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL);
/* if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the group, then, sort by creation order, otherwise by name */
@@ -1975,11 +1975,11 @@ dump_group(hid_t gid, const char *name)
if((sort_by == H5_INDEX_CRT_ORDER) && (crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Literate(gid, sort_by, sort_order, NULL, dump_all_cb, NULL);
else
- H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
+ H5Literate(gid, H5_INDEX_NAME, sort_order, NULL, dump_all_cb, NULL);
+
-
}
-
+
indent -= COL;
indentation(indent);
end_obj(dump_header_format->groupend, dump_header_format->groupblockend);
@@ -1995,10 +1995,10 @@ dump_group(hid_t gid, const char *name)
*
* Programmer: Ruey-Hsia Li
*
- * Modifications:
+ * Modifications:
* Pedro Vicente, 2004, added dataset creation property list display
* Pedro Vicente, October 4, 2007, added parameters to H5Aiterate2() to allow for
- * other iteration orders
+ * other iteration orders
*
*-------------------------------------------------------------------------
*/
@@ -2015,9 +2015,9 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
error_msg(progname, "error in getting creation property list ID\n");
d_status = EXIT_FAILURE;
}
-
+
/* query the creation properties for attributes */
- if (H5Pget_attr_creation_order(dcpl_id, &attr_crt_order_flags) < 0)
+ if (H5Pget_attr_creation_order(dcpl_id, &attr_crt_order_flags) < 0)
{
error_msg(progname, "error in getting creation properties\n");
d_status = EXIT_FAILURE;
@@ -2037,7 +2037,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
if(display_oid)
dump_oid(did);
- if(display_dcpl)
+ if(display_dcpl)
dump_dcpl(dcpl_id, type, did);
if(display_data)
@@ -2068,15 +2068,15 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
if ( !bin_output )
{
-
+
/* attribute iteration: if there is a request to do H5_INDEX_CRT_ORDER and tracking order is set
in the group for attributes, then, sort by creation order, otherwise by name */
-
+
if( (sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(did, sort_by, sort_order, NULL, dump_attr_cb, NULL);
else
H5Aiterate2(did, H5_INDEX_NAME, sort_order, NULL, dump_attr_cb, NULL);
-
+
}
indent -= COL;
@@ -2218,11 +2218,11 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
outputformat->pindex=display_index;
/* do not print indices for regions */
- if(obj_data == DATASET_DATA)
+ if(obj_data == DATASET_DATA)
{
hid_t f_type = H5Dget_type(obj_id);
-
- if (H5Tequal(f_type, H5T_STD_REF_DSETREG))
+
+ if (H5Tequal(f_type, H5T_STD_REF_DSETREG))
{
outputformat->pindex = 0;
}
@@ -2540,7 +2540,7 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
hid_t tid = H5Dget_type( obj_id );
size_t datum_size = H5Tget_size( tid );
hsize_t dims[H5S_MAX_RANK];
- int ndims = H5Sget_simple_extent_dims( sid, dims, NULL);
+ int ndims = H5Sget_simple_extent_dims( sid, dims, NULL);
hsize_t nelmts = 1;
hsize_t size;
double ratio = 0;
@@ -2548,13 +2548,13 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
int ok = 0;
/* only print the compression ratio for these filters */
- for ( i = 0; i < nfilters; i++)
+ for ( i = 0; i < nfilters; i++)
{
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
-
- switch (filtn)
+
+ switch (filtn)
{
case H5Z_FILTER_DEFLATE:
case H5Z_FILTER_SZIP:
@@ -2564,10 +2564,10 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
break;
}
}
-
+
if (ndims && ok )
{
-
+
for (i = 0; i < ndims; i++)
{
nelmts *= dims[i];
@@ -2580,9 +2580,9 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
if (b!=0)
ratio = (double) a / (double) b;
-
+
HDfprintf(stdout, "SIZE %Hu (%.3f:1 COMPRESSION)\n ", storage_size, ratio);
-
+
}
else
HDfprintf(stdout, "SIZE %Hu\n ", storage_size);
@@ -2590,7 +2590,7 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
H5Sclose(sid);
H5Tclose(tid);
-
+
}
else
{
@@ -2668,15 +2668,15 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id)
* FILTERS
*-------------------------------------------------------------------------
*/
-
+
indentation(indent + COL);
printf("%s %s\n", FILTERS, BEGIN);
indent += COL;
- if (nfilters)
+ if (nfilters)
{
- for (i=0; i<nfilters; i++)
+ for (i=0; i<nfilters; i++)
{
cd_nelmts = NELMTS(cd_values);
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
@@ -2935,8 +2935,8 @@ dump_fcpl(hid_t fid)
else
HDstrcpy(dname,"Unknown driver");
- /* Take out this because the driver used can be different from the
- * standard output. */
+ /* Take out this because the driver used can be different from the
+ * standard output. */
/*indentation(indent + COL);
printf("%s %s\n","FILE_DRIVER", dname);*/
indentation(indent + COL);
@@ -3072,11 +3072,11 @@ set_binary_form(const char *form)
}
/*-------------------------------------------------------------------------
- * Function: set_sort_by
+ * Function: set_sort_by
*
* Purpose: set the "by" form of sorting by translating from a string input
* parameter to a H5_index_t return value
- * current sort values are [creation_order | name]
+ * current sort values are [creation_order | name]
*
* Return: H5_index_t form of sort or H5_INDEX_UNKNOWN if none found
*
@@ -3103,11 +3103,11 @@ set_sort_by(const char *form)
/*-------------------------------------------------------------------------
- * Function: set_sort_order
+ * Function: set_sort_order
*
* Purpose: set the order of sorting by translating from a string input
* parameter to a H5_iter_order_t return value
- * current order values are [ascending | descending ]
+ * current order values are [ascending | descending ]
*
* Return: H5_iter_order_t form of order or H5_ITER_UNKNOWN if none found
*
@@ -3295,7 +3295,7 @@ parse_subset_params(char *dset)
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
- * added for cases of external links not found, to avoid printing of
+ * added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
@@ -3307,7 +3307,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe)
hid_t dsetid;
struct subset_t *sset = (struct subset_t *)data;
- if((dsetid = H5Dopen2(fid, dset, H5P_DEFAULT)) < 0)
+ if((dsetid = H5Dopen2(fid, dset, H5P_DEFAULT)) < 0)
{
if (pe)
{
@@ -3319,7 +3319,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe)
dump_header_format->datasetblockend);
d_status = EXIT_FAILURE;
}
-
+
return;
} /* end if */
@@ -3374,36 +3374,36 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe)
}
}
-
+
/*-------------------------------------------------------------------------
* check for block overlap
*-------------------------------------------------------------------------
*/
- if(sset)
+ if(sset)
{
hid_t sid = H5Dget_space(dsetid);
unsigned int ndims = H5Sget_simple_extent_ndims(sid);
unsigned int i;
-
+
for ( i = 0; i < ndims; i++)
{
if ( sset->count[i] > 1 )
{
-
+
if ( sset->stride[i] < sset->block[i] )
{
error_msg(progname, "wrong subset selection; blocks overlap\n");
d_status = EXIT_FAILURE;
return;
-
- }
-
+
+ }
+
}
-
- }
+
+ }
H5Sclose(sid);
-
+
}
H5Oget_info(dsetid, &oinfo);
@@ -3446,14 +3446,14 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe)
* Programmer: Bill Wendling
* Tuesday, 9. January 2001
*
- * Modifications:
+ * Modifications:
*
* Pedro Vicente, September 26, 2007
* handle creation order
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
- * added for cases of external links not found, to avoid printing of
+ * added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
@@ -3462,9 +3462,9 @@ static void
handle_groups(hid_t fid, const char *group, void UNUSED * data, int pe)
{
hid_t gid;
-
-
- if((gid = H5Gopen2(fid, group, H5P_DEFAULT)) < 0)
+
+
+ if((gid = H5Gopen2(fid, group, H5P_DEFAULT)) < 0)
{
if ( pe )
{
@@ -3474,22 +3474,22 @@ handle_groups(hid_t fid, const char *group, void UNUSED * data, int pe)
end_obj(dump_header_format->groupend, dump_header_format->groupblockend);
d_status = EXIT_FAILURE;
}
-
- }
- else
+
+ }
+ else
{
size_t new_len = HDstrlen(group) + 1;
-
- if(prefix_len <= new_len)
+
+ if(prefix_len <= new_len)
{
prefix_len = new_len;
prefix = HDrealloc(prefix, prefix_len);
} /* end if */
-
+
HDstrcpy(prefix, group);
-
+
dump_group(gid, group);
-
+
if(H5Gclose(gid) < 0)
d_status = EXIT_FAILURE;
} /* end else */
@@ -3596,7 +3596,7 @@ handle_links(hid_t fid, const char *links, void UNUSED * data, int pe)
*
* Pedro Vicente, May 8, 2008
* added a flag PE that prints/not prints error messages
- * added for cases of external links not found, to avoid printing of
+ * added for cases of external links not found, to avoid printing of
* objects not found, since external links are dumped on a trial error basis
*
*-------------------------------------------------------------------------
@@ -3606,12 +3606,12 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe)
{
hid_t type_id;
- if((type_id = H5Topen2(fid, type, H5P_DEFAULT)) < 0)
+ if((type_id = H5Topen2(fid, type, H5P_DEFAULT)) < 0)
{
/* check if type is unamed datatype */
unsigned idx = 0;
- while(idx < type_table->nobjs )
+ while(idx < type_table->nobjs )
{
char name[128];
@@ -3626,7 +3626,7 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe)
idx++;
} /* end while */
- if(idx == type_table->nobjs)
+ if(idx == type_table->nobjs)
{
if ( pe )
{
@@ -3639,9 +3639,9 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe)
dump_header_format->datatypeblockend);
d_status = EXIT_FAILURE;
}
-
- }
- else
+
+ }
+ else
{
hid_t dsetid = H5Dopen2(fid, type_table->objs[idx].objname, H5P_DEFAULT);
type_id = H5Dget_type(dsetid);
@@ -3649,8 +3649,8 @@ handle_datatypes(hid_t fid, const char *type, void UNUSED * data, int pe)
H5Tclose(type_id);
H5Dclose(dsetid);
}
- }
- else
+ }
+ else
{
dump_named_datatype(type_id, type);
@@ -3811,7 +3811,7 @@ parse_start:
break;
case 'o':
-
+
if (bin_form > 0 )
{
if (set_output_file(opt_arg, 1) < 0){
@@ -3826,14 +3826,14 @@ parse_start:
leave(EXIT_FAILURE);
}
}
-
+
usingdasho = TRUE;
last_was_dset = FALSE;
outfname = opt_arg;
break;
case 'b':
-
+
if ( ( bin_form = set_binary_form(opt_arg)) < 0){
/* failed to set binary form */
usage(progname);
@@ -3846,10 +3846,10 @@ parse_start:
usage(progname);
leave(EXIT_FAILURE);
}
-
+
last_was_dset = FALSE;
}
-
+
break;
case 'q':
@@ -3864,14 +3864,14 @@ parse_start:
break;
case 'z':
-
+
if ( ( sort_order = set_sort_order(opt_arg)) < 0)
{
/* failed to set "sort order" form */
usage(progname);
leave(EXIT_FAILURE);
}
-
+
break;
/** begin XML parameters **/
@@ -4224,29 +4224,29 @@ main(int argc, const char *argv[])
dump_fcpl(fid);
}
- if(display_all)
+ if(display_all)
{
- if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
+ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
{
error_msg(progname, "unable to open root group\n");
d_status = EXIT_FAILURE;
- }
- else
+ }
+ else
{
-
+
dump_function_table->dump_group_function(gid, "/" );
-
+
}
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
{
error_msg(progname, "unable to close root group\n");
d_status = EXIT_FAILURE;
}
-
- }
- else
+
+ }
+ else
{
/* Note: this option is not supported for XML */
if(doxml) {
@@ -5477,7 +5477,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
*
* Modifications:
* Pedro Vicente, October 9, 2007
- * added parameters to H5A(L)iterate to allow for other iteration orders
+ * added parameters to H5A(L)iterate to allow for other iteration orders
*
*-------------------------------------------------------------------------
*/
@@ -5503,21 +5503,21 @@ xml_dump_group(hid_t gid, const char *name)
error_msg(progname, "error in getting group creation property list ID\n");
d_status = EXIT_FAILURE;
}
-
+
/* query the group creation properties for attributes */
- if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0)
+ if (H5Pget_attr_creation_order(gcpl_id, &attr_crt_order_flags) < 0)
{
error_msg(progname, "error in getting group creation properties\n");
d_status = EXIT_FAILURE;
}
/* query the group creation properties */
- if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0)
+ if(H5Pget_link_creation_order(gcpl_id, &crt_order_flags) < 0)
{
error_msg(progname, "error in getting group creation properties\n");
d_status = EXIT_FAILURE;
}
-
+
if(H5Pclose(gcpl_id) < 0) {
error_msg(progname, "error in closing group creation property list ID\n");
d_status = EXIT_FAILURE;
@@ -5613,7 +5613,7 @@ xml_dump_group(hid_t gid, const char *name)
found_obj->displayed = TRUE;
/* 1. do all the attributes of the group */
-
+
if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL);
else
@@ -5677,7 +5677,7 @@ xml_dump_group(hid_t gid, const char *name)
free(parentxid);
/* 1. do all the attributes of the group */
-
+
if((sort_by == H5_INDEX_CRT_ORDER) && (attr_crt_order_flags & H5P_CRT_ORDER_TRACKED))
H5Aiterate2(gid, sort_by, sort_order, NULL, dump_function_table->dump_attribute_function, NULL);
else
@@ -6140,7 +6140,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
}
/*-------------------------------------------------------------------------
- * Function: xml_dump_dataset
+ * Function: xml_dump_dataset
*
* Purpose: Dump a description of an HDF5 dataset in XML.
*
@@ -6150,7 +6150,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
*
* Modifications:
* Pedro Vicente, October 9, 2007
- * added parameters to H5Aiterate2 to allow for other iteration orders
+ * added parameters to H5Aiterate2 to allow for other iteration orders
*
*-------------------------------------------------------------------------
*/
@@ -6639,7 +6639,7 @@ h5_fileaccess(void)
return -1;
} else if (!HDstrcmp(name, "direct")) {
/* Substitute Direct I/O driver with sec2 driver temporarily because
- * some output has sec2 driver as the standard. */
+ * some output has sec2 driver as the standard. */
if (H5Pset_fapl_sec2(fapl)<0) return -1;
} else {
/* Unknown driver */
@@ -6700,7 +6700,7 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
* made by: PVN
*
* Purpose: Dump an external link
- * Since external links are soft links, they are dumped on a trial error
+ * Since external links are soft links, they are dumped on a trial error
* basis, attempting to dump as a dataset, as a group and as a named datatype
* Error messages are supressed
*
@@ -6710,33 +6710,33 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
static int dump_extlink(const char *filename, const char *targname)
{
hid_t fid;
-
-
+
+
fid = h5tools_fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT, driver, NULL, 0);
-
- if (fid < 0)
+
+ if (fid < 0)
{
goto fail;
}
-
+
/* add some indentation to distinguish that these objects are external */
indent += 2*COL;
-
+
handle_datasets(fid, targname, NULL, 0);
handle_groups(fid, targname, NULL, 0);
handle_datatypes(fid, targname, NULL, 0);
-
+
indent -= 2*COL;
-
-
+
+
if (H5Fclose(fid) < 0)
d_status = EXIT_FAILURE;
-
-
+
+
return SUCCEED;
-
+
fail:
return FAIL;
-
+
}
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 2123bb3..d3e1502 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -5539,7 +5539,7 @@ error:
/*-------------------------------------------------------------------------
* Function: gent_binary
*
- * Purpose: Generate a file to be used in the binary output test
+ * Purpose: Generate a file to be used in the binary output test
* Contains:
* 1) an integer dataset
* 2) a float dataset
@@ -5564,7 +5564,7 @@ gent_binary(void)
* integer
*-------------------------------------------------------------------------
*/
-
+
did = H5Dcreate2(fid, "integer", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf);
H5Dclose(did);
@@ -5587,7 +5587,7 @@ gent_binary(void)
aid = H5Acreate2(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT, H5P_DEFAULT);
H5Aclose(aid);
H5Dclose(did);
-
+
/* close */
H5Sclose(sid);
@@ -5629,8 +5629,8 @@ gent_bigdims(void)
/* create a file */
fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
assert(fid >= 0);
-
- /* create dataset */
+
+ /* create dataset */
if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
if(H5Pset_fill_value(dcpl, H5T_NATIVE_SCHAR, &fillvalue) < 0)
@@ -5641,35 +5641,35 @@ gent_bigdims(void)
goto out;
if((did = H5Dcreate2(fid, "dset4gb", H5T_NATIVE_SCHAR, f_sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
goto out;
- if((tid = H5Dget_type(did)) < 0)
+ if((tid = H5Dget_type(did)) < 0)
goto out;
if((size = H5Tget_size(tid)) <= 0)
goto out;
-
+
/* select an hyperslab */
nelmts = 20;
hs_start[0] = GB4LL - 10;
hs_size[0] = nelmts;
-
- if((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0)
+
+ if((m_sid = H5Screate_simple(1, hs_size, hs_size)) < 0)
goto out;
-
+
buf=(char *) malloc((unsigned)(nelmts*size));
-
- for(i=0, c=0; i<nelmts; i++, c++)
+
+ for(i=0, c=0; i<nelmts; i++, c++)
{
buf[i] = c;
}
-
- if(H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size,NULL) < 0)
+
+ if(H5Sselect_hyperslab (f_sid,H5S_SELECT_SET,hs_start,NULL,hs_size,NULL) < 0)
goto out;
- if(H5Dwrite (did,H5T_NATIVE_SCHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0)
+ if(H5Dwrite (did,H5T_NATIVE_SCHAR,m_sid,f_sid,H5P_DEFAULT,buf) < 0)
goto out;
-
-
+
+
free(buf);
buf=NULL;
-
+
/* close */
if(H5Sclose(f_sid) < 0)
goto out;
@@ -5682,9 +5682,9 @@ gent_bigdims(void)
ret = H5Fclose(fid);
assert(ret >= 0);
-
+
return;
-
+
out:
printf("Error.....\n");
H5E_BEGIN_TRY {
@@ -5695,7 +5695,7 @@ out:
H5Fclose(fid);
} H5E_END_TRY;
return;
-
+
}
@@ -5735,7 +5735,7 @@ gent_hyperslab(void)
* Function: gent_group_creation_order
*
* Purpose: generate a file with several groups with creation order set and not
- * set tru its hierarchy
+ * set tru its hierarchy
*
*-------------------------------------------------------------------------
*/
@@ -5746,118 +5746,118 @@ gent_group_creation_order(void)
hid_t gid; /* group ID */
hid_t gcpl_id; /* group creation property list ID */
hid_t fcpl_id; /* file creation property list ID (to set root group order) */
-
- if((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
+
+ if((fcpl_id = H5Pcreate(H5P_FILE_CREATE)) < 0)
goto out;
-
- if(H5Pset_link_creation_order(fcpl_id, H5P_CRT_ORDER_TRACKED ) < 0)
+
+ if(H5Pset_link_creation_order(fcpl_id, H5P_CRT_ORDER_TRACKED ) < 0)
goto out;
-
- if((fid = H5Fcreate(FILE58, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT)) < 0)
+
+ if((fid = H5Fcreate(FILE58, H5F_ACC_TRUNC, fcpl_id, H5P_DEFAULT)) < 0)
goto out;
-
-
+
+
/* create group creation property list */
- if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
goto out;
/*-------------------------------------------------------------------------
- * create a group "2"
+ * create a group "2"
*-------------------------------------------------------------------------
- */
-
+ */
+
- if((gid = H5Gcreate2(fid, "2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
-
- if((gid = H5Gcreate2(fid, "2/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+
+ if((gid = H5Gcreate2(fid, "2/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "2/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "2/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
-
+
/*-------------------------------------------------------------------------
* create a group "1" with H5P_CRT_ORDER_TRACKED set
*-------------------------------------------------------------------------
- */
- if(H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
+ */
+ if(H5Pset_link_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
-
- if((gid = H5Gcreate2(fid, "1/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+
+ if((gid = H5Gcreate2(fid, "1/c", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/b", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a/a2", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a/a1", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a/a2/a22", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
- if((gid = H5Gcreate2(fid, "1/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "1/a/a2/a21", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
- if(H5Gclose(gid) < 0)
+ if(H5Gclose(gid) < 0)
goto out;
-
-
- if(H5Pclose(gcpl_id) < 0)
+
+
+ if(H5Pclose(gcpl_id) < 0)
goto out;
- if(H5Pclose(fcpl_id) < 0)
+ if(H5Pclose(fcpl_id) < 0)
goto out;
- if(H5Fclose(fid) < 0)
+ if(H5Fclose(fid) < 0)
goto out;
-
+
return;
-
+
out:
printf("Error.....\n");
H5E_BEGIN_TRY {
@@ -5865,17 +5865,17 @@ out:
H5Pclose(gcpl_id);
H5Pclose(fcpl_id);
H5Fclose(fid);
-
+
} H5E_END_TRY;
return;
-
+
}
/*-------------------------------------------------------------------------
* Function: gent_attr_creation_order
*
- * Purpose: generate a file with several objects with attributes with creation
- * order set and not set
+ * Purpose: generate a file with several objects with attributes with creation
+ * order set and not set
*
*-------------------------------------------------------------------------
*/
@@ -5893,85 +5893,85 @@ gent_attr_creation_order(void)
hid_t tcpl_id; /* datatype creation property list ID */
int i;
const char *attr_name[3] = {"c", "b", "a" };
-
- if((fid = H5Fcreate(FILE59, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+
+ if((fid = H5Fcreate(FILE59, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* create group creation property list */
- if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ if((gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
goto out;
/* create dataset creation property list */
- if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
+ if((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
goto out;
/* create dataset creation property list */
- if((tcpl_id = H5Pcreate(H5P_DATATYPE_CREATE)) < 0)
+ if((tcpl_id = H5Pcreate(H5P_DATATYPE_CREATE)) < 0)
goto out;
/* enable attribute creation order tracking on dataset property list */
- if(H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
+ if(H5Pset_attr_creation_order(dcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
goto out;
/* enable attribute creation order tracking on group property list */
- if(H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
+ if(H5Pset_attr_creation_order(gcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
goto out;
/* enable attribute creation order tracking on datatype property list */
- if(H5Pset_attr_creation_order(tcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
+ if(H5Pset_attr_creation_order(tcpl_id, H5P_CRT_ORDER_TRACKED) < 0)
goto out;
/* create a dataspace */
- if((sid = H5Screate(H5S_SCALAR)) < 0)
+ if((sid = H5Screate(H5S_SCALAR)) < 0)
goto out;
/*-------------------------------------------------------------------------
* create a dataset with creation order tracked for attributes and atributes in it
*-------------------------------------------------------------------------
*/
-
+
/* create a dataset */
- if((did = H5Dcreate2(fid, "dt", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
+ if((did = H5Dcreate2(fid, "dt", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
goto out;
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(did, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(did, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
} /* end for */
-
- if(H5Dclose(did) < 0)
+
+ if(H5Dclose(did) < 0)
goto out;
-
+
/*-------------------------------------------------------------------------
* create a dataset without creation order tracked for attributes and atributes in it
*-------------------------------------------------------------------------
*/
-
+
/* create a dataset */
- if((did = H5Dcreate2(fid, "d", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((did = H5Dcreate2(fid, "d", H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(did, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(did, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
} /* end for */
-
- if(H5Dclose(did) < 0)
+
+ if(H5Dclose(did) < 0)
goto out;
-
+
/*-------------------------------------------------------------------------
@@ -5979,22 +5979,22 @@ gent_attr_creation_order(void)
*-------------------------------------------------------------------------
*/
- if((gid = H5Gcreate2(fid, "gt", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "gt", H5P_DEFAULT, gcpl_id, H5P_DEFAULT)) < 0)
goto out;
-
+
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
+
} /* end for */
-
- if(H5Gclose(gid) < 0)
+
+ if(H5Gclose(gid) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -6002,22 +6002,22 @@ gent_attr_creation_order(void)
*-------------------------------------------------------------------------
*/
- if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((gid = H5Gcreate2(fid, "g", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
+
} /* end for */
-
- if(H5Gclose(gid) < 0)
+
+ if(H5Gclose(gid) < 0)
goto out;
@@ -6026,25 +6026,25 @@ gent_attr_creation_order(void)
*-------------------------------------------------------------------------
*/
- if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
+ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
goto out;
-
+
if((H5Tcommit2(fid, "tt", tid, H5P_DEFAULT, tcpl_id, H5P_DEFAULT)) < 0)
goto out;
-
+
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(tid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(tid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
+
} /* end for */
-
- if(H5Tclose(tid) < 0)
+
+ if(H5Tclose(tid) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -6052,47 +6052,47 @@ gent_attr_creation_order(void)
*-------------------------------------------------------------------------
*/
- if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
+ if((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
goto out;
-
+
if((H5Tcommit2(fid, "t", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(tid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(tid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
+
} /* end for */
-
- if(H5Tclose(tid) < 0)
+
+ if(H5Tclose(tid) < 0)
goto out;
/*-------------------------------------------------------------------------
* add some attributes to the root group
*-------------------------------------------------------------------------
*/
- if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
+ if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0)
goto out;
-
+
/* add attributes */
- for(i = 0; i < 3; i++)
+ for(i = 0; i < 3; i++)
{
- if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((aid = H5Acreate2(gid, attr_name[i], H5T_NATIVE_UCHAR, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
-
+
/* close attribute */
- if(H5Aclose(aid) < 0)
+ if(H5Aclose(aid) < 0)
goto out;
-
+
} /* end for */
-
- if(H5Gclose(gid) < 0)
+
+ if(H5Gclose(gid) < 0)
goto out;
@@ -6100,22 +6100,22 @@ gent_attr_creation_order(void)
* close
*-------------------------------------------------------------------------
*/
- if(H5Sclose(sid) < 0)
+ if(H5Sclose(sid) < 0)
goto out;
- if(H5Pclose(dcpl_id) < 0)
+ if(H5Pclose(dcpl_id) < 0)
goto out;
- if(H5Pclose(gcpl_id) < 0)
+ if(H5Pclose(gcpl_id) < 0)
goto out;
- if(H5Pclose(tcpl_id) < 0)
+ if(H5Pclose(tcpl_id) < 0)
goto out;
- if(H5Fclose(fid) < 0)
+ if(H5Fclose(fid) < 0)
goto out;
-
+
return;
-
+
out:
printf("Error.....\n");
H5E_BEGIN_TRY {
@@ -6126,16 +6126,16 @@ out:
H5Pclose(dcpl_id);
H5Pclose(tcpl_id);
H5Fclose(fid);
-
+
} H5E_END_TRY;
return;
-
+
}
/*-------------------------------------------------------------------------
* Function: gent_fpformat
*
- * Purpose: Generate a file to be used in the floating point format test
+ * Purpose: Generate a file to be used in the floating point format test
* Contains:
* 1) a float dataset
* 2) a double dataset
@@ -6179,7 +6179,7 @@ gent_fpformat(void)
/*-------------------------------------------------------------------------
* Function: gent_extlinks
*
- * Purpose: Generate 2 files to be used in the external links test
+ * Purpose: Generate 2 files to be used in the external links test
* External links point from one HDF5 file to an object (Group, Dataset, or
* committed Datatype) in another file.
*
@@ -6195,7 +6195,7 @@ gent_extlinks(void)
/* create two files, a source and a target */
source_fid = H5Fcreate(FILE61, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
target_fid = H5Fcreate(FILE62, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
+
/*-------------------------------------------------------------------------
* create a Group, a Dataset, and a committed Datatype in the target