CHANGE STRUCTURE IDENTIFIER AND REFERENCES(3P) — SUNPHIGS LIBRARY
NAME
CHANGE STRUCTURE IDENTIFIER AND REFERENCES − change the identifier assigned to a structure and all references to it
SYNOPSIS
C Syntax
void
pchangestructidref ( orig_struct_id, result_struct_id )
Pintorig_struct_id;original structure identifier
Pintresult_struct_id;result structure identifier
FORTRAN Syntax
SUBROUTINE pcstir ( OLDSID, NEWSID )
INTEGEROLDSIDoriginal structure identifier
INTEGERNEWSIDresulting structure identifier
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
CHANGE STRUCTURE IDENTIFIER AND REFERENCES changes the identifier of a specified structure, and all references to the original identifier, to reference the new identifier. References may be both EXECUTE STRUCTURE elements and workstation postings.
C Input Parameters
orig_struct_id
Specifies the structure for which the identifier and references are to be changed.
result_struct_id
Specifies the identifier assigned to this structure when CHANGE STRUCTURE IDENTIFIER AND REFERENCES returns.
FORTRAN Input Parameters
OLDSID
Specifies the structure for which the identifier and references are to be changed.
NEWSID
Specifies the identifier assigned to this structure when CHANGE STRUCTURE IDENTIFIER AND REFERENCES returns.
Execution
The CHANGE STRUCTURE IDENTIFIER AND REFERENCES subroutine changes the identifier associated with original structure identifier to resulting structure identifier. This subroutine also changes all references to the original structure identifier to instead refer to the resulting structure identifier. The result of CHANGE STRUCTURE IDENTIFIER AND REFERENCES varies with the state of the original and resulting structures when the subroutine is called. The possible effects on the structures are described below.
Structure references are established by creating EXECUTE STRUCTURE elements or by posting a structure. A single call to CHANGE STRUCTURE IDENTIFIER AND REFERENCES changes both types of references to the specified structure. Details of how the subroutine changes each type of structure reference are provided below.
If original structure identifier and resulting structure identifier specify the same structure, the subroutine does not take any action. The Original Structure
The structure identified by original structure identifier will no longer exist after this subroutine is executed, unless it was the open structure. In this case, it continues to exist as the open structure after the subroutine returns, but it will be empty and the element pointer will be set to 0. The Resulting Structure
The resulting structure always exists at the end of CHANGE STRUCTURE IDENTIFIER AND REFERENCES. If resulting structure identifier does not exist when the subroutine is called, it is created and contains the elements of the original structure. If original structure identifier does not exist when the subroutine is called, the resulting structure is empty.
If resulting structure identifier already exists before CHANGE STRUCTURE IDENTIFIER AND REFERENCES, the subroutine will replace its contents with the contents of original structure identifier.
If resulting structure identifier is the open structure when the subroutine is called, CHANGE STRUCTURE IDENTIFIER AND REFERENCES closes the structure, replaces the contents with the elements from original structure identifier, and reopens the structure. The element pointer will be set to point to the last element. How EXECUTE STRUCTURE References are Changed
CHANGE STRUCTURE IDENTIFIER AND REFERENCES changes all EXECUTE STRUCTURE elements throughout the Central Structure Store that reference original structure identifier so that they reference resulting structure identifier instead. Any references to resulting structure identifier that already exist when CHANGE STRUCTURE IDENTIFIER AND REFERENCES is called will not be changed by the subroutine. How Posted Structures are Changed
If original structure identifier is posted to a workstation when CHANGE STRUCTURE IDENTIFIER AND REFERENCES is called, the subroutine unposts original structure identifier and posts resulting structure identifier with the same priority that original structure identifier had.
If resulting structure identifier is posted when CHANGE STRUCTURE IDENTIFIER AND REFERENCES is called, it will remain posted and its priority will not change. If original structure identifier is also posted, it will be unposted.
Changes in a posted structure network are processed immediately and may immediately affect the display. The actual visual effects that appear on the display surface will depend on the workstation’s current display update state.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
CHANGE STRUCTURE IDENTIFIER (3P)
CHANGE STRUCTURE REFERENCES (3P)
Sun Release 4.0 — Last change: 7 July 1989