-2004-09-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+2004-11-03 Marius Vollmer <mvo@zagadka.de>
- * pairs.h (scm_car, scm_cdr, scm_i_chase_pairs, SCM_I_A_PAT,
- SCM_I_D_PAT, etc, scm_caar, scm_cadr, etc): New.
+ * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
+ SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
+ SCM_SET_UVECTOR_LENGTH): Removed.
+
+2004-11-02 Marius Vollmer <mvo@zagadka.de>
+
+ Mac OS X and OpenBSD compatibility patches from Andreas Vögele.
+ Thanks!
+
+ * backtrace.c (scm_display_backtrace_with_highlights): Join the
+ first and the second line of the SCM_DEFINE macro call, since old
+ preprocessors cannot handle definitions that are split into two
+ lines.
+
+ * inline.h (scm_cell, scm_double_cell): Don't use C99 variable
+ declarations.
+
+ * pairs.c (scm_i_chase_pairs): Replace scm_t_bits with
+ scm_t_uint32 to fix the mismatch between the function declaration
+ and definition.
+
+ * sort.c (quicksort): Don't use C99 variable declarations.
+
+ * srfi-4.c (uvec_fast_ref): Avoid a compiler warning by returning
+ SCM_BOOL_F if no type matches.
+
+ * threads.c (thread_print): Cast a pointer to size_t when printing
+ with scm_uintprint.
+
+ * unif.c (scm_i_tag_to_prototype): Make sure that "instead" gets
+ defined.
+ (scm_array_prototype): Deprecated.
+
+2004-11-02 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
+ * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
+ more efficient access to the u32vector.
+
+ * tags.h (scm_tc7_llvect, scm_tc7_uvect, scm_tc7_fvect,
+ scm_tc7_dvect, scm_tc7_cvect, scm_tc7_svect, scm_tc7_byvect,
+ scm_tc7_ivect): Renamed to scm_tc7_unused_1 to scm_tc7_unused_8.
+
+ * validate.h (SCM_VALIDATE_VECTOR_OR_DVECTOR): Accept f64vectors
+ instead of the old-style dvectors.
+
+ * gh_data.c: Use new-style uniform arrays in place of old-style
+ ones.
+
+ * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c,
+ ramap.c, unif.c: Do no longer handle old-style uniform vectors.
+
+ * unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use u32vectors
+ instead of old-sytle uvectors.
+
+ * convert.c, convert.i.c: Rewritten completely, using
+ scm_any_to_u8vector, etc and other new-style uniform vector
+ functions.
+
+ * random.c (scm_random_solid_sphere_x,
+ scm_random_hollow_sphere_x): Do not validate vector argument, this
+ is already done elsewhere.
+
+ * srfi-4.h, srfi-4.i.c, srfi-4.c (coerce_to_uvec,
+ scm_any_to_u8vector, etc): New.
+ (scm_uniform_element_size, scm_uniform_vector_length): Do no
+ longer handle old-style uniform vectors.
+
+ * read.c (scm_lreadr): Bugfix: include the last bit in the
+ bit vector.
+
+2004-10-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * unif.h, unif.c (scm_array_creator): New.
+ (scm_i_get_old_prototype): New.
+ (scm_array_prototype): use it to return old-style prototype, never
+ return creators.
+ (scm_make_uve): Use scm_call_1 instead of scm_call_2 with a second
+ arg of SCM_UNDEFINED. The latter is wrong.
+
+ * unif.h, unif.c (scm_make_u1vector): New, but only temporary.
+ (make_uve): Removed.
+ (scm_i_proc_make_vector, scm_i_proc_make_string,
+ scm_i_proc_make_u1vector): New.
+ (scm_init_unif): Initialize them.
+ (scm_i_convert_old_prototype): New.
+ (scm_make_uve): Use it to get the creator procedure. Removed all
+ old code that created old-style uniform vectors.
+ (scm_array_p): Handle generic vectors.
+ (scm_dimensions_to_uniform_array): Do not fill new array with
+ prototype when that is a procedure.
+ (scm_list_to_uniform_array): Also accept a list of lower bounds as
+ the NDIM argument.
+ (scm_i_print_array): Print rank for shared or non-zero-origin
+ vectors.
+ (tag_proto_table, scm_i_tag_to_prototype, scm_i_read_array): New.
+ (scm_raprin1): Do not call scm_i_array_print for enclosed arrays,
+ which I do not understand yet.
+ (scm_array_prototype): Explicitely handle generic vectors.
+
+ * numbers.c, number.h (scm_i_print_complex, icmplx2str): New.
+ (iflo2str): Use icmplx2str for complex numbers.
+
+ * srfi-4.c, srfi-4.h (scm_i_read_homogenous_vector,
+ scm_i_uniform_vector_prototype): Removed.
+ (scm_i_uniform_vector_creator): New.
+ (SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
+ SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
+ Updated all tables and generic functions to support them.
+ (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
+ (scm_init_srfi_4): Initialize them.
+
+ * srfi-4.i.c (scm_take_u8vector, etc): use uvec_sizes instead of
+ sizeof(CTYPE) as explained in the comment.
+
+ * read.c (scm_lreadr): Call scm_i_read_array for all characters
+ followinf '#' that can start an array. Explicitely disambiguate
+ 'i' and 'e' between introducing numbers and uniform vectors. Do
+ not call scm_i_read_homogenous_vector, since that is also handled
+ by scm_i_read_array now.
+
+2004-10-27 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ First cut at integrating uniform vectors from srfi-4 with the rest
+ of Guile. This change replaces scm_tc7_byvect with a s8 uniform
+ vector. The plan is to gradually replace one type after the other
+ until none is left and then to consider general cleanups and
+ optimizations.
+
+ * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
+
+ * srfi-4.h, srfi-4.c (scm_uniform_vector_p,
+ scm_uniform_vector_ref, scm_uniform_vector_set_x,
+ scm_uniform_vector_to_list, scm_is_uniform_vector,
+ scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
+ scm_uniform_vector_elements, scm_uniform_vector_element_size,
+ scm_uniform_vector_release): New.
+ (scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
+ (scm_uniform_element_size, scm_uniform_vector_length): Moved here
+ from unif.h, unif.c and extended to handle both the old and new
+ uniform vectors.
+
+ * tags.h (scm_tc7_byvect): Commented out.
+
+ * unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
+ the former to the latter.
+ (scm_uniform_vector_length, scm_uniform_element_size): Moved to
+ srfi-4.h, srfi-4.c.
+ (scm_make_uve): Call scm_make_s8vector for #\nul prototype.
+ (scm_array_p, scm_array_rank, scm_array_dimensions,
+ scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
+ scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
+ scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
+ vectors. Removed code for scm_tc7_byvect.
+ (scm_dimensions_to_uniform_array): Fill array with 0 when
+ prototype is #\nul.
+ (scm_i_print_array_dimension, scm_i_legacy_tag,
+ scm_i_print_array): New.
+ (scm_raprin1): Call scm_i_print_array for arrays. Removed code
+ for scm_tc7_byvect.
+
+ * ramap.c (scm_ra_matchp, scm_array_fill_int, racp,
+ scm_array_index_map_x, raeql_1, scm_array_equal_p): Handle srfi-4
+ uniform vectors. Removed code for scm_tc7_byvect
+
+ * print.c (iprin1): Removed code for scm_tc7_byvect.
+ * objects.c (scm_class_of): Likewise.
+ * gc-mark.c (scm_gc_mark_dependencies): Likewise.
+ * gc-card.c (scm_i_sweep_card): Likewise.
+ * evalext.c (scm_self_evaluating_p): Likewise.
+ * eq.c (scm_equal_p): Likewise.
+
+ * gh_data.c (gh_chars2byvect): Reimplemented with
+ scm_make_s8vector.
+ (gh_scm2chars): Handle s8vectors, removed code for scm_tc7_byvect.
+
+ * srfi-4.c (take_uvec): New.
+ (alloc_uvec): Use it.
+ * srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
+
+ * random.c (vector_scale, vector_scale_x): Renamed former to the
+ latter, since it modifies its argument.
+ (vector_scale_x, vector_sum_squares, scm_random_normal_vector_x):
+ Do not use scm_universal_vector_length for non-uniform vectors.
+ Use scm_f64vector_elements to access innards of uniform vectors.
+
+ * convert.i.c: Convert srfi-4 style uniform vectors when
+ requested.
+ * convert.c (scm_c_scm2chars, scm_c_chars2scm,
+ scm_c_chars2byvect): Use a s8vector instead of a scm_tc7_byvect.
+
+2004-10-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * numbers.h, numbers.c (scm_i_print_double): New.
+
+ * srfi-4.c, srfi-4.h, srfi-4.i.c: New files, initially from
+ ../srfi/ but heavily modified.
+ * Makefile.am: Add them in all the right places.
+ * init.c (scm_init_guile_1): Call scm_init_srfi_4.
+ * read.c (scm_lreadr): Call scm_i_read_homogenous_vector for '#f',
+ '#u', and '#s'.
+
+ * read.h, read.c (scm_i_input_error): Renamed from scm_input_error
+ and made non-static. Changed all uses.
+
+2004-10-22 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
+ print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
+ guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
+ scm_uintprint to print unsigned integers, raw heap words, and
+ adresses, using a cast to scm_t_bits to turn pointers into
+ integers.
+
+ * unif.c: Include "libguile/print.h".
+
+ * numbers.h, numbers.c (SCM_T_INTBUFLEN): Increased to cover
+ scm_t_intmax values.
+ (scm_uint2str): New, for scm_t_uintmax.
+ (scm_iint2str): Argument type changed to scm_t_intmax,
+ reimplemented in terms of scm_uint2str.
+
+ * print.c, print.h (scm_uintprint): New, for printing
+ scm_t_uintmax values.
+ (scm_intprint): Argument type changed to scm_t_intmax.
+
+ * sort.c (quicksort, scm_merge, scm_merge_list_x,
+ scm_merge_list_step, scm_merge_vector_step): Inserted SCM_TICKs at
+ strategic places so that the loops can be interrupted.
+
+ * Makefile.am (INCLUDES): Use @LTDLINC@ instead of
+ "-I$(top_srcdir)/libguile-ltdl".
+ (libguile_la_LIBADD): Use @LIBLTDL@ instead of
+ "../libguile-ltdl/libguile-ltdl.a".
+
+ * guile.c, dynl.c: Switched to using libltdl directly. Replaced
+ all references to scm_lt_* with just lt_*. Include <ltdl.h>
+ instead of <libguile-ltdl.h>.
+
+2004-10-20 Marius Vollmer <mvo@zagadka.de>
+
+ * sort.c (quicksort): Copy pivot out of the array while
+ constructing the partitions; it could get overwritten otherwise.
+ Because of the ultimate insertion sort, this bug did not cause
+ quicksort to fail, it just put all the burdon on the insertion
+ sort and was thus very slow. Thanks to Rolan Orre for reporting
+ the slowness!
+
+2004-10-19 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * numbers.c (scm_i_range_error): New.
+ * conv-integer.i.c, conv-uinteger.i.c: Use it instead of
+ scm_out_of_range.
+
+ * sort.c (scm_restricted_vector_sort_x): Validate startpos <=
+ endpos. State inclusiveness/exclusiveness of bounds in docstring.
+
+ * unif.c (scm_array_p): When no prototype is given, explicitely
+ test for allowable types, do not simply return true. Thanks to
+ Roland Orre for reporting this!
+
+ * private-gc.h (SCM_DEFAULT_MAX_SEGMENT_SIZE): Increase to 20 Mib.
+
+ * gc-segment.c (scm_i_get_new_heap_segment): Limit size of new
+ segment to scm_max_segment_size.
+
+2004-10-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * inline.h (scm_double_cell): abort if GC running.
+ (scm_cell): idem.
+
+2004-10-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * error.c (scm_wrong_type_arg): Do not talk about "argument" for
+ pos == 0.
+
+ Keywords no longer store a 'dash symbol'. Instead, they store a
+ symbol with their real name.
+
+ * keywords.h, keywords.c, deprecated.h, deprecated.c
+ (SCM_KEYWORDP, SCM_KEYWORDSYM): Deprecated and implemented in
+ terms of scm_is_keyword and scm_keyword_dash_symbol.
+
+ * keywords.h, keywords.c, discouraged.h, discouraged.c
+ (scm_make_keyword_from_dash_symbol, scm_keyword_dash_symbol,
+ scm_c_make_keyword): Discouraged.
+
+ * keywords.h, keywords.c (scm_symbol_to_keyword,
+ scm_keyword_to_symbol): Implemented in C.
+ (scm_is_keyword, scm_from_locale_keyword,
+ scm_from_locale_keywordn): New.
+
+ * goops.c: Replaced SCM_KEYWORDP with scm_is_keyword.
+
+ * snarf.h (SCM_KEYWORD, SCM_GLOBAL_KEYWORD): Use
+ scm_from_locale_keyword instead of scm_c_make_keyword.
+
+ * keywords.c (scm_symbol_to_keyword): Use SCM_ASSERT_TYPE for a
+ better error message.
+
+ * deprecated.c: Include discouraged.h and keywords.h.
+
+ * read.c (scm_lreadr): Simply do (symbol->keyword (read)) after
+ reading '#:' or ':'. See NEWS for consequences.
+
+2004-09-29 Marius Vollmer <marius.vollmer@uni-dortmund.de>
+
+ * read.c (scm_lreadr): Revert change from 2004-09-22: string
+ literals are now read-write again (until SCM_STRING_CHARS is
+ removed).
+
+ * strings.c (SCM_STRING_CHARS): Explicitely reject read-only
+ strings with an error message that blames SCM_STRING_CHARS.
+
+ * options.c (change_option_setting): Use scm_car instead of
+ explicit type check plus SCM_CAR.
+
+ * print.h, print.c (SCM_PRINT_HIGHLIGHT_PREFIX,
+ SCM_PRINT_HIGHLIGHT_SUFFIX): New printer options.
+ (scm_iprin1): Use them instead of the previoulsy hardcoded
+ strings.
+ (scm_init_print): Initialize them.
+
+ * backtrace.c (display_frame_expr): Do not remove control
+ characters from the final string. Print it directly using
+ scm_display.
+
+ * ramap.c (scm_array_equal_p): Include scm_tc7_svect in switch.
+ Thanks to Roland Orre!
+
+2004-09-29 Kevin Ryde <user42@zip.com.au>
+
+ * regex-posix.c (scm_regexp_exec): Correction to last change, should
+ be whole original string in match struct, not offsetted substring.
+
+2004-09-24 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * gc.c (scm_gc_unprotect_object): abort if called during GC.
+
+2004-09-24 Marius Vollmer <mvo@zagadka.de>
+
+ * Makefile.am (EXTRA_DIST): Added gettext.h.
+
+ * smob.c, smob.h (scm_assert_smob_type): New.
+
+ * Makefile.am (guile_CFLAGS, guile_LDFLAGS, libguile_la_CFLAGS):
+ Include GUILE_CFLAGS.
+ (libguile_la_LIBADD): Removed THREAD_LIBS_LOCAL, which is unused
+ now.
+ (libpath.h): Put GUILE_CFLAGS in the build-info.
+
+2004-09-23 Marius Vollmer <mvo@zagadka.de>
+
+ * print.h (scm_print_state): Added highlight_objects.
+ * print.c (make_print_state, scm_free_print_state): Initialize it
+ to SCM_EOL.
+ (scm_iprin1): Wrap output in '{...}' when object is contained in
+ highlight_objects.
+
+ * backtrace.h, backtrace.c (scm_display_backtrace_with_highlights,
+ scm_backtrace_with_highlights): New. Set highlight_objects of
+ printstate.
+
+ * error.c (scm_error_scm): Document new meaning of data/rest
+ argument for out-of-range and wrong-type-arg errors.
+ (scm_out_of_range, scm_out_of_range_pos, scm_wrong_type_arg,
+ scm_wrong_type_arg_msg): Pass bad_value in rest argument of
+ exception so that it gets highlighted in the backtrace.
+ Don't talk about "argument" when not giving a position.
+
+ * throw.c (handler_message): The rest argument is the fourth
+ argument, not everything after the third. Call
+ scm_display_backtrace_with_highlights, passing the rest argument
+ when appropriate.
+
+2004-09-22 Marius Vollmer <mvo@zagadka.de>
+
+ From Jan Nieuwenhuizen <janneke@gnu.org> and Bruno Haible
+ <bruno@clisp.org>:
+
+ * i18n.c: Handle --disable-nls (thanks Bruno).
+
+ * posix.c (scm_init_posix): Add LC_PAPER, LC_NAME, LC_ADDRESS,
+ LC_TELEPHONE, LC_MEASUREMENT, LC_IDENTIFICATION.
+
+ * i18n.c (scm_i_to_lc_category): New name and export. Support all
+ LC categories.
+ * posix.c (scm_setlocale): Use it.
+
+ * i18n.h, i18n.c (scm_textdomain, scm_bindtextdomain,
+ scm_bind_textdomain_codeset): Make wrappers similar to C function
+ they wrap.
+
+ * i18n.h: New file.
+ * i18n.c: New file.
+ * gettext.h: New file, taken from GNU gettext.
+ * init.c: Include libguile/i18n.h.
+ (scm_init_guile_1): Add call to scm_init_i18n().
+ * Makefile.am (libguile_la_SOURCES): Add i18n.c.
+ (DOT_X_FILES): Add i18n.x.
+ (DOT_DOC_FILES): Add i18n.doc.
+ (libguile_la_LDFLAGS): Add @LTLIBINTL@.
+ (modinclude_HEADERS): Add i18n.h.
+
+2004-09-22 Marius Vollmer <mvo@zagadka.de>
+
+ * gh_list.c: Replaced SCM_CAR, etc with scm_car, etc.
+
+ * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
+ discouraged.h. Replaced all uses with scm_is_pair.
+ (SCM_I_CONSP): New name for SCM_CONSP.
+
+ * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
+ scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
+ scm_cadr, etc): New.
+ (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all
+ uses with scm_is_null.
+
+ * eval.c (scm_eval, scm_apply, call_cxr_1): Use scm_i_chase_pairs
+ instead of explicit code.
2004-09-22 Marius Vollmer <mvo@zagadka.de>
too short to contain s2.
* regex-posix.c (scm_regexp_exec): Convert string to
- zero-temrinated locale string before matching against it.
+ zero-terminated locale string before matching against it.
* strings.h, strings.c (scm_substring_read_only,
scm_c_substring_read_only, scm_i_substring_read_only): New.
2004-09-13 Jan Nieuwenhuizen <janneke@gnu.org>
- * srfi-13.c (scm_string_contains, s_scm_string_contains_ci):
+ * srfi-13.c (scm_string_contains, scm_string_contains_ci):
Bugfix: when subtracting unsigned values, make sure that result
does not wrap.