3 /* srfi-4.c --- Homogeneous numeric vector datatypes.
5 * Copyright (C) 2001 Free Software Foundation, Inc.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2, or (at
10 * your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this software; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
22 * As a special exception, the Free Software Foundation gives
23 * permission for additional uses of the text contained in its release
26 * The exception is that, if you link the GUILE library with other
27 * files to produce an executable, this does not by itself cause the
28 * resulting executable to be covered by the GNU General Public
29 * License. Your use of that executable is in no way restricted on
30 * account of linking the GUILE library code into it.
32 * This exception does not however invalidate any other reasons why
33 * the executable file might be covered by the GNU General Public
36 * This exception applies only to the code released by the Free
37 * Software Foundation under the name GUILE. If you copy code from
38 * other Free Software Foundation releases into a copy of GUILE, as
39 * the General Public License permits, the exception does not apply to
40 * the code that you add in this way. To avoid misleading anyone as
41 * to the status of such modified files, you must delete this
42 * exception notice from them.
44 * If you write modifications of your own for GUILE, it is your choice
45 * whether to permit this exception to apply to your modifications.
46 * If you do not wish that, delete this exception notice. */
49 /* SCM_SRFI4_API is a macro prepended to all function and data definitions
50 which should be exported or imported in the resulting dynamic link
51 library in the Win32 port. */
53 #if defined (SCM_SRFI4_IMPORT)
54 # define SCM_SRFI4_API __declspec (dllimport) extern
55 #elif defined (SCM_SRFI4_EXPORT) || defined (DLL_EXPORT)
56 # define SCM_SRFI4_API __declspec (dllexport) extern
58 # define SCM_SRFI4_API extern
61 SCM_SRFI4_API SCM
scm_u8vector_p (SCM obj
);
62 SCM_SRFI4_API SCM
scm_make_u8vector (SCM n
, SCM fill
);
63 SCM_SRFI4_API SCM
scm_u8vector (SCM l
);
64 SCM_SRFI4_API SCM
scm_u8vector_length (SCM uvec
);
65 SCM_SRFI4_API SCM
scm_u8vector_ref (SCM uvec
, SCM index
);
66 SCM_SRFI4_API SCM
scm_u8vector_set_x (SCM uvec
, SCM index
, SCM value
);
67 SCM_SRFI4_API SCM
scm_u8vector_to_list (SCM uvec
);
68 SCM_SRFI4_API SCM
scm_list_to_u8vector (SCM l
);
70 SCM_SRFI4_API SCM
scm_s8vector_p (SCM obj
);
71 SCM_SRFI4_API SCM
scm_make_s8vector (SCM n
, SCM fill
);
72 SCM_SRFI4_API SCM
scm_s8vector (SCM l
);
73 SCM_SRFI4_API SCM
scm_s8vector_length (SCM uvec
);
74 SCM_SRFI4_API SCM
scm_s8vector_ref (SCM uvec
, SCM index
);
75 SCM_SRFI4_API SCM
scm_s8vector_set_x (SCM uvec
, SCM index
, SCM value
);
76 SCM_SRFI4_API SCM
scm_s8vector_to_list (SCM uvec
);
77 SCM_SRFI4_API SCM
scm_list_to_s8vector (SCM l
);
79 SCM_SRFI4_API SCM
scm_u16vector_p (SCM obj
);
80 SCM_SRFI4_API SCM
scm_make_u16vector (SCM n
, SCM fill
);
81 SCM_SRFI4_API SCM
scm_u16vector (SCM l
);
82 SCM_SRFI4_API SCM
scm_u16vector_length (SCM uvec
);
83 SCM_SRFI4_API SCM
scm_u16vector_ref (SCM uvec
, SCM index
);
84 SCM_SRFI4_API SCM
scm_u16vector_set_x (SCM uvec
, SCM index
, SCM value
);
85 SCM_SRFI4_API SCM
scm_u16vector_to_list (SCM uvec
);
86 SCM_SRFI4_API SCM
scm_list_to_u16vector (SCM l
);
88 SCM_SRFI4_API SCM
scm_s16vector_p (SCM obj
);
89 SCM_SRFI4_API SCM
scm_make_s16vector (SCM n
, SCM fill
);
90 SCM_SRFI4_API SCM
scm_s16vector (SCM l
);
91 SCM_SRFI4_API SCM
scm_s16vector_length (SCM uvec
);
92 SCM_SRFI4_API SCM
scm_s16vector_ref (SCM uvec
, SCM index
);
93 SCM_SRFI4_API SCM
scm_s16vector_set_x (SCM uvec
, SCM index
, SCM value
);
94 SCM_SRFI4_API SCM
scm_s16vector_to_list (SCM uvec
);
95 SCM_SRFI4_API SCM
scm_list_to_s16vector (SCM l
);
97 SCM_SRFI4_API SCM
scm_u32vector_p (SCM obj
);
98 SCM_SRFI4_API SCM
scm_make_u32vector (SCM n
, SCM fill
);
99 SCM_SRFI4_API SCM
scm_u32vector (SCM l
);
100 SCM_SRFI4_API SCM
scm_u32vector_length (SCM uvec
);
101 SCM_SRFI4_API SCM
scm_u32vector_ref (SCM uvec
, SCM index
);
102 SCM_SRFI4_API SCM
scm_u32vector_set_x (SCM uvec
, SCM index
, SCM value
);
103 SCM_SRFI4_API SCM
scm_u32vector_to_list (SCM uvec
);
104 SCM_SRFI4_API SCM
scm_list_to_u32vector (SCM l
);
106 SCM_SRFI4_API SCM
scm_s32vector_p (SCM obj
);
107 SCM_SRFI4_API SCM
scm_make_s32vector (SCM n
, SCM fill
);
108 SCM_SRFI4_API SCM
scm_s32vector (SCM l
);
109 SCM_SRFI4_API SCM
scm_s32vector_length (SCM uvec
);
110 SCM_SRFI4_API SCM
scm_s32vector_ref (SCM uvec
, SCM index
);
111 SCM_SRFI4_API SCM
scm_s32vector_set_x (SCM uvec
, SCM index
, SCM value
);
112 SCM_SRFI4_API SCM
scm_s32vector_to_list (SCM uvec
);
113 SCM_SRFI4_API SCM
scm_list_to_s32vector (SCM l
);
115 SCM_SRFI4_API SCM
scm_u64vector_p (SCM obj
);
116 SCM_SRFI4_API SCM
scm_make_u64vector (SCM n
, SCM fill
);
117 SCM_SRFI4_API SCM
scm_u64vector (SCM l
);
118 SCM_SRFI4_API SCM
scm_u64vector_length (SCM uvec
);
119 SCM_SRFI4_API SCM
scm_u64vector_ref (SCM uvec
, SCM index
);
120 SCM_SRFI4_API SCM
scm_u64vector_set_x (SCM uvec
, SCM index
, SCM value
);
121 SCM_SRFI4_API SCM
scm_u64vector_to_list (SCM uvec
);
122 SCM_SRFI4_API SCM
scm_list_to_u64vector (SCM l
);
124 SCM_SRFI4_API SCM
scm_s64vector_p (SCM obj
);
125 SCM_SRFI4_API SCM
scm_make_s64vector (SCM n
, SCM fill
);
126 SCM_SRFI4_API SCM
scm_s64vector (SCM l
);
127 SCM_SRFI4_API SCM
scm_s64vector_length (SCM uvec
);
128 SCM_SRFI4_API SCM
scm_s64vector_ref (SCM uvec
, SCM index
);
129 SCM_SRFI4_API SCM
scm_s64vector_set_x (SCM uvec
, SCM index
, SCM value
);
130 SCM_SRFI4_API SCM
scm_s64vector_to_list (SCM uvec
);
131 SCM_SRFI4_API SCM
scm_list_to_s64vector (SCM l
);
133 SCM_SRFI4_API SCM
scm_f32vector_p (SCM obj
);
134 SCM_SRFI4_API SCM
scm_make_f32vector (SCM n
, SCM fill
);
135 SCM_SRFI4_API SCM
scm_f32vector (SCM l
);
136 SCM_SRFI4_API SCM
scm_f32vector_length (SCM uvec
);
137 SCM_SRFI4_API SCM
scm_f32vector_ref (SCM uvec
, SCM index
);
138 SCM_SRFI4_API SCM
scm_f32vector_set_x (SCM uvec
, SCM index
, SCM value
);
139 SCM_SRFI4_API SCM
scm_f32vector_to_list (SCM uvec
);
140 SCM_SRFI4_API SCM
scm_list_to_f32vector (SCM l
);
142 SCM_SRFI4_API SCM
scm_f64vector_p (SCM obj
);
143 SCM_SRFI4_API SCM
scm_make_f64vector (SCM n
, SCM fill
);
144 SCM_SRFI4_API SCM
scm_f64vector (SCM l
);
145 SCM_SRFI4_API SCM
scm_f64vector_length (SCM uvec
);
146 SCM_SRFI4_API SCM
scm_f64vector_ref (SCM uvec
, SCM index
);
147 SCM_SRFI4_API SCM
scm_f64vector_set_x (SCM uvec
, SCM index
, SCM value
);
148 SCM_SRFI4_API SCM
scm_f64vector_to_list (SCM uvec
);
149 SCM_SRFI4_API SCM
scm_list_to_f64vector (SCM l
);
151 SCM_SRFI4_API
void scm_init_srfi_4 (void);
153 #endif /* SCM_SRFI_4_H */