diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/misc/pdb2hdf.c | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-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/misc/pdb2hdf.c')
-rw-r--r-- | tools/misc/pdb2hdf.c | 38 |
1 files changed, 19 insertions, 19 deletions
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. */ |