summaryrefslogtreecommitdiff
path: root/libguile/srfi-4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/srfi-4.c')
-rw-r--r--libguile/srfi-4.c83
1 files changed, 45 insertions, 38 deletions
diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c
index b0ed0ce17..cb9de9d8f 100644
--- a/libguile/srfi-4.c
+++ b/libguile/srfi-4.c
@@ -1,37 +1,44 @@
/* srfi-4.c --- Uniform numeric vector datatypes.
- *
- * Copyright (C) 2001, 2004, 2006, 2009, 2010, 2011, 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 2001,2004,2006,2009-2011,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/__scm.h"
-#include "libguile/bdw-gc.h"
-#include "libguile/srfi-4.h"
-#include "libguile/bytevectors.h"
-#include "libguile/error.h"
-#include "libguile/eval.h"
-#include "libguile/extensions.h"
-#include "libguile/uniform.h"
-#include "libguile/validate.h"
+#include <string.h>
+
+#include "bdw-gc.h"
+#include "boolean.h"
+#include "bytevectors.h"
+#include "error.h"
+#include "eval.h"
+#include "extensions.h"
+#include "generalized-vectors.h"
+#include "gsubr.h"
+#include "modules.h"
+#include "numbers.h"
+#include "uniform.h"
+#include "variable.h"
+
+#include "srfi-4.h"
#define DEFINE_SCHEME_PROXY100(cname, modname, scmname) \
@@ -112,7 +119,7 @@
#define DEFINE_SRFI_4_C_FUNCS(TAG, tag, ctype, width) \
SCM scm_take_##tag##vector (ctype *data, size_t n) \
{ \
- return scm_c_take_typed_bytevector ((scm_t_int8*)data, n, ETYPE (TAG), \
+ return scm_c_take_typed_bytevector ((int8_t*)data, n, ETYPE (TAG), \
SCM_BOOL_F); \
} \
const ctype* scm_array_handle_##tag##_elements (scm_t_array_handle *h) \
@@ -156,28 +163,28 @@
#define MOD "srfi srfi-4"
DEFINE_SRFI_4_PROXIES (u8);
-DEFINE_SRFI_4_C_FUNCS (U8, u8, scm_t_uint8, 1);
+DEFINE_SRFI_4_C_FUNCS (U8, u8, uint8_t, 1);
DEFINE_SRFI_4_PROXIES (s8);
-DEFINE_SRFI_4_C_FUNCS (S8, s8, scm_t_int8, 1);
+DEFINE_SRFI_4_C_FUNCS (S8, s8, int8_t, 1);
DEFINE_SRFI_4_PROXIES (u16);
-DEFINE_SRFI_4_C_FUNCS (U16, u16, scm_t_uint16, 1);
+DEFINE_SRFI_4_C_FUNCS (U16, u16, uint16_t, 1);
DEFINE_SRFI_4_PROXIES (s16);
-DEFINE_SRFI_4_C_FUNCS (S16, s16, scm_t_int16, 1);
+DEFINE_SRFI_4_C_FUNCS (S16, s16, int16_t, 1);
DEFINE_SRFI_4_PROXIES (u32);
-DEFINE_SRFI_4_C_FUNCS (U32, u32, scm_t_uint32, 1);
+DEFINE_SRFI_4_C_FUNCS (U32, u32, uint32_t, 1);
DEFINE_SRFI_4_PROXIES (s32);
-DEFINE_SRFI_4_C_FUNCS (S32, s32, scm_t_int32, 1);
+DEFINE_SRFI_4_C_FUNCS (S32, s32, int32_t, 1);
DEFINE_SRFI_4_PROXIES (u64);
-DEFINE_SRFI_4_C_FUNCS (U64, u64, scm_t_uint64, 1);
+DEFINE_SRFI_4_C_FUNCS (U64, u64, uint64_t, 1);
DEFINE_SRFI_4_PROXIES (s64);
-DEFINE_SRFI_4_C_FUNCS (S64, s64, scm_t_int64, 1);
+DEFINE_SRFI_4_C_FUNCS (S64, s64, int64_t, 1);
DEFINE_SRFI_4_PROXIES (f32);
DEFINE_SRFI_4_C_FUNCS (F32, f32, float, 1);
@@ -291,7 +298,7 @@ scm_init_srfi_4 (void)
REGISTER (c32, C32);
REGISTER (c64, C64);
-#include "libguile/srfi-4.x"
+#include "srfi-4.x"
}
/* End of srfi-4.c. */