1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 herr_t
 ss_blob_bound_f1(ss_blob_t *blob,               /* Blob to query. */
                  hid_t *dset,                   /* OUT: Optional returned dataset handle. The handle is not duplicated and the
                                                  * caller should not close it. */
                  hsize_t *offset,               /* OUT: Optional starting offset for the data owned by BLOB. */
                  hsize_t *size,                 /* OUT: Optional number of elements owned by BLOB. */
                  hid_t *ftype                   /* OUT: Optional datatype of the underlying dataset. The caller should close this
                                                  * datatype handle when no longer needed. */
                  )
 {
     SS_ENTER(ss_blob_bound_f1, herr_t);
     hsize_t     offsets[SS_MAXDIMS], sizes[SS_MAXDIMS];
     int         ndims;

     if ((ndims=ss_blob_bound_f(blob, dset, offsets, sizes, NULL, ftype))<0) SS_ERROR(FAILED);
     if (ndims>1) SS_ERROR_FMT(USAGE, ("dataset is multi-dimensional"));
     if (0==ndims) {
         if (offset) *offset = 0;
         if (size) *size = 0;
     } else {
         if (offset) *offset = offsets[0];
         if (size) *size = sizes[0];
     }

  SS_CLEANUP:
     SS_LEAVE(0);
 }