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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
.help inget
int = in_geti (in, param)
pointer= in_getp (in, param)
real = in_getr (in, param)
double = in_getd (in, param)
in_gstr (in, param, str, maxch)
in_gkey (in, key, axis, type, varnum)
.endhelp
include <pkg/inlfit.h>
include "inlfitdef.h"
# IN_GETI -- Get integer valued parameters.
int procedure in_geti (in, param)
pointer in # INLFIT pointer
int param # parameter to get
begin
switch (param) {
case INLFUNCTION:
return (IN_FUNC (in))
case INLDERIVATIVE:
return (IN_DFUNC (in))
case INLNPARAMS:
return (IN_NPARAMS (in))
case INLNFPARAMS:
return (IN_NFPARAMS (in))
case INLNVARS:
return (IN_NVARS (in))
case INLNPTS:
return (IN_NPTS (in))
case INLMAXITER:
return (IN_MAXITER (in))
case INLNREJECT:
return (IN_NREJECT(in))
case INLNREJPTS:
return (IN_NREJPTS (in))
case INLUAXES:
return (IN_UAXES (in))
case INLUCOLON:
return (IN_UCOLON (in))
case INLUFIT:
return (IN_UFIT (in))
case INLOVERPLOT:
return (IN_OVERPLOT (in))
case INLPLOTFIT:
return (IN_PLOTFIT (in))
case INLFITERROR:
return (IN_FITERROR (in))
case INLGKEY:
return (IN_GKEY (in))
default:
call error (0, "INLFIT, in_geti: Unknown parameter")
}
end
$for (rd)
# IN_GET[RD] -- Get real/double valued parameters.
PIXEL procedure in_get$t (in, param)
pointer in # INLFIT pointer
int param # parameter to get
begin
switch (param) {
case INLTOLERANCE:
return (IN_TOL$T (in))
case INLLOW:
return (IN_LOW$T (in))
case INLHIGH:
return (IN_HIGH$T (in))
case INLGROW:
return (IN_GROW$T (in))
default:
call error (0, "INLFIT, in_get[rd]: Unknown parameter")
}
end
$endfor
# IN_GETP -- Get pointer valued parameters.
pointer procedure in_getp (in, param)
pointer in # INLFIT pointer
int param # parameter to get
begin
switch (param) {
case INLPARAM:
return (IN_PARAM (in))
case INLDPARAM:
return (IN_DPARAM (in))
case INLPLIST:
return (IN_PLIST (in))
case INLSFLOAT:
return (IN_SFLOAT (in))
case INLREJPTS:
return (IN_REJPTS (in))
case INLXMIN:
return (IN_XMIN (in))
case INLXMAX:
return (IN_XMAX (in))
case INLSGAXES:
return (IN_SGAXES (in))
default:
call error (0, "INLFIT, in_getp: Unknown parameter")
}
end
# IN_GETC -- Get character pointer valued parameters.
pointer procedure in_getc (in, param)
pointer in # INLFIT pointer
int param # parameter to get
begin
switch (param) {
case INLLABELS:
return (IN_LABELS (in))
case INLUNITS:
return (IN_UNITS (in))
case INLFLABELS:
return (IN_FLABELS (in))
case INLFUNITS:
return (IN_FUNITS (in))
case INLPLABELS:
return (IN_PLABELS (in))
case INLPUNITS:
return (IN_PUNITS (in))
case INLVLABELS:
return (IN_VLABELS (in))
case INLVUNITS:
return (IN_VUNITS (in))
case INLUSERLABELS:
return (IN_USERLABELS (in))
case INLUSERUNITS:
return (IN_USERUNITS (in))
case INLHELP:
return (IN_HELP (in))
case INLPROMPT:
return (IN_PROMPT (in))
default:
call error (0, "INLFIT, in_getc: Unknown parameter")
}
end
# IN_GSTR -- Get string valued parameters.
procedure in_gstr (in, param, str, maxch)
pointer in # INLFIT pointer
int param # parameter to get
char str[maxch] # string value
int maxch # maximum number of characters
begin
switch (param) {
case INLLABELS:
call strcpy (Memc[IN_LABELS (in)], str, maxch)
case INLUNITS:
call strcpy (Memc[IN_UNITS (in)], str, maxch)
case INLFLABELS:
call strcpy (Memc[IN_FLABELS (in)], str, maxch)
case INLFUNITS:
call strcpy (Memc[IN_FUNITS (in)], str, maxch)
case INLPLABELS:
call strcpy (Memc[IN_PLABELS (in)], str, maxch)
case INLPUNITS:
call strcpy (Memc[IN_PUNITS (in)], str, maxch)
case INLVLABELS:
call strcpy (Memc[IN_VLABELS (in)], str, maxch)
case INLVUNITS:
call strcpy (Memc[IN_VUNITS (in)], str, maxch)
case INLUSERLABELS:
call strcpy (Memc[IN_USERLABELS (in)], str, maxch)
case INLUSERUNITS:
call strcpy (Memc[IN_USERUNITS (in)], str, maxch)
case INLHELP:
call strcpy (Memc[IN_HELP (in)], str, maxch)
case INLPROMPT:
call strcpy (Memc[IN_PROMPT (in)], str, maxch)
default:
call error (0, "INLFIT, in_gstr: Unknown parameter")
}
end
# IN_GKEY -- Get key parameters.
procedure in_gkey (in, key, axis, type, varnum)
pointer in # INLFIT pointer
int key # key to get
int axis # axis number
int type # axis type (output)
int varnum # axis variable number (output)
begin
# Check ranges
if (key < 1 || key > INLNGKEYS)
call error (0, "INLFIT, in_pkey: Illegal key")
# Get data
if (axis == INLXAXIS) {
type = IN_GXTYPE (in, key)
varnum = IN_GXNUMBER (in, key)
} else if (axis == INLYAXIS) {
type = IN_GYTYPE (in, key)
varnum = IN_GYNUMBER (in, key)
} else
call error (0, "INLFIT, in_gkey: Illegal axis")
end
|