/************************************************************ This example shows how to read and write opaque datatypes to a dataset. The program first writes opaque data to a dataset with a dataspace of DIM0, then closes the file. Next, it reopens the file, reads back the data, and outputs it to the screen. This file is intended for use with HDF5 Library version 1.8 ************************************************************/ #include "hdf5.h" #include #include #define FILE "opqext.h5" #define DATASET "DS1" #define DIM0 4 #define LEN 7 #define RANK 1 int main (void) { hid_t file, space, dtype, dset, prop, memspace, filespace; herr_t status; hsize_t dims[1] = {DIM0}; hsize_t maxdims[1] = {H5S_UNLIMITED}; hsize_t chunk_dims[1]= {2}; size_t len; char wdata[DIM0*LEN], /* Write buffer */ str[LEN] = "OPAQUE", *tag; char edata[DIM0*10]; int ndims, i, j; hsize_t dimsext[1]={10}; hsize_t size[1]; hsize_t offset[1]; /* * Initialize data. */ for (i=0; i