rsspice/generated/spicelib/putact.rs
1//
2// GENERATED FILE
3//
4
5use super::*;
6use crate::SpiceContext;
7use f2rust_std::*;
8
9const IDEFLT: i32 = 5;
10
11struct SaveVars {
12 SAVACT: i32,
13}
14
15impl SaveInit for SaveVars {
16 fn new() -> Self {
17 let mut SAVACT: i32 = 0;
18
19 SAVACT = IDEFLT;
20
21 Self { SAVACT }
22 }
23}
24
25/// Store Error Response Action
26///
27/// Store the error response action.
28///
29/// PUTACT is a low-level data structure access routine.
30/// DO NOT CALL THIS ROUTINE. USE ERRACT, NOT PUTACT, TO SET THE
31/// CURRENT ERROR RESPONSE ACTION.
32///
33/// # Required Reading
34///
35/// * [ERROR](crate::required_reading::error)
36///
37/// # Brief I/O
38///
39/// ```text
40/// VARIABLE I/O DESCRIPTION
41/// -------- --- --------------------------------------------------
42/// ACTION I The integer code for the error response action.
43/// ```
44///
45/// # Detailed Input
46///
47/// ```text
48/// ACTION is the new integer code for the error response action.
49/// This code is saved for use by the error handling
50/// system.
51/// ```
52///
53/// # Exceptions
54///
55/// ```text
56/// Error free.
57/// ```
58///
59/// # Particulars
60///
61/// ```text
62/// DO NOT CALL THIS ROUTINE.
63///
64/// This is a data structure access routine for the SPICELIB
65/// error response action. This routine should be used for
66/// no other purpose. In particular, it should not be used
67/// by non-SPICELIB routines to set up an error response;
68/// use ERRACT for that.
69/// ```
70///
71/// # Restrictions
72///
73/// ```text
74/// 1) DO NOT CALL THIS ROUTINE.
75///
76/// 2) Calls to this routine by routines other than the SPICELIB
77/// error handling routines may interfere with error processing.
78///
79/// 3) See the subroutine ERRACT for the definitions of the error
80/// action codes.
81/// ```
82///
83/// # Author and Institution
84///
85/// ```text
86/// N.J. Bachman (JPL)
87/// J. Diaz del Rio (ODC Space)
88/// K.R. Gehringer (JPL)
89/// W.L. Taber (JPL)
90/// ```
91///
92/// # Version
93///
94/// ```text
95/// - SPICELIB Version 2.1.0, 27-AUG-2021 (JDR)
96///
97/// Added IMPLICIT NONE statement.
98///
99/// Edited the header to comply with NAIF standard. Added
100/// $Index_Entries entry.
101///
102/// - SPICELIB Version 2.0.0, 22-APR-1996 (KRG)
103///
104/// This subroutine has been modified in an attempt to improve
105/// the general performance of the SPICELIB error handling
106/// mechanism. The specific modification has been to change the
107/// type of the saved error action from a short character string
108/// to an integer. This change is backwardly incompatible
109/// because the type of the input argument has changed. This
110/// should pose no difficulties because it is a private subroutine
111/// used by the error handling system, and hence isolated from
112/// direct use.
113///
114/// - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
115///
116/// Comment section for permuted index source lines was added
117/// following the header.
118///
119/// - SPICELIB Version 1.0.0, 31-JAN-1990 (NJB)
120/// ```
121///
122/// # Revisions
123///
124/// ```text
125/// - SPICELIB Version 2.0.0, 22-APR-1996 (KRG)
126///
127/// This subroutine has been modified in an attempt to improve
128/// the general performance of the SPICELIB error handling
129/// mechanism. The specific modification has been to change the
130/// type of the saved error action from a short character string
131/// to an integer. This change is backwardly incompatible
132/// because the type of the input argument has changed. This
133/// should pose no difficulties because it is a private subroutine
134/// used by the error handling system, and hence isolated from
135/// direct use.
136///
137/// - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
138///
139/// Comment section for permuted index source lines was added
140/// following the header.
141///
142/// - Beta Version 1.0.1, 08-FEB-1989 (NJB)
143///
144/// Warnings added to discourage use of this routine in
145/// non-error-handling code.
146/// ```
147pub fn putact(ctx: &mut SpiceContext, action: i32) {
148 PUTACT(action, ctx.raw_context());
149}
150
151//$Procedure PUTACT ( Store Error Response Action )
152pub fn PUTACT(ACTION: i32, ctx: &mut Context) {
153 let save = ctx.get_vars::<SaveVars>();
154 let save = &mut *save.borrow_mut();
155
156 //
157 // Local Parameters:
158 //
159 // Define the mnemonic for the default error action.
160 //
161 //
162 // Local Variables:
163 //
164 // The current error response action:
165 //
166
167 //
168 // Initial values:
169 //
170
171 //
172 // Executable Code:
173 //
174
175 save.SAVACT = ACTION;
176}
177
178/// Get Error Response Action
179///
180/// Return the value of the current error response action.
181///
182/// # Required Reading
183///
184/// * [ERROR](crate::required_reading::error)
185///
186/// # Brief I/O
187///
188/// ```text
189/// VARIABLE I/O DESCRIPTION
190/// -------- --- --------------------------------------------------
191/// ACTION O The integer code for the error response action.
192/// ```
193///
194/// # Detailed Output
195///
196/// ```text
197/// ACTION is the integer code for the current error response
198/// action. See the ERRACT subroutine and the "required
199/// reading" file for a detailed discussion of error
200/// response actions.
201/// ```
202///
203/// # Exceptions
204///
205/// ```text
206/// Error free.
207///
208/// 1) However, this routine is part of the SPICELIB error
209/// handling mechanism.
210/// ```
211///
212/// # Author and Institution
213///
214/// ```text
215/// N.J. Bachman (JPL)
216/// J. Diaz del Rio (ODC Space)
217/// K.R. Gehringer (JPL)
218/// W.L. Taber (JPL)
219/// ```
220///
221/// # Version
222///
223/// ```text
224/// - SPICELIB Version 2.1.0, 03-JUN-2021 (JDR)
225///
226/// Added IMPLICIT NONE statement.
227///
228/// Edited the header to comply with NAIF standard. Added
229/// $Index_Entries entry.
230///
231/// - SPICELIB Version 2.0.0, 22-APR-1996 (KRG)
232///
233/// This subroutine has been modified in an attempt to improve
234/// the general performance of the SPICELIB error handling
235/// mechanism. The specific modification has been to change the
236/// type of the saved error action from a short character string
237/// to an integer. This change is backwardly incompatible
238/// because the type of the input argument has changed. This
239/// should pose no difficulties because it is a private subroutine
240/// used by the error handling system, and hence isolated from
241/// direct use.
242///
243/// - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
244///
245/// Comment section for permuted index source lines was added
246/// following the header.
247///
248/// - SPICELIB Version 1.0.0, 31-JAN-1990 (NJB)
249/// ```
250///
251/// # Revisions
252///
253/// ```text
254/// - SPICELIB Version 2.0.0, 22-APR-1996 (KRG)
255///
256/// This subroutine has been modified in an attempt to improve
257/// the general performance of the SPICELIB error handling
258/// mechanism. The specific modification has been to change the
259/// type of the saved error action from a short character string
260/// to an integer. This change is backwardly incompatible
261/// because the type of the input argument has changed. This
262/// should pose no difficulties because it is a private subroutine
263/// used by the error handling system, and hence isolated from
264/// direct use.
265///
266/// - SPICELIB Version 1.0.1, 10-MAR-1992 (WLT)
267///
268/// Comment section for permuted index source lines was added
269/// following the header.
270/// ```
271pub fn getact(ctx: &mut SpiceContext, action: &mut i32) {
272 GETACT(action, ctx.raw_context());
273}
274
275//$Procedure GETACT ( Get Error Response Action )
276pub fn GETACT(ACTION: &mut i32, ctx: &mut Context) {
277 let save = ctx.get_vars::<SaveVars>();
278 let save = &mut *save.borrow_mut();
279
280 //
281 // Executable Code:
282 //
283
284 //
285 // Grab saved error response action:
286 //
287
288 *ACTION = save.SAVACT;
289}