.\"##
.\" $XConsortium: p007,v 5.2 94/04/17 20:54:16 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 "ARCHIVE STRUCTURES" 3P "29 February 1991"
.SH NAME
ARCHIVE STRUCTURES \- archive specified structures into an archive file
.IX "Archive Files" "ARCHIVE STRUCTURES"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
par_structs ( archive_id, struct_ids )
Pint	archive_id;	\fIarchive identifier\fP
Pint_list	*struct_ids;	\fIlist of structure identifiers\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, AROP)
.SH DESCRIPTION
.SS Purpose
Use \s-2ARCHIVE STRUCTURES\s+2 to archive a list of structures in the
Central Structure Store to the specified open archive file.
.SS C Input Parameters
.IP \fIarchive_id\fP
The archive identifier specifying the open archive file to write to.
.IP \fIstruct_ids\fP
A pointer to a Pint_list structure containing the list of structure
identifiers to be archived.
The Pint_list structure is defined in phigs.h as follows:
.sp .4
.ta .5i +\w'Pint     'u +\w'*num_ints;     'u
.nf
typedef struct {
.sp .2
	Pint	num_ints;	/* number of Pints in list */
	Pint	*ints;	/* list of integers */
.sp .2
} Pint_list;
.fi
.sp
The \fInum_ints\fP component specifies the number of structure identifiers
in the list. The \fIints\fP component is a pointer to a list,
\fInum_ints\fP long, of the structure identifiers.
.SS Execution
The specified structures are copied from the Central Structure
Store to the indicated open archive file.
If any of the structures to be archived currently exist in the archive
file, the conflict is resolved as follows:
.RS
\(bu  If the archival conflict resolution flag is \s-2MAINTAIN\s+2,
the conflicting structure will not be copied into the archive 
(the archive contents are maintained)
.sp .2
\(bu  If the archival conflict resolution flag is \s-2UPDATE\s+2,
the conflicting structure in the archive will be overwritten
(the archive contents are updated)
.sp .2
\(bu  If the archival conflict resolution flag is \s-2ABANDON\s+2,
no structures will be copied to the archive at all
.RE
The archival conflict resolution flag is set by the 
\s-2SET CONFLICT RESOLUTION\s+2 subroutine.
.LP
If any of the structures to be archived do not exist in the Central
Structure Store, a warning is generated and the archiving operation
continues for the remaining structures.
.SH ERRORS
.IP 007
Ignoring function, function requires state (\s-2PHOP\s+2, *, *, \s-2AROP\s+2)
.IP 404
Ignoring function, the specified archive file is not open
.IP 200
Warning, ignoring structures that do not exist
.IP 405
Ignoring function, name conflict occurred while conflict resolution flag
has value \s-2ABANDON\s+2
.IP 406
Warning, the archive file is full.
Any structures that were archived were archived in total
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "OPEN ARCHIVE FILE (3P)"
.SM "SET CONFLICT RESOLUTION (3P)"
.SM "ARCHIVE STRUCTURE NETWORKS (3P)"
.SM "ARCHIVE ALL STRUCTURES (3P)"
.SM "DELETE STRUCTURES FROM ARCHIVE (3P)"
.fi
