Commit | Line | Data |
---|---|---|
1fa86ca5 SJ |
1 | /* Copyright (C) 2002 Free Software Foundation, Inc. |
2 | * | |
73be1d9e MV |
3 | * This library is free software; you can redistribute it and/or |
4 | * modify it under the terms of the GNU Lesser General Public | |
5 | * License as published by the Free Software Foundation; either | |
6 | * version 2.1 of the License, or (at your option) any later version. | |
1fa86ca5 | 7 | * |
73be1d9e MV |
8 | * This library is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Lesser General Public License for more details. | |
1fa86ca5 | 12 | * |
73be1d9e MV |
13 | * You should have received a copy of the GNU Lesser General Public |
14 | * License along with this library; if not, write to the Free Software | |
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
16 | */ | |
1fa86ca5 SJ |
17 | |
18 | \f | |
3c6be74a RB |
19 | #if HAVE_CONFIG_H |
20 | # include <config.h> | |
21 | #endif | |
1fa86ca5 SJ |
22 | |
23 | #include "libguile/_scm.h" | |
24 | #include "libguile/validate.h" | |
25 | #include "libguile/strings.h" | |
26 | #include "libguile/vectors.h" | |
27 | #include "libguile/pairs.h" | |
3c6be74a | 28 | #if SCM_HAVE_ARRAYS |
1fa86ca5 SJ |
29 | # include "libguile/unif.h" |
30 | #endif | |
31 | ||
32 | #include "libguile/convert.h" | |
33 | ||
4f2716b6 GH |
34 | #ifdef HAVE_STRING_H |
35 | #include <string.h> | |
36 | #endif | |
37 | ||
97820583 SJ |
38 | #define CTYPE char |
39 | #define SIZEOF_CTYPE 1 | |
40 | #define SCM2CTYPES_FN "scm_c_scm2chars" | |
41 | #define SCM2CTYPES scm_c_scm2chars | |
42 | #define CTYPES2SCM_FN "scm_c_chars2scm" | |
43 | #define CTYPES2SCM scm_c_chars2scm | |
44 | #define CTYPES2UVECT_FN "scm_c_chars2byvect" | |
45 | #define CTYPES2UVECT scm_c_chars2byvect | |
46 | #define UVECTTYPE scm_tc7_byvect | |
47 | #define SIZEOF_UVECTTYPE 1 | |
48 | #define UVECTCTYPE char | |
49 | #define ARRAYTYPE scm_tc7_byvect | |
50 | #define SIZEOF_ARRAYTYPE 1 | |
51 | #define ARRAYCTYPE char | |
1fa86ca5 SJ |
52 | #include "convert.i.c" |
53 | ||
97820583 SJ |
54 | #define CTYPE short |
55 | #define SIZEOF_CTYPE SIZEOF_SHORT | |
56 | #define SCM2CTYPES_FN "scm_c_scm2shorts" | |
57 | #define SCM2CTYPES scm_c_scm2shorts | |
58 | #define CTYPES2SCM_FN "scm_c_shorts2scm" | |
59 | #define CTYPES2SCM scm_c_shorts2scm | |
60 | #define CTYPES2UVECT_FN "scm_c_shorts2svect" | |
61 | #define CTYPES2UVECT scm_c_shorts2svect | |
62 | #define UVECTTYPE scm_tc7_svect | |
63 | #define SIZEOF_UVECTTYPE SIZEOF_SHORT | |
64 | #define UVECTCTYPE short | |
65 | #define ARRAYTYPE scm_tc7_svect | |
66 | #define SIZEOF_ARRAYTYPE SIZEOF_SHORT | |
67 | #define ARRAYCTYPE short | |
1fa86ca5 SJ |
68 | #include "convert.i.c" |
69 | ||
edb810bb SJ |
70 | #define CTYPE int |
71 | #define SIZEOF_CTYPE SIZEOF_INT | |
72 | #define SCM2CTYPES_FN "scm_c_scm2ints" | |
73 | #define SCM2CTYPES scm_c_scm2ints | |
74 | #define CTYPES2SCM_FN "scm_c_ints2scm" | |
75 | #define CTYPES2SCM scm_c_ints2scm | |
76 | #define CTYPES2UVECT_FN "scm_c_ints2ivect" | |
77 | #define CTYPES2UVECT scm_c_ints2ivect | |
78 | #define UVECTTYPE scm_tc7_ivect | |
97820583 SJ |
79 | #define SIZEOF_UVECTTYPE SIZEOF_LONG |
80 | #define UVECTCTYPE long | |
edb810bb SJ |
81 | #define CTYPES2UVECT_FN_OPTIONAL "scm_c_uints2uvect" |
82 | #define CTYPES2UVECT_OPTIONAL scm_c_uints2uvect | |
83 | #define UVECTTYPE_OPTIONAL scm_tc7_uvect | |
84 | #define ARRAYTYPE scm_tc7_ivect | |
97820583 SJ |
85 | #define SIZEOF_ARRAYTYPE SIZEOF_LONG |
86 | #define ARRAYCTYPE long | |
edb810bb | 87 | #define ARRAYTYPE_OPTIONAL scm_tc7_uvect |
1fa86ca5 SJ |
88 | #include "convert.i.c" |
89 | ||
edb810bb SJ |
90 | #define CTYPE long |
91 | #define SIZEOF_CTYPE SIZEOF_LONG | |
92 | #define SCM2CTYPES_FN "scm_c_scm2longs" | |
93 | #define SCM2CTYPES scm_c_scm2longs | |
94 | #define CTYPES2SCM_FN "scm_c_longs2scm" | |
95 | #define CTYPES2SCM scm_c_longs2scm | |
96 | #define CTYPES2UVECT_FN "scm_c_longs2ivect" | |
97 | #define CTYPES2UVECT scm_c_longs2ivect | |
98 | #define UVECTTYPE scm_tc7_ivect | |
97820583 SJ |
99 | #define SIZEOF_UVECTTYPE SIZEOF_LONG |
100 | #define UVECTCTYPE long | |
edb810bb SJ |
101 | #define CTYPES2UVECT_FN_OPTIONAL "scm_c_ulongs2uvect" |
102 | #define CTYPES2UVECT_OPTIONAL scm_c_ulongs2uvect | |
103 | #define UVECTTYPE_OPTIONAL scm_tc7_uvect | |
104 | #define ARRAYTYPE scm_tc7_ivect | |
97820583 SJ |
105 | #define SIZEOF_ARRAYTYPE SIZEOF_LONG |
106 | #define ARRAYCTYPE long | |
edb810bb | 107 | #define ARRAYTYPE_OPTIONAL scm_tc7_uvect |
1fa86ca5 SJ |
108 | #include "convert.i.c" |
109 | ||
edb810bb SJ |
110 | #define CTYPE float |
111 | #define SIZEOF_CTYPE 0 | |
112 | #define SCM2CTYPES_FN "scm_c_scm2floats" | |
113 | #define SCM2CTYPES scm_c_scm2floats | |
114 | #define CTYPES2SCM_FN "scm_c_floats2scm" | |
115 | #define CTYPES2SCM scm_c_floats2scm | |
116 | #define CTYPES2UVECT_FN "scm_c_floats2fvect" | |
117 | #define CTYPES2UVECT scm_c_floats2fvect | |
118 | #define UVECTTYPE scm_tc7_fvect | |
97820583 | 119 | #define SIZEOF_UVECTTYPE 0 |
edb810bb | 120 | #define ARRAYTYPE scm_tc7_fvect |
97820583 | 121 | #define SIZEOF_ARRAYTYPE 0 |
edb810bb SJ |
122 | #define ARRAYTYPE_OPTIONAL scm_tc7_dvect |
123 | #define FLOATTYPE float | |
124 | #define FLOATTYPE_OPTIONAL double | |
1fa86ca5 SJ |
125 | #include "convert.i.c" |
126 | ||
edb810bb SJ |
127 | #define CTYPE double |
128 | #define SIZEOF_CTYPE 0 | |
129 | #define SCM2CTYPES_FN "scm_c_scm2doubles" | |
130 | #define SCM2CTYPES scm_c_scm2doubles | |
131 | #define CTYPES2SCM_FN "scm_c_doubles2scm" | |
132 | #define CTYPES2SCM scm_c_doubles2scm | |
133 | #define CTYPES2UVECT_FN "scm_c_doubles2dvect" | |
134 | #define CTYPES2UVECT scm_c_doubles2dvect | |
135 | #define UVECTTYPE scm_tc7_dvect | |
97820583 | 136 | #define SIZEOF_UVECTTYPE 0 |
edb810bb | 137 | #define ARRAYTYPE scm_tc7_dvect |
97820583 | 138 | #define SIZEOF_ARRAYTYPE 0 |
edb810bb SJ |
139 | #define ARRAYTYPE_OPTIONAL scm_tc7_fvect |
140 | #define FLOATTYPE double | |
141 | #define FLOATTYPE_OPTIONAL float | |
1fa86ca5 SJ |
142 | #include "convert.i.c" |
143 | ||
144 | /* | |
145 | Local Variables: | |
146 | c-file-style: "gnu" | |
147 | End: | |
148 | */ |