.\" @(#)PEXFetchElements.3 1.5 95/03/24 SMI; .so man3/pex.macs .TH PEXFetchElements 3 "May 1995" "Solaris PEXlib Reference Manual" "" .SH NAME PEXFetchElements - Fetch Elements .SH SYNTAX .HP Status PEXFetchElements\^(\^Display *\fIdisplay\fP\^, PEXStructure \fIstructure\fP\^, int \fIwhence1\fP\^, long \fIoffset1\fP\^, int \fIwhence2\fP\^, long \fIoffset2\fP\^, int \fIfloat_format\fP\^, unsigned long *\fIcount_return\fP\^, unsigned long *\fIlength_return\fP\^, char **\fIocs_return\fP\^) .SH PARAMETERS .TP 1i \fIdisplay\fP A pointer to a display structure returned by a successful .B XOpenDisplay call. .IP \fIstructure\fP 1i The resource identifier of the structure. .IP \fIwhence1\fP 1i A value specifying, with \fIoffset1\fP, the first limit of the range of elements to be fetched ( .B PEXBeginning, .B PEXCurrent, .B PEXEnd ). .IP \fIoffset1\fP 1i The offset from \fIwhence1\fP denoting the first limit of the range of elements to be fetched. .IP \fIwhence2\fP 1i A value specifying, with \fIoffset2\fP, the second limit of the range of elements to be fetched ( .B PEXBeginning, .B PEXCurrent, .B PEXEnd ). .IP \fIoffset2\fP 1i The offset from \fIwhence2\fP denoting the second limit of the range of elements to be fetched. .IP \fIfloat_format\fP 1i The floating point format to use when formatting the output commands to be fetched ( .B PEXIEEE_754_32, .B PEXDEC_F_Floating, .B PEXIEEE_754_64, .B PEXDEC_D_Floating ). .IP \fIcount_return\fP 1i Returns the number of output commands returned. .IP \fIlength_return\fP 1i Returns the length, in bytes, of the output commands fetched. .IP \fIocs_return\fP 1i Returns a pointer to protocol-formatted output commands (structure elements). .SH RETURNS Zero if unsuccessful, non-zero otherwise. .SH DESCRIPTION .\" indexing .IX PEXFetchElements .IX "Structure Elements" PEXFetchElements .LP This function fetches a range of structure elements from the specified .I structure. .LP If either computed offset is less than zero, it is set to zero before fetching the structure elements. If either computed offset is greater than the number of elements in the .I structure, it is set to the offset of the last structure element in the .I structure. The element pointer attribute of .I structure is not affected by this command. No information will be returned for inquiries on element offset zero. .LP An null pointer is returned is the requested floating point format is not supported. .LP Any text or annotation text output commands returned will be formatted as encoded text or encoded annotation text. .LP PEXlib allocates memory for the return value. .B XFree should be called to deallocate the memory. .SH DATA STRUCTURES .LP .nf typedef XID PEXStructure; .fi .sp .SH ERRORS .TP .SB BadPEXFloatingPointFormat The specified floating point format is invalid or unsupported. .TP .SB BadPEXStructure The specified .I structure resource identifier is invalid. .TP .SB BadValue The specified value for whence parameter is invalid. .SH SEE ALSO .LP .nf .BR PEXCreateStructure (3) .BR PEXDecodeOCs (3) .BR PEXEncodeOCs (3) .BR PEXSendOCs (3) .fi