interpret_ele(3G)
NAME
interpret_ele − process an inquired display list element
SYNOPSIS
C Syntax:
void interpret_ele(fildes, ele)
int fildes, *ele;
FORTRAN77 Syntax:
subroutine interpret_ele(fildes, ele)
integer*4 fildes, ele(*)
Pascal Syntax:
procedure interpret_ele(fildes:integer;
var ele[lo..hi:integer] of integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
ele An element, as returned by inq_ele(3G).
Discussion
Interpret_ele processes the specified element for display or addition to a display list. An element is obtained by using inq_ele(3G). If a segment is open when the element is processed, the element is added to the segment. If the display parameter was TRUE on the call to open_segment(3G), the element will also be displayed. If no segment is open, the element will be processed for display, but will not be inserted into a segment.
Not all Starbase routines that might possibly be invoked by the interpretation of an element are automatically linked with the application program. This is done so that a program that uses interpret_ele does not incur the code size penalty for linking all Starbase routines. If an element is interpreted, and the corresponding Starbase routine has not been linked, an error is reported. If a program only interprets elements that it originally placed in a display list, then all routines will be available and the error cannot occur.
A program that interprets elements generated by another program should ensure that all necessary Starbase routines are linked with the program. This can be accomplished by either:
1. placing calls to the required Starbase routines in the program. The calls do not need to be actually executed when the program is run. For example, the following C function could be linked with a program to guarantee that polyline2d, background_color, and polygon2d element types could be interpreted:
void reference_sb_fcts()
{
polyline2d();
background_color();
polygon2d();
}
2. causing all Starbase element routines to be loaded by linking the optional library sbdlrefs. This library is specified on the compile or link command line before the sbdl library. For example,
cc example.c -ldd98721 -lsbdlrefs -lsbdl -lsb1 -lsb2
Note that this usage is not recommended except when dealing with an archive file whose contents are unknown. This practice will result in a large executable file.
EXAMPLE
For an example of how to use interpret_ele(3G), see the manual page for inq_ele(3G).
ERRORS
1 Graphics device not initialized for this operation.
56 Code not linked for element passed to interpret_ele.
HARDWARE DEPENDENCIES
Series 300/Series 800:
Archived data is in a machine-dependent binary format that may not be interpreted correctly by another machine. In particular, archived Series 800 floating point data may include denormalized numbers, which if interpreted by a Series 300 machine will not be handled correctly and may cause floating point errors.
WARNING
This routine does not check the validity of the data passed to it. Random or incorrect data will probably produce a Starbase error as the data is interpreted.
SEE ALSO
inq_ele(3G), open_segment(3G).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994