summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/binread.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /tools/test/h5dump/binread.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'tools/test/h5dump/binread.c')
-rw-r--r--tools/test/h5dump/binread.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/test/h5dump/binread.c b/tools/test/h5dump/binread.c
index 6165cd8..171a5fd 100644
--- a/tools/test/h5dump/binread.c
+++ b/tools/test/h5dump/binread.c
@@ -27,9 +27,9 @@
*/
-#define NELMTS 6
-#define TYPE int
-#define FORMAT "%d "
+#define NELMTS 6
+#define TYPE int
+#define FORMAT "%d "
/*-------------------------------------------------------------------------
* Function: usage
@@ -45,7 +45,7 @@
*-------------------------------------------------------------------------
*/
static void
-usage (void)
+usage(void)
{
fprintf(stderr, "usage: binread FILE_NAME\n");
}
@@ -59,13 +59,13 @@ usage (void)
*/
int
-main (int argc, const char *argv[])
+main(int argc, const char *argv[])
{
- FILE *stream;
+ FILE * stream;
size_t numread;
TYPE buf[NELMTS];
size_t i, nelmts = NELMTS;
- char *fname=NULL;
+ char * fname = NULL;
if (argc != 2) {
usage();
@@ -74,12 +74,12 @@ main (int argc, const char *argv[])
fname = strdup(argv[1]);
- if((stream = fopen(fname, "rb")) != NULL) {
- numread = fread(buf, sizeof( TYPE ), nelmts, stream);
+ if ((stream = fopen(fname, "rb")) != NULL) {
+ numread = fread(buf, sizeof(TYPE), nelmts, stream);
printf("Number of items read = %llu\n", (unsigned long long)numread);
for (i = 0; i < nelmts; i++) {
- printf(FORMAT,buf[i]);
+ printf(FORMAT, buf[i]);
}
printf("\n");
@@ -92,4 +92,3 @@ main (int argc, const char *argv[])
return 0;
}
-