+2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * srfi-13.c (scm_string_contains, s_scm_string_contains_ci):
+ Bugfix: when subtracting unsigned values, make sure that result
+ does not wrap.
+
+2004-09-09 Kevin Ryde <user42@zip.com.au>
+
+ * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
+ causes too many problems elsewhere (glibc, freebsd, mingw). Reported
+ by Andreas Vögele.
+
+2004-09-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * Makefile.am (EXTRA_libguile_la_SOURCES): Removed "alloca.c".
+
+ * eq.c (real_eqv): Pretend that all NaNs are equal.
+
+ * numbers.c (scm_integer_expt): Do not accept inexact integers.
+
+2004-09-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * srfi-13.c (scm_string_trim_right, scm_string_xcopy_x): Correctly
+ use size_t for some locals instead of int.
+
+ * read.c (scm_flush_ws): Detect "#!"-style comments here.
+ (scm_lreadr): Abort on seeing "#!", which should no longer happen.
+ (skip_scsh_block_comment): Use scm_input_error instead of
+ scm_misc_error in case of EOF.
+
+2004-09-07 Kevin Ryde <user42@zip.com.au>
+
+ * numbers.c (scm_integer_expt): Reject exponent +/-inf.
+ Bug report by Bill Schottstaedt.
+
+ * ports.c (scm_getc, scm_lfwrite): Recognise \a \b and \r for port
+ column.
+ * ports.h (SCM_ZEROCOL, SCM_DECCOL): New macros.
+
+ * posix.c (scm_access): Update docstring per manual.
+
+ * posix.c (scm_nice): Correction to error detection. Reported by
+ Matthias Koeppe.
+
+ * stime.c (scm_current_time, scm_gettimeofday, scm_strptime): Don't
+ throw error before unlocking mutex with SCM_ALLOW_INTS.
+
+2004-09-06 Kevin Ryde <user42@zip.com.au>
+
+ * stime.h (SCM_TIME_UNITS_PER_SECOND): Use sysconf(_SC_CLK_TCK) when
+ available. This also gets around CLK_TCK being absent when
+ _GNU_SOURCE and _POSIX_C_SOURCE are defined in stime.c.
+
+2004-09-03 Stefan Jahn <stefan@lkcc.org>
+
+ * threads.c (scm_threads_mark_stacks): Fixed local variable
+ definitions.
+
+ * strings.c (scm_i_substring_copy, scm_string_append): Fixed
+ local variable definitions.
+
+ * stime.c (_POSIX_C_SOURCE): Do not define this item on
+ MinGW32 because it conflicts with its pthread headers.
+ (scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
+ (scm_strftime): Using scm_from_locale_string() instead of
+ scm_makfrom0str().
+
+ * posix.c (scm_putenv): Fixed typo in the !HAVE_UNSETENV
+ part.
+
+ * numbers.c (scm_init_numbers): Removed check_sanity() call
+ inside GUILE_DEBUG. The function has been removed somewhen...
+
+ * filesys.c (_POSIX_C_SOURCE): Do not define this item on
+ MinGW32 because it conflicts with its pthread headers.
+
+2004-08-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * strings.c (SCM_STRINGP): Accept all strings.
+ (SCM_STRING_CHARS): Reject shared substrings here.
+
+ * script.c (scm_compile_shell_switches): Added 2003 and 2004 to
+ the Copyright years.
+
+2004-08-27 Kevin Ryde <user42@zip.com.au>
+
+ * socket.c (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
+ HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
+ SIN_LEN6 are not defined on all systems. Reported by Michael Tuexen.
+
+2004-08-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * strings.h, strings.c (scm_i_make_symbol): Added FLAGS parameter.
+ * symbols.h, symbols.c (SCM_I_F_SYMBOL_UNINTERNED,
+ scm_i_symbol_is_interned, scm_i_mem2symbol,
+ scm_i_mem2uninternedsymbol): Use it to store uninternedness flag.
+
+2004-08-25 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * srfi-13.c: First cut at thread-safeness and proper use of
+ scm_i_string_chars et al. Copious scm_remember_upto_heres have
+ been inserted. Made sure that no internal string pointer is used
+ across a SCM_TICK or a possible GC.
+
+ * script.c (scm_compile_shell_switches): Use
+ scm_from_locale_string instead of scm_makfrom0str.
+
+ * srfi-13.c (scm_string_rindex): Export to Scheme, as it has
+ always been.
+
+2004-08-25 Marius Vollmer <mvo@zagadka.de>
+
+ Moved SRFI-13 and SRFI-14 into the core, taking over the role of
+ strop.c.
+
+ * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
+ * strop.h, strop.c: Removed, they are now empty.
+ * Makefile.am: Updated for new and removed files.
+
+ * symbols.h, symbols.c (scm_string_ci_to_symbol): Moved here, next
+ to scm_string_to_symbol.
+
+ * chars.c (scm_char_alphabetic_p, scm_char_numeric_p,
+ scm_char_whitespace_p, scm_upper_case_p, scm_lower_case_p,
+ scm_char_is_both_p): Use scm_char_set_contains_p with the proper
+ charset instead of libc functions.
+
+ * strorder.c (scm_string_equal_p, scm_string_ci_equal_p,
+ scm_string_less_p, scm_string_leq_p, scm_string_gr_p,
+ scm_string_geq_p, scm_string_ci_less_p, scm_string_ci_leq_p,
+ scm_string_ci_gr_p, scm_string_ci_geq_p): Use scm_string_eq, etc
+ instead of explicit code.
+
+ * deprecated.c, load.c, posix.c, unif.c, symbols.c: Include
+ "srfi-13.h" instead of "strop.h".
+
+ * init.c (scm_init_guile_1): Call scm_init_srfi_13 and
+ scm_init_srfi_14. Do not call scm_init_strop.
+
+2004-08-24 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * numbers.c (scm_inf_p): Synced docstring back from manual.
+
+2004-08-22 Marius Vollmer <mvo@zagadka.de>
+
+ * strings.c (get_str_buf_start): New helper function.
+ (scm_i_substring, scm_i_substring_copy, scm_i_substring_shared,
+ scm_i_string_char, scm_i_string_writable_chars): Use it.
+ (scm_i_substring_copy): Make START argument optional for C
+ callers, for upcoming SRFI-13 integration.
+
+2004-08-21 Marius Vollmer <mvo@zagadka.de>
+
+ From Richard Todd, Thanks!
+
+ * script.c (scm_compile_shell_switches): added '-L' switch to add
+ to the %load-path.
+
+2004-08-21 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
+
+ * eval.c (unmemoize_exprs): When dropping internal body markers
+ from the output during unmemoization, also drop those that are not
+ immediately at the beginning of a body.
+
+2004-08-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * eval.c (scm_lookupcar1): Report "Variable used before given a
+ value" insetad of an "Unbound" one for variables that are found
+ but still contain SCM_UNDEFINED.
+
+ * posix.c (scm_mkstemp): Correction to the correction, mkstemp
+ expects a null-terminated string in the locale encoding, but
+ scm_i_string_writable_chars doesn't give that. Fixed by letting
+ mkstemp modify a locale version of the tmpl argument and copying
+ the result back into tmpl.
+
+ * strop.c (scm_substring_move_x): Store into str2, not str1.
+
+2004-08-20 Kevin Ryde <user42@zip.com.au>
+
+ * posix.c (scm_mkstemp): Correction to new locale_string stuff, need
+ to modify the input string.
+
+2004-08-19 Marius Vollmer <mvo@zagadka.de>
+
+ * deprecated.c (SCM_SYMBOL_CHARS): Cast away const in return.
+ (SCM_SYMBOL_LENGTH): It's scm_i_symbol_length, not
+ scm_c_symbol_length.
+
+2004-08-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ New string implementation, with copy-on-write strings and
+ mutation-sharing substrings, and a new internal string API.
+ Symbols can now share memory with strings.
+
+ * tags.h (scm_tc7_stringbuf): New tag.
+
+ * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
+ scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
+ replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH. Updated all
+ uses.
+ (scm_i_make_string, scm_c_make_string): New, to replace
+ scm_allocate_string. Updated all uses.
+ (SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
+ SCM_STRING_LENGTH): Deprecated.
+ (scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
+ scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
+ Discouraged. Replaced all uses with scm_from_locale_string or
+ similar, as appropriate.
+ (scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
+ scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
+ scm_substring_shared, scm_substring_copy): New.
+
+ * symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
+ SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
+ SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
+ scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
+ (SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
+ Deprecated.
+ (SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
+ SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
+ (scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
+ New, to replace scm_str2symbol and scm_mem2symbol, respectively.
+ Updated all uses.
+ (scm_gensym): Generate only the number suffix in the buffer, just
+ string-append the prefix.
+
+ * error.c (scm_memory_error): Do not try to throw, just abort.
+ Throwing will not work anyway.
+
+ * gh.h, gh-data.c (gh_set_substr): Made src const.
+
+ * ports.c (scm_i_mode_bits_n): New, for counted strings.
+ (scm_mode_bits): Use it.
+ (scm_c_port_for_each): Blocking GC does not seem to work, allocate
+ a vector normally and fill that instead of consing a list with a
+ blocked GC.
+
+ * read.c (scm_i_casei_streq): New, for counted strings.
+
+ * threads.c (gc_section_count): Removed, thread-sleeping can not
+ be nested.
+ (scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
+ admin mutex so that we can be put to sleep by other threads while
+ blocking on that mutex. Lock all the heap mutex of all threads,
+ including ourselves.
+ (scm_i_thread_wake_up): Unlock all threads, including ourselves,
+ call scm_i_enter_guile.
+ (scm_thread_mark_stacks): Expect all threads to be suspended.
+
+ * gc.h, gc.c (scm_i_gc_admin_mutex): New, to protect
+ scm_gc_mallocated, for now.
+ (scm_init_storage): Initialize it.
+ * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it.
+
+ * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark,
+ scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate.
+ * gc-card.c (scm_i_sweep_card): Call scm_i_string_free,
+ scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
+
+ * strop.c (scm_string_copy): Use scm_c_substring to get a
+ copy-on-write string.
+
+2004-08-18 Kevin Ryde <user42@zip.com.au>
+
+ * arbiters.c (FETCH_STORE): New macro.
+ (SCM_LOCK_VAL, SCM_UNLOCK_VAL): New constants.
+ (SCM_LOCK_ARB, SCM_UNLOCK_ARB): Remove, effectively absorbed into
+ scm_try_arbiter and scm_release_arbiter.
+ (scm_try_arbiter, scm_release_arbiter): Use FETCH_STORE to get xchg
+ for speed on i386, otherwise using mutex.
+
+ * eq.c (scm_equal_p): Remove real==fraction and fraction==real, they
+ must be #f according to R5RS. (equal? follows eqv?, and for eqv? an
+ exact and inexact is #f.)
+
+ * fports.c (fport_print): Use scm_ttyname instead of ttyname directly,
+ to get thread safety of scm_ttyname.
+
+ * ports.c (ttyname): Remove prototype, unused.
+
+ * socket.c (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM.
+ Reported by Michael Tuexen.
+
+2004-08-13 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * load.c (scm_init_load_path): Do not pass NULL to
+ scm_to_locale_string, which would happen when GUILE_LOAD_PATH is
+ not set. Thanks to Bill Schottstaedt.
+
+2004-08-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
+ locale strings instead of accessing their internals.
+ (scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
+ SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
+ SCM_STRING_CHARS and SCM_STRING_LENGTH.
+
+ * simpos.c (scm_system): Convert SCM strings to locale strings
+ instead of accessing their internals.
+
+ * script.c (scm_compile_shell_switches): Convert version to locale
+ string before printing it.
+
+ * rdelim.c (scm_read_delimited_x): Avoid
+ SCM_VALIDATE_SUBSTRING_SPEC_COPY and use scm_from_size_t instead
+ of scm_from_long for the returned number of read characters.
+
+ * ioext.c (scm_fdopen): Use scm_i_fdes_to_port together with
+ scm_i_mode_bits to avoid accessing internals of SCM string from C.
+
+ * filesys.c (STRING_SYSCALL, STRING2_SYSCALL): New helper macros.
+ Use them instead of SCM_SYSCALL when one or two strings need to be
+ converted into locale strings.
+ (my_rename): New, gathers platform dependent code for renaming.
+ (scm_rename): Use it.
+ (scm_readlink, scm_copy_file): Convert SCM strings to locale
+ strings instead of accessing their internals.
+ (scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
+ SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
+ SCM_STRING_LENGTH.
+
+ * extensions.c (load_extension): Convert lib and init to locale
+ strings instead of accessing the internals directly.
+ (scm_c_load_extension): Use scm_from_locale_string instead of
+ scm_makfrom0str.
+
+ * fports.h, fports.c (scm_i_fdes_to_port): New, like
+ scm_fdes_to_port, but take mode bits directly instead of as a C
+ string.
+ (scm_i_fdes_to_port): Implement using above.
+ (scm_open_file): Use scm_i_fdes_to_port together with
+ scm_i_mode_bits to avoid accessing internals of SCM string from C.
+ * vports.c (scm_make_soft_port): Use scm_i_fdes_to_port together
+ with scm_i_mode_bits to avoid accessing internals of SCM string
+ from C.
+
+ * ports.h (scm_i_mode_bits): New, same as scm_mode_bits but with a
+ SCM string as argument.
+
+ * ports.c (scm_i_void_port): New, like scm_void_port but take mode
+ bits directly instead of C string.
+ (scm_void_port): Implement using above.
+ (scm_sys_make_void_port): Use scm_i_void_port together with
+ scm_i_mode_bits to avoid accessing internals of SCM string.
+
+ * strings.h, strings.c (scm_i_get_substring_spec): New.
+
+ * socket.c, rw.c, deprecated.h, validate.h
+ (SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with
+ SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
+ scm_to_locale_string, etc.
+ (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as
+ above, plus scm_i_get_substring_spec.
+
+ * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c,
+ hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c,
+ strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use
+ SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH
+ instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and
+ SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first
+ with more explicit scm_remember_upto_here_1, etc, or introduced
+ them in the first place.
+
+ * posix.c (WITH_STRING): New helper macro. Use it where one
+ locale string is needed for a short piece of code.
+ (STRING_SYSCALL): New helper macro. Use it instead of SCM_SYSCALL
+ when one locale string is needed.
+ (scm_mkstemp): Convert tmpl to a locale string.
+ (scm_putenv): Rewritten to use only C strings.
+ (scm_setlocale, scm_crpt): Convert argument strings to locale
+ strings.
+
+2004-08-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * load.c (scm_primitive_load_path): Do not check for absolute
+ filenames when scm_sys_search_load_path returns false, which will
+ return absolute filenames unchanged.
+
+2004-08-11 Marius Vollmer <mvo@zagadka.de>
+
+ * gc.c, procprop.c (scm_init_storage, scm_stand_in_procs,
+ scm_stand_in_proc): Use a hastable for scm_stand_in_procs instead
+ of an alist. Thanks to Matthias Koeppe!
+
+2004-08-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * strings.h, deprecated.h (SCM_STRING_COERCE_0TERMINATION_X):
+ Moved from string.h to deprecated.h.
+
+ * deprecated.c, deprecated.h (SCM_CHARS, SCM_LENGTH): Removed.
+
+ * strings.h, strings.c (SCM_MAKE_STRING_TAG): Renamed to
+ SCM_I_MAKE_STRING_TAG, changed all uses.
+ (SCM_STRING_CHARS, SCM_STRING_UCHARS, SCM_STRING_LENGTH): Renamed
+ to SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_LENGTH
+ respectively. For a short time, the old names are still there as
+ aliases. Not all uses have been changed yet, but the ones in
+ strings.c have.
+ (SCM_STRING_MAX_LEN): Do not hardcode to 24 bits, compute from
+ SCM_T_BITS_MAX.
+ (scm_is_string, scm_from_locale_string, scm_from_locale_stringn,
+ scm_take_locale_string, scm_take_locale_stringn,
+ scm_to_locale_string, scm_to_locale_stringn,
+ scm_to_locale_stringbuf): New.
+ (scm_c_string2str, scm_c_substring2str): Deprecated by moving to
+ deprecated.[hc]. Implemented in terms of the new functions above.
+ (scm_take_str, scm_take0str, scm_mem2string, scm_str2string,
+ scm_makfrom0str): Reimplemented in terms of the new functions from
+ above. They will be discouraged shortly.
+ (scm_substring): Do not use scm_mem2string.
+ (scm_i_allocate_string_pointers, scm_i_free_string_pointers): New,
+ to replace similar code from posix.c, simpos.c, and dynl.c.
+ (scm_string_append): Use memcpy instead of explicit loop. Do not
+ use register keyword. Use plain 'char' instead of 'unsigned
+ char'.
+
+ * strports.c (scm_mkstrport): Use SCM_I_STRING_UCHARS instead of
+ SCM_STRING_UCHARS. Use SCM_I_STRINGP instead of SCM_STRINGP.
+
+ * strop.c (scm_i_index): Replaced SCM_STRINGP, SCM_STRING_CHARS,
+ and SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
+ SCM_I_STRING_LENGTH, respectively. Pass string object directly,
+ not as a pointer. Use scm_remember_upto_here_1 to protect it.
+
+ * read.c (scm_input_error): Use a SCM value for 'fn', not a C
+ string. This avoids a conversion round-trip.
+
+ * gh_data.c: Replaced SCM_STRINGP, SCM_STRING_CHARS, and
+ SCM_STRING_LENGTH with SCM_I_STRINGP, SCM_I_STRING_CHARS, and
+ SCM_I_STRING_LENGTH, respectively.
+ (gh_scm2newstr): Implement in terms of scm_to_locale_string.
+
+ * environments.c: Instead calling scm_puts on the SCM_STRING_CHARS
+ of a string, call scm_display on the string itself.
+
+ * dynwind.c, dynwind.h (scm_frame_free): New.
+
+ * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
+ net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
+ Replaced uses of SCM_STRING_CHARS with proper uses of
+ scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
+ Replaced scm_mem2string with scm_from_locale_string.
+
+ * simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
+ Removed, replaced all uses with scm_i_allocate_string_pointers.
+
+ * load.h, load.c (scm_internal_parse_path): Removed.
+ (scm_parse_path): Use scm_string_split to do the work.
+ (scm_init_load_path): Use scm_parse_path instead of
+ scm_internal_parse_path.
+ (scm_search_path): Rewritten string handling part of the code in
+ terms of scm_to_locale_stringbuf and so that it is thread safe.
+
+ * error.c (scm_error_scm): Throw directly instead of calling
+ scm_error, this avoids the back and forth conversion of SUBR and
+ MESSAGE and also plugs a memory leak.
+ (scm_error): Call scm_error_scm.
+
+ * backtrace.c: Replaced SCM_STRINGP with scm_is_string.
+ (display_header): Print FNAME when it is true, not
+ merely when it is a string.
+
+ * strings.h (SCM_SET_STRING_LENGTH, SCM_SET_STRING_CHARS): Removed
+ unceremoniously. They were unused by Guile itself, and external
+ use should stop immediately.
+
+
+2004-08-10 Marius Vollmer <mvo@zagadka.de>
+
+ * numbers.h, number.c, deprecated.h, deprecated.c (scm_round,
+ scm_truncate): Renamed to scm_c_round and scm_c_truncate;
+ deprecated versions installed in deprecated.h and deprecated.c.
+ Changed all uses.
+
+2004-08-06 Rob Browning <rlb@defaultvalue.org>
+
+ * net_db.c (scm_resolv_error): don't cause an exception while
+ trying to throw an exception -- call scm_misc_error with correct
+ arguments. The previous arguments needed a format escape that
+ wasn't in any of the format strings.
+
+2004-08-06 Kevin Ryde <user42@zip.com.au>
+
+ * ramap.c (scm_array_fill_x): For byvect char fill, force signed char
+ so as not to depend on signedness of plain char. For byvect range
+ check, throw out-of-range rather than wrong-type-arg.
+
+ * unif.c (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
+ signed byte range checks by using scm_to_schar and scm_from_schar,
+ don't want to depend on signedness of C char.
+
+2004-08-05 Kevin Ryde <user42@zip.com.au>
+
+ * arbiters.c (scm_try_arbiter): Use scm_i_misc_mutex instead of
+ SCM_DEFER_INTS.
+ (scm_release_arbiter): Use scm_i_misc_mutex so return value can be
+ guaranteed if multiple threads compete to unlock.
+ Update docstrings per doc/ref/api-scheduling.texi.
+
+ * filesys.c (scm_copy_file): Use fstat on the input fd rather than
+ stat on the filename, to be certain a file rename can't mean we get
+ info on one filesystem object but open another. This fstat usage is
+ similar to Emacs copy-file.
+
+ * posix.c (scm_setgroups): Enhance docstring, per doc/ref/posix.texi.
+
+ * simpos.c (scm_system_star): Change scm_from_long to scm_from_int on
+ SIGINT and SIGQUIT, since those values are ints.
+
+2004-08-03 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * num2integral.i.c, num2float.i.c: Removed.
+ * Makefile.am (noinst_HEADERS): Updated.
+
+ * numbers.h. numbers.c (scm_make_ratio): Renamed to
+ scm_i_make_ratio and made static, replaced uses with scm_divide.
+ (scm_complex_p): New, export as "complex?" to Scheme.
+ (scm_number_p): Export as "number?" to Scheme.
+ (scm_is_complex, scm_is_number): New.
+ (scm_c_make_rectangular, scm_c_make_polar): New.
+ (scm_make_rectangular, scm_make_polar): Use above.
+ (scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
+ New.
+ (scm_make_complex): Discouraged by moving to discouraged.h and
+ discouraged.c. Replaced all uses with scm_c_make_rectangular.
+
+ * discouraged.h, discouraged.c, numbers.c, numbers.h
+ (scm_is_rational): New.
+ (scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
+ scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
+ Removed prototypes.
+ (scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
+ Discouraged by moving to discouraged.h and discouraged.c.
+ Replaced all uses with scm_from_double.
+ (scm_num2float, scm_num2double): Discouraged by moving prototype
+ to discouraged.h and rewriting in terms of scm_to_double.
+ Replaced all uses with scm_to_double.
+ (scm_to_double): Do not implement in terms of scm_num2dbl, use
+ explicit code.
+ (scm_from_double): Do not implement in terms of scm_make_real, use
+ explicit code.
+
+2004-08-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * init.c (scm_init_guile_1): Call scm_i_init_discouraged.
+
+ * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
+ * gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
+
+ * eval.c (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR):
+ Renamed to SCM_I_* in order to avoid collisions with the versions
+ defined in deprecated.h.
+
+ * discouraged.h, discouraged.c: New files.
+
+ * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
+ SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
+ deprecated to being discouraged by moving to discouraged.h.
+
+ * numbers.h, numbers.c, discouraged.h, discouraged.c
+ (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
+ scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
+ scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
+ scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
+ scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
+ scm_num2ulong_long): Discouraged by moving to discouraged.h and
+ discouraged.c and reimplementing in terms of scm_from_* and
+ scm_to_*. Changed all uses to the new scm_from_* and scm_to_*
+ functions.
+
+ * numbers.h, numbers.c: Removed GUILE_DEBUG code.
+ (scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
+ scm_i_size2big, scm_i_ptrdiff2big): Removed.
+ (scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
+ * conv-integer.i.c, conv-uinteger.i.c: Use them instead of
+ explicit code.
+
+2004-08-02 Kevin Ryde <user42@zip.com.au>
+
+ * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
+ and current usage and migration.
+
+2004-07-31 Kevin Ryde <user42@zip.com.au>
+
+ * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
+ it's not thread safe.
+ (scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
+ advantage of this.
+ * fports.c (scm_open_file): Use scm_strerror likewise.
+ * filesys.c (scm_stat, scm_lstat): Ditto.
+
+ * filesys.c (scm_copy_file): Avoid fd leak when destination file
+ cannot be opened.
+
+ * symbols.c (scm_gensym): Use scm_i_misc_mutex around gensym_counter
+ update, for thread safety.
+ (gensym_counter): Move into scm_gensym which is its only user.
+ (scm_init_symbols): No need to explicitly initialize gensym_counter.
+
+2004-07-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
+ scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
+ scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
+ scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
+ scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
+ scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
+ scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
+ scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
+ defined in terms of scm_to_signed_integer, etc, but in terms of
+ scm_to_int8, etc.
+
+ * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New.
+
+ * gen-scmconfig.h.in: Removed SCM_I_GSC_*_LIMITS macros, they are
+ no longer used.
+
+ * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
+ SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.
+
+ * __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
+ SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
+ SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
+ SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
+ SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
+ SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
+ definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
+
+ * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
+ the functions below.
+
+ * Makefile.am (noinst_HEADERS): Added conv-integer.i.c and
+ conv-uinteger.i.c.
+
+ * numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
+ scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
+ scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
+ scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
+ scm_from_uint64): Turned from macros into proper functions.
+ (scm_to_signed_integer, scm_to_unsigned_integer,
+ scm_from_signed_integer, scm_from_unsigned_integer): Generate via
+ conv-integer.i.c and conv-uinteger.i.c, as well.
+
+ * number.h (scm_to_ssize_t, scm_to_size_t): Use the new
+ SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX, and SCM_I_SIZE_MAX macros for
+ the limits. Those are always defined.
+
+2004-07-29 Kevin Ryde <user42@zip.com.au>
+
+ * posix.c (scm_ttyname): Use scm_i_misc_mutex for thread safety.
+
+2004-07-28 Kevin Ryde <user42@zip.com.au>
+
+ * posix.c (scm_ctermid): Use an L_ctermid buf on the stack, for thread
+ safety.
+
+ * unif.c (scm_array_set_x): For svect, use scm_num2short for
+ consistency with other vector types and to get arg and func name into
+ error message.
+
+2004-07-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
+ Reimplement using scm_is_false, scm_is_true, scm_is_bool, and
+ scm_from_bool, respectively.
+ (SCM_NINUMP): Added.
+
+ * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
+ deprecated.h. Replaced all uses with scm_is_eq.
+
+2004-07-24 Kevin Ryde <user42@zip.com.au>
+
+ * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
+ * posix.c (scm_crypt): Use it to protect static data in crypt().
+
+2004-07-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
+ SCM_INUM): Deprecated by renaming them to SCM_I_INUMP,
+ SCM_I_NINUMP and SCM_I_INUM, respectively and adding deprecated
+ versions to deprecated.h and deprecated.c. Changed all uses to
+ either use the SCM_I_ variants or scm_is_*, scm_to_*, or
+ scm_from_*, as appropriate.
+
+ * dynwind.c (scm_i_dowinds): Removed unused code that would call
+ the unexisting scm_cross_dynwind_binding_scope for inums on the
+ windlist.
+
+2004-07-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * socket.c (ipv6_net_to_num, scm_from_ipv6): Renamed
+ ipv6_net_to_num to scm_from_ipv6, for converting from an IPv6
+ byte-wise address to a SCM integer. Changed all uses.
+ (ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
+ scm_to_ipv6 and added type and range checking, for converting from
+ an IPv& byte-wise address to a SCM integer. Changed all uses.
+ (bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
+ is now done by scm_to_ipv6.
+
+ * numbers.c (scm_to_signed_integer, scm_to_unsigned_integer): dot
+ not accept inexact integers.
+
+ * validate.h, deprecated.h (SCM_VALIDATE_INUM,
+ SCM_VALIDATE_INUM_COPY, SCM_VALIDATE_BIGINT,
+ SCM_VALIDATE_INUM_MIN, SCM_VALIDATE_INUM_MIN_COPY,
+ SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
+ SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
+ SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
+ fixnum/bignum distinction visible. Changed all uses to
+ scm_to_size_t or similar.
+
+2004-07-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * cpp_cnvt.awk: Use scm_from_int instead of SCM_MAKINUM.
+
2004-07-10 Kevin Ryde <user42@zip.com.au>
* hash.c (scm_hashq, scm_hashv, scm_hash): Restrict to size>=1 rather
than size>=0, since 0<=hash<size cannot be satisfied for size==0, and
such a size causes divide-by-zeros in scm_hasher.
+ * regex-posix.c (scm_make_regexp): Free rx on error, to avoid memory
+ leak.
+
2004-07-08 Marius Vollmer <marius.vollmer@uni-dortmund.de>
* numbers.c (scm_is_signed_integer, scm_is_unsigned_integer):
SCM_I_MAKINUM and changed all uses.
* deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
- * gen-scmconfig.c: Instead of hard-coding the numbers, compute
+ * gen-scmconfig.c (SCM_I_LLONG_MIN, SCM_I_LLONG_MAX,
+ SCM_I_ULLONG_MAX): Instead of hard-coding the numbers, compute
them by assuming twos-complement.
2004-07-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>