diff options
Diffstat (limited to 'examples/h5_drivers.c')
-rw-r--r-- | examples/h5_drivers.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/examples/h5_drivers.c b/examples/h5_drivers.c index 43c1fc7..bd57004 100644 --- a/examples/h5_drivers.c +++ b/examples/h5_drivers.c @@ -6,7 +6,7 @@ * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * - * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * + * distribution tree, or in https://www.hdfgroup.org/licenses. * * If you do not have access to either file, you may request a copy from * * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -22,13 +22,12 @@ #include "stdlib.h" /* global variables */ -int cleanup_g = -1; /* whether to clean. Init to not set. */ +int cleanup_g = -1; /* whether to clean. Init to not set. */ /* prototypes */ void cleanup(const char *); void split_file(void); - /* * Cleanup a file unless $HDF5_NOCLEANUP is set. */ @@ -36,12 +35,11 @@ void cleanup(const char *filename) { if (cleanup_g == -1) - cleanup_g = getenv("HDF5_NOCLEANUP") ? 0 : 1; + cleanup_g = getenv("HDF5_NOCLEANUP") ? 0 : 1; if (cleanup_g) - remove(filename); + remove(filename); } - /* * This shows how to use the split file driver. */ @@ -55,7 +53,7 @@ split_file(void) /* the metadata and rawdata files. */ fapl = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT); - fid=H5Fcreate("Station1",H5F_ACC_TRUNC,H5P_DEFAULT,fapl); + fid = H5Fcreate("Station1", H5F_ACC_TRUNC, H5P_DEFAULT, fapl); /* using the file ... */ H5Fclose(fid); H5Pclose(fapl); @@ -68,7 +66,7 @@ split_file(void) /* the metadata and rawdata files. */ fapl = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "/tmp/%s-r.h5", H5P_DEFAULT); - fid=H5Fcreate("PointA",H5F_ACC_TRUNC,H5P_DEFAULT,fapl); + fid = H5Fcreate("PointA", H5F_ACC_TRUNC, H5P_DEFAULT, fapl); /* using the file ... */ H5Fclose(fid); H5Pclose(fapl); @@ -81,7 +79,7 @@ split_file(void) /* the metadata and rawdata files. */ fapl = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_split(fapl, NULL, H5P_DEFAULT, NULL, H5P_DEFAULT); - fid=H5Fcreate("Measure",H5F_ACC_TRUNC,H5P_DEFAULT,fapl); + fid = H5Fcreate("Measure", H5F_ACC_TRUNC, H5P_DEFAULT, fapl); /* using the file ... */ H5Fclose(fid); H5Pclose(fapl); @@ -90,13 +88,12 @@ split_file(void) cleanup("Measure.raw"); } - /* Main Body */ int -main (void) +main(void) { split_file(); - return(0); + return (0); } |