PEXGetElementInfo - Get Element Information (5.0)


Note: You should use PEXGetLargeElementInfo instead of this function in order to handle large output commands properly.

Synopsis

 
   Status PEXGetElementInfo(
          Display *display,
          PEXStructure structure
          int whence1,
          long offset1,
          int whence2,
          long offset2,
          int float_format,
          unsigned long *count_return,
          PEXElementInfo
          **info_return
   )

Arguments

display
A pointer to a display structure returned by a successful XOpenDisplay call.

structure
The resource identifier of the structure.

whence1
A value specifying, with offset1, the first limit of the range of queried elements (PEXBeginning, PEXCurrent or PEXEnd).

offset1
The offset from whence1 denoting the first limit of the range of queried elements.

whence2
A value specifying, with offset2, the second limit of the range of elements to be queried (PEXBeginning, PEXCurrent or PEXEnd).

offset2
The offset from whence2 denoting the second limit of the range of elements to be queried.

float_format
The floating-point format to use when computing element sizes (PEXIEEE_754_32, PEXDEC_F_Floating, PEXIEEE_754_64 or PEXDEC_D_Floating).

count_return
Returns the number of element info records returned.

info_return
Returns an array of element info records describing the elements in the specified range.

Returns

Zero if unsuccessful; non-zero otherwise.

Description

Invoke PEXGetElementInfo to get information about a range of elements from the specified structure.

If a computed offset is less than zero, then it is set to zero before obtaining the element information. If a computed offset is greater than the number of elements in the structure, then it is set to the offset of the last element in the structure. The element pointer attribute of structure is not affected by this command. No information is returned for inquiries on element offset zero.

Information returned about the list of inquired elements includes the type of each element and its size. The size of each element is based upon the specified floating-point format. The size returned for each element is undefined if the structure's permission is PEXStructureWriteOnly.

This function returns a value of zero in the length field if the OC is greater than 64K words in length. To work with these large OC's, invoke the PEXGetLargeElementInfo function to obtain their actual lengths.

PEXlib allocates memory for the return value. Invoke XFree to deallocate the memory.

Errors

BadPEXFloatingPointFormat
The specified floating-point format is invalid or unsupported.

BadPEXStructure
The specified structure resource identifier is invalid.

BadPEXStructurePermission
The structure's permission is PEXStructureLocked.

BadValue
The specified value for a whence argument is invalid.

See Also

For a list of all Structure functions and related topics, see Structures.