Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CHANGE STRUCTURE IDENTIFIER(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

CHANGE STRUCTURE IDENTIFIER −  change the identifier assigned to a structure

SYNOPSIS

C Syntax

void
pchange_struct_id ( orig_struct_id, result_struct_id )
Pintorig_struct_id;original structure id
Pintresult_struct_id;result structure id

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

Use CHANGE STRUCTURE IDENTIFIER to change the identifier of a specified structure. 

Subroutines which create new structures, for example OPEN STRUCTURE or EXECUTE STRUCTURE, include a parameter to assign an identifier for the newly created structure. The identifier is the number used to reference the structure in the Central Structure Store (CSS). 

C Input Parameters

orig_struct_id
Specifies the structure for which the identifier is to be changed.

result_struct_id
Specifies the new identifier to assign to the structure.

Execution

The CHANGE STRUCTURE IDENTIFIER subroutine changes the identifier associated with orig_struct_id to result_struct_id.  The subroutine does not change any references that may exist in other structures to the original or the resulting structure. The result of CHANGE STRUCTURE IDENTIFIER varies with the state of the original and resulting structures when the subroutine is called. The possible effects on the structures are described below.  The Original Structure

If there are no references to the original structure anywhere in the CSS, CHANGE STRUCTURE IDENTIFIER deletes the original structure identifier from the CSS. If there are references to the original structure, the original structure continues to exist after the subroutine returns, but it will be empty. 

If original structure identifier is the open structure when CHANGE STRUCTURE IDENTIFIER is called, it continues to exist as the open structure after the subroutine returns, but it will be empty.  The element pointer will be set to 0. 

If the original structure is posted, it remains posted after CHANGE STRUCTURE IDENTIFIER, but it remains as an empty structure. The display reflects the change in the posted structure according to the workstation’s display update state.  The Resulting Structure

The resulting structure always exists at the end of CHANGE STRUCTURE IDENTIFIER. If the resulting structure identifier does not exist when the subroutine is called, it is created and contains the elements of the original structure. If the original structure identifier does not exist when the subroutine is called, the resulting structure is empty. 

If the resulting structure identifier already exists before CHANGE STRUCTURE IDENTIFIER, the subroutine will replace its contents with the contents of the original structure identifier. Any existing references to the resulting structure identifier are not changed. 

If the resulting structure identifier is the open structure when the subroutine is called, CHANGE STRUCTURE IDENTIFIER 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. 

If the resulting structure identifier is posted when CHANGE STRUCTURE IDENTIFIER is called, it will remain posted after the subroutine is complete. The display is changed to reflect the new contents of the structure according to the display update state of the workstation to which the structure is posted. 

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

SEE ALSO

CHANGE STRUCTURE IDENTIFIER AND REFERENCES (3P)
CHANGE STRUCTURE REFERENCES (3P)

September 02, 1992

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