1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 void *
 ss_attr_get(ss_attr_t *attr,                    /* The attribute in question. */
             hid_t type,                         /* The desired datatype of the returned value. */
             size_t offset,                      /* The first element of the value to return (an element index, not byte index) */
             size_t nelmts,                      /* The total number of elements to return. If the OFFSET and NELMTS arguments
                                                  * describe a range of elements that is outside that which is known to the
                                                  * attribute then an error is raised. If NELMTS is SS_NOSIZE then the number
                                                  * of returned values is not limited (except perhaps by the non-zero OFFSET). */
             void *buffer                        /* The optional buffer in which to store the returned values. */
             )
 {
     SS_ENTER(ss_attr_get, voidP);

     SS_ASSERT_MEM(attr, ss_attr_t);
     if (NULL==(buffer=ss_array_get(SS_ATTR_P(attr,value), type, offset, nelmts, buffer))) SS_ERROR(FAILED);

 SS_CLEANUP:
     SS_LEAVE(buffer);
 }