Optimize reader by preferring stack-allocated buffers
[bpt/guile.git] / libguile / control.c
CommitLineData
b9c100d0
AW
1/* Copyright (C) 2010 Free Software Foundation, Inc.
2 *
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.
7 *
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.
12 *
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
16 * 02110-1301 USA
17 */
18
19#if HAVE_CONFIG_H
20# include <config.h>
21#endif
22
23#include "libguile/_scm.h"
24#include "libguile/control.h"
25
26\f
27
28SCM scm_atcontrol (SCM, SCM, SCM);
29SCM_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
33{
34 abort ();
35 return SCM_UNSPECIFIED;
36}
37#undef FUNC_NAME
38
39SCM scm_atprompt (SCM, SCM, SCM, SCM);
40SCM_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
44{
45 abort ();
46 return SCM_UNSPECIFIED;
47}
48#undef FUNC_NAME
49
50\f
51
52static void
53scm_init_control (void)
54{
55#ifndef SCM_MAGIC_SNARFER
56#include "libguile/control.x"
57#endif
58}
59
60void
61scm_register_control (void)
62{
63 scm_c_register_extension ("libguile", "scm_init_control",
64 (scm_t_extension_init_func)scm_init_control,
65 NULL);
66}
67
68/*
69 Local Variables:
70 c-file-style: "gnu"
71 End:
72*/