diff options
Diffstat (limited to 'tools/test/h5dump/binread.c')
-rw-r--r-- | tools/test/h5dump/binread.c | 21 |
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; } - |