summaryrefslogtreecommitdiff
path: root/libguile/dynwind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/dynwind.c')
-rw-r--r--libguile/dynwind.c69
1 files changed, 31 insertions, 38 deletions
diff --git a/libguile/dynwind.c b/libguile/dynwind.c
index 4a0b0dd2b..85bf5aabc 100644
--- a/libguile/dynwind.c
+++ b/libguile/dynwind.c
@@ -1,23 +1,21 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2008, 2010, 2011, 2012 Free Software Foundation, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-
-
+/* Copyright 1995-1996,1998-2001,2003-2004,2006,2008,2010-2012,2018
+ Free Software Foundation, Inc.
+
+ This file is part of Guile.
+
+ Guile is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Guile is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Guile. If not, see
+ <https://www.gnu.org/licenses/>. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -25,22 +23,23 @@
#include <assert.h>
-#include "libguile/_scm.h"
-#include "libguile/dynstack.h"
-#include "libguile/eval.h"
-#include "libguile/ports.h"
-
-#include "libguile/dynwind.h"
+#include "boolean.h"
+#include "dynstack.h"
+#include "eval.h"
+#include "pairs.h"
+#include "ports.h"
+#include "threads.h"
+#include "variable.h"
+#include "dynwind.h"
-
SCM
scm_dynamic_wind (SCM in_guard, SCM thunk, SCM out_guard)
#define FUNC_NAME "dynamic-wind"
{
SCM ans;
- scm_i_thread *thread = SCM_I_CURRENT_THREAD;
+ scm_thread *thread = SCM_I_CURRENT_THREAD;
SCM_ASSERT (scm_is_true (scm_thunk_p (out_guard)), out_guard,
SCM_ARG3, FUNC_NAME);
@@ -61,7 +60,7 @@ scm_dynamic_wind (SCM in_guard, SCM thunk, SCM out_guard)
void
scm_dynwind_begin (scm_t_dynwind_flags flags)
{
- scm_i_thread *thread = SCM_I_CURRENT_THREAD;
+ scm_thread *thread = SCM_I_CURRENT_THREAD;
scm_dynstack_push_frame (&thread->dynstack, flags);
}
@@ -76,7 +75,7 @@ void
scm_dynwind_unwind_handler (void (*proc) (void *), void *data,
scm_t_wind_flags flags)
{
- scm_i_thread *thread = SCM_I_CURRENT_THREAD;
+ scm_thread *thread = SCM_I_CURRENT_THREAD;
scm_t_dynstack *dynstack = &thread->dynstack;
scm_dynstack_push_unwinder (dynstack, flags, proc, data);
@@ -86,7 +85,7 @@ void
scm_dynwind_rewind_handler (void (*proc) (void *), void *data,
scm_t_wind_flags flags)
{
- scm_i_thread *thread = SCM_I_CURRENT_THREAD;
+ scm_thread *thread = SCM_I_CURRENT_THREAD;
scm_t_dynstack *dynstack = &thread->dynstack;
scm_dynstack_push_rewinder (dynstack, 0, proc, data);
@@ -134,11 +133,5 @@ scm_swap_bindings (SCM vars, SCM vals)
void
scm_init_dynwind ()
{
-#include "libguile/dynwind.x"
+#include "dynwind.x"
}
-
-/*
- Local Variables:
- c-file-style: "gnu"
- End:
-*/