prelude.c
1 //! @file prelude.c
2 //! @author J. Marcel van der Veer
3
4 //! @section Copyright
5 //!
6 //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
7 //! Copyright 2001-2025 J. Marcel van der Veer [algol68g@xs4all.nl].
8
9 //! @section License
10 //!
11 //! This program is free software; you can redistribute it and/or modify it
12 //! under the terms of the GNU General Public License as published by the
13 //! Free Software Foundation; either version 3 of the License, or
14 //! (at your option) any later version.
15 //!
16 //! This program is distributed in the hope that it will be useful, but
17 //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 //! more details. You should have received a copy of the GNU General Public
20 //! License along with this program. If not, see [http://www.gnu.org/licenses/].
21
22 //! @section Synopsis
23 //!
24 //! Standard prelude definitions.
25
26 #include "a68g.h"
27 #include "a68g-prelude.h"
28 #include "a68g-prelude-mathlib.h"
29 #include "a68g-prelude-gsl.h"
30 #include "a68g-transput.h"
31 #include "a68g-mp.h"
32 #include "a68g-parser.h"
33 #include "a68g-double.h"
34
35 #define A68_STD A68_TRUE
36 #define A68_EXT A68_FALSE
37
38 //! @brief Standard_environ_proc_name.
39
40 char *standard_environ_proc_name (GPROC f)
41 {
42 for (TAG_T *i = IDENTIFIERS (A68_STANDENV); i != NO_TAG; FORWARD (i)) {
43 if (PROCEDURE (i) == f) {
44 return NSYMBOL (NODE (i));
45 }
46 }
47 return NO_TEXT;
48 }
49
50 //! @brief Enter tag in standenv symbol table.
51
52 void add_a68_standenv (BOOL_T portable, int a, NODE_T * n, char *c, MOID_T * m, int p, GPROC * q)
53 {
54 #define INSERT_TAG(l, n) {\
55 NEXT (n) = *(l);\
56 *(l) = (n);\
57 }
58 TAG_T *new_one = new_tag ();
59 PROCEDURE_LEVEL (INFO (n)) = 0;
60 USE (new_one) = A68_FALSE;
61 HEAP (new_one) = HEAP_SYMBOL;
62 TAG_TABLE (new_one) = A68_STANDENV;
63 NODE (new_one) = n;
64 VALUE (new_one) = (c != NO_TEXT ? TEXT (add_token (&A68 (top_token), c)) : NO_TEXT);
65 PRIO (new_one) = p;
66 PROCEDURE (new_one) = q;
67 A68_STANDENV_PROC (new_one) = (BOOL_T) (q != NO_GPROC);
68 UNIT (new_one) = NULL;
69 PORTABLE (new_one) = portable;
70 MOID (new_one) = m;
71 NEXT (new_one) = NO_TAG;
72 if (a == IDENTIFIER) {
73 INSERT_TAG (&IDENTIFIERS (A68_STANDENV), new_one);
74 } else if (a == OP_SYMBOL) {
75 INSERT_TAG (&OPERATORS (A68_STANDENV), new_one);
76 } else if (a == PRIO_SYMBOL) {
77 INSERT_TAG (&PRIO (A68_STANDENV), new_one);
78 } else if (a == INDICANT) {
79 INSERT_TAG (&INDICANTS (A68_STANDENV), new_one);
80 } else if (a == LABEL) {
81 INSERT_TAG (&LABELS (A68_STANDENV), new_one);
82 }
83 #undef INSERT_TAG
84 }
85
86 //! @brief Compose PROC moid from arguments - first result, than arguments.
87
88 MOID_T *a68_proc (MOID_T * m, ...)
89 {
90 va_list attribute;
91 va_start (attribute, m);
92 PACK_T *p = NO_PACK, *q = NO_PACK;
93 MOID_T *y;
94 while ((y = va_arg (attribute, MOID_T *)) != NO_MOID) {
95 PACK_T *new_one = new_pack ();
96 MOID (new_one) = y;
97 TEXT (new_one) = NO_TEXT;
98 NEXT (new_one) = NO_PACK;
99 if (q != NO_PACK) {
100 NEXT (q) = new_one;
101 } else {
102 p = new_one;
103 }
104 q = new_one;
105 }
106 va_end (attribute);
107 return add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (p), NO_NODE, m, p);
108 }
109
110 //! @brief Enter an identifier in standenv.
111
112 void a68_idf (BOOL_T portable, char *n, MOID_T * m, GPROC * q)
113 {
114 add_a68_standenv (portable, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n))), NO_TEXT, m, 0, q);
115 }
116
117 void a68_id2 (BOOL_T portable, char *n1, char *n2, MOID_T * m, GPROC * q)
118 {
119 add_a68_standenv (portable, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n1))), NO_TEXT, m, 0, q);
120 add_a68_standenv (A68_EXT, IDENTIFIER, some_node (TEXT (add_token (&A68 (top_token), n2))), NO_TEXT, m, 0, q);
121 }
122
123 //! @brief Enter a moid in standenv.
124
125 void a68_mode (int p, char *t, MOID_T ** m)
126 {
127 (*m) = add_mode (&TOP_MOID (&A68_JOB), STANDARD, p, some_node (TEXT (find_keyword (A68 (top_keyword), t))), NO_MOID, NO_PACK);
128 }
129
130 //! @brief Enter a priority in standenv.
131
132 void a68_prio (char *p, int b)
133 {
134 add_a68_standenv (A68_TRUE, PRIO_SYMBOL, some_node (TEXT (add_token (&A68 (top_token), p))), NO_TEXT, NO_MOID, b, NO_GPROC);
135 }
136
137 //! @brief Enter operator in standenv.
138
139 void a68_op (BOOL_T portable, char *n, MOID_T * m, GPROC * q)
140 {
141 add_a68_standenv (portable, OP_SYMBOL, some_node (TEXT (add_token (&A68 (top_token), n))), NO_TEXT, m, 0, q);
142 }
143
144 //! @brief Enter standard modes in standenv.
145
146 void stand_moids (void)
147 {
148 // Primitive A68 moids.
149 a68_mode (0, "VOID", &M_VOID);
150 // Standard precision.
151 a68_mode (0, "INT", &M_INT);
152 a68_mode (0, "REAL", &M_REAL);
153 a68_mode (0, "COMPLEX", &M_COMPLEX);
154 a68_mode (0, "COMPL", &M_COMPL);
155 a68_mode (0, "BITS", &M_BITS);
156 a68_mode (0, "BYTES", &M_BYTES);
157 // Multiple precision.
158 a68_mode (1, "INT", &M_LONG_INT);
159 a68_mode (1, "REAL", &M_LONG_REAL);
160 a68_mode (1, "COMPLEX", &M_LONG_COMPLEX);
161 a68_mode (1, "COMPL", &M_LONG_COMPL);
162 a68_mode (1, "BITS", &M_LONG_BITS);
163 a68_mode (1, "BYTES", &M_LONG_BYTES);
164 a68_mode (2, "REAL", &M_LONG_LONG_REAL);
165 a68_mode (2, "INT", &M_LONG_LONG_INT);
166 a68_mode (2, "COMPLEX", &M_LONG_LONG_COMPLEX);
167 a68_mode (2, "COMPL", &M_LONG_LONG_COMPL);
168 a68_mode (2, "BITS", &M_LONG_LONG_BITS);
169 // Other.
170 a68_mode (0, "BOOL", &M_BOOL);
171 a68_mode (0, "CHAR", &M_CHAR);
172 a68_mode (0, "STRING", &M_STRING);
173 a68_mode (0, "FILE", &M_FILE);
174 a68_mode (0, "CHANNEL", &M_CHANNEL);
175 a68_mode (0, "PIPE", &M_PIPE);
176 a68_mode (0, "FORMAT", &M_FORMAT);
177 a68_mode (0, "SEMA", &M_SEMA);
178 a68_mode (0, "SOUND", &M_SOUND);
179 PORTABLE (M_PIPE) = A68_FALSE;
180 HAS_ROWS (M_SOUND) = A68_TRUE;
181 PORTABLE (M_SOUND) = A68_FALSE;
182 // ROWS.
183 M_ROWS = add_mode (&TOP_MOID (&A68_JOB), ROWS_SYMBOL, 0, NO_NODE, NO_MOID, NO_PACK);
184 // REFs.
185 M_REF_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_INT, NO_PACK);
186 M_REF_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_REAL, NO_PACK);
187 M_REF_COMPLEX = M_REF_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_COMPLEX, NO_PACK);
188 M_REF_BITS = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BITS, NO_PACK);
189 M_REF_BYTES = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BYTES, NO_PACK);
190 M_REF_FORMAT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_FORMAT, NO_PACK);
191 M_REF_PIPE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_PIPE, NO_PACK);
192 // Multiple precision.
193 M_REF_LONG_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_INT, NO_PACK);
194 M_REF_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_REAL, NO_PACK);
195 M_REF_LONG_COMPLEX = M_REF_LONG_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_COMPLEX, NO_PACK);
196 M_REF_LONG_BITS = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_BITS, NO_PACK);
197 M_REF_LONG_LONG_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_INT, NO_PACK);
198 M_REF_LONG_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_REAL, NO_PACK);
199 M_REF_LONG_LONG_COMPLEX = M_REF_LONG_LONG_COMPL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_COMPLEX, NO_PACK);
200 M_REF_LONG_LONG_BITS = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_LONG_BITS, NO_PACK);
201 M_REF_LONG_BYTES = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_LONG_BYTES, NO_PACK);
202 // Other.
203 M_REF_BOOL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_BOOL, NO_PACK);
204 M_REF_CHAR = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_CHAR, NO_PACK);
205 M_REF_FILE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_FILE, NO_PACK);
206 M_REF_REF_FILE = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_REF_FILE, NO_PACK);
207 M_REF_SOUND = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_SOUND, NO_PACK);
208 // [] INT.
209 M_ROW_INT = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_INT, NO_PACK);
210 HAS_ROWS (M_ROW_INT) = A68_TRUE;
211 SLICE (M_ROW_INT) = M_INT;
212 M_REF_ROW_INT = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_INT, NO_PACK);
213 NAME (M_REF_ROW_INT) = M_REF_INT;
214 // [] REAL.
215 M_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_REAL, NO_PACK);
216 HAS_ROWS (M_ROW_REAL) = A68_TRUE;
217 SLICE (M_ROW_REAL) = M_REAL;
218 M_REF_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_REAL, NO_PACK);
219 NAME (M_REF_ROW_REAL) = M_REF_REAL;
220 // [,] REAL.
221 M_ROW_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 2, NO_NODE, M_REAL, NO_PACK);
222 HAS_ROWS (M_ROW_ROW_REAL) = A68_TRUE;
223 SLICE (M_ROW_ROW_REAL) = M_ROW_REAL;
224 M_REF_ROW_ROW_REAL = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_ROW_REAL, NO_PACK);
225 NAME (M_REF_ROW_ROW_REAL) = M_REF_ROW_REAL;
226 // [] COMPLEX.
227 M_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_COMPLEX, NO_PACK);
228 HAS_ROWS (M_ROW_COMPLEX) = A68_TRUE;
229 SLICE (M_ROW_COMPLEX) = M_COMPLEX;
230 M_REF_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_COMPLEX, NO_PACK);
231 NAME (M_REF_ROW_COMPLEX) = M_REF_COMPLEX;
232 // [,] COMPLEX.
233 M_ROW_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 2, NO_NODE, M_COMPLEX, NO_PACK);
234 HAS_ROWS (M_ROW_ROW_COMPLEX) = A68_TRUE;
235 SLICE (M_ROW_ROW_COMPLEX) = M_ROW_COMPLEX;
236 M_REF_ROW_ROW_COMPLEX = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_ROW_COMPLEX, NO_PACK);
237 NAME (M_REF_ROW_ROW_COMPLEX) = M_REF_ROW_COMPLEX;
238 // [] BOOL.
239 M_ROW_BOOL = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_BOOL, NO_PACK);
240 HAS_ROWS (M_ROW_BOOL) = A68_TRUE;
241 SLICE (M_ROW_BOOL) = M_BOOL;
242 // FLEX [] BOOL.
243 MOID_T *m = add_mode (&TOP_MOID (&A68_JOB), FLEX_SYMBOL, 0, NO_NODE, M_ROW_BOOL, NO_PACK);
244 HAS_ROWS (m) = A68_TRUE;
245 M_FLEX_ROW_BOOL = m;
246 // [] BITS.
247 M_ROW_BITS = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_BITS, NO_PACK);
248 HAS_ROWS (M_ROW_BITS) = A68_TRUE;
249 SLICE (M_ROW_BITS) = M_BITS;
250 // [] LONG BITS.
251 M_ROW_LONG_BITS = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_LONG_BITS, NO_PACK);
252 HAS_ROWS (M_ROW_LONG_BITS) = A68_TRUE;
253 SLICE (M_ROW_LONG_BITS) = M_LONG_BITS;
254 // [] CHAR.
255 M_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_CHAR, NO_PACK);
256 HAS_ROWS (M_ROW_CHAR) = A68_TRUE;
257 SLICE (M_ROW_CHAR) = M_CHAR;
258 // [][] CHAR.
259 M_ROW_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_ROW_CHAR, NO_PACK);
260 HAS_ROWS (M_ROW_ROW_CHAR) = A68_TRUE;
261 SLICE (M_ROW_ROW_CHAR) = M_ROW_CHAR;
262 // MODE STRING = FLEX [] CHAR.
263 m = add_mode (&TOP_MOID (&A68_JOB), FLEX_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
264 HAS_ROWS (m) = A68_TRUE;
265 M_FLEX_ROW_CHAR = m;
266 EQUIVALENT (M_STRING) = m;
267 // REF [] CHAR.
268 M_REF_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
269 NAME (M_REF_ROW_CHAR) = M_REF_CHAR;
270 // PROC [] CHAR.
271 M_PROC_ROW_CHAR = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, 0, NO_NODE, M_ROW_CHAR, NO_PACK);
272 // REF STRING = REF FLEX [] CHAR.
273 M_REF_STRING = add_mode (&TOP_MOID (&A68_JOB), REF_SYMBOL, 0, NO_NODE, EQUIVALENT (M_STRING), NO_PACK);
274 NAME (M_REF_STRING) = M_REF_CHAR;
275 DEFLEXED (M_REF_STRING) = M_REF_ROW_CHAR;
276 // [] STRING.
277 M_ROW_STRING = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_STRING, NO_PACK);
278 HAS_ROWS (M_ROW_STRING) = A68_TRUE;
279 SLICE (M_ROW_STRING) = M_STRING;
280 DEFLEXED (M_ROW_STRING) = M_ROW_ROW_CHAR;
281 // PROC STRING.
282 M_PROC_STRING = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, 0, NO_NODE, M_STRING, NO_PACK);
283 DEFLEXED (M_PROC_STRING) = M_PROC_ROW_CHAR;
284 // COMPLEX.
285 PACK_T *z = NO_PACK;
286 (void) add_mode_to_pack (&z, M_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
287 (void) add_mode_to_pack (&z, M_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
288 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
289 EQUIVALENT (M_COMPLEX) = EQUIVALENT (M_COMPL) = m;
290 z = NO_PACK;
291 (void) add_mode_to_pack (&z, M_REF_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
292 (void) add_mode_to_pack (&z, M_REF_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
293 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
294 NAME (M_REF_COMPLEX) = NAME (M_REF_COMPL) = m;
295 // LONG COMPLEX.
296 z = NO_PACK;
297 (void) add_mode_to_pack (&z, M_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
298 (void) add_mode_to_pack (&z, M_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
299 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
300 EQUIVALENT (M_LONG_COMPLEX) = EQUIVALENT (M_LONG_COMPL) = m;
301 z = NO_PACK;
302 (void) add_mode_to_pack (&z, M_REF_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
303 (void) add_mode_to_pack (&z, M_REF_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
304 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
305 NAME (M_REF_LONG_COMPLEX) = NAME (M_REF_LONG_COMPL) = m;
306 // LONG_LONG COMPLEX.
307 z = NO_PACK;
308 (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
309 (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
310 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
311 EQUIVALENT (M_LONG_LONG_COMPLEX) = EQUIVALENT (M_LONG_LONG_COMPL) = m;
312 z = NO_PACK;
313 (void) add_mode_to_pack (&z, M_REF_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "im")), NO_NODE);
314 (void) add_mode_to_pack (&z, M_REF_LONG_LONG_REAL, TEXT (add_token (&A68 (top_token), "re")), NO_NODE);
315 m = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
316 NAME (M_REF_LONG_LONG_COMPLEX) = NAME (M_REF_LONG_LONG_COMPL) = m;
317 // NUMBER.
318 z = NO_PACK;
319 (void) add_mode_to_pack (&z, M_INT, NO_TEXT, NO_NODE);
320 (void) add_mode_to_pack (&z, M_LONG_INT, NO_TEXT, NO_NODE);
321 (void) add_mode_to_pack (&z, M_LONG_LONG_INT, NO_TEXT, NO_NODE);
322 (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
323 (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
324 (void) add_mode_to_pack (&z, M_LONG_LONG_REAL, NO_TEXT, NO_NODE);
325 M_NUMBER = add_mode (&TOP_MOID (&A68_JOB), UNION_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
326 // HEX_NUMBER.
327 z = NO_PACK;
328 (void) add_mode_to_pack (&z, M_BOOL, NO_TEXT, NO_NODE);
329 (void) add_mode_to_pack (&z, M_CHAR, NO_TEXT, NO_NODE);
330 (void) add_mode_to_pack (&z, M_INT, NO_TEXT, NO_NODE);
331 (void) add_mode_to_pack (&z, M_LONG_INT, NO_TEXT, NO_NODE);
332 (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
333 (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
334 (void) add_mode_to_pack (&z, M_BITS, NO_TEXT, NO_NODE);
335 (void) add_mode_to_pack (&z, M_LONG_BITS, NO_TEXT, NO_NODE);
336 M_HEX_NUMBER = add_mode (&TOP_MOID (&A68_JOB), UNION_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
337 // SEMA.
338 z = NO_PACK;
339 (void) add_mode_to_pack (&z, M_REF_INT, NO_TEXT, NO_NODE);
340 EQUIVALENT (M_SEMA) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
341 // PROC VOID.
342 z = NO_PACK;
343 M_PROC_VOID = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_VOID, z);
344 // PROC (REAL) REAL.
345 z = NO_PACK;
346 (void) add_mode_to_pack (&z, M_REAL, NO_TEXT, NO_NODE);
347 M_PROC_REAL_REAL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_REAL, z);
348 // PROC (LONG_REAL) LONG_REAL.
349 z = NO_PACK;
350 (void) add_mode_to_pack (&z, M_LONG_REAL, NO_TEXT, NO_NODE);
351 M_PROC_LONG_REAL_LONG_REAL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_LONG_REAL, z);
352 // IO: PROC (REF FILE) BOOL.
353 z = NO_PACK;
354 (void) add_mode_to_pack (&z, M_REF_FILE, NO_TEXT, NO_NODE);
355 M_PROC_REF_FILE_BOOL = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_BOOL, z);
356 // IO: PROC (REF FILE) VOID.
357 z = NO_PACK;
358 (void) add_mode_to_pack (&z, M_REF_FILE, NO_TEXT, NO_NODE);
359 M_PROC_REF_FILE_VOID = add_mode (&TOP_MOID (&A68_JOB), PROC_SYMBOL, count_pack_members (z), NO_NODE, M_VOID, z);
360 // IO: SIMPLIN and SIMPLOUT.
361 M_SIMPLIN = add_mode (&TOP_MOID (&A68_JOB), IN_TYPE_MODE, 0, NO_NODE, NO_MOID, NO_PACK);
362 M_ROW_SIMPLIN = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_SIMPLIN, NO_PACK);
363 SLICE (M_ROW_SIMPLIN) = M_SIMPLIN;
364 M_SIMPLOUT = add_mode (&TOP_MOID (&A68_JOB), OUT_TYPE_MODE, 0, NO_NODE, NO_MOID, NO_PACK);
365 M_ROW_SIMPLOUT = add_mode (&TOP_MOID (&A68_JOB), ROW_SYMBOL, 1, NO_NODE, M_SIMPLOUT, NO_PACK);
366 SLICE (M_ROW_SIMPLOUT) = M_SIMPLOUT;
367 // PIPE.
368 z = NO_PACK;
369 (void) add_mode_to_pack (&z, M_INT, TEXT (add_token (&A68 (top_token), "pid")), NO_NODE);
370 (void) add_mode_to_pack (&z, M_REF_FILE, TEXT (add_token (&A68 (top_token), "write")), NO_NODE);
371 (void) add_mode_to_pack (&z, M_REF_FILE, TEXT (add_token (&A68 (top_token), "read")), NO_NODE);
372 EQUIVALENT (M_PIPE) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
373 z = NO_PACK;
374 (void) add_mode_to_pack (&z, M_REF_INT, TEXT (add_token (&A68 (top_token), "pid")), NO_NODE);
375 (void) add_mode_to_pack (&z, M_REF_REF_FILE, TEXT (add_token (&A68 (top_token), "write")), NO_NODE);
376 (void) add_mode_to_pack (&z, M_REF_REF_FILE, TEXT (add_token (&A68 (top_token), "read")), NO_NODE);
377 NAME (M_REF_PIPE) = add_mode (&TOP_MOID (&A68_JOB), STRUCT_SYMBOL, count_pack_members (z), NO_NODE, NO_MOID, z);
378 }
379
380 //! @brief Set up standenv - general RR but not transput.
381
382 void stand_prelude (void)
383 {
384 // Identifiers.
385 a68_idf (A68_STD, "intlengths", M_INT, genie_int_lengths);
386 a68_idf (A68_STD, "intshorths", M_INT, genie_int_shorths);
387 a68_idf (A68_STD, "infinity", M_REAL, genie_infinity_real);
388 a68_idf (A68_STD, "minusinfinity", M_REAL, genie_minus_infinity_real);
389 a68_idf (A68_STD, "inf", M_REAL, genie_infinity_real);
390 a68_idf (A68_STD, "mininf", M_REAL, genie_minus_infinity_real);
391 a68_idf (A68_STD, "maxint", M_INT, genie_max_int);
392 a68_idf (A68_STD, "mpradix", M_INT, genie_mp_radix);
393 a68_idf (A68_STD, "maxreal", M_REAL, genie_max_real);
394 a68_idf (A68_STD, "minreal", M_REAL, genie_min_real);
395 a68_idf (A68_STD, "smallreal", M_REAL, genie_small_real);
396 a68_idf (A68_STD, "reallengths", M_INT, genie_real_lengths);
397 a68_idf (A68_STD, "realshorths", M_INT, genie_real_shorths);
398 a68_idf (A68_STD, "compllengths", M_INT, genie_complex_lengths);
399 a68_idf (A68_STD, "complshorths", M_INT, genie_complex_shorths);
400 a68_idf (A68_STD, "bitslengths", M_INT, genie_bits_lengths);
401 a68_idf (A68_STD, "bitsshorths", M_INT, genie_bits_shorths);
402 a68_idf (A68_STD, "bitswidth", M_INT, genie_bits_width);
403 a68_idf (A68_STD, "longbitswidth", M_INT, genie_long_bits_width);
404 a68_idf (A68_STD, "maxbits", M_BITS, genie_max_bits);
405 a68_idf (A68_STD, "byteslengths", M_INT, genie_bytes_lengths);
406 a68_idf (A68_STD, "bytesshorths", M_INT, genie_bytes_shorths);
407 a68_idf (A68_STD, "byteswidth", M_INT, genie_bytes_width);
408 a68_idf (A68_STD, "maxabschar", M_INT, genie_max_abs_char);
409 a68_idf (A68_STD, "pi", M_REAL, genie_pi);
410 a68_id2 (A68_STD, "longlongpi", "qpi", M_LONG_LONG_REAL, genie_pi_mp);
411 a68_idf (A68_STD, "intwidth", M_INT, genie_int_width);
412 a68_idf (A68_STD, "realwidth", M_INT, genie_real_width);
413 a68_idf (A68_STD, "expwidth", M_INT, genie_exp_width);
414 a68_idf (A68_STD, "longintwidth", M_INT, genie_long_int_width);
415 a68_idf (A68_STD, "longlongintwidth", M_INT, genie_long_mp_int_width);
416 a68_idf (A68_STD, "longrealwidth", M_INT, genie_long_real_width);
417 a68_idf (A68_STD, "longlongrealwidth", M_INT, genie_long_mp_real_width);
418 a68_idf (A68_STD, "longexpwidth", M_INT, genie_long_exp_width);
419 a68_idf (A68_STD, "longlongexpwidth", M_INT, genie_long_mp_exp_width);
420 a68_idf (A68_STD, "longlongmaxint", M_LONG_LONG_INT, genie_long_mp_max_int);
421 a68_idf (A68_STD, "longlongsmallreal", M_LONG_LONG_REAL, genie_long_mp_small_real);
422 a68_idf (A68_STD, "longlongmaxreal", M_LONG_LONG_REAL, genie_long_mp_max_real);
423 a68_idf (A68_STD, "longlongminreal", M_LONG_LONG_REAL, genie_long_mp_min_real);
424 a68_idf (A68_STD, "longlonginfinity", M_LONG_LONG_REAL, genie_infinity_mp);
425 a68_idf (A68_STD, "longlongminusinfinity", M_LONG_LONG_REAL, genie_minus_infinity_mp);
426 a68_idf (A68_STD, "longlonginf", M_LONG_LONG_REAL, genie_infinity_mp);
427 a68_idf (A68_STD, "longlongmininf", M_LONG_LONG_REAL, genie_minus_infinity_mp);
428 a68_idf (A68_STD, "longbyteswidth", M_INT, genie_long_bytes_width);
429 a68_idf (A68_EXT, "seconds", M_REAL, genie_cputime);
430 a68_idf (A68_EXT, "clock", M_REAL, genie_cputime);
431 a68_idf (A68_EXT, "cputime", M_REAL, genie_cputime);
432 MOID_T *m = a68_proc (M_VOID, A68_MCACHE (proc_void), NO_MOID);
433 a68_idf (A68_EXT, "blocks", A68_MCACHE (proc_int), genie_block);
434 a68_idf (A68_EXT, "collections", A68_MCACHE (proc_int), genie_garbage_collections);
435 a68_idf (A68_EXT, "collectseconds", A68_MCACHE (proc_real), genie_garbage_seconds);
436 a68_idf (A68_EXT, "garbage", A68_MCACHE (proc_int), genie_garbage_freed);
437 a68_idf (A68_EXT, "garbagecollections", A68_MCACHE (proc_int), genie_garbage_collections);
438 a68_idf (A68_EXT, "garbagefreed", A68_MCACHE (proc_int), genie_garbage_freed);
439 a68_idf (A68_EXT, "garbagerefused", A68_MCACHE (proc_int), genie_garbage_refused);
440 a68_idf (A68_EXT, "garbageseconds", A68_MCACHE (proc_real), genie_garbage_seconds);
441 a68_idf (A68_EXT, "ongcevent", m, genie_on_gc_event);
442 a68_idf (A68_EXT, "sweeps", A68_MCACHE (proc_int), genie_garbage_collections);
443 a68_idf (A68_EXT, "sweepsrefused", A68_MCACHE (proc_int), genie_garbage_refused);
444 a68_idf (A68_EXT, "stackpointer", M_INT, genie_stack_pointer);
445 a68_idf (A68_EXT, "systemstackpointer", M_INT, genie_system_stack_pointer);
446 a68_idf (A68_EXT, "systemstacksize", M_INT, genie_system_stack_size);
447 a68_idf (A68_EXT, "actualstacksize", M_INT, genie_stack_pointer);
448 a68_idf (A68_EXT, "heappointer", M_INT, genie_system_heap_pointer);
449 a68_idf (A68_EXT, "systemheappointer", M_INT, genie_system_heap_pointer);
450 a68_idf (A68_EXT, "gcheap", A68_MCACHE (proc_void), genie_gc_heap);
451 a68_idf (A68_EXT, "sweepheap", A68_MCACHE (proc_void), genie_gc_heap);
452 a68_idf (A68_EXT, "preemptivegc", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
453 a68_idf (A68_EXT, "preemptivesweep", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
454 a68_idf (A68_EXT, "preemptivesweepheap", A68_MCACHE (proc_void), genie_preemptive_gc_heap);
455 a68_idf (A68_EXT, "backtrace", A68_MCACHE (proc_void), genie_backtrace);
456 a68_idf (A68_EXT, "break", A68_MCACHE (proc_void), genie_break);
457 a68_idf (A68_EXT, "debug", A68_MCACHE (proc_void), genie_debug);
458 a68_idf (A68_EXT, "monitor", A68_MCACHE (proc_void), genie_debug);
459 m = a68_proc (M_VOID, M_STRING, NO_MOID);
460 a68_idf (A68_EXT, "abend", m, genie_abend);
461 m = a68_proc (M_STRING, M_STRING, NO_MOID);
462 a68_idf (A68_EXT, "evaluate", m, genie_evaluate);
463 m = a68_proc (M_INT, M_STRING, NO_MOID);
464 a68_idf (A68_EXT, "system", m, genie_system);
465 m = A68_MCACHE (proc_int_int);
466 a68_idf (A68_EXT, "sleep", m, genie_sleep);
467 // Machine environ parameters.
468 a68_idf (A68_EXT, "i32mach", A68_MCACHE (proc_int_int), genie_i32mach);
469 a68_idf (A68_EXT, "r64mach", A68_MCACHE (proc_int_real), genie_i32mach);
470 #if (A68_LEVEL >= 3)
471 m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
472 a68_idf (A68_EXT, "i64mach", m, genie_i64mach);
473 m = a68_proc (M_LONG_REAL, M_INT, NO_MOID);
474 a68_idf (A68_EXT, "r128mach", m, genie_r128mach);
475 #endif
476 // BITS procedures.
477 m = a68_proc (M_BITS, M_ROW_BOOL, NO_MOID);
478 a68_idf (A68_STD, "bitspack", m, genie_bits_pack);
479 // RNG procedures.
480 m = a68_proc (M_VOID, M_INT, NO_MOID);
481 a68_idf (A68_STD, "firstrandom", m, genie_first_random);
482 m = A68_MCACHE (proc_real);
483 a68_idf (A68_STD, "nextrandom", m, genie_next_random);
484 a68_idf (A68_STD, "random", m, genie_next_random);
485 a68_idf (A68_STD, "rnd", m, genie_next_rnd);
486 m = a68_proc (M_LONG_LONG_REAL, NO_MOID);
487 a68_idf (A68_STD, "longlongnextrandom", m, genie_long_next_random);
488 a68_idf (A68_STD, "longlongrandom", m, genie_long_next_random);
489 // Priorities.
490 a68_prio ("+:=", 1);
491 a68_prio ("-:=", 1);
492 a68_prio ("*:=", 1);
493 a68_prio ("/:=", 1);
494 a68_prio ("%:=", 1);
495 a68_prio ("%*:=", 1);
496 a68_prio ("+=:", 1);
497 a68_prio ("PLUSAB", 1);
498 a68_prio ("MINUSAB", 1);
499 a68_prio ("TIMESAB", 1);
500 a68_prio ("DIVAB", 1);
501 a68_prio ("OVERAB", 1);
502 a68_prio ("MODAB", 1);
503 a68_prio ("PLUSTO", 1);
504 a68_prio ("OR", 2);
505 a68_prio ("AND", 3);
506 a68_prio ("&", 3);
507 a68_prio ("XOR", 3);
508 a68_prio ("=", 4);
509 a68_prio ("/=", 4);
510 a68_prio ("~=", 4);
511 a68_prio ("^=", 4);
512 a68_prio ("<", 5);
513 a68_prio ("<=", 5);
514 a68_prio (">", 5);
515 a68_prio (">=", 5);
516 a68_prio ("EQ", 4);
517 a68_prio ("NE", 4);
518 a68_prio ("LT", 5);
519 a68_prio ("LE", 5);
520 a68_prio ("GT", 5);
521 a68_prio ("GE", 5);
522 a68_prio ("+", 6);
523 a68_prio ("-", 6);
524 a68_prio ("*", 7);
525 a68_prio ("/", 7);
526 a68_prio ("OVER", 7);
527 a68_prio ("%", 7);
528 a68_prio ("MOD", 7);
529 a68_prio ("%*", 7);
530 a68_prio ("ELEM", 7);
531 a68_prio ("SET", 7);
532 a68_prio ("CLEAR", 7);
533 a68_prio ("**", 8);
534 a68_prio ("SHL", 8);
535 a68_prio ("SHR", 8);
536 a68_prio ("ROL", 8);
537 a68_prio ("ROR", 8);
538 a68_prio ("UP", 8);
539 a68_prio ("DOWN", 8);
540 a68_prio ("^", 8);
541 a68_prio ("ELEMS", 8);
542 a68_prio ("LWB", 8);
543 a68_prio ("UPB", 8);
544 a68_prio ("SORT", 8);
545 a68_prio ("I", 9);
546 a68_prio ("+*", 9);
547 // INT ops.
548 m = a68_proc (M_INT, M_INT, NO_MOID);
549 a68_op (A68_STD, "+", m, genie_idle);
550 a68_op (A68_STD, "-", m, genie_minus_int);
551 a68_op (A68_STD, "ABS", m, genie_abs_int);
552 a68_op (A68_STD, "SIGN", m, genie_sign_int);
553 m = a68_proc (M_BOOL, M_INT, NO_MOID);
554 a68_op (A68_STD, "ODD", m, genie_odd_int);
555 m = a68_proc (M_BOOL, M_INT, M_INT, NO_MOID);
556 a68_op (A68_STD, "=", m, genie_eq_int);
557 a68_op (A68_STD, "/=", m, genie_ne_int);
558 a68_op (A68_STD, "~=", m, genie_ne_int);
559 a68_op (A68_STD, "^=", m, genie_ne_int);
560 a68_op (A68_STD, "<", m, genie_lt_int);
561 a68_op (A68_STD, "<=", m, genie_le_int);
562 a68_op (A68_STD, ">", m, genie_gt_int);
563 a68_op (A68_STD, ">=", m, genie_ge_int);
564 a68_op (A68_STD, "EQ", m, genie_eq_int);
565 a68_op (A68_STD, "NE", m, genie_ne_int);
566 a68_op (A68_STD, "LT", m, genie_lt_int);
567 a68_op (A68_STD, "LE", m, genie_le_int);
568 a68_op (A68_STD, "GT", m, genie_gt_int);
569 a68_op (A68_STD, "GE", m, genie_ge_int);
570 m = a68_proc (M_INT, M_INT, M_INT, NO_MOID);
571 a68_op (A68_STD, "+", m, genie_add_int);
572 a68_op (A68_STD, "-", m, genie_sub_int);
573 a68_op (A68_STD, "*", m, genie_mul_int);
574 a68_op (A68_STD, "OVER", m, genie_over_int);
575 a68_op (A68_STD, "%", m, genie_over_int);
576 a68_op (A68_STD, "MOD", m, genie_mod_int);
577 a68_op (A68_STD, "%*", m, genie_mod_int);
578 a68_op (A68_STD, "**", m, genie_pow_int);
579 a68_op (A68_STD, "UP", m, genie_pow_int);
580 a68_op (A68_STD, "^", m, genie_pow_int);
581 m = a68_proc (M_REAL, M_INT, M_INT, NO_MOID);
582 a68_op (A68_STD, "/", m, genie_div_int);
583 m = a68_proc (M_REF_INT, M_REF_INT, M_INT, NO_MOID);
584 a68_op (A68_STD, "+:=", m, genie_plusab_int);
585 a68_op (A68_STD, "-:=", m, genie_minusab_int);
586 a68_op (A68_STD, "*:=", m, genie_timesab_int);
587 a68_op (A68_STD, "%:=", m, genie_overab_int);
588 a68_op (A68_STD, "%*:=", m, genie_modab_int);
589 a68_op (A68_STD, "PLUSAB", m, genie_plusab_int);
590 a68_op (A68_STD, "MINUSAB", m, genie_minusab_int);
591 a68_op (A68_STD, "TIMESAB", m, genie_timesab_int);
592 a68_op (A68_STD, "OVERAB", m, genie_overab_int);
593 a68_op (A68_STD, "MODAB", m, genie_modab_int);
594 // REAL ops.
595 m = A68_MCACHE (proc_real_real);
596 a68_op (A68_STD, "+", m, genie_idle);
597 a68_op (A68_STD, "-", m, genie_minus_real);
598 a68_op (A68_STD, "ABS", m, genie_abs_real);
599 m = a68_proc (M_INT, M_REAL, NO_MOID);
600 a68_op (A68_STD, "SIGN", m, genie_sign_real);
601 a68_op (A68_STD, "ROUND", m, genie_round_real);
602 a68_op (A68_STD, "ENTIER", m, genie_entier_real);
603 m = a68_proc (M_BOOL, M_REAL, M_REAL, NO_MOID);
604 a68_op (A68_STD, "=", m, genie_eq_real);
605 a68_op (A68_STD, "/=", m, genie_ne_real);
606 a68_op (A68_STD, "~=", m, genie_ne_real);
607 a68_op (A68_STD, "^=", m, genie_ne_real);
608 a68_op (A68_STD, "<", m, genie_lt_real);
609 a68_op (A68_STD, "<=", m, genie_le_real);
610 a68_op (A68_STD, ">", m, genie_gt_real);
611 a68_op (A68_STD, ">=", m, genie_ge_real);
612 a68_op (A68_STD, "EQ", m, genie_eq_real);
613 a68_op (A68_STD, "NE", m, genie_ne_real);
614 a68_op (A68_STD, "LT", m, genie_lt_real);
615 a68_op (A68_STD, "LE", m, genie_le_real);
616 a68_op (A68_STD, "GT", m, genie_gt_real);
617 a68_op (A68_STD, "GE", m, genie_ge_real);
618 m = A68_MCACHE (proc_real_real_real);
619 a68_op (A68_STD, "+", m, genie_add_real);
620 a68_op (A68_STD, "-", m, genie_sub_real);
621 a68_op (A68_STD, "*", m, genie_mul_real);
622 a68_op (A68_STD, "/", m, genie_div_real);
623 a68_op (A68_STD, "**", m, genie_pow_real);
624 a68_op (A68_STD, "UP", m, genie_pow_real);
625 a68_op (A68_STD, "^", m, genie_pow_real);
626 m = a68_proc (M_REAL, M_REAL, M_INT, NO_MOID);
627 a68_op (A68_STD, "**", m, genie_pow_real_int);
628 a68_op (A68_STD, "UP", m, genie_pow_real_int);
629 a68_op (A68_STD, "^", m, genie_pow_real_int);
630 m = a68_proc (M_REF_REAL, M_REF_REAL, M_REAL, NO_MOID);
631 a68_op (A68_STD, "+:=", m, genie_plusab_real);
632 a68_op (A68_STD, "-:=", m, genie_minusab_real);
633 a68_op (A68_STD, "*:=", m, genie_timesab_real);
634 a68_op (A68_STD, "/:=", m, genie_divab_real);
635 a68_op (A68_STD, "PLUSAB", m, genie_plusab_real);
636 a68_op (A68_STD, "MINUSAB", m, genie_minusab_real);
637 a68_op (A68_STD, "TIMESAB", m, genie_timesab_real);
638 a68_op (A68_STD, "DIVAB", m, genie_divab_real);
639 // Procedures
640 m = A68_MCACHE (proc_real_real);
641 a68_id2 (A68_EXT, "arccosdg", "acosdg", m, genie_acosdg_real);
642 a68_id2 (A68_EXT, "arccosh", "acosh", m, genie_acosh_real);
643 a68_id2 (A68_EXT, "arccot", "acot", m, genie_acot_real);
644 a68_id2 (A68_EXT, "arccotdg", "acotdg", m, genie_acotdg_real);
645 a68_id2 (A68_EXT, "arccsc", "acsc", m, genie_acsc_real);
646 a68_id2 (A68_EXT, "arccscdg", "acscdg", m, genie_acscdg_real);
647 a68_id2 (A68_EXT, "arcsec", "asec", m, genie_asec_real);
648 a68_id2 (A68_EXT, "arcsecdg", "asecdg", m, genie_asecdg_real);
649 a68_id2 (A68_EXT, "arcsindg", "asindg", m, genie_asindg_real);
650 a68_id2 (A68_EXT, "arcsinh", "asinh", m, genie_asinh_real);
651 a68_id2 (A68_EXT, "arctandg", "atandg", m, genie_atandg_real);
652 a68_id2 (A68_EXT, "arctanh", "atanh", m, genie_atanh_real);
653 a68_id2 (A68_STD, "arccos", "acos", m, genie_acos_real);
654 a68_id2 (A68_STD, "arcsin", "asin", m, genie_asin_real);
655 a68_id2 (A68_STD, "arctan", "atan", m, genie_atan_real);
656 a68_idf (A68_EXT, "cas", m, genie_cas_real);
657 a68_idf (A68_EXT, "cbrt", m, genie_curt_real);
658 a68_idf (A68_EXT, "cosdg", m, genie_cosdg_real);
659 a68_idf (A68_EXT, "cosh", m, genie_cosh_real);
660 a68_idf (A68_EXT, "cospi", m, genie_cospi_real);
661 a68_idf (A68_EXT, "cotdg", m, genie_cotdg_real);
662 a68_idf (A68_EXT, "cot", m, genie_cot_real);
663 a68_idf (A68_EXT, "cotpi", m, genie_cotpi_real);
664 a68_idf (A68_EXT, "cscdg", m, genie_cscdg_real);
665 a68_idf (A68_EXT, "csc", m, genie_csc_real);
666 a68_idf (A68_EXT, "curt", m, genie_curt_real);
667 a68_idf (A68_EXT, "erfc", m, genie_erfc_real);
668 a68_idf (A68_EXT, "erf", m, genie_erf_real);
669 a68_idf (A68_EXT, "gamma", m, genie_gamma_real);
670 a68_idf (A68_EXT, "inverfc", m, genie_inverfc_real);
671 a68_idf (A68_EXT, "inverf", m, genie_inverf_real);
672 a68_idf (A68_EXT, "inverseerfc", m, genie_inverfc_real);
673 a68_idf (A68_EXT, "inverseerf", m, genie_inverf_real);
674 a68_idf (A68_EXT, "ln1p", m, genie_ln1p_real);
675 a68_idf (A68_EXT, "lngamma", m, genie_ln_gamma_real);
676 a68_idf (A68_EXT, "secdg", m, genie_secdg_real);
677 a68_idf (A68_EXT, "sec", m, genie_sec_real);
678 a68_idf (A68_EXT, "sindg", m, genie_sindg_real);
679 a68_idf (A68_EXT, "sinh", m, genie_sinh_real);
680 a68_idf (A68_EXT, "sinpi", m, genie_sinpi_real);
681 a68_idf (A68_EXT, "tandg", m, genie_tandg_real);
682 a68_idf (A68_EXT, "tanh", m, genie_tanh_real);
683 a68_idf (A68_EXT, "tanpi", m, genie_tanpi_real);
684 a68_idf (A68_STD, "cos", m, genie_cos_real);
685 a68_idf (A68_STD, "exp", m, genie_exp_real);
686 a68_idf (A68_STD, "ln", m, genie_ln_real);
687 a68_idf (A68_STD, "log", m, genie_log_real);
688 a68_idf (A68_STD, "sin", m, genie_sin_real);
689 a68_idf (A68_STD, "sqrt", m, genie_sqrt_real);
690 a68_idf (A68_STD, "tan", m, genie_tan_real);
691 // Miscellaneous.
692 a68_id2 (A68_EXT, "arctan2", "atan2", A68_MCACHE (proc_real_real_real), genie_atan2_real);
693 a68_id2 (A68_EXT, "arctan2dg", "atan2dg", A68_MCACHE (proc_real_real_real), genie_atan2dg_real);
694 a68_idf (A68_EXT, "beta", A68_MCACHE (proc_real_real_real), genie_beta_real);
695 a68_idf (A68_EXT, "betainc", A68_MCACHE (proc_real_real_real_real), genie_beta_inc_cf_real);
696 a68_idf (A68_EXT, "choose", A68_MCACHE (proc_int_int_real), genie_choose_real);
697 a68_idf (A68_EXT, "fact", A68_MCACHE (proc_int_real), genie_fact_real);
698 a68_idf (A68_EXT, "gammainc", A68_MCACHE (proc_real_real_real), genie_gamma_inc_h_real);
699 a68_idf (A68_EXT, "gammaincf", A68_MCACHE (proc_real_real_real), genie_gamma_inc_f_real);
700 a68_idf (A68_EXT, "gammaincg", A68_MCACHE (proc_real_real_real_real_real), genie_gamma_inc_g_real);
701 a68_idf (A68_EXT, "gammaincgf", A68_MCACHE (proc_real_real_real), genie_gamma_inc_gf_real);
702 a68_idf (A68_EXT, "lje126", A68_MCACHE (proc_real_real_real_real), genie_lj_e_12_6);
703 a68_idf (A68_EXT, "ljf126", A68_MCACHE (proc_real_real_real_real), genie_lj_f_12_6);
704 a68_idf (A68_EXT, "lnbeta", A68_MCACHE (proc_real_real_real), genie_ln_beta_real);
705 a68_idf (A68_EXT, "lnchoose", A68_MCACHE (proc_int_int_real), genie_ln_choose_real);
706 a68_idf (A68_EXT, "lnfact", A68_MCACHE (proc_int_real), genie_ln_fact_real);
707 // COMPLEX ops.
708 m = a68_proc (M_COMPLEX, M_REAL, M_REAL, NO_MOID);
709 a68_op (A68_STD, "I", m, genie_i_complex);
710 a68_op (A68_STD, "+*", m, genie_i_complex);
711 m = a68_proc (M_COMPLEX, M_INT, M_INT, NO_MOID);
712 a68_op (A68_STD, "I", m, genie_i_int_complex);
713 a68_op (A68_STD, "+*", m, genie_i_int_complex);
714 m = a68_proc (M_REAL, M_COMPLEX, NO_MOID);
715 a68_op (A68_STD, "RE", m, genie_re_complex);
716 a68_op (A68_STD, "IM", m, genie_im_complex);
717 a68_op (A68_STD, "ABS", m, genie_abs_complex);
718 a68_op (A68_STD, "ARG", m, genie_arg_complex);
719 m = A68_MCACHE (proc_complex_complex);
720 a68_op (A68_STD, "+", m, genie_idle);
721 a68_op (A68_STD, "-", m, genie_minus_complex);
722 a68_op (A68_STD, "CONJ", m, genie_conj_complex);
723 m = a68_proc (M_BOOL, M_COMPLEX, M_COMPLEX, NO_MOID);
724 a68_op (A68_STD, "=", m, genie_eq_complex);
725 a68_op (A68_STD, "/=", m, genie_ne_complex);
726 a68_op (A68_STD, "~=", m, genie_ne_complex);
727 a68_op (A68_STD, "^=", m, genie_ne_complex);
728 a68_op (A68_STD, "EQ", m, genie_eq_complex);
729 a68_op (A68_STD, "NE", m, genie_ne_complex);
730 m = a68_proc (M_COMPLEX, M_COMPLEX, M_COMPLEX, NO_MOID);
731 a68_op (A68_STD, "+", m, genie_add_complex);
732 a68_op (A68_STD, "-", m, genie_sub_complex);
733 a68_op (A68_STD, "*", m, genie_mul_complex);
734 a68_op (A68_STD, "/", m, genie_div_complex);
735 m = a68_proc (M_COMPLEX, M_COMPLEX, M_INT, NO_MOID);
736 a68_op (A68_STD, "**", m, genie_pow_complex_int);
737 a68_op (A68_STD, "UP", m, genie_pow_complex_int);
738 a68_op (A68_STD, "^", m, genie_pow_complex_int);
739 m = a68_proc (M_REF_COMPLEX, M_REF_COMPLEX, M_COMPLEX, NO_MOID);
740 a68_op (A68_STD, "+:=", m, genie_plusab_complex);
741 a68_op (A68_STD, "-:=", m, genie_minusab_complex);
742 a68_op (A68_STD, "*:=", m, genie_timesab_complex);
743 a68_op (A68_STD, "/:=", m, genie_divab_complex);
744 a68_op (A68_STD, "PLUSAB", m, genie_plusab_complex);
745 a68_op (A68_STD, "MINUSAB", m, genie_minusab_complex);
746 a68_op (A68_STD, "TIMESAB", m, genie_timesab_complex);
747 a68_op (A68_STD, "DIVAB", m, genie_divab_complex);
748 m = A68_MCACHE (proc_complex_complex);
749 a68_id2 (A68_EXT, "complexarccosh", "cacosh", m, genie_acosh_complex);
750 a68_id2 (A68_EXT, "complexarccos", "cacos", m, genie_acos_complex);
751 a68_id2 (A68_EXT, "complexarcsinh", "casinh", m, genie_asinh_complex);
752 a68_id2 (A68_EXT, "complexarcsin", "casin", m, genie_asin_complex);
753 a68_id2 (A68_EXT, "complexarctanh", "catanh", m, genie_atanh_complex);
754 a68_id2 (A68_EXT, "complexarctan", "catan", m, genie_atan_complex);
755 a68_id2 (A68_EXT, "complexcosh", "ccosh", m, genie_cosh_complex);
756 a68_id2 (A68_EXT, "complexcos", "ccos", m, genie_cos_complex);
757 a68_id2 (A68_EXT, "complexexp", "cexp", m, genie_exp_complex);
758 a68_id2 (A68_EXT, "complexln", "cln", m, genie_ln_complex);
759 a68_id2 (A68_EXT, "complexsinh", "csinh", m, genie_sinh_complex);
760 a68_id2 (A68_EXT, "complexsin", "csin", m, genie_sin_complex);
761 a68_id2 (A68_EXT, "complexsqrt", "csqrt", m, genie_sqrt_complex);
762 a68_id2 (A68_EXT, "complextanh", "ctanh", m, genie_tanh_complex);
763 a68_id2 (A68_EXT, "complextan", "ctan", m, genie_tan_complex);
764 // BOOL ops.
765 m = a68_proc (M_BOOL, M_BOOL, NO_MOID);
766 a68_op (A68_STD, "NOT", m, genie_not_bool);
767 a68_op (A68_STD, "~", m, genie_not_bool);
768 m = a68_proc (M_INT, M_BOOL, NO_MOID);
769 a68_op (A68_STD, "ABS", m, genie_abs_bool);
770 m = a68_proc (M_BOOL, M_BOOL, M_BOOL, NO_MOID);
771 a68_op (A68_STD, "OR", m, genie_or_bool);
772 a68_op (A68_STD, "AND", m, genie_and_bool);
773 a68_op (A68_STD, "&", m, genie_and_bool);
774 a68_op (A68_EXT, "XOR", m, genie_xor_bool);
775 a68_op (A68_STD, "=", m, genie_eq_bool);
776 a68_op (A68_STD, "/=", m, genie_ne_bool);
777 a68_op (A68_STD, "~=", m, genie_ne_bool);
778 a68_op (A68_STD, "^=", m, genie_ne_bool);
779 a68_op (A68_STD, "EQ", m, genie_eq_bool);
780 a68_op (A68_STD, "NE", m, genie_ne_bool);
781 // CHAR ops.
782 m = a68_proc (M_BOOL, M_CHAR, M_CHAR, NO_MOID);
783 a68_op (A68_STD, "=", m, genie_eq_char);
784 a68_op (A68_STD, "/=", m, genie_ne_char);
785 a68_op (A68_STD, "~=", m, genie_ne_char);
786 a68_op (A68_STD, "^=", m, genie_ne_char);
787 a68_op (A68_STD, "<", m, genie_lt_char);
788 a68_op (A68_STD, "<=", m, genie_le_char);
789 a68_op (A68_STD, ">", m, genie_gt_char);
790 a68_op (A68_STD, ">=", m, genie_ge_char);
791 a68_op (A68_STD, "EQ", m, genie_eq_char);
792 a68_op (A68_STD, "NE", m, genie_ne_char);
793 a68_op (A68_STD, "LT", m, genie_lt_char);
794 a68_op (A68_STD, "LE", m, genie_le_char);
795 a68_op (A68_STD, "GT", m, genie_gt_char);
796 a68_op (A68_STD, "GE", m, genie_ge_char);
797 m = a68_proc (M_INT, M_CHAR, NO_MOID);
798 a68_op (A68_STD, "ABS", m, genie_abs_char);
799 m = a68_proc (M_CHAR, M_INT, NO_MOID);
800 a68_op (A68_STD, "REPR", m, genie_repr_char);
801 m = a68_proc (M_BOOL, M_CHAR, NO_MOID);
802 a68_idf (A68_EXT, "isalnum", m, genie_is_alnum);
803 a68_idf (A68_EXT, "isalpha", m, genie_is_alpha);
804 a68_idf (A68_EXT, "iscntrl", m, genie_is_cntrl);
805 a68_idf (A68_EXT, "isdigit", m, genie_is_digit);
806 a68_idf (A68_EXT, "isgraph", m, genie_is_graph);
807 a68_idf (A68_EXT, "islower", m, genie_is_lower);
808 a68_idf (A68_EXT, "isprint", m, genie_is_print);
809 a68_idf (A68_EXT, "ispunct", m, genie_is_punct);
810 a68_idf (A68_EXT, "isspace", m, genie_is_space);
811 a68_idf (A68_EXT, "isupper", m, genie_is_upper);
812 a68_idf (A68_EXT, "isxdigit", m, genie_is_xdigit);
813 m = a68_proc (M_CHAR, M_CHAR, NO_MOID);
814 a68_idf (A68_EXT, "tolower", m, genie_to_lower);
815 a68_idf (A68_EXT, "toupper", m, genie_to_upper);
816 // BITS ops.
817 m = a68_proc (M_INT, M_BITS, NO_MOID);
818 a68_op (A68_STD, "ABS", m, genie_abs_bits);
819 m = a68_proc (M_BITS, M_INT, NO_MOID);
820 a68_op (A68_STD, "BIN", m, genie_bin_int);
821 m = a68_proc (M_BITS, M_BITS, NO_MOID);
822 a68_op (A68_STD, "NOT", m, genie_not_bits);
823 a68_op (A68_STD, "~", m, genie_not_bits);
824 m = a68_proc (M_BOOL, M_BITS, M_BITS, NO_MOID);
825 a68_op (A68_STD, "=", m, genie_eq_bits);
826 a68_op (A68_STD, "/=", m, genie_ne_bits);
827 a68_op (A68_STD, "~=", m, genie_ne_bits);
828 a68_op (A68_STD, "^=", m, genie_ne_bits);
829 a68_op (A68_STD, "<=", m, genie_le_bits);
830 a68_op (A68_STD, ">=", m, genie_ge_bits);
831 a68_op (A68_STD, "EQ", m, genie_eq_bits);
832 a68_op (A68_STD, "NE", m, genie_ne_bits);
833 a68_op (A68_STD, "LE", m, genie_le_bits);
834 a68_op (A68_STD, "GE", m, genie_ge_bits);
835 #if (A68_LEVEL >= 3)
836 a68_op (A68_EXT, "<", m, genie_lt_bits);
837 a68_op (A68_EXT, ">", m, genie_gt_bits);
838 a68_op (A68_EXT, "LT", m, genie_lt_bits);
839 a68_op (A68_EXT, "GT", m, genie_gt_bits);
840 #endif
841 m = a68_proc (M_BITS, M_BITS, M_BITS, NO_MOID);
842 a68_op (A68_STD, "AND", m, genie_and_bits);
843 a68_op (A68_STD, "&", m, genie_and_bits);
844 a68_op (A68_STD, "OR", m, genie_or_bits);
845 a68_op (A68_EXT, "XOR", m, genie_xor_bits);
846 a68_op (A68_EXT, "+", m, genie_add_bits);
847 a68_op (A68_EXT, "-", m, genie_sub_bits);
848 a68_op (A68_EXT, "*", m, genie_times_bits);
849 a68_op (A68_EXT, "OVER", m, genie_over_bits);
850 a68_op (A68_EXT, "MOD", m, genie_over_bits);
851 m = a68_proc (M_BITS, M_BITS, M_INT, NO_MOID);
852 a68_op (A68_STD, "SHL", m, genie_shl_bits);
853 a68_op (A68_STD, "UP", m, genie_shl_bits);
854 a68_op (A68_STD, "SHR", m, genie_shr_bits);
855 a68_op (A68_STD, "DOWN", m, genie_shr_bits);
856 a68_op (A68_EXT, "ROL", m, genie_rol_bits);
857 a68_op (A68_EXT, "ROR", m, genie_ror_bits);
858 m = a68_proc (M_BOOL, M_INT, M_BITS, NO_MOID);
859 a68_op (A68_STD, "ELEM", m, genie_elem_bits);
860 m = a68_proc (M_BITS, M_INT, M_BITS, NO_MOID);
861 a68_op (A68_STD, "SET", m, genie_set_bits);
862 a68_op (A68_STD, "CLEAR", m, genie_clear_bits);
863 // LONG LONG INT in software
864 m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
865 a68_op (A68_STD, "+", m, genie_idle);
866 a68_op (A68_STD, "-", m, genie_minus_mp);
867 a68_op (A68_STD, "ABS", m, genie_abs_mp);
868 m = a68_proc (M_INT, M_LONG_LONG_INT, NO_MOID);
869 a68_op (A68_STD, "SIGN", m, genie_sign_mp);
870 m = a68_proc (M_BOOL, M_LONG_LONG_INT, NO_MOID);
871 a68_op (A68_STD, "ODD", m, genie_odd_mp);
872 m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_REAL, NO_MOID);
873 a68_op (A68_STD, "ENTIER", m, genie_entier_mp);
874 a68_op (A68_STD, "ROUND", m, genie_round_mp);
875 m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
876 a68_op (A68_STD, "+", m, genie_add_mp_int);
877 a68_op (A68_STD, "-", m, genie_sub_mp_int);
878 a68_op (A68_STD, "*", m, genie_mul_mp_int);
879 a68_op (A68_STD, "OVER", m, genie_over_mp);
880 a68_op (A68_STD, "%", m, genie_over_mp);
881 a68_op (A68_STD, "MOD", m, genie_mod_mp);
882 a68_op (A68_STD, "%*", m, genie_mod_mp);
883 m = a68_proc (M_REF_LONG_LONG_INT, M_REF_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
884 a68_op (A68_STD, "+:=", m, genie_plusab_mp_int);
885 a68_op (A68_STD, "-:=", m, genie_minusab_mp_int);
886 a68_op (A68_STD, "*:=", m, genie_timesab_mp_int);
887 a68_op (A68_STD, "%:=", m, genie_overab_mp);
888 a68_op (A68_STD, "%*:=", m, genie_modab_mp);
889 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_int);
890 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_int);
891 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_int);
892 a68_op (A68_STD, "OVERAB", m, genie_overab_mp);
893 a68_op (A68_STD, "MODAB", m, genie_modab_mp);
894 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
895 a68_op (A68_STD, "/", m, genie_div_mp);
896 m = a68_proc (M_BOOL, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
897 a68_op (A68_STD, "EQ", m, genie_eq_mp);
898 a68_op (A68_STD, "NE", m, genie_ne_mp);
899 a68_op (A68_STD, "GE", m, genie_ge_mp);
900 a68_op (A68_STD, "GT", m, genie_gt_mp);
901 a68_op (A68_STD, "LE", m, genie_le_mp);
902 a68_op (A68_STD, "LT", m, genie_lt_mp);
903 a68_op (A68_STD, "=", m, genie_eq_mp);
904 a68_op (A68_STD, ">=", m, genie_ge_mp);
905 a68_op (A68_STD, ">", m, genie_gt_mp);
906 a68_op (A68_STD, "<=", m, genie_le_mp);
907 a68_op (A68_STD, "<", m, genie_lt_mp);
908 a68_op (A68_STD, "/=", m, genie_ne_mp);
909 a68_op (A68_STD, "^=", m, genie_ne_mp);
910 a68_op (A68_STD, "~=", m, genie_ne_mp);
911 m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, M_INT, NO_MOID);
912 a68_op (A68_STD, "**", m, genie_pow_mp_int_int);
913 a68_op (A68_STD, "^", m, genie_pow_mp_int_int);
914 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
915 a68_op (A68_STD, "I", m, genie_idle);
916 a68_op (A68_STD, "+*", m, genie_idle);
917 // LONG LONG REAL in software
918 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
919 a68_op (A68_STD, "ABS", m, genie_abs_mp);
920 a68_op (A68_STD, "+", m, genie_idle);
921 a68_op (A68_STD, "-", m, genie_minus_mp);
922 m = a68_proc (M_INT, M_LONG_LONG_REAL, NO_MOID);
923 a68_op (A68_STD, "SIGN", m, genie_sign_mp);
924 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
925 a68_id2 (A68_EXT, "longlongarccosdg", "qacosdg", m, genie_acosdg_mp);
926 a68_id2 (A68_EXT, "longlongarccosh", "qacosh", m, genie_acosh_mp);
927 a68_id2 (A68_EXT, "longlongarccotdg", "qacotdg", m, genie_acotdg_mp);
928 a68_id2 (A68_EXT, "longlongarccot", "qacot", m, genie_acot_mp);
929 a68_id2 (A68_EXT, "longlongarccscdg", "qacscdg", m, genie_acscdg_mp);
930 a68_id2 (A68_EXT, "longlongarccsc", "qacsc", m, genie_acsc_mp);
931 a68_id2 (A68_EXT, "longlongarcsecdg", "qasecdg", m, genie_asecdg_mp);
932 a68_id2 (A68_EXT, "longlongarcsec", "qasec", m, genie_asec_mp);
933 a68_id2 (A68_EXT, "longlongarcsindg", "qasindg", m, genie_asindg_mp);
934 a68_id2 (A68_EXT, "longlongarcsinh", "qasinh", m, genie_asinh_mp);
935 a68_id2 (A68_EXT, "longlongarctandg", "qatandg", m, genie_atandg_mp);
936 a68_id2 (A68_EXT, "longlongarctanh", "qatanh", m, genie_atanh_mp);
937 a68_id2 (A68_EXT, "longlongcas", "qcas", m, genie_cas_mp);
938 a68_id2 (A68_EXT, "longlongcbrt", "qcbrt", m, genie_curt_mp);
939 a68_id2 (A68_EXT, "longlongcosdg", "qcosdg", m, genie_cosdg_mp);
940 a68_id2 (A68_EXT, "longlongcosh", "qcosh", m, genie_cosh_mp);
941 a68_id2 (A68_EXT, "longlongcospi", "qcospi", m, genie_cospi_mp);
942 a68_id2 (A68_EXT, "longlongcotdg", "qcotdg", m, genie_cotdg_mp);
943 a68_id2 (A68_EXT, "longlongcotpi", "qcotpi", m, genie_cotpi_mp);
944 a68_id2 (A68_EXT, "longlongcot", "qcot", m, genie_cot_mp);
945 a68_id2 (A68_EXT, "longlongcscdg", "qcscdg", m, genie_cscdg_mp);
946 a68_id2 (A68_EXT, "longlongcsc", "qcsc", m, genie_csc_mp);
947 a68_id2 (A68_EXT, "longlongcurt", "qcurt", m, genie_curt_mp);
948 a68_id2 (A68_EXT, "longlongerfc", "qerfc", m, genie_erfc_mp);
949 a68_id2 (A68_EXT, "longlongerf", "qerf", m, genie_erf_mp);
950 a68_id2 (A68_EXT, "longlonggamma", "qgamma", m, genie_gamma_mp);
951 a68_id2 (A68_EXT, "longlonginverfc", "qinverfc", m, genie_inverfc_mp);
952 a68_id2 (A68_EXT, "longlonginverf", "qinverf", m, genie_inverf_mp);
953 a68_id2 (A68_EXT, "longlonglngamma", "qlngamma", m, genie_lngamma_mp);
954 a68_id2 (A68_EXT, "longlongsecdg", "qsecdg", m, genie_secdg_mp);
955 a68_id2 (A68_EXT, "longlongsec", "qsec", m, genie_sec_mp);
956 a68_id2 (A68_EXT, "longlongsindg", "qsindg", m, genie_sindg_mp);
957 a68_id2 (A68_EXT, "longlongsinh", "qsinh", m, genie_sinh_mp);
958 a68_id2 (A68_EXT, "longlongsinpi", "qsinpi", m, genie_sinpi_mp);
959 a68_id2 (A68_EXT, "longlongtandg", "qtandg", m, genie_tandg_mp);
960 a68_id2 (A68_EXT, "longlongtanh", "qtanh", m, genie_tanh_mp);
961 a68_id2 (A68_EXT, "longlongtanpi", "qtanpi", m, genie_tanpi_mp);
962 a68_id2 (A68_STD, "longlongarccos", "qacos", m, genie_acos_mp);
963 a68_id2 (A68_STD, "longlongarcsin", "qasin", m, genie_asin_mp);
964 a68_id2 (A68_STD, "longlongarctan", "qatan", m, genie_atan_mp);
965 a68_id2 (A68_STD, "longlongcos", "qcos", m, genie_cos_mp);
966 a68_id2 (A68_STD, "longlongexp", "qexp", m, genie_exp_mp);
967 a68_id2 (A68_STD, "longlongln", "qln", m, genie_ln_mp);
968 a68_id2 (A68_STD, "longlonglog", "qlog", m, genie_log_mp);
969 a68_id2 (A68_STD, "longlongsin", "qsin", m, genie_sin_mp);
970 a68_id2 (A68_STD, "longlongsqrt", "qsqrt", m, genie_sqrt_mp);
971 a68_id2 (A68_STD, "longlongtan", "qtan", m, genie_tan_mp);
972 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
973 a68_id2 (A68_EXT, "longlongarctan2dg", "qatan2dg", m, genie_atan2dg_mp);
974 a68_id2 (A68_EXT, "longlongarctan2", "qatan2", m, genie_atan2_mp);
975 a68_id2 (A68_EXT, "longlongbeta", "qbeta", m, genie_beta_mp);
976 a68_id2 (A68_EXT, "longlonggammaincf", "qgammaincf", m, genie_gamma_inc_f_mp);
977 a68_id2 (A68_EXT, "longlonggammaincgf", "qgammaincgf", m, genie_gamma_inc_gf_mp);
978 a68_id2 (A68_EXT, "longlonggammainc", "qgammainc", m, genie_gamma_inc_h_mp);
979 a68_id2 (A68_EXT, "longlonglnbeta", "qlnbeta", m, genie_lnbeta_mp);
980 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
981 a68_id2 (A68_EXT, "longlongbetainc", "qbetainc", m, genie_beta_inc_mp);
982 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
983 a68_id2 (A68_EXT, "longlonggammaincg", "qgammaincg", m, genie_gamma_inc_g_mp);
984 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
985 a68_op (A68_STD, "+", m, genie_add_mp);
986 a68_op (A68_STD, "-", m, genie_sub_mp);
987 a68_op (A68_STD, "*", m, genie_mul_mp);
988 a68_op (A68_STD, "/", m, genie_div_mp);
989 a68_op (A68_STD, "**", m, genie_pow_mp);
990 a68_op (A68_STD, "UP", m, genie_pow_mp);
991 a68_op (A68_STD, "^", m, genie_pow_mp);
992 m = a68_proc (M_REF_LONG_LONG_REAL, M_REF_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
993 a68_op (A68_STD, "+:=", m, genie_plusab_mp);
994 a68_op (A68_STD, "-:=", m, genie_minusab_mp);
995 a68_op (A68_STD, "*:=", m, genie_timesab_mp);
996 a68_op (A68_STD, "/:=", m, genie_divab_mp);
997 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp);
998 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp);
999 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp);
1000 a68_op (A68_STD, "DIVAB", m, genie_divab_mp);
1001 m = a68_proc (M_BOOL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1002 a68_op (A68_STD, "=", m, genie_eq_mp);
1003 a68_op (A68_STD, "EQ", m, genie_eq_mp);
1004 a68_op (A68_STD, "/=", m, genie_ne_mp);
1005 a68_op (A68_STD, "~=", m, genie_ne_mp);
1006 a68_op (A68_STD, "^=", m, genie_ne_mp);
1007 a68_op (A68_STD, "NE", m, genie_ne_mp);
1008 a68_op (A68_STD, "<", m, genie_lt_mp);
1009 a68_op (A68_STD, "LT", m, genie_lt_mp);
1010 a68_op (A68_STD, "<=", m, genie_le_mp);
1011 a68_op (A68_STD, "LE", m, genie_le_mp);
1012 a68_op (A68_STD, ">", m, genie_gt_mp);
1013 a68_op (A68_STD, "GT", m, genie_gt_mp);
1014 a68_op (A68_STD, ">=", m, genie_ge_mp);
1015 a68_op (A68_STD, "GE", m, genie_ge_mp);
1016 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_INT, NO_MOID);
1017 a68_op (A68_STD, "**", m, genie_pow_mp_int);
1018 a68_op (A68_STD, "UP", m, genie_pow_mp_int);
1019 a68_op (A68_STD, "^", m, genie_pow_mp_int);
1020 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1021 a68_op (A68_STD, "I", m, genie_idle);
1022 a68_op (A68_STD, "+*", m, genie_idle);
1023 // LONG LONG COMPLEX in software
1024 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_COMPLEX, NO_MOID);
1025 a68_op (A68_STD, "RE", m, genie_re_mp_complex);
1026 a68_op (A68_STD, "IM", m, genie_im_mp_complex);
1027 a68_op (A68_STD, "ARG", m, genie_arg_mp_complex);
1028 a68_op (A68_STD, "ABS", m, genie_abs_mp_complex);
1029 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1030 a68_op (A68_STD, "+", m, genie_idle);
1031 a68_op (A68_STD, "-", m, genie_minus_mp_complex);
1032 a68_op (A68_STD, "CONJ", m, genie_conj_mp_complex);
1033 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1034 a68_op (A68_STD, "+", m, genie_add_mp_complex);
1035 a68_op (A68_STD, "-", m, genie_sub_mp_complex);
1036 a68_op (A68_STD, "*", m, genie_mul_mp_complex);
1037 a68_op (A68_STD, "/", m, genie_div_mp_complex);
1038 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, M_INT, NO_MOID);
1039 a68_op (A68_STD, "**", m, genie_pow_mp_complex_int);
1040 a68_op (A68_STD, "UP", m, genie_pow_mp_complex_int);
1041 a68_op (A68_STD, "^", m, genie_pow_mp_complex_int);
1042 m = a68_proc (M_BOOL, M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1043 a68_op (A68_STD, "=", m, genie_eq_mp_complex);
1044 a68_op (A68_STD, "EQ", m, genie_eq_mp_complex);
1045 a68_op (A68_STD, "/=", m, genie_ne_mp_complex);
1046 a68_op (A68_STD, "~=", m, genie_ne_mp_complex);
1047 a68_op (A68_STD, "^=", m, genie_ne_mp_complex);
1048 a68_op (A68_STD, "NE", m, genie_ne_mp_complex);
1049 m = a68_proc (M_REF_LONG_LONG_COMPLEX, M_REF_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1050 a68_op (A68_STD, "+:=", m, genie_plusab_mp_complex);
1051 a68_op (A68_STD, "-:=", m, genie_minusab_mp_complex);
1052 a68_op (A68_STD, "*:=", m, genie_timesab_mp_complex);
1053 a68_op (A68_STD, "/:=", m, genie_divab_mp_complex);
1054 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_complex);
1055 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_complex);
1056 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_complex);
1057 a68_op (A68_STD, "DIVAB", m, genie_divab_mp_complex);
1058 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1059 a68_id2 (A68_EXT, "longlongcomplexarccosh", "qcacosh", m, genie_acosh_mp_complex);
1060 a68_id2 (A68_EXT, "longlongcomplexarccos", "qcacos", m, genie_acos_mp_complex);
1061 a68_id2 (A68_EXT, "longlongcomplexarcsinh", "qcasinh", m, genie_asinh_mp_complex);
1062 a68_id2 (A68_EXT, "longlongcomplexarcsin", "qcasin", m, genie_asin_mp_complex);
1063 a68_id2 (A68_EXT, "longlongcomplexarctanh", "qcatanh", m, genie_atanh_mp_complex);
1064 a68_id2 (A68_EXT, "longlongcomplexarctan", "qcatan", m, genie_atan_mp_complex);
1065 a68_id2 (A68_EXT, "longlongcomplexcosh", "qccosh", m, genie_cosh_mp_complex);
1066 a68_id2 (A68_EXT, "longlongcomplexcos", "qccos", m, genie_cos_mp_complex);
1067 a68_id2 (A68_EXT, "longlongcomplexexp", "qcexp", m, genie_exp_mp_complex);
1068 a68_id2 (A68_EXT, "longlongcomplexln", "qcln", m, genie_ln_mp_complex);
1069 a68_id2 (A68_EXT, "longlongcomplexsinh", "qcsinh", m, genie_sinh_mp_complex);
1070 a68_id2 (A68_EXT, "longlongcomplexsin", "qcsin", m, genie_sin_mp_complex);
1071 a68_id2 (A68_EXT, "longlongcomplexsqrt", "qcsqrt", m, genie_sqrt_mp_complex);
1072 a68_id2 (A68_EXT, "longlongcomplextanh", "qctanh", m, genie_tanh_mp_complex);
1073 a68_id2 (A68_EXT, "longlongcomplextan", "qctan", m, genie_tan_mp_complex);
1074 // BYTES ops.
1075 m = a68_proc (M_BYTES, M_STRING, NO_MOID);
1076 a68_idf (A68_STD, "bytespack", m, genie_bytespack);
1077 m = a68_proc (M_CHAR, M_INT, M_BYTES, NO_MOID);
1078 a68_op (A68_STD, "ELEM", m, genie_elem_bytes);
1079 m = a68_proc (M_BYTES, M_BYTES, M_BYTES, NO_MOID);
1080 a68_op (A68_STD, "+", m, genie_add_bytes);
1081 m = a68_proc (M_REF_BYTES, M_REF_BYTES, M_BYTES, NO_MOID);
1082 a68_op (A68_STD, "+:=", m, genie_plusab_bytes);
1083 a68_op (A68_STD, "PLUSAB", m, genie_plusab_bytes);
1084 m = a68_proc (M_REF_BYTES, M_BYTES, M_REF_BYTES, NO_MOID);
1085 a68_op (A68_STD, "+=:", m, genie_plusto_bytes);
1086 a68_op (A68_STD, "PLUSTO", m, genie_plusto_bytes);
1087 m = a68_proc (M_BOOL, M_BYTES, M_BYTES, NO_MOID);
1088 a68_op (A68_STD, "=", m, genie_eq_bytes);
1089 a68_op (A68_STD, "/=", m, genie_ne_bytes);
1090 a68_op (A68_STD, "~=", m, genie_ne_bytes);
1091 a68_op (A68_STD, "^=", m, genie_ne_bytes);
1092 a68_op (A68_STD, "<", m, genie_lt_bytes);
1093 a68_op (A68_STD, "<=", m, genie_le_bytes);
1094 a68_op (A68_STD, ">", m, genie_gt_bytes);
1095 a68_op (A68_STD, ">=", m, genie_ge_bytes);
1096 a68_op (A68_STD, "EQ", m, genie_eq_bytes);
1097 a68_op (A68_STD, "NE", m, genie_ne_bytes);
1098 a68_op (A68_STD, "LT", m, genie_lt_bytes);
1099 a68_op (A68_STD, "LE", m, genie_le_bytes);
1100 a68_op (A68_STD, "GT", m, genie_gt_bytes);
1101 a68_op (A68_STD, "GE", m, genie_ge_bytes);
1102 // LONG BYTES ops.
1103 m = a68_proc (M_LONG_BYTES, M_BYTES, NO_MOID);
1104 a68_op (A68_STD, "LENG", m, genie_leng_bytes);
1105 m = a68_proc (M_BYTES, M_LONG_BYTES, NO_MOID);
1106 a68_idf (A68_STD, "SHORTEN", m, genie_shorten_bytes);
1107 m = a68_proc (M_LONG_BYTES, M_STRING, NO_MOID);
1108 a68_idf (A68_STD, "longbytespack", m, genie_long_bytespack);
1109 m = a68_proc (M_CHAR, M_INT, M_LONG_BYTES, NO_MOID);
1110 a68_op (A68_STD, "ELEM", m, genie_elem_long_bytes);
1111 m = a68_proc (M_LONG_BYTES, M_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1112 a68_op (A68_STD, "+", m, genie_add_long_bytes);
1113 m = a68_proc (M_REF_LONG_BYTES, M_REF_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1114 a68_op (A68_STD, "+:=", m, genie_plusab_long_bytes);
1115 a68_op (A68_STD, "PLUSAB", m, genie_plusab_long_bytes);
1116 m = a68_proc (M_REF_LONG_BYTES, M_LONG_BYTES, M_REF_LONG_BYTES, NO_MOID);
1117 a68_op (A68_STD, "+=:", m, genie_plusto_long_bytes);
1118 a68_op (A68_STD, "PLUSTO", m, genie_plusto_long_bytes);
1119 m = a68_proc (M_BOOL, M_LONG_BYTES, M_LONG_BYTES, NO_MOID);
1120 a68_op (A68_STD, "=", m, genie_eq_long_bytes);
1121 a68_op (A68_STD, "/=", m, genie_ne_long_bytes);
1122 a68_op (A68_STD, "~=", m, genie_ne_long_bytes);
1123 a68_op (A68_STD, "^=", m, genie_ne_long_bytes);
1124 a68_op (A68_STD, "<", m, genie_lt_long_bytes);
1125 a68_op (A68_STD, "<=", m, genie_le_long_bytes);
1126 a68_op (A68_STD, ">", m, genie_gt_long_bytes);
1127 a68_op (A68_STD, ">=", m, genie_ge_long_bytes);
1128 a68_op (A68_STD, "EQ", m, genie_eq_long_bytes);
1129 a68_op (A68_STD, "NE", m, genie_ne_long_bytes);
1130 a68_op (A68_STD, "LT", m, genie_lt_long_bytes);
1131 a68_op (A68_STD, "LE", m, genie_le_long_bytes);
1132 a68_op (A68_STD, "GT", m, genie_gt_long_bytes);
1133 a68_op (A68_STD, "GE", m, genie_ge_long_bytes);
1134 // STRING ops.
1135 m = a68_proc (M_BOOL, M_STRING, M_STRING, NO_MOID);
1136 a68_op (A68_STD, "=", m, genie_eq_string);
1137 a68_op (A68_STD, "/=", m, genie_ne_string);
1138 a68_op (A68_STD, "~=", m, genie_ne_string);
1139 a68_op (A68_STD, "^=", m, genie_ne_string);
1140 a68_op (A68_STD, "<", m, genie_lt_string);
1141 a68_op (A68_STD, "<=", m, genie_le_string);
1142 a68_op (A68_STD, ">=", m, genie_ge_string);
1143 a68_op (A68_STD, ">", m, genie_gt_string);
1144 a68_op (A68_STD, "EQ", m, genie_eq_string);
1145 a68_op (A68_STD, "NE", m, genie_ne_string);
1146 a68_op (A68_STD, "LT", m, genie_lt_string);
1147 a68_op (A68_STD, "LE", m, genie_le_string);
1148 a68_op (A68_STD, "GE", m, genie_ge_string);
1149 a68_op (A68_STD, "GT", m, genie_gt_string);
1150 m = a68_proc (M_STRING, M_CHAR, M_CHAR, NO_MOID);
1151 a68_op (A68_STD, "+", m, genie_add_char);
1152 m = a68_proc (M_STRING, M_STRING, M_STRING, NO_MOID);
1153 a68_op (A68_STD, "+", m, genie_add_string);
1154 m = a68_proc (M_REF_STRING, M_REF_STRING, M_STRING, NO_MOID);
1155 a68_op (A68_STD, "+:=", m, genie_plusab_string);
1156 a68_op (A68_STD, "PLUSAB", m, genie_plusab_string);
1157 m = a68_proc (M_REF_STRING, M_REF_STRING, M_INT, NO_MOID);
1158 a68_op (A68_STD, "*:=", m, genie_timesab_string);
1159 a68_op (A68_STD, "TIMESAB", m, genie_timesab_string);
1160 m = a68_proc (M_REF_STRING, M_STRING, M_REF_STRING, NO_MOID);
1161 a68_op (A68_STD, "+=:", m, genie_plusto_string);
1162 a68_op (A68_STD, "PLUSTO", m, genie_plusto_string);
1163 m = a68_proc (M_STRING, M_STRING, M_INT, NO_MOID);
1164 a68_op (A68_STD, "*", m, genie_times_string_int);
1165 m = a68_proc (M_STRING, M_INT, M_STRING, NO_MOID);
1166 a68_op (A68_STD, "*", m, genie_times_int_string);
1167 m = a68_proc (M_STRING, M_INT, M_CHAR, NO_MOID);
1168 a68_op (A68_STD, "*", m, genie_times_int_char);
1169 m = a68_proc (M_STRING, M_CHAR, M_INT, NO_MOID);
1170 a68_op (A68_STD, "*", m, genie_times_char_int);
1171 m = a68_proc (M_CHAR, M_INT, M_ROW_CHAR, NO_MOID);
1172 a68_op (A68_STD, "ELEM", m, genie_elem_string);
1173 m = a68_proc (M_STRING, M_STRING, NO_MOID);
1174 a68_idf (A68_EXT, "realpath", m, genie_realpath);
1175 // SEMA ops.
1176 #if defined (BUILD_PARALLEL_CLAUSE)
1177 m = a68_proc (M_SEMA, M_INT, NO_MOID);
1178 a68_op (A68_STD, "LEVEL", m, genie_level_sema_int);
1179 m = a68_proc (M_INT, M_SEMA, NO_MOID);
1180 a68_op (A68_STD, "LEVEL", m, genie_level_int_sema);
1181 m = a68_proc (M_VOID, M_SEMA, NO_MOID);
1182 a68_op (A68_STD, "UP", m, genie_up_sema);
1183 a68_op (A68_STD, "DOWN", m, genie_down_sema);
1184 #else
1185 m = a68_proc (M_SEMA, M_INT, NO_MOID);
1186 a68_op (A68_STD, "LEVEL", m, genie_unimplemented);
1187 m = a68_proc (M_INT, M_SEMA, NO_MOID);
1188 a68_op (A68_STD, "LEVEL", m, genie_unimplemented);
1189 m = a68_proc (M_VOID, M_SEMA, NO_MOID);
1190 a68_op (A68_STD, "UP", m, genie_unimplemented);
1191 a68_op (A68_STD, "DOWN", m, genie_unimplemented);
1192 #endif
1193 // ROWS ops.
1194 m = a68_proc (M_INT, M_ROWS, NO_MOID);
1195 a68_op (A68_EXT, "ELEMS", m, genie_monad_elems);
1196 a68_op (A68_STD, "LWB", m, genie_monad_lwb);
1197 a68_op (A68_STD, "UPB", m, genie_monad_upb);
1198 m = a68_proc (M_INT, M_INT, M_ROWS, NO_MOID);
1199 a68_op (A68_EXT, "ELEMS", m, genie_dyad_elems);
1200 a68_op (A68_STD, "LWB", m, genie_dyad_lwb);
1201 a68_op (A68_STD, "UPB", m, genie_dyad_upb);
1202 m = a68_proc (M_ROW_STRING, M_ROW_STRING, NO_MOID);
1203 a68_op (A68_EXT, "SORT", m, genie_sort_row_string);
1204 // Some "terminators" to handle the mapping of very short or very long modes.
1205 // This allows you to write SHORT REAL z = SHORTEN pi while everything is
1206 // silently mapped onto REAL.
1207 m = a68_proc (M_LONG_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1208 a68_op (A68_STD, "LENG", m, genie_idle);
1209 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1210 a68_op (A68_STD, "LENG", m, genie_idle);
1211 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1212 a68_op (A68_STD, "LENG", m, genie_idle);
1213 m = a68_proc (M_INT, M_INT, NO_MOID);
1214 a68_op (A68_STD, "SHORTEN", m, genie_idle);
1215 m = a68_proc (M_REAL, M_REAL, NO_MOID);
1216 a68_op (A68_STD, "SHORTEN", m, genie_idle);
1217 m = a68_proc (M_COMPLEX, M_COMPLEX, NO_MOID);
1218 a68_op (A68_STD, "SHORTEN", m, genie_idle);
1219 m = a68_proc (M_BITS, M_BITS, NO_MOID);
1220 a68_op (A68_STD, "SHORTEN", m, genie_idle);
1221 // SOUND/RIFF procs.
1222 m = a68_proc (M_SOUND, M_INT, M_INT, M_INT, M_INT, NO_MOID);
1223 a68_idf (A68_EXT, "newsound", m, genie_new_sound);
1224 m = a68_proc (M_INT, M_SOUND, M_INT, M_INT, NO_MOID);
1225 a68_idf (A68_EXT, "getsound", m, genie_get_sound);
1226 m = a68_proc (M_VOID, M_SOUND, M_INT, M_INT, M_INT, NO_MOID);
1227 a68_idf (A68_EXT, "setsound", m, genie_set_sound);
1228 m = a68_proc (M_INT, M_SOUND, NO_MOID);
1229 a68_op (A68_EXT, "RESOLUTION", m, genie_sound_resolution);
1230 a68_op (A68_EXT, "CHANNELS", m, genie_sound_channels);
1231 a68_op (A68_EXT, "RATE", m, genie_sound_rate);
1232 a68_op (A68_EXT, "SAMPLES", m, genie_sound_samples);
1233 }
1234
1235 //! @brief Set up standenv - transput.
1236
1237 void stand_mp_level_2 (void)
1238 {
1239 #if (A68_LEVEL <= 2)
1240 a68_id2 (A68_STD, "longpi", "dpi", M_LONG_REAL, genie_pi_mp);
1241 a68_idf (A68_STD, "longmaxbits", M_LONG_BITS, genie_long_max_bits);
1242 a68_idf (A68_STD, "longmaxint", M_LONG_INT, genie_long_max_int);
1243 a68_idf (A68_STD, "longsmallreal", M_LONG_REAL, genie_long_small_real);
1244 a68_idf (A68_STD, "longmaxreal", M_LONG_REAL, genie_long_max_real);
1245 a68_idf (A68_STD, "longminreal", M_LONG_REAL, genie_long_min_real);
1246 a68_idf (A68_STD, "longinfinity", M_LONG_REAL, genie_infinity_mp);
1247 a68_idf (A68_STD, "longminusinfinity", M_LONG_REAL, genie_minus_infinity_mp);
1248 a68_idf (A68_STD, "longinf", M_LONG_REAL, genie_infinity_mp);
1249 a68_idf (A68_STD, "longmininf", M_LONG_REAL, genie_minus_infinity_mp);
1250 // LONG INT in software
1251 MOID_T *m = a68_proc (M_LONG_INT, M_LONG_INT, NO_MOID);
1252 a68_op (A68_STD, "+", m, genie_idle);
1253 a68_op (A68_STD, "-", m, genie_minus_mp);
1254 a68_op (A68_STD, "ABS", m, genie_abs_mp);
1255 m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
1256 a68_op (A68_STD, "LENG", m, genie_lengthen_int_to_mp);
1257 m = a68_proc (M_INT, M_LONG_INT, NO_MOID);
1258 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_int);
1259 a68_op (A68_STD, "SIGN", m, genie_sign_mp);
1260 m = a68_proc (M_LONG_LONG_REAL, M_LONG_REAL, NO_MOID);
1261 a68_op (A68_STD, "LENG", m, genie_lengthen_mp_to_long_mp);
1262 m = a68_proc (M_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1263 a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_to_mp);
1264 m = a68_proc (M_LONG_LONG_INT, M_LONG_INT, NO_MOID);
1265 a68_op (A68_STD, "LENG", m, genie_lengthen_mp_to_long_mp);
1266 m = a68_proc (M_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1267 a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_to_mp);
1268 m = a68_proc (M_BOOL, M_LONG_INT, NO_MOID);
1269 a68_op (A68_STD, "ODD", m, genie_odd_mp);
1270 m = a68_proc (M_LONG_INT, M_LONG_REAL, NO_MOID);
1271 a68_op (A68_STD, "ENTIER", m, genie_entier_mp);
1272 a68_op (A68_STD, "ROUND", m, genie_round_mp);
1273 m = a68_proc (M_LONG_INT, M_LONG_INT, M_LONG_INT, NO_MOID);
1274 a68_op (A68_STD, "+", m, genie_add_mp_int);
1275 a68_op (A68_STD, "-", m, genie_sub_mp_int);
1276 a68_op (A68_STD, "*", m, genie_mul_mp_int);
1277 a68_op (A68_STD, "OVER", m, genie_over_mp);
1278 a68_op (A68_STD, "%", m, genie_over_mp);
1279 a68_op (A68_STD, "MOD", m, genie_mod_mp);
1280 a68_op (A68_STD, "%*", m, genie_mod_mp);
1281 m = a68_proc (M_REF_LONG_INT, M_REF_LONG_INT, M_LONG_INT, NO_MOID);
1282 a68_op (A68_STD, "+:=", m, genie_plusab_mp_int);
1283 a68_op (A68_STD, "-:=", m, genie_minusab_mp_int);
1284 a68_op (A68_STD, "*:=", m, genie_timesab_mp_int);
1285 a68_op (A68_STD, "%:=", m, genie_overab_mp);
1286 a68_op (A68_STD, "%*:=", m, genie_modab_mp);
1287 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_int);
1288 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_int);
1289 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_int);
1290 a68_op (A68_STD, "OVERAB", m, genie_overab_mp);
1291 a68_op (A68_STD, "MODAB", m, genie_modab_mp);
1292 m = a68_proc (M_BOOL, M_LONG_INT, M_LONG_INT, NO_MOID);
1293 a68_op (A68_STD, "=", m, genie_eq_mp);
1294 a68_op (A68_STD, "EQ", m, genie_eq_mp);
1295 a68_op (A68_STD, "/=", m, genie_ne_mp);
1296 a68_op (A68_STD, "~=", m, genie_ne_mp);
1297 a68_op (A68_STD, "^=", m, genie_ne_mp);
1298 a68_op (A68_STD, "NE", m, genie_ne_mp);
1299 a68_op (A68_STD, "<", m, genie_lt_mp);
1300 a68_op (A68_STD, "LT", m, genie_lt_mp);
1301 a68_op (A68_STD, "<=", m, genie_le_mp);
1302 a68_op (A68_STD, "LE", m, genie_le_mp);
1303 a68_op (A68_STD, ">", m, genie_gt_mp);
1304 a68_op (A68_STD, "GT", m, genie_gt_mp);
1305 a68_op (A68_STD, ">=", m, genie_ge_mp);
1306 a68_op (A68_STD, "GE", m, genie_ge_mp);
1307 m = a68_proc (M_LONG_REAL, M_LONG_INT, M_LONG_INT, NO_MOID);
1308 a68_op (A68_STD, "/", m, genie_div_mp);
1309 m = a68_proc (M_LONG_INT, M_LONG_INT, M_INT, NO_MOID);
1310 a68_op (A68_STD, "**", m, genie_pow_mp_int_int);
1311 a68_op (A68_STD, "^", m, genie_pow_mp_int_int);
1312 m = a68_proc (M_LONG_COMPLEX, M_LONG_INT, M_LONG_INT, NO_MOID);
1313 a68_op (A68_STD, "I", m, genie_idle);
1314 a68_op (A68_STD, "+*", m, genie_idle);
1315 m = a68_proc (M_LONG_REAL, M_REAL, NO_MOID);
1316 a68_op (A68_STD, "LENG", m, genie_lengthen_real_to_mp);
1317 m = a68_proc (M_REAL, M_LONG_REAL, NO_MOID);
1318 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_real);
1319 // LONG REAL in software
1320 m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1321 a68_op (A68_STD, "+", m, genie_idle);
1322 a68_op (A68_STD, "-", m, genie_minus_mp);
1323 a68_op (A68_STD, "ABS", m, genie_abs_mp);
1324 m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1325 a68_id2 (A68_EXT, "longarccosdg", "dacosdg", m, genie_acosdg_mp);
1326 a68_id2 (A68_EXT, "longarccosh", "dacosh", m, genie_acosh_mp);
1327 a68_id2 (A68_EXT, "longarccot", "dacot", m, genie_acot_mp);
1328 a68_id2 (A68_EXT, "longarccotdg", "dacotdg", m, genie_acosdg_mp);
1329 a68_id2 (A68_EXT, "longarccsc", "dacsc", m, genie_acsc_mp);
1330 a68_id2 (A68_EXT, "longarccscdg", "dacscdg", m, genie_acscdg_mp);
1331 a68_id2 (A68_EXT, "longarcsec", "dasec", m, genie_asec_mp);
1332 a68_id2 (A68_EXT, "longarcsecdg", "dasecdg", m, genie_asecdg_mp);
1333 a68_id2 (A68_EXT, "longarcsindg", "dasindg", m, genie_asindg_mp);
1334 a68_id2 (A68_EXT, "longarcsinh", "dasinh", m, genie_asinh_mp);
1335 a68_id2 (A68_EXT, "longarctandg", "datandg", m, genie_atandg_mp);
1336 a68_id2 (A68_EXT, "longarctanh", "datanh", m, genie_atanh_mp);
1337 a68_id2 (A68_EXT, "longcas", "dcas", m, genie_cas_mp);
1338 a68_id2 (A68_EXT, "longcbrt", "dcbrt", m, genie_curt_mp);
1339 a68_id2 (A68_EXT, "longcosdg", "dcosdg", m, genie_cosdg_mp);
1340 a68_id2 (A68_EXT, "longcosh", "dcosh", m, genie_cosh_mp);
1341 a68_id2 (A68_EXT, "longcospi", "dcospi", m, genie_cospi_mp);
1342 a68_id2 (A68_EXT, "longcot", "dcot", m, genie_cot_mp);
1343 a68_id2 (A68_EXT, "longcotdg", "dcotdg", m, genie_cotdg_mp);
1344 a68_id2 (A68_EXT, "longcotpi", "dcotpi", m, genie_cotpi_mp);
1345 a68_id2 (A68_EXT, "longcsc", "dcsc", m, genie_csc_mp);
1346 a68_id2 (A68_EXT, "longcscdg", "dcscdg", m, genie_cscdg_mp);
1347 a68_id2 (A68_EXT, "longcurt", "dcurt", m, genie_curt_mp);
1348 a68_id2 (A68_EXT, "longerfc", "derfc", m, genie_erfc_mp);
1349 a68_id2 (A68_EXT, "longerf", "derf", m, genie_erf_mp);
1350 a68_id2 (A68_EXT, "longgamma", "dgamma", m, genie_gamma_mp);
1351 a68_id2 (A68_EXT, "longinverfc", "dinverfc", m, genie_inverfc_mp);
1352 a68_id2 (A68_EXT, "longinverf", "dinverf", m, genie_inverf_mp);
1353 a68_id2 (A68_EXT, "longlngamma", "dlngamma", m, genie_lngamma_mp);
1354 a68_id2 (A68_EXT, "longsecdg", "dsecdg", m, genie_secdg_mp);
1355 a68_id2 (A68_EXT, "longsec", "dsec", m, genie_sec_mp);
1356 a68_id2 (A68_EXT, "longsindg", "dsindg", m, genie_sindg_mp);
1357 a68_id2 (A68_EXT, "longsinh", "dsinh", m, genie_sinh_mp);
1358 a68_id2 (A68_EXT, "longsinpi", "dsinpi", m, genie_sinpi_mp);
1359 a68_id2 (A68_EXT, "longtandg", "dtandg", m, genie_tandg_mp);
1360 a68_id2 (A68_EXT, "longtanh", "dtanh", m, genie_tanh_mp);
1361 a68_id2 (A68_EXT, "longtanpi", "dtanpi", m, genie_tanpi_mp);
1362 // RR.
1363 a68_id2 (A68_STD, "longarccos", "dacos", m, genie_acos_mp);
1364 a68_id2 (A68_STD, "longarcsin", "dasin", m, genie_asin_mp);
1365 a68_id2 (A68_STD, "longarctan", "datan", m, genie_atan_mp);
1366 a68_id2 (A68_STD, "longcos", "dcos", m, genie_cos_mp);
1367 a68_id2 (A68_STD, "longexp", "dexp", m, genie_exp_mp);
1368 a68_id2 (A68_STD, "longln", "dln", m, genie_ln_mp);
1369 a68_id2 (A68_STD, "longlog", "dlog", m, genie_log_mp);
1370 a68_id2 (A68_STD, "longsin", "dsin", m, genie_sin_mp);
1371 a68_id2 (A68_STD, "longsqrt", "dsqrt", m, genie_sqrt_mp);
1372 a68_id2 (A68_STD, "longtan", "dtan", m, genie_tan_mp);
1373 m = a68_proc (M_LONG_REAL, NO_MOID);
1374 a68_idf (A68_STD, "longnextrandom", m, genie_long_next_random);
1375 a68_idf (A68_STD, "longrandom", m, genie_long_next_random);
1376 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1377 a68_id2 (A68_EXT, "longarctan2", "datan2", m, genie_atan2_mp);
1378 a68_id2 (A68_EXT, "longarctan2dg", "datan2dg", m, genie_atan2dg_mp);
1379 a68_id2 (A68_EXT, "longbeta", "dbeta", m, genie_beta_mp);
1380 a68_id2 (A68_EXT, "longgammainc", "dgammainc", m, genie_gamma_inc_h_mp);
1381 a68_id2 (A68_EXT, "longgammaincf", "dgammaincf", m, genie_gamma_inc_f_mp);
1382 a68_id2 (A68_EXT, "longgammaincgf", "dgammaincgf", m, genie_gamma_inc_gf_mp);
1383 a68_id2 (A68_EXT, "longlnbeta", "dlnbeta", m, genie_lnbeta_mp);
1384 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1385 a68_id2 (A68_EXT, "longbetainc", "dbetainc", m, genie_beta_inc_mp);
1386 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1387 a68_id2 (A68_EXT, "longgammaincg", "dgammaincg", m, genie_gamma_inc_g_mp);
1388 m = a68_proc (M_INT, M_LONG_REAL, NO_MOID);
1389 a68_op (A68_STD, "SIGN", m, genie_sign_mp);
1390 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1391 a68_op (A68_STD, "+", m, genie_add_mp);
1392 a68_op (A68_STD, "-", m, genie_sub_mp);
1393 a68_op (A68_STD, "*", m, genie_mul_mp);
1394 a68_op (A68_STD, "/", m, genie_div_mp);
1395 a68_op (A68_STD, "**", m, genie_pow_mp);
1396 a68_op (A68_STD, "UP", m, genie_pow_mp);
1397 a68_op (A68_STD, "^", m, genie_pow_mp);
1398 m = a68_proc (M_REF_LONG_REAL, M_REF_LONG_REAL, M_LONG_REAL, NO_MOID);
1399 a68_op (A68_STD, "+:=", m, genie_plusab_mp);
1400 a68_op (A68_STD, "-:=", m, genie_minusab_mp);
1401 a68_op (A68_STD, "*:=", m, genie_timesab_mp);
1402 a68_op (A68_STD, "/:=", m, genie_divab_mp);
1403 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp);
1404 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp);
1405 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp);
1406 a68_op (A68_STD, "DIVAB", m, genie_divab_mp);
1407 m = a68_proc (M_BOOL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1408 a68_op (A68_STD, "=", m, genie_eq_mp);
1409 a68_op (A68_STD, "EQ", m, genie_eq_mp);
1410 a68_op (A68_STD, "/=", m, genie_ne_mp);
1411 a68_op (A68_STD, "~=", m, genie_ne_mp);
1412 a68_op (A68_STD, "^=", m, genie_ne_mp);
1413 a68_op (A68_STD, "NE", m, genie_ne_mp);
1414 a68_op (A68_STD, "<", m, genie_lt_mp);
1415 a68_op (A68_STD, "LT", m, genie_lt_mp);
1416 a68_op (A68_STD, "<=", m, genie_le_mp);
1417 a68_op (A68_STD, "LE", m, genie_le_mp);
1418 a68_op (A68_STD, ">", m, genie_gt_mp);
1419 a68_op (A68_STD, "GT", m, genie_gt_mp);
1420 a68_op (A68_STD, ">=", m, genie_ge_mp);
1421 a68_op (A68_STD, "GE", m, genie_ge_mp);
1422 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_INT, NO_MOID);
1423 a68_op (A68_STD, "**", m, genie_pow_mp_int);
1424 a68_op (A68_STD, "UP", m, genie_pow_mp_int);
1425 a68_op (A68_STD, "^", m, genie_pow_mp_int);
1426 m = a68_proc (M_LONG_COMPLEX, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1427 a68_op (A68_STD, "I", m, genie_idle);
1428 a68_op (A68_STD, "+*", m, genie_idle);
1429 // LONG COMPLEX in software
1430 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1431 a68_op (A68_STD, "LENG", m, genie_lengthen_mp_complex_to_long_mp_complex);
1432 m = a68_proc (M_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1433 a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_complex_to_mp_complex);
1434 m = a68_proc (M_LONG_COMPLEX, M_COMPLEX, NO_MOID);
1435 a68_op (A68_STD, "LENG", m, genie_lengthen_complex_to_mp_complex);
1436 m = a68_proc (M_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1437 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_complex_to_complex);
1438 m = a68_proc (M_LONG_REAL, M_LONG_COMPLEX, NO_MOID);
1439 a68_op (A68_STD, "RE", m, genie_re_mp_complex);
1440 a68_op (A68_STD, "IM", m, genie_im_mp_complex);
1441 a68_op (A68_STD, "ARG", m, genie_arg_mp_complex);
1442 a68_op (A68_STD, "ABS", m, genie_abs_mp_complex);
1443 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1444 a68_op (A68_STD, "+", m, genie_idle);
1445 a68_op (A68_STD, "-", m, genie_minus_mp_complex);
1446 a68_op (A68_STD, "CONJ", m, genie_conj_mp_complex);
1447 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1448 a68_op (A68_STD, "+", m, genie_add_mp_complex);
1449 a68_op (A68_STD, "-", m, genie_sub_mp_complex);
1450 a68_op (A68_STD, "*", m, genie_mul_mp_complex);
1451 a68_op (A68_STD, "/", m, genie_div_mp_complex);
1452 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_INT, NO_MOID);
1453 a68_op (A68_STD, "**", m, genie_pow_mp_complex_int);
1454 a68_op (A68_STD, "UP", m, genie_pow_mp_complex_int);
1455 a68_op (A68_STD, "^", m, genie_pow_mp_complex_int);
1456 m = a68_proc (M_BOOL, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1457 a68_op (A68_STD, "=", m, genie_eq_mp_complex);
1458 a68_op (A68_STD, "EQ", m, genie_eq_mp_complex);
1459 a68_op (A68_STD, "/=", m, genie_ne_mp_complex);
1460 a68_op (A68_STD, "~=", m, genie_ne_mp_complex);
1461 a68_op (A68_STD, "^=", m, genie_ne_mp_complex);
1462 a68_op (A68_STD, "NE", m, genie_ne_mp_complex);
1463 m = a68_proc (M_REF_LONG_COMPLEX, M_REF_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1464 a68_op (A68_STD, "+:=", m, genie_plusab_mp_complex);
1465 a68_op (A68_STD, "-:=", m, genie_minusab_mp_complex);
1466 a68_op (A68_STD, "*:=", m, genie_timesab_mp_complex);
1467 a68_op (A68_STD, "/:=", m, genie_divab_mp_complex);
1468 a68_op (A68_STD, "PLUSAB", m, genie_plusab_mp_complex);
1469 a68_op (A68_STD, "MINUSAB", m, genie_minusab_mp_complex);
1470 a68_op (A68_STD, "TIMESAB", m, genie_timesab_mp_complex);
1471 a68_op (A68_STD, "DIVAB", m, genie_divab_mp_complex);
1472 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1473 a68_id2 (A68_EXT, "longcomplexarccos", "dcacos", m, genie_acos_mp_complex);
1474 a68_id2 (A68_EXT, "longcomplexarccosh", "dcacosh", m, genie_acosh_mp_complex);
1475 a68_id2 (A68_EXT, "longcomplexarcsin", "dcasin", m, genie_asin_mp_complex);
1476 a68_id2 (A68_EXT, "longcomplexarcsinh", "dcasinh", m, genie_asinh_mp_complex);
1477 a68_id2 (A68_EXT, "longcomplexarctan", "dcatan", m, genie_atan_mp_complex);
1478 a68_id2 (A68_EXT, "longcomplexarctanh", "dcatanh", m, genie_atanh_mp_complex);
1479 a68_id2 (A68_EXT, "longcomplexcos", "dccos", m, genie_cos_mp_complex);
1480 a68_id2 (A68_EXT, "longcomplexcosh", "dccosh", m, genie_cosh_mp_complex);
1481 a68_id2 (A68_EXT, "longcomplexexp", "dcexp", m, genie_exp_mp_complex);
1482 a68_id2 (A68_EXT, "longcomplexln", "dcln", m, genie_ln_mp_complex);
1483 a68_id2 (A68_EXT, "longcomplexsin", "dcsin", m, genie_sin_mp_complex);
1484 a68_id2 (A68_EXT, "longcomplexsinh", "dcsin", m, genie_sinh_mp_complex);
1485 a68_id2 (A68_EXT, "longcomplexsqrt", "dcsqrt", m, genie_sqrt_mp_complex);
1486 a68_id2 (A68_EXT, "longcomplextan", "dctan", m, genie_tan_mp_complex);
1487 a68_id2 (A68_EXT, "longcomplextanh", "dctanh", m, genie_tanh_mp_complex);
1488
1489 // LONG BITS in software
1490 m = a68_proc (M_LONG_BITS, M_ROW_BOOL, NO_MOID);
1491 a68_idf (A68_STD, "longbitspack", m, genie_long_bits_pack);
1492 m = a68_proc (M_LONG_INT, M_LONG_BITS, NO_MOID);
1493 a68_op (A68_STD, "ABS", m, genie_idle);
1494 m = a68_proc (M_LONG_BITS, M_LONG_INT, NO_MOID);
1495 a68_op (A68_STD, "BIN", m, genie_bin_mp);
1496 m = a68_proc (M_BITS, M_LONG_BITS, NO_MOID);
1497 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_bits);
1498 m = a68_proc (M_LONG_BITS, M_BITS, NO_MOID);
1499 a68_op (A68_STD, "LENG", m, genie_lengthen_unt_to_mp);
1500 m = a68_proc (M_LONG_BITS, M_LONG_BITS, NO_MOID);
1501 a68_op (A68_STD, "NOT", m, genie_not_mp);
1502 a68_op (A68_STD, "~", m, genie_not_mp);
1503 m = a68_proc (M_BOOL, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1504 a68_op (A68_STD, "=", m, genie_eq_mp);
1505 a68_op (A68_STD, "EQ", m, genie_eq_mp);
1506 a68_op (A68_STD, "/=", m, genie_ne_mp);
1507 a68_op (A68_STD, "~=", m, genie_ne_mp);
1508 a68_op (A68_STD, "^=", m, genie_ne_mp);
1509 a68_op (A68_STD, "NE", m, genie_ne_mp);
1510 a68_op (A68_STD, "<=", m, genie_le_long_bits);
1511 a68_op (A68_STD, "LE", m, genie_le_long_bits);
1512 a68_op (A68_STD, ">=", m, genie_ge_long_bits);
1513 a68_op (A68_STD, "GE", m, genie_ge_long_bits);
1514 m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1515 a68_op (A68_STD, "AND", m, genie_and_mp);
1516 a68_op (A68_STD, "&", m, genie_and_mp);
1517 a68_op (A68_STD, "OR", m, genie_or_mp);
1518 a68_op (A68_EXT, "XOR", m, genie_xor_mp);
1519 m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_INT, NO_MOID);
1520 a68_op (A68_STD, "SHL", m, genie_shl_mp);
1521 a68_op (A68_STD, "UP", m, genie_shl_mp);
1522 a68_op (A68_STD, "SHR", m, genie_shr_mp);
1523 a68_op (A68_STD, "DOWN", m, genie_shr_mp);
1524 m = a68_proc (M_BOOL, M_INT, M_LONG_BITS, NO_MOID);
1525 a68_op (A68_STD, "ELEM", m, genie_elem_long_bits);
1526 m = a68_proc (M_LONG_BITS, M_INT, M_LONG_BITS, NO_MOID);
1527 a68_op (A68_STD, "SET", m, genie_set_long_bits);
1528 a68_op (A68_STD, "CLEAR", m, genie_clear_long_bits);
1529 #endif
1530 }
1531
1532 void stand_mp_level_3 (void)
1533 {
1534 #if (A68_LEVEL >= 3)
1535 a68_id2 (A68_STD, "longpi", "dpi", M_LONG_REAL, genie_pi_double);
1536 a68_idf (A68_STD, "longmaxbits", M_LONG_BITS, genie_double_max_bits);
1537 a68_idf (A68_STD, "longmaxint", M_LONG_INT, genie_double_max_int);
1538 a68_idf (A68_STD, "longsmallreal", M_LONG_REAL, genie_double_small_real);
1539 a68_idf (A68_STD, "longmaxreal", M_LONG_REAL, genie_double_max_real);
1540 a68_idf (A68_STD, "longminreal", M_LONG_REAL, genie_double_min_real);
1541 a68_idf (A68_STD, "longinfinity", M_LONG_REAL, genie_infinity_double);
1542 a68_idf (A68_STD, "longminusinfinity", M_LONG_REAL, genie_minus_infinity_double);
1543 a68_idf (A68_STD, "longinf", M_LONG_REAL, genie_infinity_double);
1544 a68_idf (A68_STD, "longmininf", M_LONG_REAL, genie_minus_infinity_double);
1545 // LONG INT as 128 bit
1546 MOID_T *m = a68_proc (M_LONG_INT, M_LONG_INT, NO_MOID);
1547 a68_op (A68_STD, "+", m, genie_idle);
1548 a68_op (A68_STD, "-", m, genie_minus_double_int);
1549 a68_op (A68_STD, "ABS", m, genie_abs_double_int);
1550 m = a68_proc (M_LONG_INT, M_INT, NO_MOID);
1551 a68_op (A68_STD, "LENG", m, genie_lengthen_int_to_double_int);
1552 m = a68_proc (M_LONG_LONG_INT, M_LONG_INT, NO_MOID);
1553 a68_op (A68_STD, "LENG", m, genie_lengthen_double_int_to_mp);
1554 m = a68_proc (M_INT, M_LONG_INT, NO_MOID);
1555 a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_int_to_int);
1556 a68_op (A68_STD, "SIGN", m, genie_sign_double_int);
1557 m = a68_proc (M_BOOL, M_LONG_INT, NO_MOID);
1558 a68_op (A68_STD, "ODD", m, genie_odd_double_int);
1559 m = a68_proc (M_LONG_INT, M_LONG_REAL, NO_MOID);
1560 a68_op (A68_STD, "ENTIER", m, genie_entier_double);
1561 a68_op (A68_STD, "ROUND", m, genie_round_double);
1562 m = a68_proc (M_LONG_INT, M_LONG_INT, M_LONG_INT, NO_MOID);
1563 a68_op (A68_STD, "+", m, genie_add_double_int);
1564 a68_op (A68_STD, "-", m, genie_sub_double_int);
1565 a68_op (A68_STD, "*", m, genie_mul_double_int);
1566 a68_op (A68_STD, "OVER", m, genie_over_double_int);
1567 a68_op (A68_STD, "%", m, genie_over_double_int);
1568 a68_op (A68_STD, "MOD", m, genie_mod_double_int);
1569 a68_op (A68_STD, "%*", m, genie_mod_double_int);
1570 m = a68_proc (M_LONG_INT, M_LONG_INT, M_INT, NO_MOID);
1571 a68_op (A68_STD, "**", m, genie_pow_double_int_int);
1572 a68_op (A68_STD, "^", m, genie_pow_double_int_int);
1573 m = a68_proc (M_REF_LONG_INT, M_REF_LONG_INT, M_LONG_INT, NO_MOID);
1574 a68_op (A68_STD, "+:=", m, genie_plusab_double_int);
1575 a68_op (A68_STD, "-:=", m, genie_minusab_double_int);
1576 a68_op (A68_STD, "*:=", m, genie_timesab_double_int);
1577 a68_op (A68_STD, "%:=", m, genie_overab_double_int);
1578 a68_op (A68_STD, "%*:=", m, genie_modab_double_int);
1579 a68_op (A68_STD, "PLUSAB", m, genie_plusab_double_int);
1580 a68_op (A68_STD, "MINUSAB", m, genie_minusab_double_int);
1581 a68_op (A68_STD, "TIMESAB", m, genie_timesab_double_int);
1582 a68_op (A68_STD, "OVERAB", m, genie_overab_double_int);
1583 a68_op (A68_STD, "MODAB", m, genie_modab_double_int);
1584 m = a68_proc (M_LONG_REAL, M_LONG_INT, M_LONG_INT, NO_MOID);
1585 a68_op (A68_STD, "/", m, genie_div_double_int);
1586 m = a68_proc (M_BOOL, M_LONG_INT, M_LONG_INT, NO_MOID);
1587 a68_op (A68_STD, "=", m, genie_eq_double_int);
1588 a68_op (A68_STD, "EQ", m, genie_eq_double_int);
1589 a68_op (A68_STD, "/=", m, genie_ne_double_int);
1590 a68_op (A68_STD, "~=", m, genie_ne_double_int);
1591 a68_op (A68_STD, "^=", m, genie_ne_double_int);
1592 a68_op (A68_STD, "NE", m, genie_ne_double_int);
1593 a68_op (A68_STD, "<", m, genie_lt_double_int);
1594 a68_op (A68_STD, "LT", m, genie_lt_double_int);
1595 a68_op (A68_STD, "<=", m, genie_le_double_int);
1596 a68_op (A68_STD, "LE", m, genie_le_double_int);
1597 a68_op (A68_STD, ">", m, genie_gt_double_int);
1598 a68_op (A68_STD, "GT", m, genie_gt_double_int);
1599 a68_op (A68_STD, ">=", m, genie_ge_double_int);
1600 a68_op (A68_STD, "GE", m, genie_ge_double_int);
1601 // LONG REAL as 128 bit
1602 m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1603 a68_op (A68_STD, "+", m, genie_idle);
1604 a68_op (A68_STD, "-", m, genie_minus_double);
1605 a68_op (A68_STD, "ABS", m, genie_abs_double);
1606 m = a68_proc (M_INT, M_LONG_REAL, NO_MOID);
1607 a68_op (A68_STD, "SIGN", m, genie_sign_double);
1608 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1609 a68_op (A68_STD, "+", m, genie_add_double);
1610 a68_op (A68_STD, "-", m, genie_sub_double);
1611 a68_op (A68_STD, "*", m, genie_mul_double);
1612 a68_op (A68_STD, "/", m, genie_over_double);
1613 a68_op (A68_STD, "**", m, genie_pow_double);
1614 a68_op (A68_STD, "UP", m, genie_pow_double);
1615 a68_op (A68_STD, "^", m, genie_pow_double);
1616 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_INT, NO_MOID);
1617 a68_op (A68_STD, "**", m, genie_pow_double_int);
1618 a68_op (A68_STD, "UP", m, genie_pow_double_int);
1619 a68_op (A68_STD, "^", m, genie_pow_double_int);
1620 m = a68_proc (M_LONG_REAL, M_REAL, NO_MOID);
1621 a68_op (A68_STD, "LENG", m, genie_lengthen_real_to_double);
1622 m = a68_proc (M_REAL, M_LONG_REAL, NO_MOID);
1623 a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_to_real);
1624 m = a68_proc (M_LONG_LONG_REAL, M_LONG_REAL, NO_MOID);
1625 a68_op (A68_STD, "LENG", m, genie_lengthen_double_to_mp);
1626 m = a68_proc (M_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1627 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_double);
1628 m = a68_proc (M_LONG_INT, M_LONG_LONG_INT, NO_MOID);
1629 a68_op (A68_STD, "SHORTEN", m, genie_shorten_mp_to_double_int);
1630 m = a68_proc (M_REF_LONG_REAL, M_REF_LONG_REAL, M_LONG_REAL, NO_MOID);
1631 a68_op (A68_STD, "+:=", m, genie_plusab_double);
1632 a68_op (A68_STD, "-:=", m, genie_minusab_double);
1633 a68_op (A68_STD, "*:=", m, genie_timesab_double);
1634 a68_op (A68_STD, "/:=", m, genie_divab_double);
1635 a68_op (A68_STD, "PLUSAB", m, genie_plusab_double);
1636 a68_op (A68_STD, "MINUSAB", m, genie_minusab_double);
1637 a68_op (A68_STD, "TIMESAB", m, genie_timesab_double);
1638 a68_op (A68_STD, "DIVAB", m, genie_divab_double);
1639 m = a68_proc (M_BOOL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1640 a68_op (A68_STD, "=", m, genie_eq_double);
1641 a68_op (A68_STD, "EQ", m, genie_eq_double);
1642 a68_op (A68_STD, "/=", m, genie_ne_double);
1643 a68_op (A68_STD, "~=", m, genie_ne_double);
1644 a68_op (A68_STD, "^=", m, genie_ne_double);
1645 a68_op (A68_STD, "NE", m, genie_ne_double);
1646 a68_op (A68_STD, "<", m, genie_lt_double);
1647 a68_op (A68_STD, "LT", m, genie_lt_double);
1648 a68_op (A68_STD, "<=", m, genie_le_double);
1649 a68_op (A68_STD, "LE", m, genie_le_double);
1650 a68_op (A68_STD, ">", m, genie_gt_double);
1651 a68_op (A68_STD, "GT", m, genie_gt_double);
1652 a68_op (A68_STD, ">=", m, genie_ge_double);
1653 a68_op (A68_STD, "GE", m, genie_ge_double);
1654 m = a68_proc (M_LONG_REAL, M_LONG_REAL, NO_MOID);
1655 a68_id2 (A68_EXT, "longarccosdg", "dacosdg", m, genie_acosdg_double);
1656 a68_id2 (A68_EXT, "longarccosh", "dacosh", m, genie_acosh_double);
1657 a68_id2 (A68_EXT, "longarccotdg", "dacotdg", m, genie_acotdg_double);
1658 a68_id2 (A68_EXT, "longarccot", "dacot", m, genie_acot_double);
1659 a68_id2 (A68_EXT, "longarccsc", "dacsc", m, genie_acsc_double);
1660 a68_id2 (A68_EXT, "longarccscdg", "dacscdg", m, genie_acscdg_double);
1661 a68_id2 (A68_EXT, "longarcsecdg", "dasecdg", m, genie_asecdg_double);
1662 a68_id2 (A68_EXT, "longarcsindg", "dasindg", m, genie_asindg_double);
1663 a68_id2 (A68_EXT, "longarcsinh", "dasinh", m, genie_asinh_double);
1664 a68_id2 (A68_EXT, "longarctandg", "datandg", m, genie_atandg_double);
1665 a68_id2 (A68_EXT, "longarctanh", "datanh", m, genie_atanh_double);
1666 a68_id2 (A68_EXT, "longcbrt", "dcbrt", m, genie_curt_double);
1667 a68_id2 (A68_EXT, "longcosdg", "dcosdg", m, genie_cosdg_double);
1668 a68_id2 (A68_EXT, "longcosh", "dcosh", m, genie_cosh_double);
1669 a68_id2 (A68_EXT, "longcospi", "dcospi", m, genie_cospi_double);
1670 a68_id2 (A68_EXT, "longcotdg", "dcotdg", m, genie_cotdg_double);
1671 a68_id2 (A68_EXT, "longcot", "dcot", m, genie_cot_double);
1672 a68_id2 (A68_EXT, "longcotpi", "dcotpi", m, genie_cotpi_double);
1673 a68_id2 (A68_EXT, "longcsc", "dcsc", m, genie_csc_double);
1674 a68_id2 (A68_EXT, "longcscdg", "dcscdg", m, genie_cscdg_double);
1675 a68_id2 (A68_EXT, "longcurt", "dcurt", m, genie_curt_double);
1676 a68_id2 (A68_EXT, "longerfc", "derfc", m, genie_erfc_double);
1677 a68_id2 (A68_EXT, "longerf", "derf", m, genie_erf_double);
1678 a68_id2 (A68_EXT, "longinverfc", "dinverfc", m, genie_inverfc_double);
1679 a68_id2 (A68_EXT, "longinverf", "dinverf", m, genie_inverf_double);
1680 a68_id2 (A68_EXT, "longgamma", "dgamma", m, genie_gamma_double);
1681 a68_id2 (A68_EXT, "longlngamma", "dlngamma", m, genie_lngamma_double);
1682 a68_id2 (A68_EXT, "longsec", "dsec", m, genie_sec_double);
1683 a68_id2 (A68_EXT, "longsecdg", "dsecdg", m, genie_secdg_double);
1684 a68_id2 (A68_EXT, "longsindg", "dsindg", m, genie_sindg_double);
1685 a68_id2 (A68_EXT, "longsinh", "dsinh", m, genie_sinh_double);
1686 a68_id2 (A68_EXT, "longsinpi", "dsinpi", m, genie_sinpi_double);
1687 a68_id2 (A68_EXT, "longtandg", "dtandg", m, genie_tandg_double);
1688 a68_id2 (A68_EXT, "longtanh", "dtanh", m, genie_tanh_double);
1689 a68_id2 (A68_EXT, "longtanpi", "dtanpi", m, genie_tanpi_double);
1690 a68_id2 (A68_STD, "longarccos", "dacos", m, genie_acos_double);
1691 a68_id2 (A68_STD, "longarcsin", "dasin", m, genie_asin_double);
1692 a68_id2 (A68_STD, "longarctan", "datan", m, genie_atan_double);
1693 a68_id2 (A68_EXT, "longcas", "dcas", m, genie_cas_double);
1694 a68_id2 (A68_STD, "longcos", "dcos", m, genie_cos_double);
1695 a68_id2 (A68_STD, "longexp", "dexp", m, genie_exp_double);
1696 a68_id2 (A68_STD, "longln", "dln", m, genie_ln_double);
1697 a68_id2 (A68_STD, "longlog", "dlog", m, genie_log_double);
1698 a68_id2 (A68_STD, "longsin", "dsin", m, genie_sin_double);
1699 a68_id2 (A68_STD, "longsqrt", "dsqrt", m, genie_sqrt_double);
1700 a68_id2 (A68_STD, "longtan", "dtan", m, genie_tan_double);
1701 m = a68_proc (M_LONG_REAL, NO_MOID);
1702 a68_idf (A68_STD, "longnextrandom", m, genie_next_random_double);
1703 a68_idf (A68_STD, "longrandom", m, genie_next_random_double);
1704 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1705 a68_id2 (A68_EXT, "longarctan2dg", "datan2dg", m, genie_atan2dg_double);
1706 a68_id2 (A68_EXT, "longarctan2", "datan2", m, genie_atan2_double);
1707 a68_id2 (A68_EXT, "longbeta", "dbeta", m, genie_beta_double);
1708 a68_id2 (A68_EXT, "longgammaincgf", "dgammaincgf", m, genie_gamma_inc_gf_double);
1709 a68_id2 (A68_EXT, "longgammaincf", "dgammaincf", m, genie_gamma_inc_f_double);
1710 a68_id2 (A68_EXT, "longgammainc", "dgammainc", m, genie_gamma_inc_h_double);
1711 a68_id2 (A68_EXT, "longlnbeta", "dlnbeta", m, genie_ln_beta_double);
1712 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1713 a68_id2 (A68_EXT, "longbetainc", "dbetainc", m, genie_beta_inc_cf_double);
1714 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1715 a68_id2 (A68_EXT, "longgammaincg", "dgammaincg", m, genie_gamma_inc_g_double);
1716 // LONG BITS as 128 bit
1717 m = a68_proc (M_LONG_BITS, M_ROW_BOOL, NO_MOID);
1718 a68_idf (A68_STD, "longbitspack", m, genie_double_bits_pack);
1719 m = a68_proc (M_BITS, M_LONG_BITS, NO_MOID);
1720 a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_bits_to_bits);
1721 m = a68_proc (M_LONG_BITS, M_BITS, NO_MOID);
1722 a68_op (A68_STD, "LENG", m, genie_lengthen_bits_to_double_bits);
1723 m = a68_proc (M_LONG_INT, M_LONG_BITS, NO_MOID);
1724 a68_op (A68_STD, "ABS", m, genie_idle);
1725 m = a68_proc (M_LONG_BITS, M_LONG_INT, NO_MOID);
1726 a68_op (A68_STD, "BIN", m, genie_bin_double_int);
1727 m = a68_proc (M_LONG_BITS, M_LONG_BITS, NO_MOID);
1728 a68_op (A68_STD, "NOT", m, genie_not_double_bits);
1729 a68_op (A68_STD, "~", m, genie_not_double_bits);
1730 m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1731 a68_op (A68_STD, "AND", m, genie_and_double_bits);
1732 a68_op (A68_STD, "&", m, genie_and_double_bits);
1733 a68_op (A68_STD, "OR", m, genie_or_double_bits);
1734 a68_op (A68_EXT, "XOR", m, genie_xor_double_bits);
1735 a68_op (A68_EXT, "+", m, genie_add_double_bits);
1736 a68_op (A68_EXT, "-", m, genie_sub_double_bits);
1737 a68_op (A68_EXT, "*", m, genie_times_double_bits);
1738 a68_op (A68_EXT, "OVER", m, genie_over_double_bits);
1739 a68_op (A68_EXT, "MOD", m, genie_over_double_bits);
1740 m = a68_proc (M_BOOL, M_LONG_BITS, M_LONG_BITS, NO_MOID);
1741 a68_op (A68_STD, "=", m, genie_eq_double_bits);
1742 a68_op (A68_STD, "/=", m, genie_ne_double_bits);
1743 a68_op (A68_STD, "~=", m, genie_ne_double_bits);
1744 a68_op (A68_STD, "^=", m, genie_ne_double_bits);
1745 a68_op (A68_STD, "<=", m, genie_le_double_bits);
1746 a68_op (A68_STD, ">=", m, genie_ge_double_bits);
1747 a68_op (A68_STD, "EQ", m, genie_eq_double_bits);
1748 a68_op (A68_STD, "NE", m, genie_ne_double_bits);
1749 a68_op (A68_STD, "LE", m, genie_le_double_bits);
1750 a68_op (A68_STD, "GE", m, genie_ge_double_bits);
1751 a68_op (A68_EXT, "<", m, genie_lt_double_bits);
1752 a68_op (A68_EXT, ">", m, genie_gt_double_bits);
1753 a68_op (A68_EXT, "LT", m, genie_lt_double_bits);
1754 a68_op (A68_EXT, "GT", m, genie_gt_double_bits);
1755 m = a68_proc (M_BOOL, M_INT, M_LONG_BITS, NO_MOID);
1756 a68_op (A68_STD, "ELEM", m, genie_elem_double_bits);
1757 m = a68_proc (M_LONG_BITS, M_INT, M_LONG_BITS, NO_MOID);
1758 a68_op (A68_STD, "SET", m, genie_set_double_bits);
1759 a68_op (A68_STD, "CLEAR", m, genie_clear_double_bits);
1760 m = a68_proc (M_LONG_BITS, M_LONG_BITS, M_INT, NO_MOID);
1761 a68_op (A68_STD, "SHL", m, genie_shl_double_bits);
1762 a68_op (A68_STD, "UP", m, genie_shl_double_bits);
1763 a68_op (A68_STD, "SHR", m, genie_shr_double_bits);
1764 a68_op (A68_STD, "DOWN", m, genie_shr_double_bits);
1765 a68_op (A68_EXT, "ROL", m, genie_rol_double_bits);
1766 a68_op (A68_EXT, "ROR", m, genie_ror_double_bits);
1767 // LONG COMPLEX as 2 x 128 bit.
1768 m = a68_proc (M_LONG_COMPLEX, M_COMPLEX, NO_MOID);
1769 a68_op (A68_STD, "LENG", m, genie_lengthen_complex_to_double_compl);
1770 m = a68_proc (M_LONG_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1771 a68_op (A68_STD, "LENG", m, genie_lengthen_double_compl_to_long_mp_complex);
1772 m = a68_proc (M_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1773 a68_op (A68_STD, "SHORTEN", m, genie_shorten_double_compl_to_complex);
1774 m = a68_proc (M_LONG_COMPLEX, M_LONG_LONG_COMPLEX, NO_MOID);
1775 a68_op (A68_STD, "SHORTEN", m, genie_shorten_long_mp_complex_to_double_compl);
1776 m = a68_proc (M_LONG_COMPLEX, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1777 a68_op (A68_STD, "I", m, genie_i_double_compl);
1778 a68_op (A68_STD, "+*", m, genie_i_double_compl);
1779 m = a68_proc (M_LONG_COMPLEX, M_LONG_INT, M_LONG_INT, NO_MOID);
1780 a68_op (A68_STD, "I", m, genie_i_int_double_compl);
1781 a68_op (A68_STD, "+*", m, genie_i_int_double_compl);
1782 m = a68_proc (M_LONG_REAL, M_LONG_COMPLEX, NO_MOID);
1783 a68_op (A68_STD, "RE", m, genie_re_double_compl);
1784 a68_op (A68_STD, "IM", m, genie_im_double_compl);
1785 a68_op (A68_STD, "ABS", m, genie_abs_double_compl);
1786 a68_op (A68_STD, "ARG", m, genie_arg_double_compl);
1787 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1788 a68_op (A68_STD, "+", m, genie_idle);
1789 a68_op (A68_STD, "-", m, genie_minus_double_compl);
1790 a68_op (A68_STD, "CONJ", m, genie_conj_double_compl);
1791 m = a68_proc (M_BOOL, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1792 a68_op (A68_STD, "=", m, genie_eq_double_compl);
1793 a68_op (A68_STD, "/=", m, genie_ne_double_compl);
1794 a68_op (A68_STD, "~=", m, genie_ne_double_compl);
1795 a68_op (A68_STD, "^=", m, genie_ne_double_compl);
1796 a68_op (A68_STD, "EQ", m, genie_eq_double_compl);
1797 a68_op (A68_STD, "NE", m, genie_ne_double_compl);
1798 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1799 a68_op (A68_STD, "+", m, genie_add_double_compl);
1800 a68_op (A68_STD, "-", m, genie_sub_double_compl);
1801 a68_op (A68_STD, "*", m, genie_mul_double_compl);
1802 a68_op (A68_STD, "/", m, genie_div_double_compl);
1803 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, M_INT, NO_MOID);
1804 a68_op (A68_STD, "**", m, genie_pow_double_compl_int);
1805 a68_op (A68_STD, "UP", m, genie_pow_double_compl_int);
1806 a68_op (A68_STD, "^", m, genie_pow_double_compl_int);
1807 m = a68_proc (M_REF_LONG_COMPLEX, M_REF_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1808 a68_op (A68_STD, "+:=", m, genie_plusab_double_compl);
1809 a68_op (A68_STD, "-:=", m, genie_minusab_double_compl);
1810 a68_op (A68_STD, "*:=", m, genie_timesab_double_compl);
1811 a68_op (A68_STD, "/:=", m, genie_divab_double_compl);
1812 a68_op (A68_STD, "PLUSAB", m, genie_plusab_double_compl);
1813 a68_op (A68_STD, "MINUSAB", m, genie_minusab_double_compl);
1814 a68_op (A68_STD, "TIMESAB", m, genie_timesab_double_compl);
1815 a68_op (A68_STD, "DIVAB", m, genie_divab_double_compl);
1816 m = a68_proc (M_LONG_COMPLEX, M_LONG_COMPLEX, NO_MOID);
1817 a68_id2 (A68_EXT, "longcomplexarccosh", "dcacosh", m, genie_acosh_double_compl);
1818 a68_id2 (A68_EXT, "longcomplexarccos", "dcacos", m, genie_acos_double_compl);
1819 a68_id2 (A68_EXT, "longcomplexarcsinh", "dcasinh", m, genie_asinh_double_compl);
1820 a68_id2 (A68_EXT, "longcomplexarcsin", "dcasin", m, genie_asin_double_compl);
1821 a68_id2 (A68_EXT, "longcomplexarctanh", "dcatanh", m, genie_atanh_double_compl);
1822 a68_id2 (A68_EXT, "longcomplexarctan", "dcatan", m, genie_atan_double_compl);
1823 a68_id2 (A68_EXT, "longcomplexatanh", "dcatanh", m, genie_atanh_double_compl);
1824 a68_id2 (A68_EXT, "longcomplexcosh", "dccosh", m, genie_cosh_double_compl);
1825 a68_id2 (A68_EXT, "longcomplexcos", "dccos", m, genie_cos_double_compl);
1826 a68_id2 (A68_EXT, "longcomplexexp", "dcexp", m, genie_exp_double_compl);
1827 a68_id2 (A68_EXT, "longcomplexln", "dcln", m, genie_ln_double_compl);
1828 a68_id2 (A68_EXT, "longcomplexsinh", "dcsinh", m, genie_sinh_double_compl);
1829 a68_id2 (A68_EXT, "longcomplexsin", "dcsin", m, genie_sin_double_compl);
1830 a68_id2 (A68_EXT, "longcomplexsqrt", "dcsqrt", m, genie_sqrt_double_compl);
1831 a68_id2 (A68_EXT, "longcomplextanh", "dctanh", m, genie_tanh_double_compl);
1832 a68_id2 (A68_EXT, "longcomplextan", "dctan", m, genie_tan_double_compl);
1833
1834 #if defined (HAVE_GNU_MPFR)
1835 m = a68_proc (M_LONG_REAL, M_LONG_REAL, M_LONG_REAL, NO_MOID);
1836 a68_id2 (A68_EXT, "mpfrlonggammainc", "mpfrdgammainc", m, genie_gamma_inc_double_mpfr);
1837 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1838 a68_id2 (A68_STD, "mpfrlonglongbeta", "mpfrqbeta", m, genie_beta_mpfr);
1839 a68_id2 (A68_STD, "mpfrlonglonggammainc", "mpfrqgammainc", m, genie_gamma_inc_mpfr);
1840 a68_id2 (A68_STD, "mpfrlonglonglnbeta", "mpfrqlnbeta", m, genie_ln_beta_mpfr);
1841 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1842 a68_id2 (A68_STD, "mpfrlonglongbetainc", "mpfrqbetainc", m, genie_beta_inc_mpfr);
1843 m = a68_proc (M_LONG_LONG_REAL, M_LONG_LONG_REAL, NO_MOID);
1844 a68_id2 (A68_EXT, "mpfrlonglongerfc", "mpfrqerfc", m, genie_mpfr_erfc_mp);
1845 a68_id2 (A68_EXT, "mpfrlonglongerf", "mpfrqerf", m, genie_mpfr_erf_mp);
1846 a68_id2 (A68_EXT, "mpfrlonglonggamma", "mpfrqgamma", m, genie_gamma_mpfr);
1847 a68_id2 (A68_EXT, "mpfrlonglonginverfc", "mpfrqinverfc", m, genie_mpfr_inverfc_mp);
1848 a68_id2 (A68_EXT, "mpfrlonglonginverf", "mpfrqinverf", m, genie_mpfr_inverf_mp);
1849 a68_id2 (A68_EXT, "mpfrlonglonglngamma", "mpfrqlngamma", m, genie_lngamma_mpfr);
1850 a68_idf (A68_EXT, "mpfrmp", m, genie_mpfr_mp);
1851 #endif
1852 #endif
1853 }
1854
1855 void stand_transput (void)
1856 {
1857 a68_idf (A68_EXT, "blankcharacter", M_CHAR, genie_blank_char);
1858 a68_idf (A68_EXT, "formfeedcharacter", M_CHAR, genie_formfeed_char);
1859 a68_idf (A68_EXT, "formfeedchar", M_CHAR, genie_formfeed_char);
1860 a68_idf (A68_EXT, "newlinecharacter", M_CHAR, genie_newline_char);
1861 a68_idf (A68_EXT, "newlinechar", M_CHAR, genie_newline_char);
1862 a68_idf (A68_EXT, "nullcharacter", M_CHAR, genie_null_char);
1863 a68_idf (A68_EXT, "tabcharacter", M_CHAR, genie_tab_char);
1864 a68_idf (A68_EXT, "tabchar", M_CHAR, genie_tab_char);
1865 a68_idf (A68_STD, "blankchar", M_CHAR, genie_blank_char);
1866 a68_idf (A68_STD, "blank", M_CHAR, genie_blank_char);
1867 a68_idf (A68_STD, "errorchar", M_CHAR, genie_error_char);
1868 a68_idf (A68_STD, "expchar", M_CHAR, genie_exp_char);
1869 a68_idf (A68_STD, "flip", M_CHAR, genie_flip_char);
1870 a68_idf (A68_STD, "flop", M_CHAR, genie_flop_char);
1871 a68_idf (A68_STD, "nullchar", M_CHAR, genie_null_char);
1872 MOID_T *m = a68_proc (M_STRING, M_HEX_NUMBER, M_INT, M_INT, NO_MOID);
1873 a68_idf (A68_STD, "bits", m, genie_bits);
1874 m = a68_proc (M_STRING, M_NUMBER, M_INT, NO_MOID);
1875 a68_idf (A68_STD, "whole", m, genie_whole);
1876 m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, NO_MOID);
1877 a68_idf (A68_STD, "fixed", m, genie_fixed);
1878 m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, M_INT, NO_MOID);
1879 a68_idf (A68_STD, "float", m, genie_float);
1880 m = a68_proc (M_STRING, M_NUMBER, M_INT, M_INT, M_INT, M_INT, NO_MOID);
1881 a68_idf (A68_STD, "real", m, genie_real);
1882 a68_idf (A68_STD, "standin", M_REF_FILE, genie_stand_in);
1883 a68_idf (A68_STD, "standout", M_REF_FILE, genie_stand_out);
1884 a68_idf (A68_STD, "standback", M_REF_FILE, genie_stand_back);
1885 a68_idf (A68_EXT, "standerror", M_REF_FILE, genie_stand_error);
1886 a68_idf (A68_STD, "standinchannel", M_CHANNEL, genie_stand_in_channel);
1887 a68_idf (A68_STD, "standoutchannel", M_CHANNEL, genie_stand_out_channel);
1888 a68_idf (A68_EXT, "standdrawchannel", M_CHANNEL, genie_stand_draw_channel);
1889 a68_idf (A68_STD, "standbackchannel", M_CHANNEL, genie_stand_back_channel);
1890 a68_idf (A68_EXT, "standerrorchannel", M_CHANNEL, genie_stand_error_channel);
1891 m = a68_proc (M_VOID, M_REF_FILE, M_STRING, NO_MOID);
1892 a68_idf (A68_STD, "maketerm", m, genie_make_term);
1893 m = a68_proc (M_BOOL, M_CHAR, M_REF_INT, M_STRING, NO_MOID);
1894 a68_idf (A68_STD, "charinstring", m, genie_char_in_string);
1895 a68_idf (A68_EXT, "lastcharinstring", m, genie_last_char_in_string);
1896 m = a68_proc (M_BOOL, M_STRING, M_REF_INT, M_STRING, NO_MOID);
1897 a68_idf (A68_EXT, "stringinstring", m, genie_string_in_string);
1898 m = a68_proc (M_STRING, M_REF_FILE, NO_MOID);
1899 a68_idf (A68_EXT, "idf", m, genie_idf);
1900 a68_idf (A68_EXT, "term", m, genie_term);
1901 m = a68_proc (M_STRING, NO_MOID);
1902 a68_idf (A68_EXT, "programidf", m, genie_program_idf);
1903 // Event routines.
1904 m = a68_proc (M_VOID, M_REF_FILE, M_PROC_REF_FILE_BOOL, NO_MOID);
1905 a68_idf (A68_STD, "onfileend", m, genie_on_file_end);
1906 a68_idf (A68_STD, "onpageend", m, genie_on_page_end);
1907 a68_idf (A68_STD, "onlineend", m, genie_on_line_end);
1908 a68_idf (A68_STD, "onlogicalfileend", m, genie_on_file_end);
1909 a68_idf (A68_STD, "onphysicalfileend", m, genie_on_file_end);
1910 a68_idf (A68_STD, "onformatend", m, genie_on_format_end);
1911 a68_idf (A68_STD, "onformaterror", m, genie_on_format_error);
1912 a68_idf (A68_STD, "onvalueerror", m, genie_on_value_error);
1913 a68_idf (A68_STD, "onopenerror", m, genie_on_open_error);
1914 a68_idf (A68_EXT, "ontransputerror", m, genie_on_transput_error);
1915 // Enquiries on files.
1916 a68_idf (A68_EXT, "drawpossible", M_PROC_REF_FILE_BOOL, genie_draw_possible);
1917 a68_idf (A68_EXT, "endoffile", M_PROC_REF_FILE_BOOL, genie_eof);
1918 a68_idf (A68_EXT, "endofline", M_PROC_REF_FILE_BOOL, genie_eoln);
1919 a68_idf (A68_EXT, "eof", M_PROC_REF_FILE_BOOL, genie_eof);
1920 a68_idf (A68_EXT, "eoln", M_PROC_REF_FILE_BOOL, genie_eoln);
1921 a68_idf (A68_EXT, "rewindpossible", M_PROC_REF_FILE_BOOL, genie_reset_possible);
1922 a68_idf (A68_STD, "binpossible", M_PROC_REF_FILE_BOOL, genie_bin_possible);
1923 a68_idf (A68_STD, "compressible", M_PROC_REF_FILE_BOOL, genie_compressible);
1924 a68_idf (A68_STD, "getpossible", M_PROC_REF_FILE_BOOL, genie_get_possible);
1925 a68_idf (A68_STD, "putpossible", M_PROC_REF_FILE_BOOL, genie_put_possible);
1926 a68_idf (A68_STD, "reidfpossible", M_PROC_REF_FILE_BOOL, genie_reidf_possible);
1927 a68_idf (A68_STD, "resetpossible", M_PROC_REF_FILE_BOOL, genie_reset_possible);
1928 a68_idf (A68_STD, "setpossible", M_PROC_REF_FILE_BOOL, genie_set_possible);
1929 // Handling of files.
1930 m = a68_proc (M_INT, M_REF_FILE, M_STRING, M_CHANNEL, NO_MOID);
1931 a68_idf (A68_STD, "open", m, genie_open);
1932 a68_idf (A68_STD, "establish", m, genie_establish);
1933 m = a68_proc (M_VOID, M_REF_FILE, M_REF_STRING, NO_MOID);
1934 a68_idf (A68_STD, "associate", m, genie_associate);
1935 m = a68_proc (M_INT, M_REF_FILE, M_CHANNEL, NO_MOID);
1936 a68_idf (A68_EXT, "rewind", M_PROC_REF_FILE_VOID, genie_reset);
1937 a68_idf (A68_STD, "backspace", M_PROC_REF_FILE_VOID, genie_backspace);
1938 a68_idf (A68_STD, "close", M_PROC_REF_FILE_VOID, genie_close);
1939 a68_idf (A68_STD, "create", m, genie_create);
1940 a68_idf (A68_STD, "erase", M_PROC_REF_FILE_VOID, genie_erase);
1941 a68_idf (A68_STD, "lock", M_PROC_REF_FILE_VOID, genie_lock);
1942 a68_idf (A68_STD, "newline", M_PROC_REF_FILE_VOID, genie_new_line);
1943 a68_idf (A68_STD, "newpage", M_PROC_REF_FILE_VOID, genie_new_page);
1944 a68_idf (A68_STD, "reset", M_PROC_REF_FILE_VOID, genie_reset);
1945 a68_idf (A68_STD, "scratch", M_PROC_REF_FILE_VOID, genie_erase);
1946 a68_idf (A68_STD, "space", M_PROC_REF_FILE_VOID, genie_space);
1947 m = a68_proc (M_INT, M_REF_FILE, M_INT, NO_MOID);
1948 a68_idf (A68_STD, "set", m, genie_set);
1949 a68_idf (A68_STD, "seek", m, genie_set);
1950 m = a68_proc (M_VOID, M_ROW_SIMPLIN, NO_MOID);
1951 a68_idf (A68_STD, "read", m, genie_read);
1952 a68_idf (A68_STD, "readbin", m, genie_read_bin);
1953 a68_idf (A68_STD, "readf", m, genie_read_format);
1954 m = a68_proc (M_VOID, M_ROW_SIMPLOUT, NO_MOID);
1955 a68_idf (A68_STD, "printbin", m, genie_write_bin);
1956 a68_idf (A68_STD, "printf", m, genie_write_format);
1957 a68_idf (A68_STD, "print", m, genie_write);
1958 a68_idf (A68_STD, "writebin", m, genie_write_bin);
1959 a68_idf (A68_STD, "writef", m, genie_write_format);
1960 a68_idf (A68_STD, "write", m, genie_write);
1961 m = a68_proc (M_VOID, M_REF_FILE, M_ROW_SIMPLIN, NO_MOID);
1962 a68_idf (A68_STD, "get", m, genie_read_file);
1963 a68_idf (A68_STD, "getf", m, genie_read_file_format);
1964 a68_idf (A68_STD, "getbin", m, genie_read_bin_file);
1965 m = a68_proc (M_VOID, M_REF_FILE, M_ROW_SIMPLOUT, NO_MOID);
1966 a68_idf (A68_STD, "put", m, genie_write_file);
1967 a68_idf (A68_STD, "putf", m, genie_write_file_format);
1968 a68_idf (A68_STD, "putbin", m, genie_write_bin_file);
1969 m = a68_proc (M_VOID, M_REF_STRING, M_ROW_SIMPLIN, NO_MOID);
1970 a68_idf (A68_EXT, "gets", m, genie_get_text);
1971 a68_idf (A68_EXT, "getsf", m, genie_getf_text);
1972 m = a68_proc (M_VOID, M_REF_STRING, M_ROW_SIMPLOUT, NO_MOID);
1973 a68_idf (A68_EXT, "puts", m, genie_put_text);
1974 a68_idf (A68_EXT, "putsf", m, genie_putf_text);
1975 m = a68_proc (M_REF_STRING, M_REF_STRING, M_ROW_SIMPLOUT, NO_MOID);
1976 a68_idf (A68_EXT, "string", m, genie_string);
1977 a68_idf (A68_EXT, "stringf", m, genie_stringf);
1978 A68C_DEFIO (bits, bits, BITS);
1979 A68C_DEFIO (bool, bool, BOOL);
1980 A68C_DEFIO (char, char, CHAR);
1981 A68C_DEFIO (compl, complex, COMPLEX);
1982 A68C_DEFIO (complex, complex, COMPLEX);
1983 A68C_DEFIO (double, long_real, LONG_REAL);
1984 A68C_DEFIO (int, int, INT);
1985 A68C_DEFIO (longbits, long_bits, LONG_BITS);
1986 A68C_DEFIO (longcomplex, mp_complex, LONG_COMPLEX);
1987 A68C_DEFIO (longcompl, mp_complex, LONG_COMPLEX);
1988 A68C_DEFIO (longint, long_int, LONG_INT);
1989 A68C_DEFIO (longlongcomplex, long_mp_complex, LONG_LONG_COMPLEX);
1990 A68C_DEFIO (longlongcompl, long_mp_complex, LONG_LONG_COMPLEX);
1991 A68C_DEFIO (longlongint, long_mp_int, LONG_LONG_INT);
1992 A68C_DEFIO (longlongreal, long_mp_real, LONG_LONG_REAL);
1993 A68C_DEFIO (longreal, long_real, LONG_REAL);
1994 A68C_DEFIO (quad, long_mp_real, LONG_LONG_REAL);
1995 A68C_DEFIO (real, real, REAL);
1996 A68C_DEFIO (string, string, STRING);
1997 a68_idf (A68_EXT, "readline", M_PROC_STRING, genie_read_line);
1998 }
1999
2000 //! @brief Set up standenv - extensions.
2001
2002 void stand_extensions (void)
2003 {
2004 // UNIX things.
2005 MOID_T *m = A68_MCACHE (proc_int);
2006 a68_idf (A68_EXT, "rows", m, genie_rows);
2007 a68_idf (A68_EXT, "columns", m, genie_columns);
2008 a68_idf (A68_EXT, "argc", m, genie_argc);
2009 a68_idf (A68_EXT, "a68gargc", m, genie_a68g_argc);
2010 a68_idf (A68_EXT, "errno", m, genie_errno);
2011 a68_idf (A68_EXT, "fork", m, genie_fork);
2012 m = a68_proc (M_STRING, NO_MOID);
2013 a68_idf (A68_EXT, "getpwd", m, genie_pwd);
2014 m = a68_proc (M_INT, M_STRING, NO_MOID);
2015 a68_idf (A68_EXT, "setpwd", m, genie_cd);
2016 m = a68_proc (M_BOOL, M_STRING, NO_MOID);
2017 a68_idf (A68_EXT, "fileisdirectory", m, genie_file_is_directory);
2018 a68_idf (A68_EXT, "fileisblockdevice", m, genie_file_is_block_device);
2019 a68_idf (A68_EXT, "fileischardevice", m, genie_file_is_char_device);
2020 a68_idf (A68_EXT, "fileisregular", m, genie_file_is_regular);
2021 #if defined (S_ISFIFO)
2022 a68_idf (A68_EXT, "fileisfifo", m, genie_file_is_fifo);
2023 #endif
2024 #if defined (S_ISLNK)
2025 a68_idf (A68_EXT, "fileislink", m, genie_file_is_link);
2026 #endif
2027 m = a68_proc (M_BITS, M_STRING, NO_MOID);
2028 a68_idf (A68_EXT, "filemode", m, genie_file_mode);
2029 m = a68_proc (M_STRING, M_INT, NO_MOID);
2030 a68_idf (A68_EXT, "argv", m, genie_argv);
2031 a68_idf (A68_EXT, "a68gargv", m, genie_a68g_argv);
2032 a68_idf (A68_EXT, "reseterrno", A68_MCACHE (proc_void), genie_reset_errno);
2033 m = a68_proc (M_STRING, M_INT, NO_MOID);
2034 a68_idf (A68_EXT, "strerror", m, genie_strerror);
2035 m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2036 a68_idf (A68_EXT, "exec", m, genie_exec);
2037 a68_idf (A68_EXT, "execve", m, genie_exec);
2038 m = a68_proc (M_PIPE, NO_MOID);
2039 a68_idf (A68_EXT, "createpipe", m, genie_create_pipe);
2040 m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2041 a68_idf (A68_EXT, "execsub", m, genie_exec_sub);
2042 a68_idf (A68_EXT, "execvechild", m, genie_exec_sub);
2043 m = a68_proc (M_PIPE, M_STRING, M_ROW_STRING, M_ROW_STRING, NO_MOID);
2044 a68_idf (A68_EXT, "execsubpipeline", m, genie_exec_sub_pipeline);
2045 a68_idf (A68_EXT, "execvechildpipe", m, genie_exec_sub_pipeline);
2046 m = a68_proc (M_INT, M_STRING, M_ROW_STRING, M_ROW_STRING, M_REF_STRING, NO_MOID);
2047 a68_idf (A68_EXT, "execsuboutput", m, genie_exec_sub_output);
2048 a68_idf (A68_EXT, "execveoutput", m, genie_exec_sub_output);
2049 m = a68_proc (M_STRING, M_STRING, NO_MOID);
2050 a68_idf (A68_EXT, "getenv", m, genie_getenv);
2051 m = a68_proc (M_VOID, M_INT, NO_MOID);
2052 a68_idf (A68_EXT, "waitpid", m, genie_waitpid);
2053 m = a68_proc (M_ROW_INT, NO_MOID);
2054 a68_idf (A68_EXT, "utctime", m, genie_utctime);
2055 a68_idf (A68_EXT, "localtime", m, genie_localtime);
2056 m = a68_proc (M_INT, M_STRING, M_STRING, M_REF_INT, M_REF_INT, NO_MOID);
2057 a68_idf (A68_EXT, "grepinstring", m, genie_grep_in_string);
2058 a68_idf (A68_EXT, "grepinsubstring", m, genie_grep_in_substring);
2059 m = a68_proc (M_INT, M_STRING, M_STRING, M_REF_STRING, NO_MOID);
2060 a68_idf (A68_EXT, "subinstring", m, genie_sub_in_string);
2061 #if defined (HAVE_DIRENT_H)
2062 m = a68_proc (M_ROW_STRING, M_STRING, NO_MOID);
2063 a68_idf (A68_EXT, "getdirectory", m, genie_directory);
2064 #endif
2065 #if defined (HAVE_CURL)
2066 m = a68_proc (M_INT, M_REF_STRING, M_STRING, M_STRING, M_INT, NO_MOID);
2067 a68_idf (A68_EXT, "httpcontent", m, genie_http_content);
2068 a68_idf (A68_EXT, "httpscontent", m, genie_https_content);
2069 #endif
2070 }
2071
2072 #if defined (HAVE_GNU_PLOTUTILS)
2073
2074 void stand_plot (void)
2075 {
2076 // Drawing.
2077 MOID_T *m = a68_proc (M_BOOL, M_REF_FILE, M_STRING, M_STRING, NO_MOID);
2078 a68_idf (A68_EXT, "drawdevice", m, genie_make_device);
2079 a68_idf (A68_EXT, "makedevice", m, genie_make_device);
2080 m = a68_proc (M_REAL, M_REF_FILE, NO_MOID);
2081 a68_idf (A68_EXT, "drawaspect", m, genie_draw_aspect);
2082 m = a68_proc (M_VOID, M_REF_FILE, NO_MOID);
2083 a68_idf (A68_EXT, "drawclear", m, genie_draw_clear);
2084 a68_idf (A68_EXT, "drawerase", m, genie_draw_clear);
2085 a68_idf (A68_EXT, "drawflush", m, genie_draw_show);
2086 a68_idf (A68_EXT, "drawshow", m, genie_draw_show);
2087 m = a68_proc (M_VOID, M_REF_FILE, M_INT, NO_MOID);
2088 a68_idf (A68_EXT, "drawfillstyle", m, genie_draw_fillstyle);
2089 m = a68_proc (M_STRING, M_INT, NO_MOID);
2090 a68_idf (A68_EXT, "drawgetcolourname", m, genie_draw_get_colour_name);
2091 a68_idf (A68_EXT, "drawgetcolorname", m, genie_draw_get_colour_name);
2092 m = a68_proc (M_VOID, M_REF_FILE, M_REAL, M_REAL, M_REAL, NO_MOID);
2093 a68_idf (A68_EXT, "drawcolor", m, genie_draw_colour);
2094 a68_idf (A68_EXT, "drawcolour", m, genie_draw_colour);
2095 a68_idf (A68_EXT, "drawbackgroundcolor", m, genie_draw_background_colour);
2096 a68_idf (A68_EXT, "drawbackgroundcolour", m, genie_draw_background_colour);
2097 a68_idf (A68_EXT, "drawcircle", m, genie_draw_circle);
2098 a68_idf (A68_EXT, "drawball", m, genie_draw_atom);
2099 a68_idf (A68_EXT, "drawstar", m, genie_draw_star);
2100 m = a68_proc (M_VOID, M_REF_FILE, M_REAL, M_REAL, NO_MOID);
2101 a68_idf (A68_EXT, "drawpoint", m, genie_draw_point);
2102 a68_idf (A68_EXT, "drawline", m, genie_draw_line);
2103 a68_idf (A68_EXT, "drawmove", m, genie_draw_move);
2104 a68_idf (A68_EXT, "drawrect", m, genie_draw_rect);
2105 m = a68_proc (M_VOID, M_REF_FILE, M_CHAR, M_CHAR, M_ROW_CHAR, NO_MOID);
2106 a68_idf (A68_EXT, "drawtext", m, genie_draw_text);
2107 m = a68_proc (M_VOID, M_REF_FILE, M_ROW_CHAR, NO_MOID);
2108 a68_idf (A68_EXT, "drawlinestyle", m, genie_draw_linestyle);
2109 a68_idf (A68_EXT, "drawfontname", m, genie_draw_fontname);
2110 m = a68_proc (M_VOID, M_REF_FILE, M_REAL, NO_MOID);
2111 a68_idf (A68_EXT, "drawlinewidth", m, genie_draw_linewidth);
2112 m = a68_proc (M_VOID, M_REF_FILE, M_INT, NO_MOID);
2113 a68_idf (A68_EXT, "drawfontsize", m, genie_draw_fontsize);
2114 a68_idf (A68_EXT, "drawtextangle", m, genie_draw_textangle);
2115 m = a68_proc (M_VOID, M_REF_FILE, M_STRING, NO_MOID);
2116 a68_idf (A68_EXT, "drawcolorname", m, genie_draw_colour_name);
2117 a68_idf (A68_EXT, "drawcolourname", m, genie_draw_colour_name);
2118 a68_idf (A68_EXT, "drawbackgroundcolorname", m, genie_draw_background_colour_name);
2119 a68_idf (A68_EXT, "drawbackgroundcolourname", m, genie_draw_background_colour_name);
2120 }
2121
2122 #endif
2123
2124 #if defined (HAVE_CURSES)
2125
2126 void stand_curses (void)
2127 {
2128 a68_idf (A68_EXT, "cursesstart", A68_MCACHE (proc_void), genie_curses_start);
2129 a68_idf (A68_EXT, "cursesend", A68_MCACHE (proc_void), genie_curses_end);
2130 a68_idf (A68_EXT, "cursesclear", A68_MCACHE (proc_void), genie_curses_clear);
2131 a68_idf (A68_EXT, "cursesrefresh", A68_MCACHE (proc_void), genie_curses_refresh);
2132 a68_idf (A68_EXT, "cursesgreen", A68_MCACHE (proc_void), genie_curses_green);
2133 a68_idf (A68_EXT, "cursescyan", A68_MCACHE (proc_void), genie_curses_cyan);
2134 a68_idf (A68_EXT, "cursesred", A68_MCACHE (proc_void), genie_curses_red);
2135 a68_idf (A68_EXT, "cursesyellow", A68_MCACHE (proc_void), genie_curses_yellow);
2136 a68_idf (A68_EXT, "cursesmagenta", A68_MCACHE (proc_void), genie_curses_magenta);
2137 a68_idf (A68_EXT, "cursesblue", A68_MCACHE (proc_void), genie_curses_blue);
2138 a68_idf (A68_EXT, "curseswhite", A68_MCACHE (proc_void), genie_curses_white);
2139 a68_idf (A68_EXT, "cursesgreeninverse", A68_MCACHE (proc_void), genie_curses_green_inverse);
2140 a68_idf (A68_EXT, "cursescyaninverse", A68_MCACHE (proc_void), genie_curses_cyan_inverse);
2141 a68_idf (A68_EXT, "cursesredinverse", A68_MCACHE (proc_void), genie_curses_red_inverse);
2142 a68_idf (A68_EXT, "cursesyellowinverse", A68_MCACHE (proc_void), genie_curses_yellow_inverse);
2143 a68_idf (A68_EXT, "cursesmagentainverse", A68_MCACHE (proc_void), genie_curses_magenta_inverse);
2144 a68_idf (A68_EXT, "cursesblueinverse", A68_MCACHE (proc_void), genie_curses_blue_inverse);
2145 a68_idf (A68_EXT, "curseswhiteinverse", A68_MCACHE (proc_void), genie_curses_white_inverse);
2146 MOID_T *m = A68_MCACHE (proc_char);
2147 a68_idf (A68_EXT, "cursesgetchar", m, genie_curses_getchar);
2148 m = a68_proc (M_VOID, M_CHAR, NO_MOID);
2149 a68_idf (A68_EXT, "cursesputchar", m, genie_curses_putchar);
2150 m = a68_proc (M_VOID, M_INT, M_INT, NO_MOID);
2151 a68_idf (A68_EXT, "cursesmove", m, genie_curses_move);
2152 m = A68_MCACHE (proc_int);
2153 a68_idf (A68_EXT, "curseslines", m, genie_curses_lines);
2154 a68_idf (A68_EXT, "cursescolumns", m, genie_curses_columns);
2155 m = a68_proc (M_BOOL, M_CHAR, NO_MOID);
2156 a68_idf (A68_EXT, "cursesdelchar", m, genie_curses_del_char);
2157 }
2158
2159 #endif
2160
2161 #if defined (HAVE_POSTGRESQL)
2162
2163 void stand_postgresql (void)
2164 {
2165 MOID_T *m = a68_proc (M_INT, M_REF_FILE, M_STRING, M_REF_STRING, NO_MOID);
2166 a68_idf (A68_EXT, "pqconnectdb", m, genie_pq_connectdb);
2167 m = a68_proc (M_INT, M_REF_FILE, NO_MOID);
2168 a68_idf (A68_EXT, "pqfinish", m, genie_pq_finish);
2169 a68_idf (A68_EXT, "pqreset", m, genie_pq_reset);
2170 m = a68_proc (M_INT, M_REF_FILE, M_STRING, NO_MOID);
2171 a68_idf (A68_EXT, "pqparameterstatus", m, genie_pq_parameterstatus);
2172 a68_idf (A68_EXT, "pqexec", m, genie_pq_exec);
2173 a68_idf (A68_EXT, "pqfnumber", m, genie_pq_fnumber);
2174 m = a68_proc (M_INT, M_REF_FILE, NO_MOID);
2175 a68_idf (A68_EXT, "pqntuples", m, genie_pq_ntuples);
2176 a68_idf (A68_EXT, "pqnfields", m, genie_pq_nfields);
2177 a68_idf (A68_EXT, "pqcmdstatus", m, genie_pq_cmdstatus);
2178 a68_idf (A68_EXT, "pqcmdtuples", m, genie_pq_cmdtuples);
2179 a68_idf (A68_EXT, "pqerrormessage", m, genie_pq_errormessage);
2180 a68_idf (A68_EXT, "pqresulterrormessage", m, genie_pq_resulterrormessage);
2181 a68_idf (A68_EXT, "pqdb", m, genie_pq_db);
2182 a68_idf (A68_EXT, "pquser", m, genie_pq_user);
2183 a68_idf (A68_EXT, "pqpass", m, genie_pq_pass);
2184 a68_idf (A68_EXT, "pqhost", m, genie_pq_host);
2185 a68_idf (A68_EXT, "pqport", m, genie_pq_port);
2186 a68_idf (A68_EXT, "pqtty", m, genie_pq_tty);
2187 a68_idf (A68_EXT, "pqoptions", m, genie_pq_options);
2188 a68_idf (A68_EXT, "pqprotocolversion", m, genie_pq_protocolversion);
2189 a68_idf (A68_EXT, "pqserverversion", m, genie_pq_serverversion);
2190 a68_idf (A68_EXT, "pqsocket", m, genie_pq_socket);
2191 a68_idf (A68_EXT, "pqbackendpid", m, genie_pq_backendpid);
2192 m = a68_proc (M_INT, M_REF_FILE, M_INT, NO_MOID);
2193 a68_idf (A68_EXT, "pqfname", m, genie_pq_fname);
2194 a68_idf (A68_EXT, "pqfformat", m, genie_pq_fformat);
2195 m = a68_proc (M_INT, M_REF_FILE, M_INT, M_INT, NO_MOID);
2196 a68_idf (A68_EXT, "pqgetvalue", m, genie_pq_getvalue);
2197 a68_idf (A68_EXT, "pqgetisnull", m, genie_pq_getisnull);
2198 }
2199
2200 #endif
2201
2202 #if defined (BUILD_LINUX)
2203 void stand_linux (void)
2204 {
2205 a68_idf (A68_EXT, "sigsegv", A68_MCACHE (proc_void), genie_sigsegv);
2206 }
2207 #endif
2208
2209 //! @brief Build the standard environ symbol table.
2210
2211 void make_standard_environ (void)
2212 {
2213 stand_moids ();
2214 A68_MCACHE (proc_bool) = a68_proc (M_BOOL, NO_MOID);
2215 A68_MCACHE (proc_char) = a68_proc (M_CHAR, NO_MOID);
2216 A68_MCACHE (proc_complex_complex) = a68_proc (M_COMPLEX, M_COMPLEX, NO_MOID);
2217 A68_MCACHE (proc_int) = a68_proc (M_INT, NO_MOID);
2218 A68_MCACHE (proc_int_int) = a68_proc (M_INT, M_INT, NO_MOID);
2219 A68_MCACHE (proc_int_int_real) = a68_proc (M_REAL, M_INT, M_INT, NO_MOID);
2220 A68_MCACHE (proc_int_real) = a68_proc (M_REAL, M_INT, NO_MOID);
2221 A68_MCACHE (proc_int_real_real) = a68_proc (M_REAL, M_INT, M_REAL, NO_MOID);
2222 A68_MCACHE (proc_int_real_real_real) = a68_proc (M_REAL, M_INT, M_REAL, M_REAL, NO_MOID);
2223 A68_MCACHE (proc_real) = a68_proc (M_REAL, NO_MOID);
2224 A68_MCACHE (proc_real_int_real) = a68_proc (M_REAL, M_REAL, M_INT, NO_MOID);
2225 A68_MCACHE (proc_real_real_int_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_INT, NO_MOID);
2226 A68_MCACHE (proc_real_real) = M_PROC_REAL_REAL;
2227 A68_MCACHE (proc_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, NO_MOID);
2228 A68_MCACHE (proc_real_real_real_int) = a68_proc (M_INT, M_REAL, M_REAL, M_REAL, NO_MOID);
2229 A68_MCACHE (proc_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2230 A68_MCACHE (proc_real_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2231 A68_MCACHE (proc_real_real_real_real_real_real) = a68_proc (M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, M_REAL, NO_MOID);
2232 A68_MCACHE (proc_real_ref_real_ref_int_void) = a68_proc (M_VOID, M_REAL, M_REF_REAL, M_REF_INT, NO_MOID);
2233 A68_MCACHE (proc_void) = a68_proc (M_VOID, NO_MOID);
2234 stand_prelude ();
2235 stand_mp_level_2 ();
2236 stand_mp_level_3 ();
2237 stand_transput ();
2238 stand_extensions ();
2239 #if (A68_LEVEL <= 2)
2240 stand_longlong_bits ();
2241 #endif
2242 #if defined (BUILD_LINUX)
2243 stand_linux ();
2244 #endif
2245 #if defined (HAVE_GSL)
2246 stand_gsl ();
2247 #endif
2248 #if defined (HAVE_MATHLIB)
2249 stand_mathlib ();
2250 #endif
2251 #if defined (HAVE_GNU_PLOTUTILS)
2252 stand_plot ();
2253 #endif
2254 #if defined (HAVE_CURSES)
2255 stand_curses ();
2256 #endif
2257 #if defined (HAVE_POSTGRESQL)
2258 stand_postgresql ();
2259 #endif
2260 }
© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)
|