Don't install the unwashed masses of Guile header files in the
[bpt/guile.git] / libguile / root.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
3#ifndef ROOTH
4#define ROOTH
5
6/* Copyright (C) 1996 Free Software Foundation, Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this software; see the file COPYING. If not, write to
20 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * As a special exception, the Free Software Foundation gives permission
23 * for additional uses of the text contained in its release of GUILE.
24 *
25 * The exception is that, if you link the GUILE library with other files
26 * to produce an executable, this does not by itself cause the
27 * resulting executable to be covered by the GNU General Public License.
28 * Your use of that executable is in no way restricted on account of
29 * linking the GUILE library code into it.
30 *
31 * This exception does not however invalidate any other reasons why
32 * the executable file might be covered by the GNU General Public License.
33 *
34 * This exception applies only to the code released by the
35 * Free Software Foundation under the name GUILE. If you copy
36 * code from other Free Software Foundation releases into a copy of
37 * GUILE, as the General Public License permits, the exception does
38 * not apply to the code that you add in this way. To avoid misleading
39 * anyone as to the status of such modified files, you must delete
40 * this exception notice from them.
41 *
42 * If you write modifications of your own for GUILE, it is your choice
43 * whether to permit this exception to apply to your modifications.
44 * If you do not wish that, delete this exception notice.
45 */
46\f
47
48\f
49
cd4f61de 50#include <libguile/__scm.h>
0f2d19dd
JB
51
52\f
53
54#define scm_flo0 scm_sys_protects[0]
55#define scm_listofnull scm_sys_protects[1]
56#define scm_undefineds scm_sys_protects[2]
57#define scm_nullvect scm_sys_protects[3]
58#define scm_nullstr scm_sys_protects[4]
59#define scm_symhash scm_sys_protects[5]
60#define scm_weak_symhash scm_sys_protects[6]
61#define scm_symhash_vars scm_sys_protects[7]
62#define scm_kw_obarray scm_sys_protects[8]
63#define scm_type_obj_list scm_sys_protects[9]
64#define scm_first_type scm_sys_protects[10]
65#define scm_stand_in_procs scm_sys_protects[11]
66#define scm_object_whash scm_sys_protects[12]
67#define scm_permobjs scm_sys_protects[13]
68#define scm_asyncs scm_sys_protects[14]
615aec77
MD
69#ifdef DEBUG_EXTENSIONS
70#define scm_source_whash scm_sys_protects[15]
71#define SCM_NUM_PROTECTS 16
72#else
0f2d19dd 73#define SCM_NUM_PROTECTS 15
615aec77 74#endif
0f2d19dd
JB
75
76extern SCM scm_sys_protects[];
77
78\f
79
80struct scm_root_state
81{
82 SCM_STACKITEM * stack_base;
83 jmp_buf save_regs_gc_mark;
84 int errjmp_bad;
85
86 SCM rootcont;
87 SCM dynwinds;
88 SCM continuation_stack;
89 SCM continuation_stack_ptr;
90
91 SCM progargs; /* vestigial */
92 SCM exitval; /* vestigial */
93
94 SCM cur_inp;
95 SCM cur_outp;
96 SCM cur_errp;
97 SCM def_inp;
98 SCM def_outp;
99 SCM def_errp;
100
101 SCM system_transformer;
102 SCM top_level_lookup_thunk_var;
103};
104
105#define scm_stack_base (scm_root->stack_base)
106#define scm_save_regs_gc_mark (scm_root->save_regs_gc_mark)
107#define scm_errjmp_bad (scm_root->errjmp_bad)
108
109#define scm_rootcont (scm_root->rootcont)
110#define scm_dynwinds (scm_root->dynwinds)
111#define scm_continuation_stack (scm_root->continuation_stack)
112#define scm_continuation_stack_ptr (scm_root->continuation_stack_ptr)
113#define scm_progargs (scm_root->progargs)
114#define scm_exitval (scm_root->exitval)
115#define scm_cur_inp (scm_root->cur_inp)
116#define scm_cur_outp (scm_root->cur_outp)
117#define scm_cur_errp (scm_root->cur_errp)
118#define scm_def_inp (scm_root->def_inp)
119#define scm_def_outp (scm_root->def_outp)
120#define scm_def_errp (scm_root->def_errp)
121#define scm_top_level_lookup_thunk_var (scm_root->top_level_lookup_thunk_var)
122#define scm_system_transformer (scm_root->system_transformer)
123
124
125extern struct scm_root_state * scm_root;
126
127\f
128
129
130#ifdef __STDC__
131extern SCM scm_call_catching_errors (SCM (*thunk)(), SCM (*err_filter)(), void * closure);
132
133#else /* STDC */
134extern SCM scm_call_catching_errors ();
135
136#endif /* STDC */
137
138
139
140
141
142
143#endif /* ROOTH */