summaryrefslogtreecommitdiff
path: root/libguile/srfi-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/srfi-1.c')
-rw-r--r--libguile/srfi-1.c71
1 files changed, 37 insertions, 34 deletions
diff --git a/libguile/srfi-1.c b/libguile/srfi-1.c
index 08a4b22e2..ca812935a 100644
--- a/libguile/srfi-1.c
+++ b/libguile/srfi-1.c
@@ -1,38 +1,46 @@
/* srfi-1.c --- SRFI-1 procedures for Guile
- *
- * Copyright (C) 1995-1997, 2000-2003, 2005, 2006, 2008-2011, 2013
- * 2014 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-1997,2000-2003,2005-2006,2008-2011,2013-2014,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>
#endif
-#include "libguile/_scm.h"
-#include "libguile/eq.h"
+#include <stdarg.h>
-#include "libguile/validate.h"
-#include "libguile/list.h"
-#include "libguile/eval.h"
-#include "libguile/srfi-1.h"
+#include "boolean.h"
+#include "eq.h"
+#include "eval.h"
+#include "extensions.h"
+#include "gsubr.h"
+#include "list.h"
+#include "pairs.h"
+#include "procs.h"
+#include "values.h"
+#include "vectors.h"
+#include "version.h"
-#include <stdarg.h>
+#include "srfi-1.h"
/* The intent of this file was to gradually replace those Scheme
@@ -811,12 +819,7 @@ SCM_DEFINE (scm_srfi1_partition, "partition", 2, 0, 0,
dropped_tail = new_tail;
}
}
- /* re-use the initial conses for the values list */
- SCM_SETCAR(kept, SCM_CDR(kept));
- SCM_SETCDR(kept, dropped);
- SCM_SETCAR(dropped, SCM_CDR(dropped));
- SCM_SETCDR(dropped, SCM_EOL);
- return scm_values(kept);
+ return scm_values_2 (SCM_CDR (kept), SCM_CDR (dropped));
}
#undef FUNC_NAME
@@ -870,7 +873,7 @@ SCM_DEFINE (scm_srfi1_partition_x, "partition!", 2, 0, 0,
*tp = SCM_EOL;
*fp = SCM_EOL;
- return scm_values (scm_list_2 (tlst, flst));
+ return scm_values_2 (tlst, flst);
}
#undef FUNC_NAME
@@ -947,7 +950,7 @@ void
scm_init_srfi_1 (void)
{
#ifndef SCM_MAGIC_SNARFER
-#include "libguile/srfi-1.x"
+#include "srfi-1.x"
#endif
}