From 067806e5070d3503b76db91ce6201c26b44c12e5 Mon Sep 17 00:00:00 2001 From: MuQun Yang Date: Thu, 29 Mar 2001 18:56:23 -0500 Subject: [svn-r3739] Purpose: a bug fix Description: when creating sds dimensional scale dataset, I accidently created two sds dimensional scale dataset with the same name, (say using name "dim1" for both rank 2 and rank 3). hdf4 library doesn't give me complaints, hdp dumpsds doesn't generate complaints. h4toh5 converter since assumed that dimensional scale name has to be unique, simply skip if finding the same dimensional name, so accidently the result from hdp dumpsds are the same as the result from h5dump until I implement library API and find this bug. Solution: make unique sds dimensional scale name for this test file. Will also need to modify testfiles later. suggestions: somebody check hdf4 library to disallow the same dimensional scale nameOused for the same sds object. Platforms tested: eirene, and this check in will not affect daily test. --- tools/h4toh5/h4toh5test.c | 55 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/tools/h4toh5/h4toh5test.c b/tools/h4toh5/h4toh5test.c index 333d49f..9090251 100644 --- a/tools/h4toh5/h4toh5test.c +++ b/tools/h4toh5/h4toh5test.c @@ -2900,7 +2900,7 @@ int test_vgall() { int32 sds_ref; int32 fill_value; int32 array_data[TYP_DIMSIZE][TYP_DIMSIZE][TYP_DIMSIZE]; - int32 dimo_sca[TYP_DIMSIZE]; + int32 dim_sca0[TYP_DIMSIZE],dim_sca1[TYP_DIMSIZE]; int32 dim_sizes[TYP_RANK]; int32 start[TYP_RANK],edges[TYP_RANK],stride[TYP_RANK]; float64 cal; @@ -2937,6 +2937,7 @@ int test_vgall() { char dim_name0[] ="dim0"; char dim_name1[] ="dim1"; + char dim_name2[] ="dim2"; char dim_label[] ="dim.label"; char dim_unit[] ="dim.unit"; char dim_format[] ="dim.format"; @@ -2963,8 +2964,10 @@ int test_vgall() { } } - for (i=0;i