Source
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* 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. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* This shows how to use the hdf5 virtual file drivers.
* The example codes here do not check return values for the
* sake of simplicity. As in all proper programs, return codes
* should be checked.
*/
/* global variables */
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.
*/
void
cleanup(const char *filename)
{
if (cleanup_g == -1)
cleanup_g = getenv("HDF5_NOCLEANUP") ? 0 : 1;
if (cleanup_g)
remove(filename);
}
/*
* This shows how to use the split file driver.
*/
void
split_file(void)
{
hid_t fapl, fid;