Line 0
Link Here
|
|
|
1 |
--- CMakeLists.txt (revision 11761) |
Lines 85-103
Link Here
|
85 |
#ifndef DEBUG_ON |
85 |
#ifndef DEBUG_ON |
86 |
static SCM |
86 |
static SCM |
87 |
TeXmacs_lazy_eval_file (char *file) { |
87 |
TeXmacs_lazy_eval_file (char *file) { |
|
|
88 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
88 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
89 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
89 |
(scm_t_catch_body) scm_c_primitive_load, file, |
90 |
(scm_t_catch_body) scm_c_primitive_load, file, |
90 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, file); |
91 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, file); |
|
|
92 |
#else |
93 |
return scm_c_with_throw_handler (SCM_BOOL_T, |
94 |
(scm_t_catch_body) scm_c_primitive_load, file, |
95 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, |
96 |
file, 0); |
97 |
#endif |
91 |
} |
98 |
} |
92 |
#endif |
99 |
#endif |
93 |
|
100 |
|
94 |
static SCM |
101 |
static SCM |
95 |
TeXmacs_eval_file (char *file) { |
102 |
TeXmacs_eval_file (char *file) { |
96 |
#ifndef DEBUG_ON |
103 |
#ifndef DEBUG_ON |
|
|
104 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
97 |
return scm_internal_catch (SCM_BOOL_T, |
105 |
return scm_internal_catch (SCM_BOOL_T, |
98 |
(scm_t_catch_body) TeXmacs_lazy_eval_file, file, |
106 |
(scm_t_catch_body) TeXmacs_lazy_eval_file, file, |
99 |
(scm_t_catch_handler) TeXmacs_catcher, file); |
107 |
(scm_t_catch_handler) TeXmacs_catcher, file); |
100 |
#else |
108 |
#else |
|
|
109 |
return scm_c_catch (SCM_BOOL_T, |
110 |
(scm_t_catch_body) TeXmacs_lazy_eval_file, file, |
111 |
(scm_t_catch_handler) TeXmacs_catcher, file, NULL, NULL); |
112 |
|
113 |
#endif |
114 |
|
115 |
#else |
101 |
return scm_c_primitive_load (file); |
116 |
return scm_c_primitive_load (file); |
102 |
#endif |
117 |
#endif |
103 |
} |
118 |
} |
Lines 121-139
Link Here
|
121 |
#ifndef DEBUG_ON |
136 |
#ifndef DEBUG_ON |
122 |
static SCM |
137 |
static SCM |
123 |
TeXmacs_lazy_eval_string (char *s) { |
138 |
TeXmacs_lazy_eval_string (char *s) { |
|
|
139 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
124 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
140 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
125 |
(scm_t_catch_body) scm_c_eval_string, s, |
141 |
(scm_t_catch_body) scm_c_eval_string, s, |
126 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, s); |
142 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, s); |
|
|
143 |
#else |
144 |
return scm_c_with_throw_handler (SCM_BOOL_T, |
145 |
(scm_t_catch_body) scm_c_eval_string, s, |
146 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, |
147 |
s, 0); |
148 |
#endif |
127 |
} |
149 |
} |
128 |
#endif |
150 |
#endif |
129 |
|
151 |
|
130 |
static SCM |
152 |
static SCM |
131 |
TeXmacs_eval_string (char *s) { |
153 |
TeXmacs_eval_string (char *s) { |
132 |
#ifndef DEBUG_ON |
154 |
#ifndef DEBUG_ON |
|
|
155 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
133 |
return scm_internal_catch (SCM_BOOL_T, |
156 |
return scm_internal_catch (SCM_BOOL_T, |
134 |
(scm_t_catch_body) TeXmacs_lazy_eval_string, s, |
157 |
(scm_t_catch_body) TeXmacs_lazy_eval_string, s, |
135 |
(scm_t_catch_handler) TeXmacs_catcher, s); |
158 |
(scm_t_catch_handler) TeXmacs_catcher, s); |
136 |
#else |
159 |
#else |
|
|
160 |
return scm_c_catch (SCM_BOOL_T, |
161 |
(scm_t_catch_body) TeXmacs_lazy_eval_string, s, |
162 |
(scm_t_catch_handler) TeXmacs_catcher, s, NULL, NULL); |
163 |
|
164 |
#endif |
165 |
#else |
137 |
return scm_c_eval_string(s); |
166 |
return scm_c_eval_string(s); |
138 |
#endif |
167 |
#endif |
139 |
} |
168 |
} |
Lines 180-198
Link Here
|
180 |
#ifndef DEBUG_ON |
209 |
#ifndef DEBUG_ON |
181 |
static SCM |
210 |
static SCM |
182 |
TeXmacs_lazy_call_scm (arg_list* args) { |
211 |
TeXmacs_lazy_call_scm (arg_list* args) { |
|
|
212 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
183 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
213 |
return scm_internal_lazy_catch (SCM_BOOL_T, |
184 |
(scm_t_catch_body) TeXmacs_call, (void*) args, |
214 |
(scm_t_catch_body) TeXmacs_call, (void*) args, |
185 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, (void*) args); |
215 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, |
|
|
216 |
(void*) args); |
217 |
#else |
218 |
return scm_c_with_throw_handler (SCM_BOOL_T, |
219 |
(scm_t_catch_body) TeXmacs_call, (void*) args, |
220 |
(scm_t_catch_handler) TeXmacs_lazy_catcher, |
221 |
(void*) args, 0); |
222 |
|
223 |
#endif |
186 |
} |
224 |
} |
187 |
#endif |
225 |
#endif |
188 |
|
226 |
|
189 |
static SCM |
227 |
static SCM |
190 |
TeXmacs_call_scm (arg_list *args) { |
228 |
TeXmacs_call_scm (arg_list *args) { |
191 |
#ifndef DEBUG_ON |
229 |
#ifndef DEBUG_ON |
|
|
230 |
#if (defined(GUILE_A) || defined(GUILE_B)) |
192 |
return scm_internal_catch (SCM_BOOL_T, |
231 |
return scm_internal_catch (SCM_BOOL_T, |
193 |
(scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args, |
232 |
(scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args, |
194 |
(scm_t_catch_handler) TeXmacs_catcher, (void*) args); |
233 |
(scm_t_catch_handler) TeXmacs_catcher, (void*) args); |
195 |
#else |
234 |
#else |
|
|
235 |
return scm_c_catch (SCM_BOOL_T, |
236 |
(scm_t_catch_body) TeXmacs_lazy_call_scm, (void*) args, |
237 |
(scm_t_catch_handler) TeXmacs_catcher, (void*) args, |
238 |
NULL, NULL); |
239 |
#endif |
240 |
#else |
196 |
return TeXmacs_call(args); |
241 |
return TeXmacs_call(args); |
197 |
#endif |
242 |
#endif |
198 |
} |
243 |
} |
Lines 443-449
Link Here
|
443 |
return SCM_BOOL_F; |
488 |
return SCM_BOOL_F; |
444 |
} |
489 |
} |
445 |
|
490 |
|
|
|
491 |
#ifdef GUILE_A |
446 |
static scm_sizet |
492 |
static scm_sizet |
|
|
493 |
#else |
494 |
static size_t |
495 |
#endif |
447 |
free_blackbox (SCM blackbox_smob) { |
496 |
free_blackbox (SCM blackbox_smob) { |
448 |
blackbox *ptr = (blackbox *) SCM_CDR (blackbox_smob); |
497 |
blackbox *ptr = (blackbox *) SCM_CDR (blackbox_smob); |
449 |
#ifdef DEBUG_ON |
498 |
#ifdef DEBUG_ON |