Commit | Line | Data |
---|---|---|
5e9c05a1 MV |
1 | 2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
2 | ||
327114a2 MV |
3 | * unif.h, unif.c (scm_array_creator): New. |
4 | (scm_i_get_old_prototype): New. | |
5 | (scm_array_prototype): use it to return old-style prototype, never | |
6 | return creators. | |
7 | (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second | |
8 | arg of SCM_UNDEFINED. The latter is wrong. | |
9 | ||
5e9c05a1 MV |
10 | * unif.h, unif.c (scm_make_u1vector): New, but only temporary. |
11 | (make_uve): Removed. | |
12 | (scm_i_proc_make_vector, scm_i_proc_make_string, | |
13 | scm_i_proc_make_u1vector): New. | |
14 | (scm_init_unif): Initialize them. | |
15 | (scm_i_convert_old_prototype): New. | |
16 | (scm_make_uve): Use it to get the creator procedure. Removed all | |
17 | old code that created old-style uniform vectors. | |
18 | (scm_array_p): Handle generic vectors. | |
19 | (scm_dimensions_to_uniform_array): Do not fill new array with | |
20 | prototype when that is a procedure. | |
21 | (scm_list_to_uniform_array): Also accept a list of lower bounds as | |
22 | the NDIM argument. | |
23 | (scm_i_print_array): Print rank for shared or non-zero-origin | |
24 | vectors. | |
25 | (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New. | |
26 | (scm_raprin1): Do not call scm_i_array_print for enclosed arrays, | |
27 | which I do not understand yet. | |
28 | (scm_array_prototype): Explicitely handle generic vectors. | |
327114a2 | 29 | |
5e9c05a1 MV |
30 | * numbers.c, number.h (scm_i_print_complex, icmplx2str): New. |
31 | (iflo2str): Use icmplx2str for complex numbers. | |
32 | ||
33 | * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector, | |
34 | scm_i_uniform_vector_prototype): Removed. | |
35 | (scm_i_uniform_vector_creator): New. | |
36 | (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc, | |
37 | SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New. | |
38 | Updated all tables and generic functions to support them. | |
39 | (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New. | |
40 | (scm_init_srfi_4): Initialize them. | |
41 | ||
42 | * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of | |
43 | sizeof(CTYPE) as explained in the comment. | |
44 | ||
45 | * read.c (scm_lreadr): Call scm_i_read_array for all characters | |
46 | followinf '#' that can start an array. Explicitely disambiguate | |
47 | 'i' and 'e' between introducing numbers and uniform vectors. Do | |
48 | not call scm_i_read_homogenous_vector, since that is also handled | |
49 | by scm_i_read_array now. | |
50 | ||
f984af07 MV |
51 | 2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
52 | ||
53 | First cut at integrating uniform vectors from srfi-4 with the rest | |
54 | of Guile. This change replaces scm_tc7_byvect with a s8 uniform | |
55 | vector. The plan is to gradually replace one type after the other | |
56 | until none is left and then to consider general cleanups and | |
57 | optimizations. | |
58 | ||
59 | * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New. | |
60 | ||
61 | * srfi-4.h, srfi-4.c (scm_uniform_vector_p, | |
62 | scm_uniform_vector_ref, scm_uniform_vector_set_x, | |
63 | scm_uniform_vector_to_list, scm_is_uniform_vector, | |
64 | scm_c_uniform_vector_lengths, scm_c_uniform_vector_size, | |
65 | scm_uniform_vector_elements, scm_uniform_vector_element_size, | |
66 | scm_uniform_vector_release): New. | |
67 | (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New. | |
68 | (scm_uniform_element_size, scm_uniform_vector_length): Moved here | |
69 | from unif.h, unif.c and extended to handle both the old and new | |
70 | uniform vectors. | |
71 | ||
72 | * tags.h (scm_tc7_byvect): Commented out. | |
73 | ||
74 | * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed | |
75 | the former to the latter. | |
76 | (scm_uniform_vector_length, scm_uniform_element_size): Moved to | |
77 | srfi-4.h, srfi-4.c. | |
78 | (scm_make_uve): Call scm_make_s8vector for #\nul prototype. | |
79 | (scm_array_p, scm_array_rank, scm_array_dimensions, | |
80 | scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref, | |
81 | scm_array_set_x, scm_array_contents, scm_uniform_array_read_x, | |
82 | scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform | |
83 | vectors. Removed code for scm_tc7_byvect. | |
84 | (scm_dimensions_to_uniform_array): Fill array with 0 when | |
85 | prototype is #\nul. | |
86 | (scm_i_print_array_dimension, scm_i_legacy_tag, | |
87 | scm_i_print_array): New. | |
88 | (scm_raprin1): Call scm_i_print_array for arrays. Removed code | |
89 | for scm_tc7_byvect. | |
90 | ||
91 | * ramap.c (scm_ra_matchp, scm_array_fill_int, racp, | |
92 | scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4 | |
93 | uniform vectors. Removed code for scm_tc7_byvect | |
94 | ||
95 | * print.c (iprin1): Removed code for scm_tc7_byvect. | |
96 | * objects.c (scm_class_of): Likewise. | |
97 | * gc-mark.c (scm_gc_mark_dependencies): Likewise. | |
98 | * gc-card.c (scm_i_sweep_card): Likewise. | |
99 | * evalext.c (scm_self_evaluating_p): Likewise. | |
100 | * eq.c (scm_equal_p): Likewise. | |
101 | ||
102 | * gh_data.c (gh_chars2byvect): Reimplemented with | |
103 | scm_make_s8vector. | |
104 | (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect. | |
105 | ||
106 | * srfi-4.c (take_uvec): New. | |
107 | (alloc_uvec): Use it. | |
108 | * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New. | |
109 | ||
110 | * random.c (vector_scale, vector_scale_x): Renamed former to the | |
111 | latter, since it modifies its argument. | |
112 | (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x): | |
113 | Do not use scm_universal_vector_length for non-uniform vectors. | |
114 | Use scm_f64vector_elements to access innards of uniform vectors. | |
115 | ||
116 | * convert.i.c: Convert srfi-4 style uniform vectors when | |
117 | requested. | |
118 | * convert.c (scm_c_scm2chars, scm_c_chars2scm, | |
119 | scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect. | |
120 | ||
79d52182 MV |
121 | 2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
122 | ||
123 | * numbers.h, numbers.c (scm_i_print_double): New. | |
124 | ||
125 | * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from | |
126 | ../srfi/ but heavily modified. | |
127 | * Makefile.am: Add them in all the right places. | |
128 | * init.c (scm_init_guile_1): Call scm_init_srfi_4. | |
129 | * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f', | |
130 | '#u', and '#s'. | |
131 | ||
132 | * read.h, read.c (scm_i_input_error): Renamed from scm_input_error | |
133 | and made non-static. Changed all uses. | |
134 | ||
6191ccec MV |
135 | 2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
136 | ||
e64e80b0 MV |
137 | * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c, |
138 | print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c, | |
139 | guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use | |
140 | scm_uintprint to print unsigned integers, raw heap words, and | |
141 | adresses, using a cast to scm_t_bits to turn pointers into | |
142 | integers. | |
143 | ||
144 | * unif.c: Include "libguile/print.h". | |
145 | ||
c90ac3a8 MV |
146 | * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover |
147 | scm_t_intmax values. | |
148 | (scm_uint2str): New, for scm_t_uintmax. | |
149 | (scm_iint2str): Argument type changed to scm_t_intmax, | |
150 | reimplemented in terms of scm_uint2str. | |
151 | ||
152 | * print.c, print.h (scm_uintprint): New, for printing | |
153 | scm_t_uintmax values. | |
154 | (scm_intprint): Argument type changed to scm_t_intmax. | |
155 | ||
77c2594f MV |
156 | * sort.c (quicksort, scm_merge, scm_merge_list_x, |
157 | scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at | |
158 | strategic places so that the loops can be interrupted. | |
159 | ||
6191ccec MV |
160 | * Makefile.am (INCLUDES): Use @LTDLINC@ instead of |
161 | "-I$(top_srcdir)/libguile-ltdl". | |
162 | (libguile_la_LIBADD): Use @LIBLTDL@ instead of | |
163 | "../libguile-ltdl/libguile-ltdl.a". | |
164 | ||
165 | * guile.c, dynl.c: Switched to using libltdl directly. Replaced | |
166 | all references to scm_lt_* with just lt_*. Include <ltdl.h> | |
167 | instead of <libguile-ltdl.h>. | |
168 | ||
77600f3e MV |
169 | 2004-10-20 Marius Vollmer <mvo@zagadka.de> |
170 | ||
171 | * sort.c (quicksort): Copy pivot out of the array while | |
172 | constructing the partitions; it could get overwritten otherwise. | |
173 | Because of the ultimate insertion sort, this bug did not cause | |
174 | quicksort to fail, it just put all the burdon on the insertion | |
175 | sort and was thus very slow. Thanks to Rolan Orre for reporting | |
176 | the slowness! | |
177 | ||
5000379b MV |
178 | 2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
179 | ||
192cd792 MV |
180 | * numbers.c (scm_i_range_error): New. |
181 | * conv-integer.i.c, conv-uinteger.i.c: Use it instead of | |
182 | scm_out_of_range. | |
183 | ||
184 | * sort.c (scm_restricted_vector_sort_x): Validate startpos <= | |
6191ccec | 185 | endpos. State inclusiveness/exclusiveness of bounds in docstring. |
192cd792 MV |
186 | |
187 | * unif.c (scm_array_p): When no prototype is given, explicitely | |
188 | test for allowable types, do not simply return true. Thanks to | |
189 | Roland Orre for reporting this! | |
190 | ||
5000379b MV |
191 | * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib. |
192 | ||
193 | * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new | |
194 | segment to scm_max_segment_size. | |
195 | ||
497eb0b7 HWN |
196 | 2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl> |
197 | ||
198 | * inline.h (scm_double_cell): abort if GC running. | |
199 | (scm_cell): idem. | |
200 | ||
aef0bdb4 MV |
201 | 2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
202 | ||
203 | * error.c (scm_wrong_type_arg): Do not talk about "argument" for | |
204 | pos == 0. | |
205 | ||
206 | Keywords no longer store a 'dash symbol'. Instead, they store a | |
207 | symbol with their real name. | |
208 | ||
209 | * keywords.h, keywords.c, deprecated.h, deprecated.c | |
210 | (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in | |
211 | terms of scm_is_keyword and scm_keyword_dash_symbol. | |
212 | ||
213 | * keywords.h, keywords.c, discouraged.h, discouraged.c | |
214 | (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol, | |
215 | scm_c_make_keyword): Discouraged. | |
216 | ||
217 | * keywords.h, keywords.c (scm_symbol_to_keyword, | |
218 | scm_keyword_to_symbol): Implemented in C. | |
219 | (scm_is_keyword, scm_from_locale_keyword, | |
220 | scm_from_locale_keywordn): New. | |
221 | ||
222 | * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword. | |
223 | ||
224 | * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use | |
225 | scm_from_locale_keyword instead of scm_c_make_keyword. | |
226 | ||
227 | * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a | |
228 | better error message. | |
229 | ||
230 | * deprecated.c: Include discouraged.h and keywords.h. | |
231 | ||
232 | * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after | |
233 | reading '#:' or ':'. See NEWS for consequences. | |
234 | ||
818deb11 MV |
235 | 2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
236 | ||
43c25626 MV |
237 | * read.c (scm_lreadr): Revert change from 2004-09-22: string |
238 | literals are now read-write again (until SCM_STRING_CHARS is | |
239 | removed). | |
240 | ||
241 | * strings.c (SCM_STRING_CHARS): Explicitely reject read-only | |
242 | strings with an error message that blames SCM_STRING_CHARS. | |
243 | ||
244 | * options.c (change_option_setting): Use scm_car instead of | |
245 | explicit type check plus SCM_CAR. | |
246 | ||
247 | * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX, | |
248 | SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options. | |
249 | (scm_iprin1): Use them instead of the previoulsy hardcoded | |
250 | strings. | |
251 | (scm_init_print): Initialize them. | |
252 | ||
253 | * backtrace.c (display_frame_expr): Do not remove control | |
254 | characters from the final string. Print it directly using | |
255 | scm_display. | |
256 | ||
818deb11 MV |
257 | * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch. |
258 | Thanks to Roland Orre! | |
259 | ||
d748089e KR |
260 | 2004-09-29 Kevin Ryde <user42@zip.com.au> |
261 | ||
262 | * regex-posix.c (scm_regexp_exec): Correction to last change, should | |
263 | be whole original string in match struct, not offsetted substring. | |
264 | ||
0ff7e3ff HWN |
265 | 2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl> |
266 | ||
267 | * gc.c (scm_gc_unprotect_object): abort if called during GC. | |
268 | ||
ad7de4b8 MV |
269 | 2004-09-24 Marius Vollmer <mvo@zagadka.de> |
270 | ||
2edf319f MV |
271 | * Makefile.am (EXTRA_DIST): Added gettext.h. |
272 | ||
d180337b MV |
273 | * smob.c, smob.h (scm_assert_smob_type): New. |
274 | ||
05d7cf89 | 275 | * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS): |
ad7de4b8 MV |
276 | Include GUILE_CFLAGS. |
277 | (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused | |
278 | now. | |
279 | (libpath.h): Put GUILE_CFLAGS in the build-info. | |
280 | ||
c9fedf8a MV |
281 | 2004-09-23 Marius Vollmer <mvo@zagadka.de> |
282 | ||
283 | * print.h (scm_print_state): Added highlight_objects. | |
284 | * print.c (make_print_state, scm_free_print_state): Initialize it | |
285 | to SCM_EOL. | |
286 | (scm_iprin1): Wrap output in '{...}' when object is contained in | |
287 | highlight_objects. | |
288 | ||
289 | * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights, | |
290 | scm_backtrace_with_highlights): New. Set highlight_objects of | |
291 | printstate. | |
292 | ||
293 | * error.c (scm_error_scm): Document new meaning of data/rest | |
294 | argument for out-of-range and wrong-type-arg errors. | |
295 | (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg, | |
296 | scm_wrong_type_arg_msg): Pass bad_value in rest argument of | |
297 | exception so that it gets highlighted in the backtrace. | |
298 | Don't talk about "argument" when not giving a position. | |
299 | ||
300 | * throw.c (handler_message): The rest argument is the fourth | |
301 | argument, not everything after the third. Call | |
302 | scm_display_backtrace_with_highlights, passing the rest argument | |
303 | when appropriate. | |
304 | ||
d5ac9b2a MV |
305 | 2004-09-22 Marius Vollmer <mvo@zagadka.de> |
306 | ||
307 | From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible | |
308 | <bruno@clisp.org>: | |
309 | ||
310 | * i18n.c: Handle --disable-nls (thanks Bruno). | |
311 | ||
312 | * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS, | |
313 | LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION. | |
314 | ||
315 | * i18n.c (scm_i_to_lc_category): New name and export. Support all | |
316 | LC categories. | |
05d7cf89 | 317 | * posix.c (scm_setlocale): Use it. |
d5ac9b2a MV |
318 | |
319 | * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain, | |
320 | scm_bind_textdomain_codeset): Make wrappers similar to C function | |
321 | they wrap. | |
322 | ||
323 | * i18n.h: New file. | |
324 | * i18n.c: New file. | |
325 | * gettext.h: New file, taken from GNU gettext. | |
326 | * init.c: Include libguile/i18n.h. | |
327 | (scm_init_guile_1): Add call to scm_init_i18n(). | |
328 | * Makefile.am (libguile_la_SOURCES): Add i18n.c. | |
329 | (DOT_X_FILES): Add i18n.x. | |
330 | (DOT_DOC_FILES): Add i18n.doc. | |
331 | (libguile_la_LDFLAGS): Add @LTLIBINTL@. | |
332 | (modinclude_HEADERS): Add i18n.h. | |
333 | ||
d2e53ed6 MV |
334 | 2004-09-22 Marius Vollmer <mvo@zagadka.de> |
335 | ||
2cdfe016 MV |
336 | * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc. |
337 | ||
d2e53ed6 MV |
338 | * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to |
339 | discouraged.h. Replaced all uses with scm_is_pair. | |
340 | (SCM_I_CONSP): New name for SCM_CONSP. | |
341 | ||
342 | * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr, | |
343 | scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar, | |
344 | scm_cadr, etc): New. | |
345 | (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all | |
346 | uses with scm_is_null. | |
5dd82006 | 347 | |
d2e53ed6 MV |
348 | * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs |
349 | instead of explicit code. | |
5dd82006 | 350 | |
5dfdf243 MV |
351 | 2004-09-22 Marius Vollmer <mvo@zagadka.de> |
352 | ||
b50c53e5 MV |
353 | * srfi-13.c (scm_string_contains, scm_string_contains_ci): |
354 | Reworded logic a bit so that #f is returned immediately when s1 is | |
355 | too short to contain s2. | |
356 | ||
5dfdf243 | 357 | * regex-posix.c (scm_regexp_exec): Convert string to |
05d7cf89 | 358 | zero-terminated locale string before matching against it. |
5dfdf243 MV |
359 | |
360 | * strings.h, strings.c (scm_substring_read_only, | |
361 | scm_c_substring_read_only, scm_i_substring_read_only): New. | |
362 | (RO_STRING_TAG, IS_RO_STRING): New. | |
363 | (scm_i_string_writable_chars): Bail on read-only strings. | |
364 | ||
365 | * read.c (scm_lreadr): use scm_c_substring_read_only for string | |
366 | literals, thus making them read-only as specified by R5RS. | |
367 | ||
22ab5ba3 MV |
368 | 2004-09-22 Marius Vollmer <mvo@zagadka.de> |
369 | ||
370 | * eq.c (scm_equal_p): Allow smobs with different flags to be equal | |
371 | by testing for smobs before insisting on equal SCM_CELL_TYPES. | |
372 | ||
2663421c MV |
373 | 2004-09-21 Marius Vollmer <mvo@zagadka.de> |
374 | ||
0d83cb90 MV |
375 | * numbers.h, numbers.c: Include <gmp.h> in numbers.h, not in |
376 | numbers.c. | |
377 | (scm_to_mpz, scm_from_mpz): New. | |
378 |