1 /* Copyright (C) 2010 Free Software Foundation, Inc.
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public License
5 * as published by the Free Software Foundation; either version 3 of
6 * the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 #include "libguile/_scm.h"
24 #include "libguile/control.h"
28 SCM
scm_atcontrol (SCM
, SCM
, SCM
);
29 SCM_DEFINE (scm_atcontrol
, "@control", 3, 0, 0,
30 (SCM tag
, SCM type
, SCM args
),
31 "Transfer control to the handler of a delimited continuation.")
32 #define FUNC_NAME s_scm_atcontrol
35 return SCM_UNSPECIFIED
;
39 SCM
scm_atprompt (SCM
, SCM
, SCM
, SCM
);
40 SCM_DEFINE (scm_atprompt
, "@prompt", 4, 0, 0,
41 (SCM tag
, SCM thunk
, SCM handler
, SCM pre_unwind_handler
),
42 "Begin a delimited continuation.")
43 #define FUNC_NAME s_scm_atprompt
46 return SCM_UNSPECIFIED
;
53 scm_init_control (void)
55 #ifndef SCM_MAGIC_SNARFER
56 #include "libguile/control.x"
61 scm_register_control (void)
63 scm_c_register_extension ("libguile", "scm_init_control",
64 (scm_t_extension_init_func
)scm_init_control
,