Commit | Line | Data |
---|---|---|
8a807b26 KR |
1 | 2004-08-18 Kevin Ryde <user42@zip.com.au> |
2 | ||
3 | * arbiters.c (FETCH_STORE): New macro. | |
4 | (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants. | |
5 | (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into | |
6 | scm_try_arbiter and scm_release_arbiter. | |
7 | (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg | |
8 | for speed on i386, otherwise using mutex. | |
9 | ||
10 | * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they | |
11 | must be #f according to R5RS. (equal? follows eqv?, and for eqv? an | |
12 | exact and inexact is #f.) | |
13 | ||
14 | * fports.c (fport_print): Use scm_ttyname instead of ttyname directly, | |
15 | to get thread safety of scm_ttyname. | |
16 | ||
17 | * ports.c (ttyname): Remove prototype, unused. | |
18 | ||
d6cd4c36 | 19 | * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM. |
1f3cc0d3 | 20 | Reported by Michael Tuexen. |
d6cd4c36 | 21 | |
fa0c0a4b MV |
22 | 2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
23 | ||
24 | * load.c (scm_init_load_path): Do not pass NULL to | |
25 | scm_to_locale_string, which would happen when GUILE_LOAD_PATH is | |
26 | not set. Thanks to Bill Schottstaedt. | |
27 | ||
70f7ee41 MV |
28 | 2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
29 | ||
30 | * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to | |
31 | locale strings instead of accessing their internals. | |
32 | (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use | |
33 | SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of | |
34 | SCM_STRING_CHARS and SCM_STRING_LENGTH. | |
35 | ||
36 | * simpos.c (scm_system): Convert SCM strings to locale strings | |
37 | instead of accessing their internals. | |
38 | ||
39 | * script.c (scm_compile_shell_switches): Convert version to locale | |
40 | string before printing it. | |
41 | ||
42 | * rdelim.c (scm_read_delimited_x): Avoid | |
43 | SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead | |
44 | of scm_from_long for the returned number of read characters. | |
45 | ||
46 | * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with | |
47 | scm_i_mode_bits to avoid accessing internals of SCM string from C. | |
48 | ||
49 | * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros. | |
50 | Use them instead of SCM_SYSCALL when one or two strings need to be | |
51 | converted into locale strings. | |
52 | (my_rename): New, gathers platform dependent code for renaming. | |
53 | (scm_rename): Use it. | |
54 | (scm_readlink, scm_copy_file): Convert SCM strings to locale | |
55 | strings instead of accessing their internals. | |
56 | (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and | |
57 | SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and | |
58 | SCM_STRING_LENGTH. | |
59 | ||
60 | * extensions.c (load_extension): Convert lib and init to locale | |
61 | strings instead of accessing the internals directly. | |
62 | (scm_c_load_extension): Use scm_from_locale_string instead of | |
63 | scm_makfrom0str. | |
64 | ||
65 | * fports.h, fports.c (scm_i_fdes_to_port): New, like | |
66 | scm_fdes_to_port, but take mode bits directly instead of as a C | |
67 | string. | |
68 | (scm_i_fdes_to_port): Implement using above. | |
69 | (scm_open_file): Use scm_i_fdes_to_port together with | |
70 | scm_i_mode_bits to avoid accessing internals of SCM string from C. | |
71 | * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together | |
72 | with scm_i_mode_bits to avoid accessing internals of SCM string | |
73 | from C. | |
74 | ||
75 | * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a | |
76 | SCM string as argument. | |
77 | ||
78 | * ports.c (scm_i_void_port): New, like scm_void_port but take mode | |
79 | bits directly instead of C string. | |
80 | (scm_void_port): Implement using above. | |
81 | (scm_sys_make_void_port): Use scm_i_void_port together with | |
82 | scm_i_mode_bits to avoid accessing internals of SCM string. | |
83 | ||
84 | * strings.h, strings.c (scm_i_get_substring_spec): New. | |
85 | ||
86 | * socket.c, rw.c, deprecated.h, validate.h | |
87 | (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with | |
88 | SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or | |
89 | scm_to_locale_string, etc. | |
90 | (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as | |
91 | above, plus scm_i_get_substring_spec. | |
92 | ||
93 | * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c, | |
94 | hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c, | |
95 | strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use | |
96 | SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH | |
97 | instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and | |
98 | SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first | |
99 | with more explicit scm_remember_upto_here_1, etc, or introduced | |
100 | them in the first place. | |
101 | ||
102 | * posix.c (WITH_STRING): New helper macro. Use it where one | |
103 | locale string is needed for a short piece of code. | |
104 | (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL | |
105 | when one locale string is needed. | |
106 | (scm_mkstemp): Convert tmpl to a locale string. | |
107 | (scm_putenv): Rewritten to use only C strings. | |
108 | (scm_setlocale, scm_crpt): Convert argument strings to locale | |
109 | strings. | |
110 | ||
111 | 2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de> | |
112 | ||
113 | * load.c (scm_primitive_load_path): Do not check for absolute | |
114 | filenames when scm_sys_search_load_path returns false, which will | |
115 | return absolute filenames unchanged. | |
116 | ||
bb26cc2d MV |
117 | 2004-08-11 Marius Vollmer <mvo@zagadka.de> |
118 | ||
119 | * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs, | |
120 | scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead | |
121 | of an alist. Thanks to Matthias Koeppe! | |
122 | ||
02573e4c MV |
123 | 2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
124 | ||
125 | * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X): | |
126 | Moved from string.h to deprecated.h. | |
127 | ||
128 | * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed. | |
129 | ||
f9751e86 | 130 | * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to |
02573e4c MV |
131 | SCM_I_MAKE_STRING_TAG, changed all uses. |
132 | (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed | |
133 | to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH | |
134 | respectively. For a short time, the old names are still there as | |
135 | aliases. Not all uses have been changed yet, but the ones in | |
136 | strings.c have. | |
137 | (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from | |
138 | SCM_T_BITS_MAX. | |
139 | (scm_is_string, scm_from_locale_string, scm_from_locale_stringn, | |
140 | scm_take_locale_string, scm_take_locale_stringn, | |
141 | scm_to_locale_string, scm_to_locale_stringn, | |
142 | scm_to_locale_stringbuf): New. | |
143 | (scm_c_string2str, scm_c_substring2str): Deprecated by moving to | |
144 | deprecated.[hc]. Implemented in terms of the new functions above. | |
145 | (scm_take_str, scm_take0str, scm_mem2string, scm_str2string, | |
146 | scm_makfrom0str): Reimplemented in terms of the new functions from | |
147 | above. They will be discouraged shortly. | |
148 | (scm_substring): Do not use scm_mem2string. | |
149 | (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New, | |
150 | to replace similar code from posix.c, simpos.c, and dynl.c. | |
151 | (scm_string_append): Use memcpy instead of explicit loop. Do not | |
152 | use register keyword. Use plain 'char' instead of 'unsigned | |
153 | char'. | |
154 | ||
155 | * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of | |
156 | SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP. | |
157 | ||
158 | * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS, | |
159 | and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and | |
160 | SCM_I_STRING_LENGTH, respectively. Pass string object directly, | |
161 | not as a pointer. Use scm_remember_upto_here_1 to protect it. | |
162 | ||
163 | * read.c (scm_input_error): Use a SCM value for 'fn', not a C | |
164 | string. This avoids a conversion round-trip. | |
165 | ||
166 | * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and | |
167 | SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and | |
168 | SCM_I_STRING_LENGTH, respectively. | |
169 | (gh_scm2newstr): Implement in terms of scm_to_locale_string. | |
170 | ||
171 | * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS | |
172 | of a string, call scm_display on the string itself. | |
173 | ||
174 | * dynwind.c, dynwind.h (scm_frame_free): New. | |
175 | ||
176 | * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c, | |
177 | net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c: | |
178 | Replaced uses of SCM_STRING_CHARS with proper uses of | |
179 | scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string. | |
180 | Replaced scm_mem2string with scm_from_locale_string. | |
181 | ||
182 | * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c): | |
183 | Removed, replaced all uses with scm_i_allocate_string_pointers. | |
184 | ||
185 | * load.h, load.c (scm_internal_parse_path): Removed. | |
186 | (scm_parse_path): Use scm_string_split to do the work. | |
187 | (scm_init_load_path): Use scm_parse_path instead of | |
188 | scm_internal_parse_path. | |
189 | (scm_search_path): Rewritten string handling part of the code in | |
190 | terms of scm_to_locale_stringbuf and so that it is thread safe. | |
191 | ||
192 | * error.c (scm_error_scm): Throw directly instead of calling | |
193 | scm_error, this avoids the back and forth conversion of SUBR and | |
194 | MESSAGE and also plugs a memory leak. | |
195 | (scm_error): Call scm_error_scm. | |
196 | ||
197 | * backtrace.c: Replaced SCM_STRINGP with scm_is_string. | |
198 | (display_header): Print FNAME when it is true, not | |
199 | merely when it is a string. | |
200 | ||
201 | * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed | |
202 | unceremoniously. They were unused by Guile itself, and external | |
203 | use should stop immediately. | |
204 | ||
205 | ||
409eb4e5 MV |
206 | 2004-08-10 Marius Vollmer <mvo@zagadka.de> |
207 | ||
208 | * numbers.h, number.c, deprecated.h, deprecated.c (scm_round, | |
209 | scm_truncate): Renamed to scm_c_round and scm_c_truncate; | |
210 | deprecated versions installed in deprecated.h and deprecated.c. | |
211 | Changed all uses. | |
212 | ||
a00eaf19 RB |
213 | 2004-08-06 Rob Browning <rlb@defaultvalue.org> |
214 | ||
215 | * net_db.c (scm_resolv_error): don't cause an exception while | |
216 | trying to throw an exception -- call scm_misc_error with correct | |
217 | arguments. The previous arguments needed a format escape that | |
218 | wasn't in any of the format strings. | |
219 | ||
bcb88c93 KR |
220 | 2004-08-06 Kevin Ryde <user42@zip.com.au> |
221 | ||
8f094b97 KR |
222 | * ramap.c (scm_array_fill_x): For byvect char fill, force signed char |
223 | so as not to depend on signedness of plain char. For byvect range | |
224 | check, throw out-of-range rather than wrong-type-arg. | |
225 | ||
bcb88c93 KR |
226 | * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force |
227 | signed byte range checks by using scm_to_schar and scm_from_schar, | |
228 | don't want to depend on signedness of C char. | |
229 | ||
29e61124 KR |
230 | 2004-08-05 Kevin Ryde <user42@zip.com.au> |
231 | ||
232 | * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of | |
233 | SCM_DEFER_INTS. | |
234 | (scm_release_arbiter): Use scm_i_misc_mutex so return value can be | |
235 | guaranteed if multiple threads compete to unlock. | |
236 | Update docstrings per doc/ref/api-scheduling.texi. | |
237 | ||
99de794f KR |
238 | * filesys.c (scm_copy_file): Use fstat on the input fd rather than |
239 | stat on the filename, to be certain a file rename can't mean we get | |
240 | info on one filesystem object but open another. This fstat usage is | |
241 | similar to Emacs copy-file. | |
242 | ||
29e61124 KR |
243 | * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi. |
244 | ||
245 | * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on | |
246 | SIGINT and SIGQUIT, since those values are ints. | |
247 | ||
759aa8f9 MV |
248 | 2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
249 | ||
7241f213 MV |
250 | * num2integral.i.c, num2float.i.c: Removed. |
251 | * Makefile.am (noinst_HEADERS): Updated. | |
252 | ||
f9656a9f MV |
253 | * numbers.h. numbers.c (scm_make_ratio): Renamed to |
254 | scm_i_make_ratio and made static, replaced uses with scm_divide. | |
96d8c217 MV |
255 | (scm_complex_p): New, export as "complex?" to Scheme. |
256 | (scm_number_p): Export as "number?" to Scheme. | |
257 | (scm_is_complex, scm_is_number): New. | |
258 | (scm_c_make_rectangular, scm_c_make_polar): New. | |
259 | (scm_make_rectangular, scm_make_polar): Use above. | |
260 | (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle): | |
261 | New. | |
262 | (scm_make_complex): Discouraged by moving to discouraged.h and | |
263 | discouraged.c. Replaced all uses with scm_c_make_rectangular. | |
264 | ||
759aa8f9 MV |
265 | * discouraged.h, discouraged.c, numbers.c, numbers.h |
266 | (scm_is_rational): New. | |
267 | (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big, | |
268 | scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big): | |
269 | Removed prototypes. | |
270 | (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num): | |
271 | Discouraged by moving to discouraged.h and discouraged.c. | |
272 | Replaced all uses with scm_from_double. | |
273 | (scm_num2float, scm_num2double): Discouraged by moving prototype | |
274 | to discouraged.h and rewriting in terms of scm_to_double. | |
275 | Replaced all uses with scm_to_double. | |
276 | (scm_to_double): Do not implement in terms of scm_num2dbl, use | |
277 | explicit code. | |
278 | (scm_from_double): Do not implement in terms of scm_make_real, use | |
279 | explicit code. | |
280 | ||
531bf3e6 MV |
281 | 2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
282 | ||
759aa8f9 MV |
283 | * init.c (scm_init_guile_1): Call scm_i_init_discouraged. |
284 | ||
531bf3e6 MV |
285 | * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New. |
286 | * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above. | |
287 | ||
288 | * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR): | |
289 | Renamed to SCM_I_* in order to avoid collisions with the versions | |
290 | defined in deprecated.h. | |
291 | ||
292 | * discouraged.h, discouraged.c: New files. | |
293 | ||
294 | * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P, | |
295 | SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being | |
296 | deprecated to being discouraged by moving to discouraged.h. | |
297 | ||
298 | * numbers.h, numbers.c, discouraged.h, discouraged.c | |
299 | (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, | |
300 | scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num, | |
301 | scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, | |
302 | scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff, | |
303 | scm_long_long2num, scm_ulong_long2num, scm_num2long_long, | |
304 | scm_num2ulong_long): Discouraged by moving to discouraged.h and | |
305 | discouraged.c and reimplementing in terms of scm_from_* and | |
306 | scm_to_*. Changed all uses to the new scm_from_* and scm_to_* | |
307 | functions. | |
308 | ||
309 | * numbers.h, numbers.c: Removed GUILE_DEBUG code. | |
310 | (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big, | |
311 | scm_i_size2big, scm_i_ptrdiff2big): Removed. | |
312 | (scm_i_long2big, scm_i_ulong2big): New, explicit definitions. | |
313 | * conv-integer.i.c, conv-uinteger.i.c: Use them instead of | |
314 | explicit code. | |
315 | ||
5ec82e96 KR |
316 | 2004-08-02 Kevin Ryde <user42@zip.com.au> |
317 | ||
318 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past | |
319 | and current usage and migration. | |
320 | ||
58f28989 KR |
321 | 2004-07-31 Kevin Ryde <user42@zip.com.au> |
322 | ||
323 | * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since | |
324 | it's not thread safe. | |
325 | (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take | |
326 | advantage of this. | |
327 | * fports.c (scm_open_file): Use scm_strerror likewise. | |
328 | * filesys.c (scm_stat, scm_lstat): Ditto. | |
329 | ||
330 | * filesys.c (scm_copy_file): Avoid fd leak when destination file | |
331 | cannot be opened. | |
332 | ||
333 | * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter | |
334 | update, for thread safety. | |
335 | (gensym_counter): Move into scm_gensym which is its only user. | |
336 | (scm_init_symbols): No need to explicitly initialize gensym_counter. | |
337 | ||
03696aab MV |
338 | 2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
339 | ||
51fdb325 MV |
340 | * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char, |
341 | scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long, | |
342 | scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax, | |
343 | scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar, | |
344 | scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort, | |
345 | scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong, | |
346 | scm_from_long_long, scm_from_ulong_long, scm_from_intmax, | |
347 | scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer | |
348 | defined in terms of scm_to_signed_integer, etc, but in terms of | |
349 | scm_to_int8, etc. | |
350 | ||
351 | * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New. | |
352 | ||
03696aab MV |
353 | * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are |
354 | no longer used. | |
355 | ||
356 | * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN, | |
357 | SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New. | |
358 | ||
359 | * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN, | |
360 | SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX, | |
361 | SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX, | |
362 | SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX, | |
363 | SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX, | |
364 | SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved | |
365 | definition into __scm.h, using new SCM_I_TYPE_MIN, etc. | |
366 | ||
367 | * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate | |
368 | the functions below. | |
369 | ||
370 | * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and | |
371 | conv-uinteger.i.c. | |
372 | ||
373 | * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16, | |
374 | scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64, | |
375 | scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16, | |
376 | scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64, | |
377 | scm_from_uint64): Turned from macros into proper functions. | |
378 | (scm_to_signed_integer, scm_to_unsigned_integer, | |
379 | scm_from_signed_integer, scm_from_unsigned_integer): Generate via | |
380 | conv-integer.i.c and conv-uinteger.i.c, as well. | |
381 | ||
382 | * number.h (scm_to_ssize_t, scm_to_size_t): Use the new | |
383 | SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for | |
384 | the limits. Those are always defined. | |
385 | ||
1f15779e KR |
386 | 2004-07-29 Kevin Ryde <user42@zip.com.au> |
387 | ||
388 | * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety. | |
389 | ||
48360eb3 KR |
390 | 2004-07-28 Kevin Ryde <user42@zip.com.au> |
391 | ||
392 | * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread | |
393 | safety. | |
394 | ||
c3f3c841 KR |
395 | * unif.c (scm_array_set_x): For svect, use scm_num2short for |
396 | consistency with other vector types and to get arg and func name into | |
397 | error message. | |
398 | ||
c82f8ed6 MV |
399 | 2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
400 | ||
401 | * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL): | |
402 | Reimplement using scm_is_false, scm_is_true, scm_is_bool, and | |
403 | scm_from_bool, respectively. | |
404 | (SCM_NINUMP): Added. | |
405 | ||
406 | * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into | |
407 | deprecated.h. Replaced all uses with scm_is_eq. | |
408 | ||
317b4c4a KR |
409 | 2004-07-24 Kevin Ryde <user42@zip.com.au> |
410 | ||
411 | * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX. | |
412 | * posix.c (scm_crypt): Use it to protect static data in crypt(). | |
413 | ||
e11e83f3 MV |
414 | 2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
415 | ||
416 | * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP, | |
c82f8ed6 | 417 | SCM_INUM): Deprecated by renaming them to SCM_I_INUMP, |
e11e83f3 MV |
418 | SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated |
419 | versions to deprecated.h and deprecated.c. Changed all uses to | |
420 | either use the SCM_I_ variants or scm_is_*, scm_to_*, or | |
421 | scm_from_*, as appropriate. | |
422 | ||
423 | * dynwind.c (scm_i_dowinds): Removed unused code that would call | |
424 | the unexisting scm_cross_dynwind_binding_scope for inums on the | |
425 | windlist. | |
426 | ||
a55c2b68 MV |
427 | 2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
428 | ||
429 | * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed | |
e11e83f3 | 430 | ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6 |
a55c2b68 MV |
431 | byte-wise address to a SCM integer. Changed all uses. |
432 | (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to | |
433 | scm_to_ipv6 and added type and range checking, for converting from | |
434 | an IPv& byte-wise address to a SCM integer. Changed all uses. | |
435 | (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function | |
436 | is now done by scm_to_ipv6. | |
437 | ||
438 | * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot | |
439 | not accept inexact integers. | |
440 | ||
441 | * validate.h, deprecated.h (SCM_VALIDATE_INUM, | |
442 | SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT, | |
443 | SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY, | |
444 | SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF, | |
445 | SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE, | |
446 | SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the | |
447 | fixnum/bignum distinction visible. Changed all uses to | |
448 | scm_to_size_t or similar. | |
449 | ||
450 | 2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de> | |
451 | ||
452 | * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM. | |
453 | ||
48a06bd5 KR |
454 | 2004-07-10 Kevin Ryde <user42@zip.com.au> |
455 | ||
456 | * hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather | |
457 | than size>=0, since 0<=hash<size cannot be satisfied for size==0, and | |
458 | such a size causes divide-by-zeros in scm_hasher. | |
459 | ||
052fbfd9 KR |
460 | * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory |
461 | leak. | |
462 | ||
43240c9c MV |
463 | 2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
464 | ||
465 | * numbers.c (scm_is_signed_integer, scm_is_unsigned_integer): | |
466 | Rewritten using the same logic as scm_to_signed_integer and | |
467 | scm_to_unsigned_integer, respectively, which is better(tm). Also, | |
468 | use CHAR_BIT instead of hardcoding 8. | |
469 | (LLONG_MIN, LLONG_MAX, ULLONG_MAX): Removed and used | |
470 | SCM_I_LLONG_MIN etc. instead. | |
471 | ||
472 | * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to | |
473 | SCM_I_MAKINUM and changed all uses. | |
474 | * deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated. | |
475 | ||
a3de8e7b MV |
476 | * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX, |
477 | SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute | |
43240c9c MV |
478 | them by assuming twos-complement. |
479 | ||
c9eb03bb MV |
480 | 2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
481 | ||
482 | * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that | |
483 | configure now produces. | |
484 | * gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc | |
485 | definitions, giving the limits of the integer types defined by | |
486 | Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since | |
487 | LLONG_MIN or LONG_LONG_MIN is hard to get at. | |
488 | ||
489 | * numbers.h (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not | |
490 | SHORT_MIN. | |
491 | (scm_to_size_t): Use SIZE_MAX instead of cooking our own. | |
492 | (scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8, | |
493 | scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32, | |
494 | scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax, | |
495 | scm_from_long_long, scm_from_ulong_long, scm_from_int8, | |
496 | scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32, | |
497 | scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax, | |
498 | scm_from_uintmax): New. | |
499 | ||
7888309b MV |
500 | 2004-07-06 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
501 | ||
502 | * tags.h (scm_is_eq): New. | |
503 | ||
504 | * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL, | |
505 | SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into | |
506 | "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, | |
507 | scm_from_bool, and scm_is_bool, respectively. | |
508 | ||
509 | * boolean.h (scm_is_bool): Fix bug in prototype. | |
510 | (scm_from_bool): The argument is "x" not "f", stupid. | |
511 | ||
512 | * boolean.c (scm_is_bool): Fix typo. | |
513 | ||
514 | * numbers.h, numbers.c (scm_is_integer, scm_is_signed_integer, | |
515 | scm_is_unsigned_integer, scm_to_signed_integer, | |
516 | scm_to_unsigned_integer, scm_to_schar, scm_to_uchar, scm_to_char, | |
517 | scm_to_short, scm_to_ushort, scm_to_long, scm_to_ulong, | |
518 | scm_to_size_t, scm_to_ssize_t, scm_from_schar, scm_from_uchar, | |
519 | scm_from_char, scm_from_short, scm_from_ushort, scm_from_int, | |
520 | scm_from_uint, scm_from_long, scm_from_ulong, scm_from_size_t, | |
521 | scm_from_ssize_t, scm_is_real, scm_to_double, scm_from_double): | |
522 | New. | |
523 | ||
800570a6 MV |
524 | 2004-07-05 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
525 | ||
526 | * boolean.h, boolean.c (scm_is_true, scm_is_false, scm_from_bool, | |
527 | scm_to_bool): New. | |
528 | ||
9fcf3cbb DH |
529 | 2004-06-27 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> |
530 | ||
531 | * backtrace.c (display_expression, display_frame): Call | |
532 | scm_i_unmemoize_expr for unmemoizing a memoized object holding a | |
533 | single memoized expression. | |
534 | ||
535 | * debug.c (memoized_print): Don't try to unmemoize the memoized | |
536 | object, since we can't know whether it holds a single expression | |
537 | or a body. | |
538 | ||
539 | (scm_mem_to_proc): Removed check for lambda expression, since it | |
540 | was moot anyway. Whoever uses these functions for debugging | |
541 | purposes should know what they do: Creating invalid memoized code | |
542 | will cause crashes, independent of whether this check is present | |
543 | or not. | |
544 | ||
545 | (scm_proc_to_mem): Take the closure's code as it is and don't | |
546 | append a SCM_IM_LAMBDA isym. To allow easier debugging, the | |
547 | memoized code should not be modified. | |
548 | ||
549 | * debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed | |
550 | scm_unmemoize from public use, but made scm_i_unmemoize_expr | |
551 | available as a guile internal function instead. However, | |
552 | scm_i_unmemoize_expr will only work on memoized objects that hold | |
553 | a single memoized expression. It won't work with bodies. | |
554 | ||
555 | * debug.c (scm_procedure_source), macros.c (macro_print), print.c | |
556 | (scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body, | |
557 | i. e. a list of expressions. | |
558 | ||
559 | * eval.c (unmemoize_exprs): Drop internal body markers from the | |
560 | output during unmemoization. | |
561 | ||
562 | * eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr, | |
563 | scm_i_unmemocopy_body): Removed scm_unmemocopy from public use, | |
564 | but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available | |
565 | as guile internal functions instead. scm_i_unmemoize_expr will | |
566 | only work on a single memoized expression, while | |
567 | scm_i_unmemocopy_body will only work on bodies. | |
568 | ||
90df793f DH |
569 | 2004-06-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> |
570 | ||
571 | * eval.c (unmemoize_exprs): Handle semi-memoized code. | |
572 | ||
573 | (scm_cons_source, scm_primitive_eval): Prefer higher level | |
574 | predicate SCM_FALSEP over SCM_IMP. | |
575 | ||
8048c00b RB |
576 | 2004-06-15 Rob Browning <rlb@defaultvalue.org> |
577 | ||
578 | * script.c (scm_shell_usage): minor phrasing change. | |
579 | ||
580 | * gc_os_dep.c: update ifdefery for macosx. | |
581 | (scm_get_stack_base): separate result initialization from | |
582 | declaration to slience warnings with macosx and hp-ux using gcc | |
583 |