diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-30 04:29:13 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-01-30 04:29:13 (GMT) |
commit | fd70b2afa883f94718ffb7f4f33d104d76e3fe0a (patch) | |
tree | c1add8db2a4848202d86a9b274bfaf8c7b80e961 /tools/h5repack/h5repacktst.c | |
parent | 35b0159a0a5f1f4b80e305204ea51a742b052403 (diff) | |
download | hdf5-fd70b2afa883f94718ffb7f4f33d104d76e3fe0a.zip hdf5-fd70b2afa883f94718ffb7f4f33d104d76e3fe0a.tar.gz hdf5-fd70b2afa883f94718ffb7f4f33d104d76e3fe0a.tar.bz2 |
[svn-r18197] Description:
Trim trailing whitespace from source code files with this command:
find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//'
Tested on:
None - eyeballed only
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 3283ddd..17ece99 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -1569,10 +1569,10 @@ error: * *------------------------------------------------------------------------- */ -static +static int make_testfiles(void) { - hid_t fid; + hid_t fid; /*------------------------------------------------------------------------- * create a file for general copy test @@ -1779,7 +1779,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_all_objects(hid_t loc_id) { hid_t did=-1; @@ -1787,7 +1787,7 @@ int make_all_objects(hid_t loc_id) hid_t tid=-1; hid_t rid=-1; hid_t sid=-1; - hid_t gcplid=-1; + hid_t gcplid=-1; hsize_t dims[1]={2}; /* compound datatype */ typedef struct s_t @@ -1804,7 +1804,7 @@ int make_all_objects(hid_t loc_id) goto out; if ((did = H5Dcreate2(loc_id, "dset_referenced", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; - + /*------------------------------------------------------------------------- * H5G_GROUP @@ -1813,7 +1813,7 @@ int make_all_objects(hid_t loc_id) if ((gid = H5Gcreate2(loc_id, "g1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Gclose(gid) < 0) - goto out; + goto out; /* create a group "g2" with H5P_CRT_ORDER_TRACKED set */ if ((gcplid = H5Pcreate(H5P_GROUP_CREATE)) < 0) @@ -1881,7 +1881,7 @@ int make_all_objects(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Gclose(gid); @@ -1901,7 +1901,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_attributes(hid_t loc_id) { hid_t did=-1; @@ -1917,7 +1917,7 @@ int make_attributes(hid_t loc_id) if ((sid = H5Screate_simple(1, dims, NULL)) < 0) goto out; if ((did = H5Dcreate2(loc_id, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) - goto out; + goto out; /*------------------------------------------------------------------------- * H5G_GROUP @@ -1949,11 +1949,11 @@ int make_attributes(hid_t loc_id) goto out; if (H5Sclose(sid) < 0) goto out; - + return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Dclose(did); H5Gclose(gid); @@ -1971,7 +1971,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_hlinks(hid_t loc_id) { hid_t g1id=-1; @@ -2019,11 +2019,11 @@ int make_hlinks(hid_t loc_id) goto out; if (H5Gclose(g3id) < 0) goto out; - + return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Gclose(g1id); H5Gclose(g2id); @@ -2042,7 +2042,7 @@ out: *------------------------------------------------------------------------- */ #ifdef H5_HAVE_FILTER_SZIP -static +static int make_szip(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2077,19 +2077,19 @@ int make_szip(hid_t loc_id) *------------------------------------------------------------------------- */ /* Make sure encoding is enabled */ - if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) + if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_can_encode = 1; } - if (szip_can_encode) + if (szip_can_encode) { /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0) goto out; if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0) goto out; - } - else + } + else { /* WARNING? SZIP is decoder only, can't generate test files */ } @@ -2119,7 +2119,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_deflate(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2196,7 +2196,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_shuffle(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2262,7 +2262,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_fletcher32(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2332,7 +2332,7 @@ out: * *------------------------------------------------------------------------- */ -static +static int make_nbit(hid_t loc_id) { hid_t dcpl; /* dataset creation property list */ @@ -2573,11 +2573,11 @@ int make_all_filters(hid_t loc_id) #endif #if defined (H5_HAVE_FILTER_SZIP) - if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) + if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { szip_can_encode = 1; } - if (szip_can_encode) + if (szip_can_encode) { /* set szip data */ if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block) < 0) @@ -2610,7 +2610,7 @@ int make_all_filters(hid_t loc_id) /* Make sure encoding is enabled */ #if defined (H5_HAVE_FILTER_SZIP) - if (szip_can_encode) + if (szip_can_encode) { /* remove the filters from the dcpl */ if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0) @@ -2620,7 +2620,7 @@ int make_all_filters(hid_t loc_id) goto out; if (make_dset(loc_id,"dset_szip",sid,dcpl,buf) < 0) goto out; - } else + } else { /* WARNING? SZIP is decoder only, can't generate test dataset */ } @@ -2684,7 +2684,7 @@ int make_all_filters(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -2729,7 +2729,7 @@ int make_early(void) if (H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) goto out; - for(i = 0; i < iter; i++) + for(i = 0; i < iter; i++) { if ((fid = H5Fopen(FNAME5, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) goto out; @@ -2758,7 +2758,7 @@ int make_early(void) if ((fid = H5Fcreate(FNAME6, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) return -1; - for(i = 0; i < iter; i++) + for(i = 0; i < iter; i++) { if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; @@ -2779,7 +2779,7 @@ int make_early(void) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Tclose(tid); H5Pclose(dcpl); @@ -2888,7 +2888,7 @@ int make_layout(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -3074,7 +3074,7 @@ int make_external(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(dcpl); H5Sclose(sid); @@ -3628,9 +3628,9 @@ int write_dset_in(hid_t loc_id, if ((tid = H5Tcopy(H5T_STD_B8LE)) < 0) goto out; if (write_dset(loc_id,2,dims2,"bitfield2D",tid,buf22) < 0) - goto out; + goto out; if (H5Tclose(tid) < 0) - goto out; + goto out; /*------------------------------------------------------------------------- * H5T_OPAQUE @@ -3639,7 +3639,7 @@ int write_dset_in(hid_t loc_id, if ((tid = H5Tcreate(H5T_OPAQUE, (size_t)1)) < 0) goto out; if (H5Tset_tag(tid, "1-byte opaque type") < 0) - goto out; + goto out; if (write_dset(loc_id,2,dims2,"opaque2D",tid,buf22) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3704,7 +3704,7 @@ int write_dset_in(hid_t loc_id, n = 0; for(i = 0; i < 3; i++) { - for(j = 0; j < 2; j++) + for(j = 0; j < 2; j++) { int l; @@ -3925,7 +3925,7 @@ int write_dset_in(hid_t loc_id, { for(j = 0; j < 3; j++) { - for(k = 0; k < 2; k++) + for(k = 0; k < 2; k++) { int l; @@ -3953,7 +3953,7 @@ int write_dset_in(hid_t loc_id, if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf53) < 0) goto out; - + if (H5Dclose(did) < 0) goto out; if (H5Tclose(tid) < 0) @@ -4015,7 +4015,7 @@ int write_dset_in(hid_t loc_id, out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Pclose(pid); H5Sclose(sid); @@ -4025,7 +4025,7 @@ out: return -1; } - + /*------------------------------------------------------------------------- * Function: make_dset_reg_ref @@ -4120,7 +4120,7 @@ out: if(dwbuf) free(dwbuf); - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Sclose(sid1); H5Sclose(sid2); @@ -4485,7 +4485,7 @@ int write_attr_in(hid_t loc_id, if(make_diffs) { - for(i = 0; i < 2; i++) + for(i = 0; i < 2; i++) { buf7[i]=0; buf8[i]=0; @@ -4660,9 +4660,9 @@ int write_attr_in(hid_t loc_id, /* Create references to dataset */ if (dset_name) { - for (i = 0; i < 3; i++) + for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < 2; j++) { if (H5Rcreate(&buf42[i][j],fid,dset_name,H5R_OBJECT,-1) < 0) goto out; @@ -4715,9 +4715,9 @@ int write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ n=0; - for (i = 0; i < 3; i++) + for (i = 0; i < 3; i++) { - for (j = 0; j < 2; j++) + for (j = 0; j < 2; j++) { int l; buf52[i][j].p = malloc((i + 1) * sizeof(int)); @@ -4812,7 +4812,7 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - if(make_diffs) + if(make_diffs) { HDmemset(buf72, 0, sizeof buf72); HDmemset(buf82, 0, sizeof buf82); @@ -4933,11 +4933,11 @@ int write_attr_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { if (make_diffs) buf23[i][j][k]=0; else buf23[i][j][k]=n++; @@ -5002,18 +5002,18 @@ int write_attr_in(hid_t loc_id, */ n=1; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { buf33[i][j][k].a=0; buf33[i][j][k].b=0; } - else + else { buf33[i][j][k].a=n++; buf33[i][j][k].b=n++; @@ -5094,9 +5094,9 @@ int write_attr_in(hid_t loc_id, /* Create references to dataset */ if (dset_name) { - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { for (k = 0; k < 2; k++) if (H5Rcreate(&buf43[i][j][k],fid,dset_name,H5R_OBJECT,-1) < 0) @@ -5112,17 +5112,17 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { - if (make_diffs) + if (make_diffs) { - buf453[i][j][k]=RED; + buf453[i][j][k]=RED; } - else + else { buf453[i][j][k]=GREEN; } @@ -5179,11 +5179,11 @@ int write_attr_in(hid_t loc_id, /* Allocate and initialize VL dataset to write */ n=0; - for (i = 0; i < 4; i++) + for (i = 0; i < 4; i++) { - for (j = 0; j < 3; j++) + for (j = 0; j < 3; j++) { - for (k = 0; k < 2; k++) + for (k = 0; k < 2; k++) { int l; buf53[i][j][k].p = malloc((i + 1) * sizeof(int)); @@ -5193,7 +5193,7 @@ int write_attr_in(hid_t loc_id, { ((int *)buf53[i][j][k].p)[l] = 0; } - else + else ((int *)buf53[i][j][k].p)[l] = n++; } } @@ -5238,9 +5238,9 @@ int write_attr_in(hid_t loc_id, *------------------------------------------------------------------------- */ n=1; - for (i = 0; i < 24; i++) + for (i = 0; i < 24; i++) { - for (j = 0; j < (int)dimarray[0]; j++) + for (j = 0; j < (int)dimarray[0]; j++) { if (make_diffs) buf63[i][j]=0; else buf63[i][j]=n++; @@ -5278,12 +5278,12 @@ int write_attr_in(hid_t loc_id, { for(k = 0; k < 2; k++) { - if(make_diffs) + if(make_diffs) { buf73[i][j][k] = 0; buf83[i][j][k] = 0; } - else + else { buf73[i][j][k] = n++; buf83[i][j][k] = f++; @@ -5316,7 +5316,7 @@ int write_attr_in(hid_t loc_id, return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Aclose(aid); H5Sclose(sid); @@ -5572,7 +5572,7 @@ int make_named_dtype(hid_t loc_id) return 0; out: - H5E_BEGIN_TRY + H5E_BEGIN_TRY { H5Tclose(tid); H5Aclose(aid); |