Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_ele_ptr(3G) — HP-UX 9.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open_segment(3G)

inq_ele_ptr(3G)

set_ele_ptr(3G)

NAME

set_ele_ptr, set_ele_ptr_relative, set_ele_ptr_relative_to_label, set_ele_ptr_at_end − set the element pointer in the currently open segment

SYNOPSIS

C Syntax:

void set_ele_ptr(fildes, offset)
int fildes, offset;

void set_ele_ptr_relative(fildes, offset)
int fildes, offset;

void set_ele_ptr_relative_to_label(fildes, label_id, offset)
int fildes, label_id, offset;

void set_ele_ptr_at_end(fildes)
int fildes;

FORTRAN77 Syntax:

subroutine set_ele_ptr(fildes, offset)
integer*4 fildes, offset

subroutine set_ele_ptr_relative(fildes, offset)
integer*4 fildes, offset

subroutine set_ele_ptr_relative_to_label(fildes, label_id, offset)
integer*4 fildes, label_id, offset

subroutine set_ele_ptr_at_end(fildes)
integer*4 fildes

Pascal Syntax:

procedure set_ele_ptr(fildes, offset:integer);

procedure set_ele_ptr_relative(fildes, offset:integer);

procedure set_ele_ptr_relative_to_label(fildes,
label_id, offset:integer);

procedure set_ele_ptr_at_end(fildes:integer);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

label_id Display list label within the currently open segment. 

offset Offset at which to position the element pointer. 

Discussion

Set_ele_ptr, set_ele_ptr_relative, set_ele_ptr_relative_to_label, and set_ele_ptr_at_end position the element pointer of the currently open segment of the display list of the specified graphics device. 

Set_ele_ptr positions the element pointer relative to the first element.  A positive offset moves the element pointer offset elements toward the end.  A negative or zero offset sets the element pointer to point at element 0. 

Set_ele_ptr_relative positions the element pointer relative to its current location.  A negative offset moves the element pointer toward the start of the segment while a positive offset moves it offset elements toward the end. 

Set_ele_ptr_relative_to_label positions the element pointer relative to the specified label.  If offset is negative, the element pointer is positioned offset elements before label_id.  If offset is positive, the pointer is positioned offset elements after the next occurrence of label_id.  An offset of zero sets the element pointer at label_id.  If multiple display list labels have the same identifier, a search for the label_id begins with the element following the current element.  If no occurrence of label_id exists between the current element and the end of the open segment, the search continues from the beginning of the segment until label_id is found or it is determined that label_id does not exist in the segment. 

If label_id does not exist, the element pointer is left unchanged and an error is generated. 

If label_id is zero, the offset is taken from element 0. 

Offsets that would move the element pointer outside the current segment cause the pointer to be moved such that new elements would be inserted before the first element in the segment or appended to end of the segment, depending on the sign of offset.  Element pointer movement does not "wrap around". 

Set_ele_ptr_at_end sets the element pointer such that new elements will be appended to the segment.  The element pointer is set to point to the last element of the segment. 

The first element is referred to as element 1.  Placing the element pointer at element 0 provides for insertion before the first element. 

ERRORS

1 Graphics device is not initialized for this operation. 

24 Segment not open. 

38 Label_id not defined. 

SEE ALSO

open_segment(3G), inq_ele_ptr(3G). 

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026