.\"##
.\" $XConsortium: p034,v 5.2 94/04/17 20:54:36 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "DELETE STRUCTURE" 3P "29 February 1991"
.SH NAME
DELETE STRUCTURE \- remove specified structure
.IX "Structures" "DELETE STRUCTURE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pdel_struct ( struct_id )
Pint	struct_id;	\fIstructure identifier\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2DELETE STRUCTURE\s+2 removes the specified structure from the Central Structure Store \s-2(CSS)\s+2, along with all references to the structure and all postings 
of the structure to workstations.
.LP
If the specified structure is closed, the subroutine removes the structure elements, structure identifier, and any references to the structure.
.LP
If the structure is the currently open structure, the structure identifier is retained and remains open, but the structure contents and any references to the structure are deleted.
.SS C Input Parameter
.IP \fIstruct_id \fP
Specifies the structure to be deleted.
.SS Execution
The effect of \s-2DELETE STRUCTURE\s+2 when the specified structure
is closed at the time the subroutine is called is different from the
effect when structure identifier is the open structure.
The two situations are described below.
.sp .4
\fIDeleting a Closed Structure\fR
.sp .2
If structure identifier is not the currently open structure,
the \s-2DELETE STRUCTURE\s+2 subroutine removes the specified
structure from the \s-2PHIGS\s+2 Central Structure Store.
The subroutine deletes the structure identifier, structure contents,
and all references to structure identifier contained in other structures. 
.LP
If the currently open structure contains an element referencing structure
identifier, the element in the open structure is deleted and the remaining
elements renumbered.
If the element pointer is pointing to the deleted element,
the pointer is set to the preceding element.
If the element pointer is pointing to an element following the
deleted element, the element pointer is updated such that it
still refers to the same element.
.sp .4
\fIDeleting the Open Structure\fR
.sp .2
If structure identifier is the currently open structure, the result of \s-2DELETE STRUCTURE\s+2 is to replace the open structure with an empty, unreferenced structure. The effect is the same as calling the following subroutines in sequence:
.RS
.ta 0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i +0.2i
.LP
\(bu
.SM "CLOSE STRUCTURE"
.LP
\(bu
.SM "DELETE STRUCTURE"
.LP
\(bu
.SM "OPEN STRUCTURE"
.ta
.RE
.LP
.SH ERRORS
.IP 002
Ignoring function, function requires state 
(\s-2PHOP\s+2, \s-2*\s+2, \s-2*\s+2, \s-2*\s+2)
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "DELETE ALL STRUCTURES (3P)"
.SM "DELETE STRUCTURE NETWORK (3P)"
.SM "DELETE STRUCTURES FROM ARCHIVE (3P)"
.SM "EMPTY STRUCTURE (3P)"
.fi
