summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5debug.c16
-rw-r--r--tools/misc/h5import.c8
-rw-r--r--tools/misc/h5repart.c36
-rw-r--r--tools/misc/h5repart_gentest.c16
-rw-r--r--tools/misc/pdb2hdf.c38
-rw-r--r--tools/misc/repart_test.c30
6 files changed, 72 insertions, 72 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 75004fc..1f1423f 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -20,7 +20,7 @@
*
* Purpose: Debugs an existing HDF5 file at a low level.
*
- * Modifications:
+ * Modifications:
*
*-------------------------------------------------------------------------
*/
@@ -116,7 +116,7 @@ main(int argc, char *argv[])
fprintf(stderr, "cannot obtain H5F_t pointer\n");
HDexit(2);
}
-
+
/*
* Parse command arguments.
*/
@@ -149,7 +149,7 @@ main(int argc, char *argv[])
* Debug a local heap.
*/
status = H5HL_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL);
-
+
} else if (!HDmemcmp (sig, H5HG_MAGIC, H5HG_SIZEOF_MAGIC)) {
/*
* Debug a global heap collection.
@@ -170,7 +170,7 @@ main(int argc, char *argv[])
*/
H5B_subid_t subtype = (H5B_subid_t)sig[H5B_SIZEOF_MAGIC];
unsigned ndims;
-
+
switch (subtype) {
case H5B_SNODE_ID:
status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
@@ -193,7 +193,7 @@ main(int argc, char *argv[])
* B-tree signature.
*/
H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
-
+
switch (subtype) {
case H5B2_TEST_ID:
status = H5B2_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST);
@@ -215,7 +215,7 @@ main(int argc, char *argv[])
* B-tree signature.
*/
H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
-
+
switch (subtype) {
case H5B2_TEST_ID:
status = H5B2_int_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, (unsigned)extra2);
@@ -237,7 +237,7 @@ main(int argc, char *argv[])
* B-tree signature.
*/
H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1];
-
+
switch (subtype) {
case H5B2_TEST_ID:
status = H5B2_leaf_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5B2_TEST, extra, (unsigned)extra2);
@@ -271,7 +271,7 @@ main(int argc, char *argv[])
* B+ tree signature.
*/
H5BP_subid_t subtype = (H5BP_subid_t)sig[H5BP_SIZEOF_MAGIC+1];
-
+
switch (subtype) {
case H5BP_TEST_ID:
status = H5BP_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5BP_TEST);
diff --git a/tools/misc/h5import.c b/tools/misc/h5import.c
index 0fcc7ed..4192821 100644
--- a/tools/misc/h5import.c
+++ b/tools/misc/h5import.c
@@ -67,7 +67,7 @@ usage (const char *argv0)
/*-------------------------------------------------------------------------
* Function: main
*
- * Purpose:
+ * Purpose:
*
* Return: Success: 0
*
@@ -104,7 +104,7 @@ main (int argc, char *argv[])
exit (1);
}
} H5E_END_TRY;
-
+
/* process files from command-line */
for (argno=3; argno<argc; argno++) {
@@ -129,8 +129,8 @@ main (int argc, char *argv[])
if ((dset=H5Dcreate (file, dset_name, H5T_NATIVE_SCHAR,
space, H5P_DEFAULT))<0) goto next;
-
-
+
+
next:
if (fd>=0) close (fd);
fd = -1;
diff --git a/tools/misc/h5repart.c b/tools/misc/h5repart.c
index c88b5a8..ec83ea7 100644
--- a/tools/misc/h5repart.c
+++ b/tools/misc/h5repart.c
@@ -65,9 +65,9 @@
# define MIN3(X,Y,Z) MIN(MIN(X,Y),Z)
#endif
-/*Make these 2 private properties(defined in H5Fprivate.h) available to h5repart.
+/*Make these 2 private properties(defined in H5Fprivate.h) available to h5repart.
*The first one updates the member file size in the superblock. The second one
- *change file driver from family to sec2. */
+ *change file driver from family to sec2. */
#define H5F_ACS_FAMILY_NEWSIZE_NAME "family_newsize"
#define H5F_ACS_FAMILY_TO_SEC2_NAME "family_to_sec2"
@@ -136,7 +136,7 @@ get_size (const char *progname, int *argno, int argc, char *argv[])
{
off_t retval=-1;
char *suffix;
-
+
if (isdigit ((int)(argv[*argno][2]))) {
retval = strtol (argv[*argno]+2, &suffix, 10);
(*argno)++;
@@ -175,9 +175,9 @@ get_size (const char *progname, int *argno, int argc, char *argv[])
*
* Purpose: Split an hdf5 file
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
* Programmer: Robb Matzke
* Wednesday, May 13, 1998
@@ -209,7 +209,7 @@ main (int argc, char *argv[])
int src_is_family; /*is source name a family name? */
int src_membno=0; /*source member number */
-
+
const char *dst_gen_name; /*general destination name */
char dst_name[NAMELEN]; /*destination member name */
int dst_is_family; /*is dst name a family name? */
@@ -456,7 +456,7 @@ main (int argc, char *argv[])
}
close (dst);
- /* Modify family driver information saved in superblock through private property.
+ /* Modify family driver information saved in superblock through private property.
* These private properties are for this tool only. */
if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) {
perror ("H5Pcreate");
@@ -467,13 +467,13 @@ main (int argc, char *argv[])
/* The user wants to change file driver from family to sec2. Open the file
* with sec2 driver. This property signals the library to ignore the family
* driver information saved in the superblock. */
- if(H5Pset(fapl, H5F_ACS_FAMILY_TO_SEC2_NAME, &family_to_sec2) < 0) {
+ if(H5Pset(fapl, H5F_ACS_FAMILY_TO_SEC2_NAME, &family_to_sec2) < 0) {
perror ("H5Pset");
exit (1);
}
} else {
- /* Modify family size saved in superblock through private property. It signals
- * library to save the new member size(specified in command line) in superblock.
+ /* Modify family size saved in superblock through private property. It signals
+ * library to save the new member size(specified in command line) in superblock.
* This private property is for this tool only. */
if(H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
perror ("H5Pset_fapl_family");
@@ -482,23 +482,23 @@ main (int argc, char *argv[])
/* Set the property of the new member size as hsize_t */
hdsize = dst_size;
- if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
+ if(H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
perror ("H5Pset");
exit (1);
}
}
- /* If the new file is a family file, try to open file for "read and write" to
- * flush metadata. Flushing metadata will update the superblock to the new
- * member size. If the original file is a family file and the new file is a sec2
- * file, the property FAMILY_TO_SEC2 will signal the library to switch to sec2
- * driver when the new file is opened. If the original file is a sec2 file and the
- * new file can only be a sec2 file, reopen the new file should fail. There's
+ /* If the new file is a family file, try to open file for "read and write" to
+ * flush metadata. Flushing metadata will update the superblock to the new
+ * member size. If the original file is a family file and the new file is a sec2
+ * file, the property FAMILY_TO_SEC2 will signal the library to switch to sec2
+ * driver when the new file is opened. If the original file is a sec2 file and the
+ * new file can only be a sec2 file, reopen the new file should fail. There's
* nothing to do in this case. */
H5E_BEGIN_TRY {
file=H5Fopen(dst_gen_name, H5F_ACC_RDWR, fapl);
} H5E_END_TRY;
- if(file>=0) {
+ if(file>=0) {
if(H5Fclose(file)<0) {
perror ("H5Fclose");
exit (1);
diff --git a/tools/misc/h5repart_gentest.c b/tools/misc/h5repart_gentest.c
index 22243b1..913d066 100644
--- a/tools/misc/h5repart_gentest.c
+++ b/tools/misc/h5repart_gentest.c
@@ -12,11 +12,11 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/*
- * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
+/*
+ * Programmer: Raymond Lu<slu@ncsa.uiuc.edu>
* June 1, 2005
- *
- * Purpose: Generate a family file of 1024 bytes for each member
+ *
+ * Purpose: Generate a family file of 1024 bytes for each member
* for h5repart test.
*/
#include "hdf5.h"
@@ -71,23 +71,23 @@ int main(void)
perror ("H5Dwrite");
exit (1);
}
-
+
if(H5Sclose(space)<0) {
perror ("H5Sclose");
exit (1);
}
-
+
if(H5Dclose(dset)<0) {
perror ("H5Dclose");
exit (1);
}
-
+
if(H5Pclose(fapl)<0) {
perror ("H5Pclose");
exit (1);
}
-
+
if(H5Fclose(file)<0) {
perror ("H5Fclose");
exit (1);
diff --git a/tools/misc/pdb2hdf.c b/tools/misc/pdb2hdf.c
index c6a8951..c3e93aa 100644
--- a/tools/misc/pdb2hdf.c
+++ b/tools/misc/pdb2hdf.c
@@ -98,7 +98,7 @@ usage: %s [OPTIONS] [PDBFILE ...]\n\
the characters \".h5\". For example, \"/tmp/test/eos.data\" would result\n\
in an HDF5 file called \"eos.h5\" in the current directory.\n",
progname);
-
+
}
@@ -150,7 +150,7 @@ fix_name(const char *pdb_name, char *hdf_name, size_t size)
{
char *s;
const char *ext;
-
+
if (!pdb_name || !hdf_name) return NULL;
if ((s=strrchr(pdb_name, '/'))) pdb_name = s;
if (NULL==(ext=strrchr(pdb_name, '.'))) ext = pdb_name + strlen(pdb_name);
@@ -189,15 +189,15 @@ fix_type(PDBfile *pdb, const char *s)
assert(d);
assert(d->size>0);
if (d->onescmp) return -1;
-
-
+
+
if (!strcmp(s, "char")) {
/*
* Character datatypes. Use whatever sign the native system uses by
* default.
*/
type = H5Tcopy(H5T_NATIVE_CHAR);
-
+
} else if (!strcmp(s, "integer")) {
/*
* Integer datatypes. PDB supports various sizes of signed or
@@ -209,7 +209,7 @@ fix_type(PDBfile *pdb, const char *s)
assert(NORMAL_ORDER==d->order_flag || REVERSE_ORDER==d->order_flag);
H5Tset_order(type,
NORMAL_ORDER==d->order_flag?H5T_ORDER_BE:H5T_ORDER_LE);
-
+
} else if (!strcmp(s, "float") || !strcmp(s, "double")) {
/*
* Floating-point datatypes
@@ -221,14 +221,14 @@ fix_type(PDBfile *pdb, const char *s)
H5Tset_precision(type, 8*d->size);
assert(d->order);
H5Tset_order(type, 1==d->order[0]?H5T_ORDER_BE:H5T_ORDER_LE);
-
+
/*
- * format[0] = # of bits per number
- * format[1] = # of bits in exponent
- * format[2] = # of bits in mantissa
- * format[3] = start bit of sign
- * format[4] = start bit of exponent
- * format[5] = start bit of mantissa
+ * format[0] = # of bits per number
+ * format[1] = # of bits in exponent
+ * format[2] = # of bits in mantissa
+ * format[3] = start bit of sign
+ * format[4] = start bit of exponent
+ * format[5] = start bit of mantissa
* format[6] = high order mantissa bit (CRAY needs this)
* format[7] = bias of exponent
*/
@@ -298,7 +298,7 @@ fix_external(hid_t dcpl, const char *pdb_file_name, long nelmts,
hsize_t elmt_size, symblock *block)
{
int i;
-
+
for (i=0; nelmts>0; i++) {
hsize_t nbytes = block[i].number * elmt_size;
H5Pset_external(dcpl, pdb_file_name, block[i].diskaddr, nbytes);
@@ -344,7 +344,7 @@ traverse(PDBfile *pdb, const char *pdb_file_name, hid_t hdf)
printf("%s %s\n", _PD_fixname(pdb, list[i]), ep->type);
fflush(stdout);
}
-
+
if ('/'==list[i][strlen(list[i])-1]) {
/*
@@ -361,14 +361,14 @@ traverse(PDBfile *pdb, const char *pdb_file_name, hid_t hdf)
} else {
in_subdir = TRUE;
}
-
+
traverse(pdb, pdb_file_name, group);
if (!PD_cd(pdb, "..")) {
fprintf(stderr, "cannot traverse out of PDB %s\n", list[i]);
goto error;
}
H5Gclose(group);
-
+
} else {
/* This is some non-directory PDB object */
@@ -401,7 +401,7 @@ traverse(PDBfile *pdb, const char *pdb_file_name, hid_t hdf)
H5Sclose(h_space);
H5Tclose(h_type);
}
-
+
}
for (i=0; i<nitems; i++) {
@@ -505,7 +505,7 @@ main(int argc, char *argv[])
exit(1);
}
H5Pclose(fapl);
-
+
/*
* Traverse the PDB file to create the HDF5 file.
*/
diff --git a/tools/misc/repart_test.c b/tools/misc/repart_test.c
index 833a496..faf61cf 100644
--- a/tools/misc/repart_test.c
+++ b/tools/misc/repart_test.c
@@ -16,7 +16,7 @@
* Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
* June 1, 2005
*
- * Purpose: This program tests family files after being repartitioned
+ * Purpose: This program tests family files after being repartitioned
* by h5repart. It simply tries to reopen the files with
* correct family driver and member size.
*/
@@ -27,11 +27,11 @@
#define FAMILY_H5REPART_SIZE2 (5*KB)
#define MAX(a,b) (a>b ? a:b)
-const char *FILENAME[] = {
+const char *FILENAME[] = {
"fst_family%05d.h5",
"scd_family%05d.h5",
"family_to_sec2.h5",
- NULL
+ NULL
};
herr_t test_family_h5repart_opens(void);
@@ -57,14 +57,14 @@ herr_t
test_family_h5repart_opens(void)
{
hid_t file=(-1), fapl=(-1);
-
+
/* open 1st file(single member file) with correct family size(20000 byte) */
if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0)
goto error;
if(H5Pset_fapl_family(fapl, (hsize_t)FAMILY_H5REPART_SIZE1, H5P_DEFAULT)<0)
goto error;
-
+
if((file=H5Fopen(FILENAME[0], H5F_ACC_RDWR, fapl))<0)
goto error;
@@ -110,7 +110,7 @@ herr_t
test_sec2_h5repart_opens(void)
{
hid_t file=(-1);
-
+
/* open the sec2 file */
if((file=H5Fopen(FILENAME[2], H5F_ACC_RDWR, H5P_DEFAULT))<0)
goto error;
@@ -130,30 +130,30 @@ error:
/*-------------------------------------------------------------------------
* Function: main
- *
- * Purpose: Tests h5repart-ed family files
- *
+ *
+ * Purpose: Tests h5repart-ed family files
+ *
* Return: Success: exit(0)
- *
+ *
* Failure: exit(1)
- *
+ *
* Programmer: Raymond Lu
* June 1, 2005
- *
+ *
* Modifications:
*
*-------------------------------------------------------------------------
*/
int
main(void)
-{
+{
int nerrors=0;
-
+
nerrors += test_family_h5repart_opens()<0 ?1:0;
nerrors += test_sec2_h5repart_opens()<0 ?1:0;
if (nerrors) goto error;
-
+
return 0;
error: