summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-02 14:54:38 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-02 14:54:38 (GMT)
commit5c081f2baa778542d14a8e1ffb4971aa89476b35 (patch)
tree7d76a9163437a6c94c44377fa8bcc3a9dd1df718 /tools
parentc36d2e6e2567bba75f295b6c6312ec582cd456d7 (diff)
downloadhdf5-5c081f2baa778542d14a8e1ffb4971aa89476b35.zip
hdf5-5c081f2baa778542d14a8e1ffb4971aa89476b35.tar.gz
hdf5-5c081f2baa778542d14a8e1ffb4971aa89476b35.tar.bz2
[svn-r14168] bug fix:
groups and creation order: if there is a request to do H5_INDEX_CRT_ORDER and this flag is set in the group, then, sort by creation order, otherwise by name tested: windows, linux
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump.c68
1 files changed, 31 insertions, 37 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 59418cc..544120a 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1431,26 +1431,24 @@ dump_all(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED *op
}
/* Iterate into group */
+
+ /* if there is a request to do H5_INDEX_CRT_ORDER and this flag is set
+ in the group, then, sort by creation order, otherwise by name */
-#if 0
- if( (crt_order_flags == H5P_CRT_ORDER_TRACKED ) ||
- (crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
+ if( (sort_by == H5_INDEX_CRT_ORDER) &&
+ (crt_order_flags == H5P_CRT_ORDER_TRACKED ||
+ crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
{
- dump_function_table->dump_group_function(obj, name, H5_INDEX_CRT_ORDER );
+ dump_function_table->dump_group_function(obj, name, sort_by, sort_order);
+
}
else
{
- dump_function_table->dump_group_function(obj, name, H5_INDEX_NAME );
+ dump_function_table->dump_group_function(obj, name, H5_INDEX_NAME, sort_order);
+
}
-
-#endif
-
-
- dump_function_table->dump_group_function(obj, name, sort_by, sort_order);
-
-
-
+
if(H5Pclose(gcpl_id) < 0)
d_status = EXIT_FAILURE;
@@ -3254,24 +3252,21 @@ handle_groups(hid_t fid, char *group, void UNUSED * data)
d_status = EXIT_FAILURE;
}
+ /* if there is a request to do H5_INDEX_CRT_ORDER and this flag is set
+ in the group, then, sort by creation order, otherwise by name */
-#if 0
- if( (crt_order_flags == H5P_CRT_ORDER_TRACKED ) ||
- (crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
+ if( (sort_by == H5_INDEX_CRT_ORDER) &&
+ (crt_order_flags == H5P_CRT_ORDER_TRACKED ||
+ crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
{
- dump_group(gid, group, H5_INDEX_CRT_ORDER );
+ dump_group(gid, group, sort_by, sort_order );
+
}
else
{
- dump_group(gid, group, H5_INDEX_NAME );
-
+ dump_group(gid, group, H5_INDEX_NAME, sort_order );
}
-#endif
-
-
- dump_group(gid, group, sort_by, sort_order );
-
if(H5Pclose(gcpl_id) < 0)
d_status = EXIT_FAILURE;
@@ -4016,25 +4011,24 @@ main(int argc, const char *argv[])
d_status = EXIT_FAILURE;
}
-#if 0
- if( (crt_order_flags == H5P_CRT_ORDER_TRACKED ) ||
- (crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
+
+ /* if there is a request to do H5_INDEX_CRT_ORDER and this flag 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 ||
+ crt_order_flags == (H5P_CRT_ORDER_TRACKED | H5P_CRT_ORDER_INDEXED)))
{
-
- dump_function_table->dump_group_function(gid, "/", H5_INDEX_CRT_ORDER );
+
+ dump_function_table->dump_group_function(gid, "/", sort_by, sort_order );
+
}
else
{
- dump_function_table->dump_group_function(gid, "/", H5_INDEX_NAME );
-
+ dump_function_table->dump_group_function(gid, "/", H5_INDEX_NAME, sort_order );
}
-#endif
-
- dump_function_table->dump_group_function(gid, "/", sort_by, sort_order );
-
-
-
+
}
if(H5Gclose(gid) < 0)