void errdev_c ( ConstSpiceChar * op,
SpiceChar * device )
Retrieve or set the name of the current output
device for error messages.
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
op I The operation: "GET" or "SET".
lenout I Length of device for output.
device I/O The device name.
op indicates the operation to be performed. Possible
values are "GET" and "SET". "GET" means, "set
device equal to the name of the current error
output device" "SET" means, "set the name of the
current error output device equal to the value of
lenout the string size of output 'device' when op equals "GET."
The size described by lenout should be large enough to
hold all characters of any possible output string
plus 1 (to accommodate the C null terminator).
device is an input when op has the value, "SET". It
indicates an output device to which error messages
are to be sent. Possible values for device are:
1. A file name. Note that the name must not
use one of the reserved strings below.
2. "SCREEN" The output will go to the
screen. This is the default device.
3. "NULL" The data will not be output.
"SCREEN" and "NULL" can be written in mixed
case. For example, the following call will work:
errdev_c ( "SET", lenout, "screEn" );
device is an output returning the current error output device
when 'op' equals "GET." See "Detailed Input"
descriptions of these values.
1) If the input argument op does not indicate a valid operation,
the error SPICE(INVALIDOPERATION) will be signaled.
2) When op is "SET", if the input argument device has length greater
than FILEN characters, the error SPICE(DEVICENAMETOOLONG) will
3) The error SPICE(EMPTYSTRING) is signaled if either input string
does not contain at least one character, since an input string
cannot be converted to a Fortran-style string in this case. This
check always applies to op; it applies to device only when
device is an input, that is, when op is "SET."
4) The error SPICE(NULLPOINTER) is signaled if either string pointer
argument is null.
5) The caller must pass a value indicating the length of the output
string, when device is an output. If this value is not at least
2, the error SPICE(STRINGTOOSHORT) is signaled.
This routine supports spooling of error messages to log files.
1. In this example, we select as the output device
the file, SPUD.DAT.
Set the error output device to the file SPUD.DAT:
errdev_c ( "SET", lenout, "SPUD.DAT" );
This routine has no capability of determining the validity
of the name of an output device. Care must be taken
to ensure that the file named is the correct one.
The device name is assumed to be no longer than FILEN characters.
N.J. Bachman (JPL)
H.A. Neilan (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.3.1, 25-SEP-2003 (EDW)
Corrected confusing description of 'lenout' argument.
-CSPICE Version 1.3.0, 24-JUN-2003 (NJB)
Bug fix: case of invalid operation keyword is now
diagnosed, as per the Exceptions section of the header.
-CSPICE Version 1.2.0, 28-AUG-1999 (NJB)
Bug fix: changed errprt_ call to call to errdev_.
-CSPICE Version 1.2.0, 09-FEB-1998 (NJB)
Re-implemented routine without dynamically allocated, temporary
strings. Made various header fixes.
-CSPICE Version 1.0.1, 30-OCT-1997 (EDW)
Corrected errors in examples in which the call sequence
-CSPICE Version 1.0.0, 25-OCT-1997 (EDW)
get/set error output device name