void ekopn_c ( ConstSpiceChar * fname,
ConstSpiceChar * ifname,
SpiceInt * handle )
Open a new E-kernel file and prepare the file for writing.
Variable I/O Description
-------- --- --------------------------------------------------
fname I Name of EK file.
ifname I Internal file name.
ncomch I The number of characters to reserve for comments.
handle O Handle attached to new EK file.
fname is the name of a new E-kernel file to be created.
ifname is the internal file name of a new E-kernel. The
internal file name may be up to 60 characters in
length, not including the null terminator.
ncomch is the amount of space, measured in characters, to
be allocated in the comment area when the new EK
file is created. It is not necessary to allocate
space in advance in order to add comments, but
doing so may greatly increase the efficiency with
which comments may be added. Making room for
comments after data has already been added to the
file involves moving the data, and thus is slower.
ncomch must be greater than or equal to zero.
handle is the EK handle of the file designated by fname.
This handle is used to identify the file to other
1) If NCOMCH is less than zero, the error SPICE(INVALIDCOUNT)
will be signalled. No file will be created.
2) If IFNAME is invalid, the error will be diagnosed by routines
called by this routine.
3) If the indicated file cannot be opened, the error will be
diagnosed by routines called by this routine. The new file
will be deleted.
4) If an I/O error occurs while reading or writing the indicated
file, the error will be diagnosed by routines called by this
See the EK Required Reading for a discussion of the EK file
This routine operates by side effects: it opens and prepares
an EK for addition of data.
1) Open a new EK file with name "my.ek" and internal file
name "test ek/1995-JUL-17":
ekopn_c ( "my.ek", "test ek/1995-JUL-17", &handle );
N.J. Bachman (JPL)
-CSPICE Version 1.0.0, 31-MAR-1998 (NJB)
Based on SPICELIB Version 1.0.0, 26-SEP-1995 (NJB)
open new E-kernel
open new EK