Index Page lmpool_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void lmpool_c ( const void  * cvals,
                       SpiceInt      lenvals,
                       SpiceInt      n       )
#### Abstract
       Load the variables contained in an internal buffer into the
       kernel pool.
#### Required_Reading
       KERNEL
#### Keywords
       CONSTANTS
       FILES
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       cvals      I   An array that contains a SPICE text kernel.
       lenvals    I   Length of strings in cvals.
       n          I   The number of entries in cvals.
#### Detailed_Input
       cvals          is an array of strings that contains lines of text
                      that could serve as a SPICE text kernel.  cvals is
                      declared as follows:

                         ConstSpiceChar   cvals [n][lenvals]

                      Each string in cvals is null-terminated.

       lenvals        is the common length of the strings in cvals,
                      including the terminating nulls.

       n              is the number of strings in cvals.
#### Detailed_Output
       None.
#### Parameters
       None.
#### Exceptions
       1) If the input string pointer is null, the error SPICE(NULLPOINTER)
          will be signaled.

       2) If the input string length lenvals is not at least 2, the error
          SPICE(STRINGTOOLSHORT) will be signaled.

       3) The error 'SPICE(BADVARNAME)' signals if a kernel pool
          variable name length exceeds 32.

       4) Other exceptions are diagnosed by routines in the call tree of
          this routine.
#### Files
       None.
#### Particulars
       This routine allows you to store a text kernel in an internal
       array of your program and load this array into the kernel pool
       without first storing its contents as a text kernel.

       Kernel pool variable names are restricted to a length of 32
       characters or less.
#### Examples
       Suppose that your application is not particularly sensitive
       to the current number of leapseconds but that you would
       still like to use a relatively recent leapseconds kernel
       without requiring users to load a leapseconds kernel into
       the program.  The example below shows how you might set up
       the initialization portion of your program.

          #include "SpiceUsr.h"

          #define LNSIZE          81
          #define NLINES          27

          SpiceChar               textbuf[NLINES][LNSIZE] =
                         {
                            "DELTET/DELTA_T_A = 32.184",
                            "DELTET/K         = 1.657D-3",
                            "DELTET/EB        = 1.671D-2",
                            "DELTET/M         = ( 6.239996 1.99096871D-7 )",
                            "DELTET/DELTA_AT  = ( 10, @1972-JAN-1",
                            "                     11, @1972-JUL-1",
                            "                     12, @1973-JAN-1",
                            "                     13, @1974-JAN-1",
                            "                     14, @1975-JAN-1",
                            "                     15, @1976-JAN-1",
                            "                     16, @1977-JAN-1",
                            "                     17, @1978-JAN-1",
                            "                     18, @1979-JAN-1",
                            "                     19, @1980-JAN-1",
                            "                     20, @1981-JUL-1",
                            "                     21, @1982-JUL-1",
                            "                     22, @1983-JUL-1",
                            "                     23, @1985-JUL-1",
                            "                     24, @1988-JAN-1",
                            "                     25, @1990-JAN-1",
                            "                     26, @1991-JAN-1",
                            "                     27, @1992-JUL-1",
                            "                     28, @1993-JUL-1",
                            "                     29, @1994-JUL-1",
                            "                     30, @1996-JAN-1",
                            "                     31, @1997-JUL-1",
                            "                     32, @1999-JAN-1 )"
                         };

          lmpool_c ( textbuf, LNSIZE, NLINES );
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman    (JPL)
       W.L. Taber      (JPL)
#### Version
       -CSPICE Version 1.3.1,  10-FEB-2010 (EDW)

          Added mention of the restriction on kernel pool variable
          names to 32 characters or less.

       -CSPICE Version 1.3.0, 12-JUL-2002 (NJB)

          Call to C2F_CreateStrArr_Sig replaced with call to C2F_MapStrArr.

       -CSPICE Version 1.2.0, 28-AUG-2001 (NJB)

          Const-qualified input array.

       -CSPICE Version 1.1.0, 14-FEB-2000 (NJB)

           Calls to C2F_CreateStrArr replaced with calls to error-signaling
           version of this routine:  C2F_CreateStrArr_Sig.

       -CSPICE Version 1.0.0, 08-JUN-1999 (NJB) (WLT)
#### Index_Entries
       Load the kernel pool from an internal text buffer
#### Link to routine lmpool_c source file lmpool_c.c

    Wed Jun  9 13:05:25 2010