if(H5Pregister(cid, PROP1_NAME, PROP1_SIZE, PROP1_DEF_VALUE, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) goto error;
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * 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 files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
#if H5_VERS_MINOR >= 8
#define ROOT_CLASS      H5P_ROOT
#else /* H5_VERS_MINOR >= 8 */
#define ROOT_CLASS      H5P_NO_CLASS
#endif /* H5_VERS_MINOR >= 8 */
/* Property definitions */
#define CLASS_NAME     "Class"
/* Property definitions */
#define PROP1_NAME     "Property 1"
int     prop1_def = 10;  /* Property default value */
#define PROP1_SIZE       sizeof(prop1_def)
#define PROP1_DEF_VALUE  (&prop1_def)
#define PROP2_NAME     "Property 2"
int     prop2_def = 20;  /* Property default value */
#define PROP2_SIZE       sizeof(prop2_def)
#define PROP2_DEF_VALUE  (&prop2_def)
/*
 * Basic tests of generic property (H5P) API routines, to verify that API compatibility
 *      is working in the 1.8+ versions of the library
 */
int
main(int argc, const char *argv[])
    hid_t   dcpl;       /* Dataset creation property list ID */
    hid_t   cid;        /* Generic Property class ID */
    hid_t   lid;        /* Generic Property list ID */
    size_t  nprops;     /* Number of properties */
    size_t      nalloc;         /* Number of bytes to be allocated for 
                                   buffer for encoded property list */