rename_segment(3G)
NAME
rename_segment, rename_segment_and_references − rename segment or segment and all references to segment
SYNOPSIS
C Syntax:
void rename_segment(fildes, old_segno, new_segno)
int fildes, old_segno, new_segno;
void rename_segment_and_references(fildes,
old_segno, new_segno)
int fildes, old_segno, new_segno;
FORTRAN77 Syntax:
subroutine rename_segment(fildes, old_segno, new_segno)
integer*4 fildes, old_segno, new_segno
subroutine rename_segment_and_references(fildes,
old_segno, new_segno)
integer*4 fildes, old_segno, new_segno
Pascal Syntax:
procedure rename_segment(fildes, old_segno, new_segno:integer);
procedure rename_segment_and_references(fildes,
old_segno, new_segno:integer);
DESCRIPTION
Input Parameters
fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened.
old_segno Old segment name
new_segno New segment name
Discussion
Rename_segment changes the name of a segment in the display list of the specified graphics device. References to the segment by call_segment, execute_segment, cond_call_segment or cond_execute_segment elements are NOT changed. If there are references to the old segment name, an empty segment with the old name is created to satisfy these references. If a segment with the new name exists in the display list, it is, in effect, deleted prior to changing the name of the segment to the new name.
In effect four situations arise:
• If a segment with the old name exists before the invocation to rename_segment and there are no references to that segment name, the segment with the old name no longer exists after renaming.
• If a segment with the old name exists before the call to rename_segment and there are references to that segment, the segment with the old name exists as an empty segment when renaming is complete.
• If no segment with the old name exists before the call to rename_segment the effect is to generate an empty segment with the new name.
• If the segment with the old name was the open segment at the time when rename_segment or rename_segment_and_references is called, it remains the open segment but is emptied by the rename operation.
Rename_segment_and_references performs the same action as rename_segment, but in addition, all references to the segment in the display list are also updated to the new segment name.
ERRORS
1 Graphics device is not initialized for this operation.
SEE ALSO
open_segment(3G), change_segment_references(3G), call_segment(3G),
execute_segment(3G), cond_call_segment(3G), cond_execute_segment(3G).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992