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
60
61
62
63
64
65
66
//
// GENERATED FILE
//
use super::*;
use f2rust_std::*;
const ARGLEN: i32 = 512;
struct SaveVars {
FIRST: bool,
}
impl SaveInit for SaveVars {
fn new() -> Self {
let mut FIRST: bool = false;
FIRST = true;
Self { FIRST }
}
}
//$Procedure GETCML ( Get the command line )
pub fn GETCML(LINE: &mut [u8], ctx: &mut Context) {
let save = ctx.get_vars::<SaveVars>();
let save = &mut *save.borrow_mut();
let mut ARGMNT = [b' '; ARGLEN as usize];
let mut HOWMNY: i32 = 0;
let mut I: i32 = 0;
//
// Other functions
//
//
// Local Variables
//
//
// Call the FORTRAN library function iargc to determine how many
// words are on the command line. Then, get the arguments one at a
// time and construct the output string.
//
HOWMNY = ctx.iargc();
I = 1;
fstr::assign(LINE, b" ");
if (HOWMNY == 0) {
return;
}
while (I <= HOWMNY) {
ctx.getarg(I, &mut ARGMNT);
if save.FIRST {
spicelib::SUFFIX(&ARGMNT, 0, LINE);
save.FIRST = false;
} else {
spicelib::SUFFIX(&ARGMNT, 1, LINE);
}
I = (I + 1);
}
}