summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/lib/h5tools.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2
[svn-r11245] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r--tools/lib/h5tools.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index ddf476d..b9dd89a 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -186,9 +186,9 @@ int UNUSED argc, const char UNUSED *argv[]
} else if (!strcmp(driver, drivernames[FAMILY_IDX])) {
/* FAMILY Driver */
if((fapl = H5Pcreate(H5P_FILE_ACCESS))>=0) {
- /* Set member size to be 0 to indicate the current first member size
- * is the member size.
- */
+ /* Set member size to be 0 to indicate the current first member size
+ * is the member size.
+ */
H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT);
if(drivernum)
@@ -391,7 +391,7 @@ static size_t
h5tools_ncols(const char *s)
{
register size_t i;
-
+
for (i = 0; *s; s++)
if (*s >= ' ')
i++;
@@ -416,9 +416,9 @@ h5tools_ncols(const char *s)
* If a new prefix is printed then the current element number is set back
* to zero.
* pvn, 2004-07-08
- * Added support for printing array indices:
+ * Added support for printing array indices:
* the indentation is printed before the prefix (printed one indentation
- * level before)
+ * level before)
*-------------------------------------------------------------------------
*/
static void
@@ -429,10 +429,10 @@ h5tools_simple_prefix(FILE *stream, const h5dump_t *info,
h5tools_str_t str; /*temporary for indentation */
size_t templength = 0;
int i, indentlevel = 0;
-
+
if (!ctx->need_prefix)
return;
-
+
memset(&prefix, 0, sizeof(h5tools_str_t));
memset(&str, 0, sizeof(h5tools_str_t));
@@ -586,7 +586,7 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container,
} else if ((ctx->prev_prefix_len + h5tools_ncols(s) +
strlen(OPT(info->elmt_suf2, " ")) +
strlen(OPT(info->line_suf, ""))) <= ncols) {
- /*
+ /*
* ...but *could* fit on one line otherwise, then we
* should end the current line and start this element on its
* own line.
@@ -627,7 +627,7 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container,
*/
if (info->line_per_line > 0 && ctx->cur_elmt >= info->line_per_line)
ctx->need_prefix = TRUE;
-
+
/*
* Each OPTIONAL_LINE_BREAK embedded in the rendered string can cause
* the data to split across multiple lines. We display the sections
@@ -670,7 +670,7 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container,
fputs(OPT(info->elmt_suf2, " "), stream);
ctx->cur_column += strlen(OPT(info->elmt_suf2, " "));
}
-
+
/* Print the section */
fputs(section, stream);
ctx->cur_column += strlen(section);
@@ -695,7 +695,7 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container,
* Bill Wendling, Wednesday, 07. March 2001
* Modifications:
*-------------------------------------------------------------------------
- */
+ */
static herr_t
h5tools_dump_simple_subset(FILE *stream, const h5dump_t *info, hid_t dset,
hid_t p_type, struct subset_t *sset,
@@ -758,10 +758,10 @@ h5tools_dump_simple_subset(FILE *stream, const h5dump_t *info, hid_t dset,
for (; count > 0; sset->start[ctx.ndims - 1] += sset->stride[ctx.ndims - 1],
count--) {
/* calculate the potential number of elements we're going to print */
- H5Sselect_hyperslab(f_space, H5S_SELECT_SET,
- sset->start,
+ H5Sselect_hyperslab(f_space, H5S_SELECT_SET,
+ sset->start,
sset->stride,
- sset->count,
+ sset->count,
sset->block);
sm_nelmts = H5Sget_select_npoints(f_space);
@@ -862,7 +862,7 @@ done:
* Robb Matzke, Thursday, July 23, 1998
* Modifications:
*-------------------------------------------------------------------------
- */
+ */
static int
h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
hid_t p_type, int indentlevel)
@@ -886,7 +886,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
hsize_t sm_nelmts; /*elements per stripmine*/
unsigned char *sm_buf = NULL; /*buffer for raw data */
hid_t sm_space; /*stripmine data space */
-
+
/* Hyperslab info */
hsize_t hs_offset[H5S_MAX_RANK];/*starting offset */
hsize_t hs_size[H5S_MAX_RANK]; /*size this pass */
@@ -932,7 +932,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
} /* end if */
else
ctx.size_last_dim = 0;
-
+
if (p_nelmts == 0) {
/* nothing to print */
H5Sclose(f_space);
@@ -959,7 +959,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
assert(sm_nbytes == (hsize_t)((size_t)sm_nbytes)); /*check for overflow*/
sm_buf = malloc((size_t)sm_nbytes);
-
+
sm_nelmts = sm_nbytes / p_type_nbytes;
sm_space = H5Screate_simple(1, &sm_nelmts, NULL);
@@ -1035,7 +1035,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
H5Sclose(sm_space);
H5Sclose(f_space);
-
+
free(sm_buf);
return SUCCEED;
@@ -1079,7 +1079,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5dump_t *info, hid_t obj_id,
ctx.indent_level = indentlevel;
ctx.need_prefix = 1;
-
+
/* Assume entire data space to be printed */
for (i = 0; i < ctx.ndims; i++)
ctx.p_min_idx[i] = 0;
@@ -1088,7 +1088,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5dump_t *info, hid_t obj_id,
for (i = 0, nelmts = 1; ctx.ndims != 0 && i < ctx.ndims; i++)
nelmts *= ctx.p_max_idx[i] - ctx.p_min_idx[i];
-
+
if (nelmts == 0)
return SUCCEED; /*nothing to print*/
if(ctx.ndims>0) {
@@ -1111,7 +1111,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5dump_t *info, hid_t obj_id,
putc('\n', stream);
fputs(OPT(info->line_sep, ""), stream);
}
-
+
return SUCCEED;
}
@@ -1230,7 +1230,7 @@ h5tools_dump_mem(FILE *stream, const h5dump_t *info, hid_t obj_id, hid_t type,
hid_t space, void *mem, int indentlevel)
{
h5dump_t info_dflt;
-
+
/* Use default values */
if (!stream)
stream = stdout;
@@ -1268,7 +1268,7 @@ void init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
int i;
assert(ctx->ndims);
-
+
ctx->acc[ctx->ndims-1]=1;
for(i=(ctx->ndims-2); i>=0; i--)
{