diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/h5diffgentest.c | 24 | ||||
-rw-r--r-- | tools/h5dump/h5dump.c | 4 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 108 | ||||
-rw-r--r-- | tools/h5ls/h5ls.c | 2 | ||||
-rw-r--r-- | tools/h5repack/h5repacktst.c | 74 | ||||
-rw-r--r-- | tools/lib/h5diff_array.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 2 | ||||
-rw-r--r-- | tools/lib/talign.c | 8 |
9 files changed, 109 insertions, 117 deletions
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index 436e7fd..de2c1ff 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -1010,8 +1010,8 @@ position array of </g1> array of </g1> difference [ 1 ] 5 0 5 [ 1 ] 6 0 6 */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,1,dims,"array",tid,buf6); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 1, dims, "array", tid, buf6); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -1289,8 +1289,8 @@ position array2D of </g1> array2D of </g1> difference [ 2 1 ] 17 0 17 [ 2 1 ] 18 0 18 */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,2,dims2,"array2D",tid,buf62); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 2, dims2, "array2D", tid, buf62); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -1675,8 +1675,8 @@ etc etc */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,3,dims3,"array3D",tid,buf63); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 3, dims3, "array3D", tid, buf63); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -1947,8 +1947,8 @@ void write_dset_in(hid_t loc_id, } } - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,1,dims,"array",tid,buf6); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 1, dims, "array", tid, buf6); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -2098,8 +2098,8 @@ void write_dset_in(hid_t loc_id, } - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,2,dims2,"array2D",tid,buf62); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 2, dims2, "array2D", tid, buf62); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -2282,8 +2282,8 @@ void write_dset_in(hid_t loc_id, } } - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,3,dims3,"array3D",tid,buf63); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 3, dims3, "array3D", tid, buf63); status = H5Tclose(tid); /*------------------------------------------------------------------------- diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index a46054d..712d133 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1075,7 +1075,7 @@ print_datatype(hid_t type,unsigned in_group) /* Get array information */ ndims = H5Tget_array_ndims(type); - H5Tget_array_dims(type, dims, NULL); + H5Tget_array_dims2(type, dims); /* Print array dimensions */ for (i = 0; i < ndims; i++) @@ -4790,7 +4790,7 @@ xml_print_datatype(hid_t type, unsigned in_group) printf("%u\">\n", ndims); /* Get array information */ - H5Tget_array_dims(type, dims, NULL); + H5Tget_array_dims2(type, dims); /* list of dimensions */ indent += COL; diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 029f20c..d0cb5f8 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -624,21 +624,21 @@ static void gent_compound_dt(void) { /* test compound data type */ ndims = 1; dim[0] = 4; - array_dt = H5Tarray_create(H5T_STD_I32BE, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); H5Tinsert(type, "int_array", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_NATIVE_INT, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_INT, ndims, dim); H5Tinsert(type2, "int_array", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); ndims = 2; dim[0] = 5; dim[1] = 6; - array_dt = H5Tarray_create(H5T_IEEE_F32BE, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_IEEE_F32BE, ndims, dim); H5Tinsert(type, "float_array", HOFFSET(dset3_t, b), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, ndims, dim); H5Tinsert(type2, "float_array", HOFFSET(dset3_t, b), array_dt); H5Tclose(array_dt); @@ -829,12 +829,12 @@ static void gent_compound_dt2(void) { /* test compound data type */ type = H5Tcreate (H5T_COMPOUND, sizeof(dset3_t)); ndims = 1; dim[0] = 4; - array_dt = H5Tarray_create(H5T_STD_I32BE, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_STD_I32BE, ndims, dim); H5Tinsert(type, "int_array", HOFFSET(dset3_t, a), array_dt); H5Tclose(array_dt); ndims = 2; dim[0] = 5; dim[1] = 6; - array_dt = H5Tarray_create(H5T_IEEE_F32BE, ndims, dim, NULL); + array_dt = H5Tarray_create2(H5T_IEEE_F32BE, ndims, dim); H5Tinsert(type, "float_array", HOFFSET(dset3_t, b), array_dt); H5Tclose(array_dt); @@ -1128,29 +1128,29 @@ static void gent_many(void) type = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0])); dim[0] = dim[1] = dim[2] = dim[3] = 2; - array_dt = H5Tarray_create(H5T_STD_I32BE, 4, dim, NULL); + array_dt = H5Tarray_create2(H5T_STD_I32BE, 4, dim); H5Tinsert(type, "a_array", HOFFSET(dset1_t, a), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_IEEE_F64BE, 4, dim, NULL); + array_dt = H5Tarray_create2(H5T_IEEE_F64BE, 4, dim); H5Tinsert(type, "b_array", HOFFSET(dset1_t, b), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_IEEE_F64BE, 4, dim, NULL); + array_dt = H5Tarray_create2(H5T_IEEE_F64BE, 4, dim); H5Tinsert(type, "c_array", HOFFSET(dset1_t, c), array_dt); H5Tclose(array_dt); type2 = H5Tcreate (H5T_COMPOUND, sizeof(dset1[0])); - array_dt = H5Tarray_create(H5T_NATIVE_INT, 4, dim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 4, dim); H5Tinsert(type2, "a_array", HOFFSET(dset1_t, a), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_NATIVE_DOUBLE,4,dim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_DOUBLE, 4, dim); H5Tinsert(type2, "b_array", HOFFSET(dset1_t, b), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_NATIVE_DOUBLE, 4, dim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_DOUBLE, 4, dim); H5Tinsert(type2, "c_array", HOFFSET(dset1_t, c), array_dt); H5Tclose(array_dt); @@ -1391,24 +1391,24 @@ static void gent_str(void) { mdims[0] = 8; mdims[1] = 10; - array_dt = H5Tarray_create(H5T_STD_I32BE, 2, mdims, NULL); + array_dt = H5Tarray_create2(H5T_STD_I32BE, 2, mdims); H5Tinsert(f_type, "int_array", HOFFSET(compound_t, a), array_dt); H5Tclose(array_dt); - array_dt = H5Tarray_create(H5T_NATIVE_INT, 2, mdims, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_INT, 2, mdims); H5Tinsert(f_type2, "int_array", HOFFSET(compound_t, a), array_dt); H5Tclose(array_dt); mdims[0] = 3; mdims[1] = 4; str_type = mkstr(32, H5T_STR_SPACEPAD); - array_dt = H5Tarray_create(str_type, 2, mdims, NULL); + array_dt = H5Tarray_create2(str_type, 2, mdims); H5Tinsert(f_type, "string", HOFFSET(compound_t, s), array_dt); H5Tclose(array_dt); H5Tclose(str_type); str_type = mkstr(33, H5T_STR_NULLTERM); - array_dt = H5Tarray_create(str_type, 2, mdims, NULL); + array_dt = H5Tarray_create2(str_type, 2, mdims); H5Tinsert(f_type2, "string", HOFFSET(compound_t, s), array_dt); H5Tclose(array_dt); H5Tclose(str_type); @@ -1909,7 +1909,7 @@ static void gent_nestcomp(void) H5Tset_strpad(char_id, H5T_STR_NULLTERM); H5Tinsert(cmp_tid, "char_name", HOFFSET(cmp_t, a), char_id); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, ndims, array_dims, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, ndims, array_dims); H5Tinsert(cmp_tid, "array_name", HOFFSET(cmp_t, b), array_dt); H5Tclose(array_dt); @@ -2420,7 +2420,7 @@ static void gent_array1(void) sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL); /* Create a datatype to refer to */ - tid1 = H5Tarray_create(H5T_NATIVE_INT, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(H5T_NATIVE_INT, ARRAY1_RANK, tdims1); /* Create a dataset */ dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -2466,7 +2466,7 @@ static void gent_array2(void) sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL); /* Create a datatype to refer to */ - tid = H5Tarray_create(H5T_NATIVE_INT, ARRAY2_RANK, tdims2, NULL); + tid = H5Tarray_create2(H5T_NATIVE_INT, ARRAY2_RANK, tdims2); /* Create a dataset */ dataset = H5Dcreate2(fid, "Dataset1", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -2514,10 +2514,10 @@ static void gent_array3(void) sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL); /* Create a 2-D datatype to refer to */ - tid2 = H5Tarray_create(H5T_NATIVE_INT, ARRAY3_RANK, tdims2, NULL); + tid2 = H5Tarray_create2(H5T_NATIVE_INT, ARRAY3_RANK, tdims2); /* Create a 1-D datatype to refer to */ - tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Create a dataset */ dataset = H5Dcreate2(fid, "Dataset1", tid1, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -2581,7 +2581,7 @@ static void gent_array4(void) assert(ret >= 0); /* Create an array datatype to refer to */ - tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); @@ -2645,7 +2645,7 @@ static void gent_array5(void) assert(ret >= 0); /* Create an array of floats datatype */ - tid3 = H5Tarray_create(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1, NULL); + tid3 = H5Tarray_create2(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1); /* Insert float array field */ ret = H5Tinsert (tid2, "f", HOFFSET(s2_t,f), tid3); @@ -2656,7 +2656,7 @@ static void gent_array5(void) assert(ret >= 0); /* Create an array datatype to refer to */ - tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close compound datatype */ ret = H5Tclose(tid2); @@ -2712,7 +2712,7 @@ static void gent_array6(void) tid2 = H5Tvlen_create(H5T_NATIVE_UINT); /* Create an array datatype to refer to */ - tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close VL datatype */ ret = H5Tclose(tid2); @@ -2771,7 +2771,7 @@ static void gent_array7(void) sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL); /* Create the nested array datatype to refer to */ - tid3 = H5Tarray_create(H5T_NATIVE_UINT, ARRAY1_RANK, tdims1, NULL); + tid3 = H5Tarray_create2(H5T_NATIVE_UINT, ARRAY1_RANK, tdims1); /* Create a VL datatype of 1-D arrays to refer to */ tid2 = H5Tvlen_create(tid3); @@ -2781,7 +2781,7 @@ static void gent_array7(void) assert(ret >= 0); /* Create an array datatype to refer to */ - tid1 = H5Tarray_create(tid2, ARRAY1_RANK, tdims1, NULL); + tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1); /* Close VL datatype */ ret = H5Tclose(tid2); @@ -2846,7 +2846,7 @@ static void gent_empty(void) assert(ret >= 0); /* write out an empty array dataset */ - type = H5Tarray_create(H5T_NATIVE_INT, SPACE1_RANK, dims, NULL); + type = H5Tarray_create2(H5T_NATIVE_INT, SPACE1_RANK, dims); dset = H5Dcreate2(file, "Dataset4.0", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); /* Don't write any data */ ret = H5Dclose(dset); @@ -3335,16 +3335,16 @@ static void write_attr_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,1,dims,"array",tid,buf6); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 1, dims, "array", tid, buf6); status = H5Tclose(tid); /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - write_attr(loc_id,1,dims,"integer",H5T_NATIVE_INT,buf7); - write_attr(loc_id,1,dims,"float",H5T_NATIVE_FLOAT,buf8); + write_attr(loc_id, 1, dims, "integer", H5T_NATIVE_INT, buf7); + write_attr(loc_id, 1, dims, "float", H5T_NATIVE_FLOAT, buf8); /*------------------------------------------------------------------------- @@ -3446,16 +3446,16 @@ static void write_attr_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,2,dims2,"array2D",tid,buf62); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 2, dims2, "array2D", tid, buf62); status = H5Tclose(tid); /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - write_attr(loc_id,2,dims2,"integer2D",H5T_NATIVE_INT,buf72); - write_attr(loc_id,2,dims2,"float2D",H5T_NATIVE_FLOAT,buf82); + write_attr(loc_id, 2, dims2, "integer2D", H5T_NATIVE_INT, buf72); + write_attr(loc_id, 2, dims2, "float2D", H5T_NATIVE_FLOAT, buf82); /*------------------------------------------------------------------------- @@ -3579,15 +3579,13 @@ static void write_attr_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - n=1; - for(i = 0; i < 24; i++) { - for(j = 0; j < (int)dimarray[0]; j++) { - buf63[i][j]=n++; - } - } + n = 1; + for(i = 0; i < 24; i++) + for(j = 0; j < (int)dimarray[0]; j++) + buf63[i][j] = n++; - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_attr(loc_id,3,dims3,"array3D",tid,buf63); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_attr(loc_id, 3, dims3, "array3D", tid, buf63); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -3779,8 +3777,8 @@ static void write_dset_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,1,dims,"array",tid,buf6); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 1, dims, "array", tid, buf6); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -3889,7 +3887,7 @@ static void write_dset_in(hid_t loc_id, * H5T_ARRAY *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); write_dset(loc_id, 2, dims2, "array2D", tid, buf62); status = H5Tclose(tid); @@ -4040,8 +4038,8 @@ static void write_dset_in(hid_t loc_id, } } - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,3,dims3,"array3D",tid,buf63); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 3, dims3, "array3D", tid, buf63); status = H5Tclose(tid); /*------------------------------------------------------------------------- @@ -4299,7 +4297,7 @@ static void gent_compound_complex(void) assert(status >= 0); /* Create the array data type for the string array */ - str_array_id = H5Tarray_create(array_tid, F41_ARRAY_RANK, array_dimb, NULL); + str_array_id = H5Tarray_create2(array_tid, F41_ARRAY_RANK, array_dimb); assert(str_array_id >= 0); /* Copy the array data type for the character array */ @@ -4311,11 +4309,11 @@ static void gent_compound_complex(void) assert(status >= 0); /* Create the array data type for the character array */ - array2_tid = H5Tarray_create(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd, NULL); + array2_tid = H5Tarray_create2(H5T_NATIVE_SHORT, F41_ARRAY_RANKd, array_dimd); assert(array2_tid >= 0); /* Create the array data type for the character array */ - array4_tid = H5Tarray_create(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf, NULL); + array4_tid = H5Tarray_create2(H5T_NATIVE_DOUBLE, F41_ARRAY_RANK, array_dimf); assert(array4_tid >= 0); /* Create the memory data type */ @@ -5232,8 +5230,8 @@ static void gent_fvalues(void) * dataset with a H5T_ARRAY fill value *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(fid,1,dims,"fill_array",tid,buf4); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(fid, 1, dims, "fill_array", tid, buf4); ret = H5Tclose(tid); @@ -5588,7 +5586,7 @@ gent_binary(void) * array *------------------------------------------------------------------------- */ - tid = H5Tarray_create(H5T_NATIVE_INT, 1, dims, NULL); + tid = H5Tarray_create2(H5T_NATIVE_INT, 1, dims); sid = H5Screate_simple(1, dimarray, NULL); did = H5Dcreate2(fid, "array", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, abuf); diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index f98a84b..3d9cf87 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1067,7 +1067,7 @@ display_array_type(hid_t type, int ind) ndims = H5Tget_array_ndims(type); if (ndims) { dims = malloc(ndims*sizeof(dims[0])); - H5Tget_array_dims(type, dims, NULL); + H5Tget_array_dims2(type, dims); /* Print dimensions */ for (i=0; i<ndims; i++) diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 59cbbf6..de04685 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -3137,8 +3137,8 @@ void write_dset_in(hid_t loc_id, } } - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,1,dims,"array",type_id,buf6); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 1, dims, "array", type_id, buf6); status = H5Tclose(type_id); /*------------------------------------------------------------------------- @@ -3284,8 +3284,8 @@ void write_dset_in(hid_t loc_id, } - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,2,dims2,"array2D",type_id,buf62); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 2, dims2, "array2D", type_id, buf62); status = H5Tclose(type_id); /*------------------------------------------------------------------------- @@ -3454,16 +3454,16 @@ void write_dset_in(hid_t loc_id, */ - n=1; - for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) { - if (make_diffs) buf63[i][j]=0; - else buf63[i][j]=n++; - } - } + n = 1; + for(i = 0; i < 24; i++) + for(j = 0; j < (int)dimarray[0]; j++) + if(make_diffs) + buf63[i][j] = 0; + else + buf63[i][j] = n++; - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - write_dset(loc_id,3,dims3,"array3D",type_id,buf63); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + write_dset(loc_id, 3, dims3, "array3D", type_id, buf63); status = H5Tclose(type_id); /*------------------------------------------------------------------------- @@ -3874,8 +3874,8 @@ position array of </g1> array of </g1> difference [ 1 ] 5 0 5 [ 1 ] 6 0 6 */ - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - make_attr(loc_id,1,dims,"array",type_id,buf6); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + make_attr(loc_id, 1, dims, "array", type_id, buf6); status = H5Tclose(type_id); /*------------------------------------------------------------------------- @@ -3883,14 +3883,12 @@ position array of </g1> array of </g1> difference *------------------------------------------------------------------------- */ - if (make_diffs) - { - for (i=0; i<2; i++) - { + if(make_diffs) + for(i = 0; i < 2; i++) { buf7[i]=0; buf8[i]=0; } - } + /* buf7[2]= {1,2}; buf8[2]= {1,2}; @@ -4153,8 +4151,8 @@ position array2D of </g1> array2D of </g1> difference [ 2 1 ] 17 0 17 [ 2 1 ] 18 0 18 */ - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - make_attr(loc_id,2,dims2,"array2D",type_id,buf62); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + make_attr(loc_id, 2, dims2, "array2D", type_id, buf62); status = H5Tclose(type_id); /*------------------------------------------------------------------------- @@ -4162,10 +4160,9 @@ position array2D of </g1> array2D of </g1> difference *------------------------------------------------------------------------- */ - if (make_diffs) - { - memset(buf72,0,sizeof buf72); - memset(buf82,0,sizeof buf82); + if(make_diffs) { + HDmemset(buf72, 0, sizeof buf72); + HDmemset(buf82, 0, sizeof buf82); } /* Attribute: <integer2D> and <integer2D> @@ -4541,29 +4538,26 @@ etc etc */ - type_id = H5Tarray_create(H5T_NATIVE_INT, 1, dimarray, NULL); - make_attr(loc_id,3,dims3,"array3D",type_id,buf63); + type_id = H5Tarray_create2(H5T_NATIVE_INT, 1, dimarray); + make_attr(loc_id, 3, dims3, "array3D", type_id, buf63); status = H5Tclose(type_id); /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT *------------------------------------------------------------------------- */ - n=1; f=1; - for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) { - if (make_diffs) { - buf73[i][j][k]=0; - buf83[i][j][k]=0; + n = 1; f = 1; + for(i = 0; i < 4; i++) + for(j = 0; j < 3; j++) + for(k = 0; k < 2; k++) + if(make_diffs) { + buf73[i][j][k] = 0; + buf83[i][j][k] = 0; } else { - buf73[i][j][k]=n++; - buf83[i][j][k]=f++; + buf73[i][j][k] = n++; + buf83[i][j][k] = f++; } - } - } - } /* position integer3D of </g1> integer3D of </g1> difference diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index f6dbd2b..f852a2d 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -643,7 +643,7 @@ hsize_t diff_datum(void *_mem1, memb_type = H5Tget_super(m_type); size = H5Tget_size(memb_type); ndims = H5Tget_array_ndims(m_type); - H5Tget_array_dims(m_type, adims, NULL); + H5Tget_array_dims2(m_type, adims); assert(ndims >= 1 && ndims <= H5S_MAX_RANK); /* calculate the number of array elements */ diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 44154cd..3d8c871 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1772,7 +1772,7 @@ int render_bin_output(FILE *stream, hid_t tid, void *_mem) memb = H5Tget_super(tid); size = H5Tget_size(memb); ndims = H5Tget_array_ndims(tid); - H5Tget_array_dims(tid, dims, NULL); + H5Tget_array_dims2(tid, dims); assert(ndims >= 1 && ndims <= H5S_MAX_RANK); /* calculate the number of array elements */ diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index f877baa..66966d8 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -916,7 +916,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai memb = H5Tget_super(type); size = H5Tget_size(memb); ndims = H5Tget_array_ndims(type); - H5Tget_array_dims(type, dims, NULL); + H5Tget_array_dims2(type, dims); assert(ndims >= 1 && ndims <= H5S_MAX_RANK); /* Calculate the number of array elements */ diff --git a/tools/lib/talign.c b/tools/lib/talign.c index 28b8075..25f0daa 100644 --- a/tools/lib/talign.c +++ b/tools/lib/talign.c @@ -79,12 +79,12 @@ int main(void) H5Tinsert(cmp, "Awkward length", 0, cs6); cdim[0] = sizeof(fok) / sizeof(float); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim); H5Tinsert(cmp, "Ok", sizeof(string5), array_dt); H5Tclose(array_dt); cdim[0] = sizeof(fnok) / sizeof(float); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim); H5Tinsert(cmp, "Not Ok", sizeof(fok) + sizeof(string5), array_dt); H5Tclose(array_dt); @@ -93,7 +93,7 @@ int main(void) cmp1 = H5Tcreate(H5T_COMPOUND, sizeof(fok)); cdim[0] = sizeof(fok) / sizeof(float); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim); H5Tinsert(cmp1, "Ok", 0, array_dt); H5Tclose(array_dt); @@ -103,7 +103,7 @@ int main(void) cmp3 = H5Tcreate(H5T_COMPOUND, sizeof(fnok)); cdim[0] = sizeof(fnok) / sizeof(float); - array_dt = H5Tarray_create(H5T_NATIVE_FLOAT, 1, cdim, NULL); + array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, cdim); H5Tinsert(cmp3, "Not Ok", 0, array_dt); H5Tclose(array_dt); |