xref: /titanic_52/usr/src/lib/efcode/include/fcode/proto.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2000-2003 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_FCODE_PROTO_H
28*7c478bd9Sstevel@tonic-gate #define	_FCODE_PROTO_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
33*7c478bd9Sstevel@tonic-gate extern "C" {
34*7c478bd9Sstevel@tonic-gate #endif
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #define	FNPROTO(x)	void x(fcode_env_t *)
37*7c478bd9Sstevel@tonic-gate 
38*7c478bd9Sstevel@tonic-gate FNPROTO(bdo);
39*7c478bd9Sstevel@tonic-gate FNPROTO(bqdo);
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate FNPROTO(literal);
42*7c478bd9Sstevel@tonic-gate void branch_common(fcode_env_t *, short, fstack_t, int);
43*7c478bd9Sstevel@tonic-gate FNPROTO(zero);
44*7c478bd9Sstevel@tonic-gate FNPROTO(bloop);
45*7c478bd9Sstevel@tonic-gate FNPROTO(bplusloop);
46*7c478bd9Sstevel@tonic-gate FNPROTO(loop_i);
47*7c478bd9Sstevel@tonic-gate FNPROTO(loop_j);
48*7c478bd9Sstevel@tonic-gate FNPROTO(bleave);
49*7c478bd9Sstevel@tonic-gate FNPROTO(execute);
50*7c478bd9Sstevel@tonic-gate FNPROTO(add);
51*7c478bd9Sstevel@tonic-gate FNPROTO(subtract);
52*7c478bd9Sstevel@tonic-gate FNPROTO(multiply);
53*7c478bd9Sstevel@tonic-gate FNPROTO(slash_mod);
54*7c478bd9Sstevel@tonic-gate FNPROTO(uslash_mod);
55*7c478bd9Sstevel@tonic-gate FNPROTO(divide);
56*7c478bd9Sstevel@tonic-gate FNPROTO(mod);
57*7c478bd9Sstevel@tonic-gate FNPROTO(and);
58*7c478bd9Sstevel@tonic-gate FNPROTO(or);
59*7c478bd9Sstevel@tonic-gate FNPROTO(xor);
60*7c478bd9Sstevel@tonic-gate FNPROTO(invert);
61*7c478bd9Sstevel@tonic-gate FNPROTO(lshift);
62*7c478bd9Sstevel@tonic-gate FNPROTO(rshift);
63*7c478bd9Sstevel@tonic-gate FNPROTO(rshifta);
64*7c478bd9Sstevel@tonic-gate FNPROTO(negate);
65*7c478bd9Sstevel@tonic-gate FNPROTO(f_abs);
66*7c478bd9Sstevel@tonic-gate FNPROTO(f_min);
67*7c478bd9Sstevel@tonic-gate FNPROTO(f_max);
68*7c478bd9Sstevel@tonic-gate FNPROTO(to_r);
69*7c478bd9Sstevel@tonic-gate FNPROTO(from_r);
70*7c478bd9Sstevel@tonic-gate FNPROTO(rfetch);
71*7c478bd9Sstevel@tonic-gate FNPROTO(f_exit);
72*7c478bd9Sstevel@tonic-gate FNPROTO(zero_equals);
73*7c478bd9Sstevel@tonic-gate FNPROTO(zero_not_equals);
74*7c478bd9Sstevel@tonic-gate FNPROTO(zero_less);
75*7c478bd9Sstevel@tonic-gate FNPROTO(zero_less_equals);
76*7c478bd9Sstevel@tonic-gate FNPROTO(zero_greater);
77*7c478bd9Sstevel@tonic-gate FNPROTO(zero_greater_equals);
78*7c478bd9Sstevel@tonic-gate FNPROTO(less);
79*7c478bd9Sstevel@tonic-gate FNPROTO(greater);
80*7c478bd9Sstevel@tonic-gate FNPROTO(equals);
81*7c478bd9Sstevel@tonic-gate FNPROTO(not_equals);
82*7c478bd9Sstevel@tonic-gate FNPROTO(unsign_greater);
83*7c478bd9Sstevel@tonic-gate FNPROTO(unsign_less_equals);
84*7c478bd9Sstevel@tonic-gate FNPROTO(unsign_less);
85*7c478bd9Sstevel@tonic-gate FNPROTO(unsign_greater_equals);
86*7c478bd9Sstevel@tonic-gate FNPROTO(greater_equals);
87*7c478bd9Sstevel@tonic-gate FNPROTO(less_equals);
88*7c478bd9Sstevel@tonic-gate FNPROTO(between);
89*7c478bd9Sstevel@tonic-gate FNPROTO(within);
90*7c478bd9Sstevel@tonic-gate FNPROTO(drop);
91*7c478bd9Sstevel@tonic-gate FNPROTO(f_dup);
92*7c478bd9Sstevel@tonic-gate FNPROTO(over);
93*7c478bd9Sstevel@tonic-gate FNPROTO(swap);
94*7c478bd9Sstevel@tonic-gate FNPROTO(rot);
95*7c478bd9Sstevel@tonic-gate FNPROTO(minus_rot);
96*7c478bd9Sstevel@tonic-gate FNPROTO(tuck);
97*7c478bd9Sstevel@tonic-gate FNPROTO(nip);
98*7c478bd9Sstevel@tonic-gate FNPROTO(pick);
99*7c478bd9Sstevel@tonic-gate FNPROTO(roll);
100*7c478bd9Sstevel@tonic-gate FNPROTO(qdup);
101*7c478bd9Sstevel@tonic-gate FNPROTO(depth);
102*7c478bd9Sstevel@tonic-gate FNPROTO(two_drop);
103*7c478bd9Sstevel@tonic-gate FNPROTO(two_dup);
104*7c478bd9Sstevel@tonic-gate FNPROTO(two_over);
105*7c478bd9Sstevel@tonic-gate FNPROTO(two_swap);
106*7c478bd9Sstevel@tonic-gate FNPROTO(two_rot);
107*7c478bd9Sstevel@tonic-gate FNPROTO(two_slash);
108*7c478bd9Sstevel@tonic-gate FNPROTO(utwo_slash);
109*7c478bd9Sstevel@tonic-gate FNPROTO(two_times);
110*7c478bd9Sstevel@tonic-gate FNPROTO(slash_c);
111*7c478bd9Sstevel@tonic-gate FNPROTO(slash_w);
112*7c478bd9Sstevel@tonic-gate FNPROTO(slash_l);
113*7c478bd9Sstevel@tonic-gate FNPROTO(slash_n);
114*7c478bd9Sstevel@tonic-gate FNPROTO(ca_plus);
115*7c478bd9Sstevel@tonic-gate FNPROTO(wa_plus);
116*7c478bd9Sstevel@tonic-gate FNPROTO(la_plus);
117*7c478bd9Sstevel@tonic-gate FNPROTO(na_plus);
118*7c478bd9Sstevel@tonic-gate FNPROTO(c1_plus);
119*7c478bd9Sstevel@tonic-gate FNPROTO(w1_plus);
120*7c478bd9Sstevel@tonic-gate FNPROTO(l1_plus);
121*7c478bd9Sstevel@tonic-gate FNPROTO(cell_plus);
122*7c478bd9Sstevel@tonic-gate FNPROTO(do_chars);
123*7c478bd9Sstevel@tonic-gate FNPROTO(slash_w_times);
124*7c478bd9Sstevel@tonic-gate FNPROTO(slash_l_times);
125*7c478bd9Sstevel@tonic-gate FNPROTO(cells);
126*7c478bd9Sstevel@tonic-gate FNPROTO(do_off);
127*7c478bd9Sstevel@tonic-gate FNPROTO(do_on);
128*7c478bd9Sstevel@tonic-gate FNPROTO(fetch);
129*7c478bd9Sstevel@tonic-gate FNPROTO(lfetch);
130*7c478bd9Sstevel@tonic-gate FNPROTO(wfetch);
131*7c478bd9Sstevel@tonic-gate FNPROTO(swfetch);
132*7c478bd9Sstevel@tonic-gate FNPROTO(cfetch);
133*7c478bd9Sstevel@tonic-gate FNPROTO(store);
134*7c478bd9Sstevel@tonic-gate FNPROTO(lstore);
135*7c478bd9Sstevel@tonic-gate FNPROTO(wstore);
136*7c478bd9Sstevel@tonic-gate FNPROTO(cstore);
137*7c478bd9Sstevel@tonic-gate 
138*7c478bd9Sstevel@tonic-gate FNPROTO(noop);
139*7c478bd9Sstevel@tonic-gate FNPROTO(lwsplit);
140*7c478bd9Sstevel@tonic-gate FNPROTO(wljoin);
141*7c478bd9Sstevel@tonic-gate FNPROTO(lbsplit);
142*7c478bd9Sstevel@tonic-gate FNPROTO(bljoin);
143*7c478bd9Sstevel@tonic-gate FNPROTO(wbflip);
144*7c478bd9Sstevel@tonic-gate FNPROTO(upper_case);
145*7c478bd9Sstevel@tonic-gate FNPROTO(lower_case);
146*7c478bd9Sstevel@tonic-gate FNPROTO(pack_str);
147*7c478bd9Sstevel@tonic-gate FNPROTO(count_str);
148*7c478bd9Sstevel@tonic-gate FNPROTO(to_body);
149*7c478bd9Sstevel@tonic-gate FNPROTO(to_acf);
150*7c478bd9Sstevel@tonic-gate FNPROTO(bcase);
151*7c478bd9Sstevel@tonic-gate FNPROTO(bendcase);
152*7c478bd9Sstevel@tonic-gate 
153*7c478bd9Sstevel@tonic-gate FNPROTO(span);
154*7c478bd9Sstevel@tonic-gate 
155*7c478bd9Sstevel@tonic-gate FNPROTO(expect);
156*7c478bd9Sstevel@tonic-gate 
157*7c478bd9Sstevel@tonic-gate FNPROTO(emit);
158*7c478bd9Sstevel@tonic-gate FNPROTO(type);
159*7c478bd9Sstevel@tonic-gate 
160*7c478bd9Sstevel@tonic-gate FNPROTO(fc_crlf);
161*7c478bd9Sstevel@tonic-gate 
162*7c478bd9Sstevel@tonic-gate FNPROTO(base);
163*7c478bd9Sstevel@tonic-gate FNPROTO(dollar_number);
164*7c478bd9Sstevel@tonic-gate FNPROTO(digit);
165*7c478bd9Sstevel@tonic-gate 
166*7c478bd9Sstevel@tonic-gate FNPROTO(do_constant);
167*7c478bd9Sstevel@tonic-gate FNPROTO(do_defer);
168*7c478bd9Sstevel@tonic-gate FNPROTO(do_crash);
169*7c478bd9Sstevel@tonic-gate FNPROTO(do_field);
170*7c478bd9Sstevel@tonic-gate FNPROTO(idefer_exec);
171*7c478bd9Sstevel@tonic-gate 
172*7c478bd9Sstevel@tonic-gate FNPROTO(set_args);
173*7c478bd9Sstevel@tonic-gate 
174*7c478bd9Sstevel@tonic-gate void make_common_access(fcode_env_t *, char *, int, int, int,
175*7c478bd9Sstevel@tonic-gate     void (*acf_i)(fcode_env_t *), void (*acf_s)(fcode_env_t *),
176*7c478bd9Sstevel@tonic-gate     void (*set_a)(fcode_env_t *, int));
177*7c478bd9Sstevel@tonic-gate 
178*7c478bd9Sstevel@tonic-gate FNPROTO(do_create);
179*7c478bd9Sstevel@tonic-gate 
180*7c478bd9Sstevel@tonic-gate FNPROTO(instance);
181*7c478bd9Sstevel@tonic-gate FNPROTO(semi);
182*7c478bd9Sstevel@tonic-gate 
183*7c478bd9Sstevel@tonic-gate FNPROTO(dollar_find);
184*7c478bd9Sstevel@tonic-gate acf_t voc_find(fcode_env_t *env);
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate FNPROTO(evaluate);
187*7c478bd9Sstevel@tonic-gate 
188*7c478bd9Sstevel@tonic-gate FNPROTO(ccomma);
189*7c478bd9Sstevel@tonic-gate FNPROTO(wcomma);
190*7c478bd9Sstevel@tonic-gate FNPROTO(lcomma);
191*7c478bd9Sstevel@tonic-gate FNPROTO(comma);
192*7c478bd9Sstevel@tonic-gate FNPROTO(state);
193*7c478bd9Sstevel@tonic-gate FNPROTO(compile_comma);
194*7c478bd9Sstevel@tonic-gate 
195*7c478bd9Sstevel@tonic-gate FNPROTO(here);
196*7c478bd9Sstevel@tonic-gate FNPROTO(aligned);
197*7c478bd9Sstevel@tonic-gate FNPROTO(wbsplit);
198*7c478bd9Sstevel@tonic-gate FNPROTO(bwjoin);
199*7c478bd9Sstevel@tonic-gate FNPROTO(bmark);
200*7c478bd9Sstevel@tonic-gate FNPROTO(bresolve);
201*7c478bd9Sstevel@tonic-gate 
202*7c478bd9Sstevel@tonic-gate FNPROTO(f_error);
203*7c478bd9Sstevel@tonic-gate FNPROTO(fc_unimplemented);
204*7c478bd9Sstevel@tonic-gate FNPROTO(fc_obsolete);
205*7c478bd9Sstevel@tonic-gate FNPROTO(fc_historical);
206*7c478bd9Sstevel@tonic-gate 
207*7c478bd9Sstevel@tonic-gate FNPROTO(myspace);
208*7c478bd9Sstevel@tonic-gate FNPROTO(property);
209*7c478bd9Sstevel@tonic-gate FNPROTO(encode_int);
210*7c478bd9Sstevel@tonic-gate FNPROTO(encode_plus);
211*7c478bd9Sstevel@tonic-gate FNPROTO(encode_phys);
212*7c478bd9Sstevel@tonic-gate FNPROTO(encode_string);
213*7c478bd9Sstevel@tonic-gate FNPROTO(encode_bytes);
214*7c478bd9Sstevel@tonic-gate FNPROTO(model_prop);
215*7c478bd9Sstevel@tonic-gate FNPROTO(device_type);
216*7c478bd9Sstevel@tonic-gate FNPROTO(new_device);
217*7c478bd9Sstevel@tonic-gate 
218*7c478bd9Sstevel@tonic-gate FNPROTO(finish_device);
219*7c478bd9Sstevel@tonic-gate 
220*7c478bd9Sstevel@tonic-gate FNPROTO(device_name);
221*7c478bd9Sstevel@tonic-gate 
222*7c478bd9Sstevel@tonic-gate FNPROTO(lwflip);
223*7c478bd9Sstevel@tonic-gate FNPROTO(lbflip);
224*7c478bd9Sstevel@tonic-gate 
225*7c478bd9Sstevel@tonic-gate FNPROTO(child_node);
226*7c478bd9Sstevel@tonic-gate FNPROTO(peer_node);
227*7c478bd9Sstevel@tonic-gate 
228*7c478bd9Sstevel@tonic-gate FNPROTO(byte_load);
229*7c478bd9Sstevel@tonic-gate 
230*7c478bd9Sstevel@tonic-gate uchar_t  next_bytecode(fcode_env_t *);
231*7c478bd9Sstevel@tonic-gate ushort_t get_short(fcode_env_t *);
232*7c478bd9Sstevel@tonic-gate uint_t   get_int(fcode_env_t *);
233*7c478bd9Sstevel@tonic-gate 
234*7c478bd9Sstevel@tonic-gate char *get_name(long *);
235*7c478bd9Sstevel@tonic-gate FNPROTO(words);
236*7c478bd9Sstevel@tonic-gate void header(fcode_env_t *, char *, int, flag_t);
237*7c478bd9Sstevel@tonic-gate void do_code(fcode_env_t *, int, char *, FNPROTO((*)));
238*7c478bd9Sstevel@tonic-gate void push_string(fcode_env_t *, char *, int);
239*7c478bd9Sstevel@tonic-gate 
240*7c478bd9Sstevel@tonic-gate FNPROTO(verify_usage);
241*7c478bd9Sstevel@tonic-gate FNPROTO(dump_dictionary);
242*7c478bd9Sstevel@tonic-gate void print_stack_element(fcode_env_t *, fstack_t);
243*7c478bd9Sstevel@tonic-gate void dump_data_stack(fcode_env_t *, int);
244*7c478bd9Sstevel@tonic-gate void dump_return_stack(fcode_env_t *, int);
245*7c478bd9Sstevel@tonic-gate char *acf_lookup(fcode_env_t *, acf_t);
246*7c478bd9Sstevel@tonic-gate char *acf_to_name(fcode_env_t *, acf_t);
247*7c478bd9Sstevel@tonic-gate int within_dictionary(fcode_env_t *, void *);
248*7c478bd9Sstevel@tonic-gate char *acf_backup_search(fcode_env_t *, acf_t);
249*7c478bd9Sstevel@tonic-gate void dump_forth_environment(fcode_env_t *);
250*7c478bd9Sstevel@tonic-gate void forth_abort(fcode_env_t *, char *, ...);
251*7c478bd9Sstevel@tonic-gate void forth_perror(fcode_env_t *, char *, ...);
252*7c478bd9Sstevel@tonic-gate void return_to_interact(fcode_env_t *);
253*7c478bd9Sstevel@tonic-gate char *get_path(fcode_env_t *, device_t *);
254*7c478bd9Sstevel@tonic-gate char *search_for_fcode_file(fcode_env_t *, char *);
255*7c478bd9Sstevel@tonic-gate int current_debug_state(fcode_env_t *);
256*7c478bd9Sstevel@tonic-gate int debug_flags_to_mask(char *);
257*7c478bd9Sstevel@tonic-gate int do_exec_debug(fcode_env_t *, void *);
258*7c478bd9Sstevel@tonic-gate int name_is_debugged(fcode_env_t *, char *);
259*7c478bd9Sstevel@tonic-gate prop_t *find_property(device_t *, char *);
260*7c478bd9Sstevel@tonic-gate void buffer_init(fcode_env_t *env);
261*7c478bd9Sstevel@tonic-gate void check_for_debug_entry(fcode_env_t *);
262*7c478bd9Sstevel@tonic-gate void check_for_debug_exit(fcode_env_t *);
263*7c478bd9Sstevel@tonic-gate void check_semi_debug_exit(fcode_env_t *);
264*7c478bd9Sstevel@tonic-gate void check_vitals(fcode_env_t *);
265*7c478bd9Sstevel@tonic-gate void clear_debug_state(fcode_env_t *, int);
266*7c478bd9Sstevel@tonic-gate void debug_set_level(fcode_env_t *, int);
267*7c478bd9Sstevel@tonic-gate void define_actions(fcode_env_t *env, int n, token_t *array);
268*7c478bd9Sstevel@tonic-gate void do_alias(fcode_env_t *);
269*7c478bd9Sstevel@tonic-gate void do_bbranch(fcode_env_t *env);
270*7c478bd9Sstevel@tonic-gate void do_bdo(fcode_env_t *);
271*7c478bd9Sstevel@tonic-gate void do_bleave(fcode_env_t *env);
272*7c478bd9Sstevel@tonic-gate void do_bloop(fcode_env_t *env);
273*7c478bd9Sstevel@tonic-gate void do_bofbranch(fcode_env_t *env);
274*7c478bd9Sstevel@tonic-gate void do_bploop(fcode_env_t *env);
275*7c478bd9Sstevel@tonic-gate void do_bqbranch(fcode_env_t *env);
276*7c478bd9Sstevel@tonic-gate void do_bqdo(fcode_env_t *env);
277*7c478bd9Sstevel@tonic-gate void do_creator(fcode_env_t *env);
278*7c478bd9Sstevel@tonic-gate void do_default_action(fcode_env_t *env);
279*7c478bd9Sstevel@tonic-gate void do_emit(fcode_env_t *, uchar_t);
280*7c478bd9Sstevel@tonic-gate void do_literal(fcode_env_t *);
281*7c478bd9Sstevel@tonic-gate void dump_comma(fcode_env_t *, char *);
282*7c478bd9Sstevel@tonic-gate void dump_words(fcode_env_t *);
283*7c478bd9Sstevel@tonic-gate void fevaluate(fcode_env_t *);
284*7c478bd9Sstevel@tonic-gate void ibuffer_init(fcode_env_t *env);
285*7c478bd9Sstevel@tonic-gate void install_builtin_nodes(fcode_env_t *);
286*7c478bd9Sstevel@tonic-gate void install_does(fcode_env_t *);
287*7c478bd9Sstevel@tonic-gate void install_openprom_nodes(fcode_env_t *);
288*7c478bd9Sstevel@tonic-gate void install_package_nodes(fcode_env_t *);
289*7c478bd9Sstevel@tonic-gate void internal_env_addr(fcode_env_t *env);
290*7c478bd9Sstevel@tonic-gate void internal_env_fetch(fcode_env_t *env);
291*7c478bd9Sstevel@tonic-gate void internal_env_store(fcode_env_t *env);
292*7c478bd9Sstevel@tonic-gate void key(fcode_env_t *);
293*7c478bd9Sstevel@tonic-gate void keyquestion(fcode_env_t *);
294*7c478bd9Sstevel@tonic-gate void make_a_node(fcode_env_t *, char *, int);
295*7c478bd9Sstevel@tonic-gate void output_data_stack(fcode_env_t *, int);
296*7c478bd9Sstevel@tonic-gate void output_return_stack(fcode_env_t *, int, int);
297*7c478bd9Sstevel@tonic-gate void output_step_message(fcode_env_t *);
298*7c478bd9Sstevel@tonic-gate void output_vitals(fcode_env_t *);
299*7c478bd9Sstevel@tonic-gate void print_property(fcode_env_t *, prop_t *, char *);
300*7c478bd9Sstevel@tonic-gate void read_line(fcode_env_t *);
301*7c478bd9Sstevel@tonic-gate void run_daemon(fcode_env_t *);
302*7c478bd9Sstevel@tonic-gate void run_fcode_from_file(fcode_env_t *, char *, int);
303*7c478bd9Sstevel@tonic-gate void tick_literal(fcode_env_t *);
304*7c478bd9Sstevel@tonic-gate void unbug(fcode_env_t *);
305*7c478bd9Sstevel@tonic-gate void xbflip(fcode_env_t *);
306*7c478bd9Sstevel@tonic-gate void xfetch(fcode_env_t *);
307*7c478bd9Sstevel@tonic-gate void xlflip(fcode_env_t *);
308*7c478bd9Sstevel@tonic-gate void xstore(fcode_env_t *);
309*7c478bd9Sstevel@tonic-gate void expose_acf(fcode_env_t *, char *);
310*7c478bd9Sstevel@tonic-gate 
311*7c478bd9Sstevel@tonic-gate FNPROTO(do_semi);
312*7c478bd9Sstevel@tonic-gate FNPROTO(do_colon);
313*7c478bd9Sstevel@tonic-gate FNPROTO(do_next);
314*7c478bd9Sstevel@tonic-gate void do_run(fcode_env_t *, int);
315*7c478bd9Sstevel@tonic-gate 
316*7c478bd9Sstevel@tonic-gate void *safe_malloc(size_t, char *, int);
317*7c478bd9Sstevel@tonic-gate void *safe_realloc(void *, size_t, char *, int);
318*7c478bd9Sstevel@tonic-gate char *safe_strdup(char *, char *, int);
319*7c478bd9Sstevel@tonic-gate void safe_free(void *, char *, int);
320*7c478bd9Sstevel@tonic-gate 
321*7c478bd9Sstevel@tonic-gate FNPROTO(do_forth);
322*7c478bd9Sstevel@tonic-gate FNPROTO(do_current);
323*7c478bd9Sstevel@tonic-gate FNPROTO(do_context);
324*7c478bd9Sstevel@tonic-gate FNPROTO(do_definitions);
325*7c478bd9Sstevel@tonic-gate FNPROTO(do_interact);
326*7c478bd9Sstevel@tonic-gate FNPROTO(do_resume);
327*7c478bd9Sstevel@tonic-gate FNPROTO(do_vocab);
328*7c478bd9Sstevel@tonic-gate FNPROTO(create);
329*7c478bd9Sstevel@tonic-gate FNPROTO(colon);
330*7c478bd9Sstevel@tonic-gate FNPROTO(does);
331*7c478bd9Sstevel@tonic-gate FNPROTO(recursive);
332*7c478bd9Sstevel@tonic-gate FNPROTO(do_if);
333*7c478bd9Sstevel@tonic-gate FNPROTO(do_else);
334*7c478bd9Sstevel@tonic-gate FNPROTO(do_then);
335*7c478bd9Sstevel@tonic-gate FNPROTO(parse_word);
336*7c478bd9Sstevel@tonic-gate FNPROTO(do_quote);
337*7c478bd9Sstevel@tonic-gate FNPROTO(run_quote);
338*7c478bd9Sstevel@tonic-gate 
339*7c478bd9Sstevel@tonic-gate FNPROTO(do_order);
340*7c478bd9Sstevel@tonic-gate FNPROTO(do_also);
341*7c478bd9Sstevel@tonic-gate FNPROTO(do_previous);
342*7c478bd9Sstevel@tonic-gate 
343*7c478bd9Sstevel@tonic-gate FNPROTO(find_package);
344*7c478bd9Sstevel@tonic-gate FNPROTO(open_package);
345*7c478bd9Sstevel@tonic-gate FNPROTO(close_package);
346*7c478bd9Sstevel@tonic-gate FNPROTO(find_method);
347*7c478bd9Sstevel@tonic-gate FNPROTO(dollar_call_parent);
348*7c478bd9Sstevel@tonic-gate FNPROTO(my_parent);
349*7c478bd9Sstevel@tonic-gate FNPROTO(my_unit);
350*7c478bd9Sstevel@tonic-gate FNPROTO(ihandle_to_phandle);
351*7c478bd9Sstevel@tonic-gate FNPROTO(dollar_call_method);
352*7c478bd9Sstevel@tonic-gate FNPROTO(dollar_open_package);
353*7c478bd9Sstevel@tonic-gate 
354*7c478bd9Sstevel@tonic-gate FNPROTO(call_environment_method);
355*7c478bd9Sstevel@tonic-gate 
356*7c478bd9Sstevel@tonic-gate FNPROTO(f_abort);
357*7c478bd9Sstevel@tonic-gate FNPROTO(catch);
358*7c478bd9Sstevel@tonic-gate FNPROTO(throw);
359*7c478bd9Sstevel@tonic-gate 
360*7c478bd9Sstevel@tonic-gate FNPROTO(get_my_property);
361*7c478bd9Sstevel@tonic-gate FNPROTO(decode_int);
362*7c478bd9Sstevel@tonic-gate FNPROTO(decode_string);
363*7c478bd9Sstevel@tonic-gate FNPROTO(get_inherited_prop);
364*7c478bd9Sstevel@tonic-gate FNPROTO(delete_property);
365*7c478bd9Sstevel@tonic-gate FNPROTO(get_package_property);
366*7c478bd9Sstevel@tonic-gate void get_environment_property(fcode_env_t *env, int);
367*7c478bd9Sstevel@tonic-gate 
368*7c478bd9Sstevel@tonic-gate FNPROTO(root_node);
369*7c478bd9Sstevel@tonic-gate FNPROTO(current_device);
370*7c478bd9Sstevel@tonic-gate FNPROTO(dot_properties);
371*7c478bd9Sstevel@tonic-gate FNPROTO(pwd);
372*7c478bd9Sstevel@tonic-gate FNPROTO(do_ls);
373*7c478bd9Sstevel@tonic-gate FNPROTO(do_cd);
374*7c478bd9Sstevel@tonic-gate FNPROTO(do_select_dev);
375*7c478bd9Sstevel@tonic-gate FNPROTO(do_unselect_dev);
376*7c478bd9Sstevel@tonic-gate FNPROTO(device_end);
377*7c478bd9Sstevel@tonic-gate FNPROTO(value);
378*7c478bd9Sstevel@tonic-gate FNPROTO(buffer_colon);
379*7c478bd9Sstevel@tonic-gate FNPROTO(variable);
380*7c478bd9Sstevel@tonic-gate FNPROTO(constant);
381*7c478bd9Sstevel@tonic-gate FNPROTO(actions);
382*7c478bd9Sstevel@tonic-gate FNPROTO(use_actions);
383*7c478bd9Sstevel@tonic-gate FNPROTO(action_colon);
384*7c478bd9Sstevel@tonic-gate FNPROTO(perform_action);
385*7c478bd9Sstevel@tonic-gate FNPROTO(do_tick);
386*7c478bd9Sstevel@tonic-gate FNPROTO(bracket_tick);
387*7c478bd9Sstevel@tonic-gate FNPROTO(defer);
388*7c478bd9Sstevel@tonic-gate FNPROTO(bye);
389*7c478bd9Sstevel@tonic-gate FNPROTO(dump_device);
390*7c478bd9Sstevel@tonic-gate FNPROTO(dump_instance);
391*7c478bd9Sstevel@tonic-gate FNPROTO(compile_string);
392*7c478bd9Sstevel@tonic-gate FNPROTO(parse_two_int);
393*7c478bd9Sstevel@tonic-gate 
394*7c478bd9Sstevel@tonic-gate token_t *alloc_instance_data(fcode_env_t *, int, int, int *);
395*7c478bd9Sstevel@tonic-gate FNPROTO(fetch_instance_data);
396*7c478bd9Sstevel@tonic-gate FNPROTO(set_instance_data);
397*7c478bd9Sstevel@tonic-gate FNPROTO(address_instance_data);
398*7c478bd9Sstevel@tonic-gate FNPROTO(instance_variable);
399*7c478bd9Sstevel@tonic-gate FNPROTO(decode_phys);
400*7c478bd9Sstevel@tonic-gate 
401*7c478bd9Sstevel@tonic-gate void install_actions(fcode_env_t *env, token_t *table);
402*7c478bd9Sstevel@tonic-gate void set_value_actions(fcode_env_t *env, int);
403*7c478bd9Sstevel@tonic-gate void set_internal_value_actions(fcode_env_t *env);
404*7c478bd9Sstevel@tonic-gate void set_buffer_actions(fcode_env_t *env, int);
405*7c478bd9Sstevel@tonic-gate 
406*7c478bd9Sstevel@tonic-gate void system_message(fcode_env_t *env, char *msg);
407*7c478bd9Sstevel@tonic-gate 
408*7c478bd9Sstevel@tonic-gate void check_interrupt(void);
409*7c478bd9Sstevel@tonic-gate void complete_interrupt(void);
410*7c478bd9Sstevel@tonic-gate 
411*7c478bd9Sstevel@tonic-gate FNPROTO(do_set_action);
412*7c478bd9Sstevel@tonic-gate void push_a_string(fcode_env_t *, char *);
413*7c478bd9Sstevel@tonic-gate char *pop_a_string(fcode_env_t *, int *);
414*7c478bd9Sstevel@tonic-gate char *pop_a_duped_string(fcode_env_t *, int *);
415*7c478bd9Sstevel@tonic-gate char *parse_a_string(fcode_env_t *, int *);
416*7c478bd9Sstevel@tonic-gate void push_double(fcode_env_t *, dforth_t);
417*7c478bd9Sstevel@tonic-gate dforth_t pop_double(fcode_env_t *);
418*7c478bd9Sstevel@tonic-gate dforth_t peek_double(fcode_env_t *);
419*7c478bd9Sstevel@tonic-gate void push_xforth(fcode_env_t *, xforth_t);
420*7c478bd9Sstevel@tonic-gate xforth_t pop_xforth(fcode_env_t *);
421*7c478bd9Sstevel@tonic-gate xforth_t peek_xforth(fcode_env_t *);
422*7c478bd9Sstevel@tonic-gate void create_prop(fcode_env_t *, char *);
423*7c478bd9Sstevel@tonic-gate void create_int_prop(fcode_env_t *, char *, int);
424*7c478bd9Sstevel@tonic-gate void create_string_prop(fcode_env_t *, char *, char *);
425*7c478bd9Sstevel@tonic-gate void make_builtin_hooks(fcode_env_t *, char *);
426*7c478bd9Sstevel@tonic-gate fstack_t mapping_to_mcookie(uint64_t, size_t, uint64_t, size_t);
427*7c478bd9Sstevel@tonic-gate void delete_mapping(fstack_t);
428*7c478bd9Sstevel@tonic-gate int is_mcookie(fstack_t);
429*7c478bd9Sstevel@tonic-gate uint64_t mcookie_to_addr(fstack_t);
430*7c478bd9Sstevel@tonic-gate fstack_t mcookie_to_rlen(fstack_t);
431*7c478bd9Sstevel@tonic-gate fstack_t mcookie_to_rvirt(fstack_t);
432*7c478bd9Sstevel@tonic-gate void set_here(fcode_env_t *, uchar_t *, char *);
433*7c478bd9Sstevel@tonic-gate int call_my_parent(fcode_env_t *, char *);
434*7c478bd9Sstevel@tonic-gate FILE *get_dump_fd(fcode_env_t *);
435*7c478bd9Sstevel@tonic-gate 
436*7c478bd9Sstevel@tonic-gate void load_file(fcode_env_t *);
437*7c478bd9Sstevel@tonic-gate void token_roundup(fcode_env_t *, char *);
438*7c478bd9Sstevel@tonic-gate 
439*7c478bd9Sstevel@tonic-gate #ifdef DEBUG
440*7c478bd9Sstevel@tonic-gate void do_fclib_trace(fcode_env_t *, void *);
441*7c478bd9Sstevel@tonic-gate int do_fclib_step(fcode_env_t *);
442*7c478bd9Sstevel@tonic-gate #endif
443*7c478bd9Sstevel@tonic-gate 
444*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
445*7c478bd9Sstevel@tonic-gate }
446*7c478bd9Sstevel@tonic-gate #endif
447*7c478bd9Sstevel@tonic-gate 
448*7c478bd9Sstevel@tonic-gate #endif /* _FCODE_PROTO_H */
449