1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// GENERATED FILE
//
use super::*;
use f2rust_std::*;
const CTRSIZ: i32 = 2;
//$Procedure ZZBODVCD ( Get d.p. kernel variable for body, with bypass )
pub fn ZZBODVCD(
BODYID: i32,
ITEM: &[u8],
MAXN: i32,
VARCTR: &mut [i32],
N: &mut i32,
VALUES: &mut [f64],
ctx: &mut Context,
) -> f2rust_std::Result<()> {
let mut VARCTR = DummyArrayMut::new(VARCTR, 1..=CTRSIZ);
let mut VALUES = DummyArrayMut::new(VALUES, 1..);
let mut UPDATE: bool = false;
//
// SPICELIB functions
//
//
// Local variables
//
if RETURN(ctx) {
return Ok(());
}
CHKIN(b"ZZBODVCD", ctx)?;
//
// See whether the kernel pool state has changed since the
// user counter was set. Update the user counter if so.
//
ZZPCTRCK(VARCTR.as_slice_mut(), &mut UPDATE, ctx);
//
// If the pool was updated, or if we're looking at a new variable,
// update the kernel variable values, size, and found flag.
// Otherwise do nothing.
//
if UPDATE {
BODVCD(BODYID, ITEM, MAXN, N, VALUES.as_slice_mut(), ctx)?;
if FAILED(ctx) {
*N = 0;
}
}
CHKOUT(b"ZZBODVCD", ctx)?;
Ok(())
}