The FSF has a new address.
[bpt/guile.git] / libguile / dynwind.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
0527e687
DH
3#ifndef SCM_DYNWIND_H
4#define SCM_DYNWIND_H
5
4845bbae 6/* Copyright (C) 1995,1996,1998,1999,2000,2003,2004 Free Software Foundation, Inc.
0527e687 7 *
73be1d9e
MV
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
0527e687 12 *
73be1d9e 13 * This library is distributed in the hope that it will be useful,
0f2d19dd 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
73be1d9e
MV
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
0527e687 17 *
73be1d9e
MV
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
92205699 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
73be1d9e 21 */
0527e687 22
0f2d19dd 23\f
0527e687 24
b4309c3c 25#include "libguile/__scm.h"
0f2d19dd
JB
26
27\f
0f2d19dd 28
92c2555f
MV
29typedef void (*scm_t_guard) (void *);
30typedef SCM (*scm_t_inner) (void *);
3346a90f 31
33b001fd
MV
32SCM_API SCM scm_dynamic_wind (SCM thunk1, SCM thunk2, SCM thunk3);
33SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
34 scm_t_inner inner,
35 scm_t_guard after,
36 void *inner_data,
37 void *guard_data);
38SCM_API void scm_dowinds (SCM to, long delta);
14578fa4 39SCM_API void scm_i_dowinds (SCM to, long delta,
4845bbae 40 void (*turn_func) (void *), void *data);
33b001fd 41SCM_API void scm_init_dynwind (void);
0f2d19dd 42
33b001fd 43SCM_API void scm_swap_bindings (SCM vars, SCM vals);
2e171178 44
4845bbae
MV
45typedef enum {
46 SCM_F_FRAME_REWINDABLE = (1 << 0)
47} scm_t_frame_flags;
48
49typedef enum {
62f3c095 50 SCM_F_WIND_EXPLICITLY = (1 << 0)
4845bbae
MV
51} scm_t_wind_flags;
52
0888de4f
MV
53SCM_API void scm_frame_begin (scm_t_frame_flags);
54SCM_API void scm_frame_end (void);
55
16c5cac2
MV
56SCM_API void scm_frame_unwind_handler (void (*func) (void *), void *data,
57 scm_t_wind_flags);
58SCM_API void scm_frame_rewind_handler (void (*func) (void *), void *data,
59 scm_t_wind_flags);
60
61SCM_API void scm_frame_unwind_handler_with_scm (void (*func) (SCM), SCM data,
62 scm_t_wind_flags);
63SCM_API void scm_frame_rewind_handler_with_scm (void (*func) (SCM), SCM data,
64 scm_t_wind_flags);
62f3c095 65
6d5649b7
MV
66SCM_API void scm_frame_free (void *mem);
67
f3667f52 68#ifdef GUILE_DEBUG
33b001fd 69SCM_API SCM scm_wind_chain (void);
f3667f52
JB
70#endif /*GUILE_DEBUG*/
71
0527e687 72#endif /* SCM_DYNWIND_H */
89e00824
ML
73
74/*
75 Local Variables:
76 c-file-style: "gnu"
77 End:
78*/