1 /* 2 3 -Procedure spkcls_c ( SPK, Close file ) 4 5 -Abstract 6 7 Close an open SPK file. 8 9 -Disclaimer 10 11 THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE 12 CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S. 13 GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE 14 ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE 15 PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS" 16 TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY 17 WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A 18 PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC 19 SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 20 SOFTWARE AND RELATED MATERIALS, HOWEVER USED. 21 22 IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA 23 BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT 24 LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, 25 INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, 26 REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE 27 REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY. 28 29 RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF 30 THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY 31 CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE 32 ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE. 33 34 -Required_Reading 35 36 SPK 37 38 -Keywords 39 40 SPK 41 42 */ 43 44 #include "SpiceUsr.h" 45 #include "SpiceZfc.h" 46 spkcls_c(SpiceInt handle)47 void spkcls_c ( SpiceInt handle ) 48 49 /* 50 51 -Brief_I/O 52 53 VARIABLE I/O DESCRIPTION 54 -------- --- -------------------------------------------------- 55 handle I Handle of the SPK file to be closed. 56 57 -Detailed_Input 58 59 handle The handle of the SPK file that is to be closed. 60 61 -Detailed_Output 62 63 None. 64 65 -Parameters 66 67 None. 68 69 -Exceptions 70 71 1) If there are no segments in the file, the error 72 SPICE(NOSEGMENTSFOUND) will be signaled. 73 74 -Files 75 76 See argument handle. 77 78 -Particulars 79 80 Close the SPK file attached to handle. 81 82 -Examples 83 84 Suppose that you want to create a new SPK file called "new.spk" 85 that contains a single type 5 SPK segment and has room for at 86 least 5000 comment characters. The following code fragment should 87 take care of this for you, assuming that all of the variables 88 passed to the SPK type 5 segment writer have appropriate values 89 and no errors occur. 90 91 #include "SpiceUsr.h" 92 . 93 . 94 . 95 name = "new.spk"; 96 ifname = "Test SPK file"; 97 98 spkopn_c ( name, ifname, 5000, &handle ); 99 spkw05 ( handle, objid, cntrid, cframe, etbeg, 100 etend, segmid, cntrgm, nstate, state, 101 epoch ); 102 spkcls_c ( handle ); 103 104 -Restrictions 105 106 None. 107 108 -Author_and_Institution 109 110 F.S. Turner (JPL) 111 112 -Literature_References 113 114 None. 115 116 -Version 117 118 -CSPICE Version 1.0.0, 16-MAR-1999 (FST) 119 120 -Index_Entries 121 122 close an spk file 123 124 -& 125 */ 126 127 { /* Begin spkcls_c */ 128 129 /* 130 Participate in error tracing. 131 */ 132 133 chkin_c ( "spkcls_c" ); 134 135 spkcls_ ( ( integer * ) &handle ); 136 137 chkout_c ( "spkcls_c" ); 138 139 } /* End spkcls_c */ 140