idx_g = H5Literate_by_name(grp, "/Data_new", H5_INDEX_NAME, H5_ITER_INC, NULL, group_info, NULL, H5P_DEFAULT);
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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 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.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
 * This program creates a group in the file and two datasets in the group.
 * Hard link to the group object is created and one of the datasets is accessed
 * under new name.
 * Iterator functions are used to find information about the objects
 * in the root group and in the created group.
 */
#include "hdf5.h"
#define H5FILE_NAME    "group.h5"
#define RANK    2
static herr_t file_info(hid_t loc_id, const char *name, const H5L_info_t *linfo,
    void *opdata);              /* Link iteration operator function */
static herr_t group_info(hid_t loc_id, const char *name, const H5L_info_t *linfo,
    void *opdata);              /* Link iteration operator function */
int
main(void)
    hid_t    file;
    hid_t    grp;
    hid_t    dataset, dataspace;
    hid_t    plist;
    herr_t   status;
    hsize_t  dims[2];
    hsize_t  cdims[2];
    int      idx_f, idx_g;
    /*
     * Create a file.