void pckopn_c ( ConstSpiceChar * name,
ConstSpiceChar * ifname,
SpiceInt * handle )
Create a new PCK file, returning the handle of the opened file.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
name I The name of the PCK file to be opened.
ifname I The internal filename for the PCK.
ncomch I The number of characters to reserve for comments.
handle O The handle of the opened PCK file.
name The name of the PCK file to be created.
ifname The internal filename for the PCK file that is being
created. The internal filename may be up to 60 characters
long. `ifname' may not contain non-printing characters;
otherwise there are no restrictions on its contents.
ncomch This is the space, measured in characters, to be
initially set aside for the comment area when a new PCK
file is opened. The amount of space actually set aside
may be greater than the amount requested, due to the
manner in which comment records are allocated in an PCK
file. However, the amount of space set aside for comments
will always be at least the amount that was requested.
The value of ncomch should be greater than or equal to
zero, i.e., 0 <= ncomch. A negative value, should one
occur, will be assumed to be zero.
handle The handle of the opened PCK file. If an error occurs
when opening the file, the value of this variable should
not be used, as it will not represent a valid handle.
1) If the value of `ncomch' is negative, a value of zero (0) will
be used for the number of comment characters to be set aside
2) If an error occurs while attempting to open a CK file the
value of `handle' will not represent a valid file handle.
3) If any input string pointers are null, the error
SPICE(NULLPOINTER) will be signaled.
4) If any input strings have length zero, the error
SPICE(EMPTYSTRING) will be signaled.
See descriptions of `name' and `handle'.
Open a new PCK file, reserving room for comments if requested.
Suppose that you want to create a new PCK file called 'new.PCK'
that contains a single type 2 PCK segment and has room for at
least 5000 comment characters. The following code fragment should
take care of this for you, assuming that all of the variables
passed to the PCK type 2 segment writer have appropriate values.
name = "new.pck";
ifname = "Test PCK file";
pckopn_c ( name, ifname, 5000, &handle );
pckw02_c ( handle, body, frame_c, first, last,
segid, intlen, n, polydg, cdata,
pckcls_c ( handle );
N.J. Bachman (JPL)
K.R. Gehringer (JPL)
-CSPICE Version 1.0.0, 16-DEC-2016 (NJB) (KRG)
open a new pck file