Changed license terms to the plain LGPL thru-out.
[bpt/guile.git] / srfi / srfi-4.h
1 #ifndef SCM_SRFI_4_H
2 #define SCM_SRFI_4_H
3 /* srfi-4.c --- Homogeneous numeric vector datatypes.
4 *
5 * Copyright (C) 2001 Free Software Foundation, Inc.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 \f
22
23 /* SCM_SRFI4_API is a macro prepended to all function and data definitions
24 which should be exported or imported in the resulting dynamic link
25 library in the Win32 port. */
26
27 #if defined (SCM_SRFI4_IMPORT)
28 # define SCM_SRFI4_API __declspec (dllimport) extern
29 #elif defined (SCM_SRFI4_EXPORT) || defined (DLL_EXPORT)
30 # define SCM_SRFI4_API __declspec (dllexport) extern
31 #else
32 # define SCM_SRFI4_API extern
33 #endif
34
35 SCM_SRFI4_API SCM scm_u8vector_p (SCM obj);
36 SCM_SRFI4_API SCM scm_make_u8vector (SCM n, SCM fill);
37 SCM_SRFI4_API SCM scm_u8vector (SCM l);
38 SCM_SRFI4_API SCM scm_u8vector_length (SCM uvec);
39 SCM_SRFI4_API SCM scm_u8vector_ref (SCM uvec, SCM index);
40 SCM_SRFI4_API SCM scm_u8vector_set_x (SCM uvec, SCM index, SCM value);
41 SCM_SRFI4_API SCM scm_u8vector_to_list (SCM uvec);
42 SCM_SRFI4_API SCM scm_list_to_u8vector (SCM l);
43
44 SCM_SRFI4_API SCM scm_s8vector_p (SCM obj);
45 SCM_SRFI4_API SCM scm_make_s8vector (SCM n, SCM fill);
46 SCM_SRFI4_API SCM scm_s8vector (SCM l);
47 SCM_SRFI4_API SCM scm_s8vector_length (SCM uvec);
48 SCM_SRFI4_API SCM scm_s8vector_ref (SCM uvec, SCM index);
49 SCM_SRFI4_API SCM scm_s8vector_set_x (SCM uvec, SCM index, SCM value);
50 SCM_SRFI4_API SCM scm_s8vector_to_list (SCM uvec);
51 SCM_SRFI4_API SCM scm_list_to_s8vector (SCM l);
52
53 SCM_SRFI4_API SCM scm_u16vector_p (SCM obj);
54 SCM_SRFI4_API SCM scm_make_u16vector (SCM n, SCM fill);
55 SCM_SRFI4_API SCM scm_u16vector (SCM l);
56 SCM_SRFI4_API SCM scm_u16vector_length (SCM uvec);
57 SCM_SRFI4_API SCM scm_u16vector_ref (SCM uvec, SCM index);
58 SCM_SRFI4_API SCM scm_u16vector_set_x (SCM uvec, SCM index, SCM value);
59 SCM_SRFI4_API SCM scm_u16vector_to_list (SCM uvec);
60 SCM_SRFI4_API SCM scm_list_to_u16vector (SCM l);
61
62 SCM_SRFI4_API SCM scm_s16vector_p (SCM obj);
63 SCM_SRFI4_API SCM scm_make_s16vector (SCM n, SCM fill);
64 SCM_SRFI4_API SCM scm_s16vector (SCM l);
65 SCM_SRFI4_API SCM scm_s16vector_length (SCM uvec);
66 SCM_SRFI4_API SCM scm_s16vector_ref (SCM uvec, SCM index);
67 SCM_SRFI4_API SCM scm_s16vector_set_x (SCM uvec, SCM index, SCM value);
68 SCM_SRFI4_API SCM scm_s16vector_to_list (SCM uvec);
69 SCM_SRFI4_API SCM scm_list_to_s16vector (SCM l);
70
71 SCM_SRFI4_API SCM scm_u32vector_p (SCM obj);
72 SCM_SRFI4_API SCM scm_make_u32vector (SCM n, SCM fill);
73 SCM_SRFI4_API SCM scm_u32vector (SCM l);
74 SCM_SRFI4_API SCM scm_u32vector_length (SCM uvec);
75 SCM_SRFI4_API SCM scm_u32vector_ref (SCM uvec, SCM index);
76 SCM_SRFI4_API SCM scm_u32vector_set_x (SCM uvec, SCM index, SCM value);
77 SCM_SRFI4_API SCM scm_u32vector_to_list (SCM uvec);
78 SCM_SRFI4_API SCM scm_list_to_u32vector (SCM l);
79
80 SCM_SRFI4_API SCM scm_s32vector_p (SCM obj);
81 SCM_SRFI4_API SCM scm_make_s32vector (SCM n, SCM fill);
82 SCM_SRFI4_API SCM scm_s32vector (SCM l);
83 SCM_SRFI4_API SCM scm_s32vector_length (SCM uvec);
84 SCM_SRFI4_API SCM scm_s32vector_ref (SCM uvec, SCM index);
85 SCM_SRFI4_API SCM scm_s32vector_set_x (SCM uvec, SCM index, SCM value);
86 SCM_SRFI4_API SCM scm_s32vector_to_list (SCM uvec);
87 SCM_SRFI4_API SCM scm_list_to_s32vector (SCM l);
88
89 SCM_SRFI4_API SCM scm_u64vector_p (SCM obj);
90 SCM_SRFI4_API SCM scm_make_u64vector (SCM n, SCM fill);
91 SCM_SRFI4_API SCM scm_u64vector (SCM l);
92 SCM_SRFI4_API SCM scm_u64vector_length (SCM uvec);
93 SCM_SRFI4_API SCM scm_u64vector_ref (SCM uvec, SCM index);
94 SCM_SRFI4_API SCM scm_u64vector_set_x (SCM uvec, SCM index, SCM value);
95 SCM_SRFI4_API SCM scm_u64vector_to_list (SCM uvec);
96 SCM_SRFI4_API SCM scm_list_to_u64vector (SCM l);
97
98 SCM_SRFI4_API SCM scm_s64vector_p (SCM obj);
99 SCM_SRFI4_API SCM scm_make_s64vector (SCM n, SCM fill);
100 SCM_SRFI4_API SCM scm_s64vector (SCM l);
101 SCM_SRFI4_API SCM scm_s64vector_length (SCM uvec);
102 SCM_SRFI4_API SCM scm_s64vector_ref (SCM uvec, SCM index);
103 SCM_SRFI4_API SCM scm_s64vector_set_x (SCM uvec, SCM index, SCM value);
104 SCM_SRFI4_API SCM scm_s64vector_to_list (SCM uvec);
105 SCM_SRFI4_API SCM scm_list_to_s64vector (SCM l);
106
107 SCM_SRFI4_API SCM scm_f32vector_p (SCM obj);
108 SCM_SRFI4_API SCM scm_make_f32vector (SCM n, SCM fill);
109 SCM_SRFI4_API SCM scm_f32vector (SCM l);
110 SCM_SRFI4_API SCM scm_f32vector_length (SCM uvec);
111 SCM_SRFI4_API SCM scm_f32vector_ref (SCM uvec, SCM index);
112 SCM_SRFI4_API SCM scm_f32vector_set_x (SCM uvec, SCM index, SCM value);
113 SCM_SRFI4_API SCM scm_f32vector_to_list (SCM uvec);
114 SCM_SRFI4_API SCM scm_list_to_f32vector (SCM l);
115
116 SCM_SRFI4_API SCM scm_f64vector_p (SCM obj);
117 SCM_SRFI4_API SCM scm_make_f64vector (SCM n, SCM fill);
118 SCM_SRFI4_API SCM scm_f64vector (SCM l);
119 SCM_SRFI4_API SCM scm_f64vector_length (SCM uvec);
120 SCM_SRFI4_API SCM scm_f64vector_ref (SCM uvec, SCM index);
121 SCM_SRFI4_API SCM scm_f64vector_set_x (SCM uvec, SCM index, SCM value);
122 SCM_SRFI4_API SCM scm_f64vector_to_list (SCM uvec);
123 SCM_SRFI4_API SCM scm_list_to_f64vector (SCM l);
124
125 SCM_SRFI4_API void scm_init_srfi_4 (void);
126
127 #endif /* SCM_SRFI_4_H */