/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
 * Programmer:  Quincey Koziol <koziol@ncsa.uiuc.edu>
 *              Friday, June 30, 2006
 *
 *  This program creates an object with fragmented object header messages
 *  that will be merged when the object is read from the file.  This program
 *  needs to be compiled against the 1.6.5 or earlier version of the library
 *  in order to generate the file as desired.
 */
#include <assert.h>
#include <stdio.h>
#include "hdf5.h"
#define FILENAME        "mergemsg.h5"
#define GROUP1          "grp1"
#define GROUP2          "grp2"
#define GROUP3          "grp3"
#define ATTR1           "__111111111111__"
#define ATTR1_LEN       11
#define ATTR2           "__222222222__"
#define ATTR2_LEN       11
#define ATTR3           "__333333333__"
#define ATTR3_LEN       1
int main()
{
    hid_t fid;          /* File ID */
    hid_t gid, gid2, gid3;      /* Group IDs */
    hid_t aid;          /* Attribute ID */
    hid_t sid;          /* Dataspace ID */
    hid_t tid;          /* Datatype ID */
    herr_t ret;         /* Generic return value */
    /* Create file */
    fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    assert(fid > 0);