summaryrefslogtreecommitdiff
path: root/libguile/macros.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/macros.c')
-rw-r--r--libguile/macros.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/libguile/macros.c b/libguile/macros.c
index 94421c17a..e26ed651c 100644
--- a/libguile/macros.c
+++ b/libguile/macros.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003, 2006, 2008, 2009, 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-1998,2000-2003,2006,2008-2012,2018-2019
+ 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/>. */
@@ -22,14 +23,19 @@
# include <config.h>
#endif
-#include "libguile/_scm.h"
-#include "libguile/ports.h"
-#include "libguile/print.h"
-#include "libguile/smob.h"
-#include "libguile/validate.h"
-#include "libguile/macros.h"
+#include "boolean.h"
+#include "gsubr.h"
+#include "modules.h"
+#include "ports.h"
+#include "print.h"
+#include "private-options.h"
+#include "procs.h"
+#include "random.h"
+#include "smob.h"
+#include "symbols.h"
+#include "variable.h"
-#include "libguile/private-options.h"
+#include "macros.h"
static scm_t_bits scm_tc16_macro;
@@ -58,6 +64,8 @@ macro_print (SCM macro, SCM port, scm_print_state *pstate)
return 1;
}
+SCM_SYMBOL (sym_primitive_macro, "primitive-macro");
+
/* Return a mmacro that is known to be one of guile's built in macros. */
SCM
scm_i_make_primitive_macro (const char *name, scm_t_macro_primitive fn)
@@ -65,7 +73,7 @@ scm_i_make_primitive_macro (const char *name, scm_t_macro_primitive fn)
SCM z = scm_words (scm_tc16_macro, 5);
SCM_SET_SMOB_DATA_N (z, 1, (scm_t_bits)fn);
SCM_SET_SMOB_OBJECT_N (z, 2, scm_from_utf8_symbol (name));
- SCM_SET_SMOB_OBJECT_N (z, 3, SCM_BOOL_F);
+ SCM_SET_SMOB_OBJECT_N (z, 3, sym_primitive_macro);
SCM_SET_SMOB_OBJECT_N (z, 4, SCM_BOOL_F);
return z;
}
@@ -213,14 +221,8 @@ scm_init_macros ()
{
scm_tc16_macro = scm_make_smob_type ("macro", 0);
scm_set_smob_print (scm_tc16_macro, macro_print);
-#include "libguile/macros.x"
+#include "macros.x"
syntax_session_id = fresh_syntax_session_id();
scm_c_define_gsubr ("syntax-session-id", 0, 0, 0, scm_syntax_session_id);
}
-
-/*
- Local Variables:
- c-file-style: "gnu"
- End:
-*/