+1999-05-09 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * strop.c (scm_string_capitalize_x): Use the SCM object `s' in
+ error messages, not the uninitialized string `str'. Love that
+ typechecking.
+
+ * strop.c (scm_substring_move_x): New function, which can handle
+ arbitrary overlapping substrings.
+ (substring-move-left!, substring-move-right!): These are
+ now just synonyms for substring-move!.
+ * strop.h (scm_substring_move_x): New prototype.
+ (scm_substring_move_left_x, scm_substring_move_right_x):
+ #define these as synonyms for scm_substring_move_x.
+
+ Fixes, cleanups, and new functions from Greg Harvey.
+
+ 1999-05-03 Greg Harvey <Greg.Harvey@thezone.net>
+
+ * strop.c (scm_string_capitalize_x, scm_string_capitalize): new
+ functions; capitalize the first letter of each word in the
+ argument string, and downcase the rest.
+ (scm_string_ci_to_symbol): string->symbol, such that the same
+ symbol is returned for any argument where the only difference
+ between strings is in capitalization.
+ (scm_string_upcase, scm_string_downcase): non-destructive
+ versions.
+
+ 1999-01-13 Greg Harvey <Greg.Harvey@thezone.net>
+
+ * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
+ changed to use memmove.
+ * strop.c (scm_i_index): removed the pos arguments (it's only
+ called twice, and each time it's SCM_ARG1, SCM_ARG2, SCM_ARG3,
+ SCM_ARG4).
+
+ 1999-01-11 Greg Harvey <Greg.Harvey@thezone.net>
+
+ * strop.h: fixed prototypes.
+
+ * strop.c (scm_substring_move_left_x, scm_substring_move_right_x):
+ changed to have 5 required args, rather than 2 required, and 3 required
+ rest args. Also modified to allow str1 & str2 to overlap.
+ (scm_substring_fill_x): changed to 4 args, rather than 2 args and
+ 2 required rest args.
+
+1999-05-02 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * procs.h: Doc fix.
+
+ * Makefile.am (modinclude_HEADERS): Add kw.h, so the new version
+ gets installed.
+ * Makefile.in: Regenerated.
+
+ * numbers.c: If we're supporting floating-point, provide the
+ feature "inexact".
+
+ * scmconfig.h.in: Regenerated; see today's change to
+ ../configure.in.
+
+1999-04-17 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * Makefile.in: Regenerated.
+
+ Remove readline support, to avoid copyright confusion.
+ * Makefile.am: Remove readline files from lists.
+ * init.c: Don't initialize readline.
+ * scmconfig.h.in: Regenerated.
+
+ * numbers.c (s_bignum): Renamed to s_bignum, and made static.
+ Libguile should not be exporting random little strings.
+ * numbers.h (s_bignum): Extern declaration removed.
+
+ More const changes from Ken Raeburn.
+ * numbers.c (scm_s_bignum, fx): Now const.
+ (scm_logtab, scm_ilentab, s_adjbig): Now static and const.
+ * numbers.h (scm_s_bignum): Update declaration.
+ * eval.c (bodycheck): Argument WHAT now points to const.
+ * snarf.h (SCM_SYNTAX): Name is const.
+
+ * eval.c (scm_i_let): Make this globally visible, to avoid dynamic
+ linking crashes on NetBSD. (Thanks to Ken Raeburn.)
+
+1999-03-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * numbers.c (isfinite): Define this macro if not defined: Return a
+ non-zero value if X is finite. (From ISO C 9x standard.)
+ (scm_inexact_to_exact): Bugfix: Don't pass NaNs to scm_dbl2big.
+ (Thanks to Jon Trowbridge and Greg Harvey.)
+
+1999-03-22 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * keywords.c (scm_tc16_kw): Added for backward compatibility.
+ Will be removed in next release.
+
+ * Makefile.am (modinclude_HEADERS): Added kw.h;
+
+ * kw.h: New file.
+
+ * libguile.h: #include "libguile/kw.h"
+
+1999-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * pairs.c (scm_set_car_x, scm_set_cdr_x): Return SCM_UNSPECIFIED.
+
+1999-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * print.c (scm_isymnames): Added #@dispatch and #@hash-dispatch.
+
+ * hashtab.c, hashtab.h (scm_hash_fold, scm_internal_hash_fold):
+ Place the table argument last.
+
+1999-03-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * modules.c: #include "procprop.h"
+ (scm_system_module_env_p): Assume root environment is no lookup
+ closure is found.
+
+ * debug.c, eval.c, evalext.c, gdbint.c stacks.c:
+ #include "modules.h".
+
+ * modules.c, modules.h, eval.c, eval.h (scm_env_top_level,
+ scm_top_level_env, scm_system_module_env_p): Moved to modules.c.
+
+ * eval.c, eval.h (scm_top_level_lookup_closure): Removed.
+
+1999-03-18 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * error.c (scm_wta): Pass SCM_LIST1 (arg) instead of SCM_EOL to
+ scm_misc_error when pos is a string. This allows for dispatching
+ arbitrary error messages with one argument via SCM_ASSERT:
+ SCM_ASSERT (<cond>, obj, "Undigestable object: %S", <subr>);
+
+1999-03-17 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * list.c (scm_reverse): Report an error if given a circular list
+ instead of filling memory.
+ * list.c (scm_reverse_x): Check args.
+
+1999-03-14 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ Most of this batch of changes is about how to deal with extended
+ types when an object system is loaded into Guile. A nice object
+ system is capable of representing Guile's types as class objects.
+
+ For example, we want a regular expression to be of class <regex>.
+ But regular expressions are smobs which aren't under direct
+ control of the object system, so there has to be some mechanism
+ which informs the object system that a new class should be created
+ which can represent the smob type. I call this a "wrapper class".
+
+ * objects.c: #include "smob.h";
+ (scm_class_keyword): Removed. (Class is automatically created by
+ make_smob_classes.)
+ (scm_smob_class): Array of smob classes indexed by smobnum.
+ (scm_make_extended_class): "Plugin" function pointer for creation
+ of wrapper classes for smob and struct types.
+ (scm_class_of): Handle compiled closures. (Currently regarded as
+ <procedure>.);
+ Use scm_smob_class to handle smob types;
+ Handle scm_tc16_bigpos, scm_tc16_bigneg, and, scm_tc16_keyword
+ through scm_smob_class;
+ Handle structs.
+
+ * smob.c (scm_newsmob): Also create a wrapper class if
+ scm_smob_class has been initialized.
+
+ * smob.h (SCM_TC2SMOBNUM): New macro for conversion between tc16
+ type code and smobnum.
+
+ * struct.c: #include "alist.h", "weaks.h", "hashtab.h";
+ (scm_struct_table): Weak key table with auxilliary information for
+ struct types. Currently used for names and wrapper classes.
+ (scm_struct_ihashq): Hash function for structs.
+ (scm_struct_create_handle): Get/create entry in scm_struct_table.
+ (scm_struct_vtable_name, scm_set_struct_vtable_name_x): Procedures
+ for accessing names of vtables. The record implementation in
+ boot-9.scm currently uses the setter to record the name of record
+ types. When the object system is initialized, it can use this
+ information to create wrapper classes with suitable names.
+ (scm_init_struct): Allocate scm_struct_table.
+ (scm_alloc_struct): Don't initialize scm_struct_i_tag here.
+ (struct tags are a finite resource and we might want to restrict
+ the use of tags to vtables only. E.g., Goops only uses tags for
+ classes.)
+ (scm_make_struct): Use scm_struct_entity_n_extra_words instead of
+ magic number 5.
+ (scm_struct_vtable_tag): Use scm_struct_i_tag instead of magic
+ number -1.
+
+ * struct.h (SCM_STRUCT_TABLE_NAME, SCM_SET_STRUCT_TABLE_NAME,
+ SCM_STRUCT_TABLE_CLASS, SCM_SET_STRUCT_TABLE_CLASS): New macros.
+ Used for access of struct table entries.
+
+ * hashtab.c, hashtab.h (scm_internal_hash_fold): New function.
+ (scm_hash_fold): New procedure. Used to process all entries in a
+ hash table (in no particular order).
+
+ Argh! For the umpteenth time I got compilation errors because of
+ the "intuitive" name `kw'. This has to have an end:
+
+ * Makefile.am, init.c, libguile.h, objects.c, root.h: Replaced
+ "kw" --> "keywords" everywhere.
+ (I doubt that this will cause big compatibility problems since the
+ application interface is unaffected.)
+
+ * keywords.c, keywords.h: Files renamed from kw.c, kw.h.
+
+1999-03-12 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * srcprop.c (scm_set_source_property_x): Bugfix: Convert line and
+ column inums to native form.
+
+ Improvement of backtraces: Introduces a new stack narrowing
+ specifier, #t, for the inner cut. (See further in the comments in
+ stacks.c:narrow_stack ().)
+
+ * procprop.c, procprop.h (scm_sym_system_procedure): New symbol.
+ (Used to flag certain system procedures which shouldn't turn up in
+ backtraces.)
+
+ * eval.c (scm_sym_system_module): New symbol. (Used to flag
+ modules which aren't "user" modules and the code of which
+ shouldn't turn up in backtraces.)
+
+ * eval.c, eval.h (scm_top_level_lookup_closure): New function:
+ Extract the lookup closure from an environment.
+ (scm_system_module_env_p): New function: Return non-#f if MODULE
+ is a system module.
+
+ * stacks.c: #include "eval.h"; #include "procprop.h";
+ (narrow_stack): Handle new narrowing specifier #t.
+
+ * debug.c (scm_procedure_name): Use name property in the default
+ case.
+
+ * gc.c, gc.h (scm_object_address): Renamed from scm_object_addr ().
+
+ * objects.h (scm_si_redefined, scm_si_hashsets): Shifted.
+
+ * eval.c, procs.c, procs.h, procprop.c: Renamed getter ->
+ procedure throughout.
+
+ * print.c (scm_iprin1): Removed extraneous space when printing
+ procedure-with-setters.
+
+ Entity and operator setter slots were introduced as a complement
+ to the <procedure-with-setter> type in order to support entities
+ and operators with setters in a reasonable and efficient way.
+ * procs.c (scm_procedure, scm_setter): Handle entity and operator
+ setter slots.
+
+ * objects.h (SCM_OPERATOR_SETTER, SCM_ENTITY_SETTER): New macros.
+ (struct scm_metaclass_operator): New setter slot.
+
+ * gc.c (scm_gc_mark): Mark struct setter slot.
+
+ * struct.c (scm_make_struct): Allocate one word more for
+ entities and initialize the new slot.
+
+ * struct.h (scm_struct_i_setter): New constant.
+
+1999-03-08 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * objects.h (SCM_OBJ_CLASS_REDEF): New macro: Find class slots
+ directly through the instance.
+
+ * objects.c (scm_class_of): Use SCM_OBJ_CLASS_REDEF.
+
+ * gc.c (scm_gc_sweep): Bugfix: Look for SCM_STRUCT_F_LIGHT flag at
+ scm_struct_i_flags instead of scm_vtable_index_layout!
+
+ * list.c (scm_list_star): New procedure.
+
+1999-02-19 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * debug.c (scm_init_debug): Added scheme level constant
+ SCM_IM_DISPATCH.
+
+1999-02-12 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * __scm.h (SCM_FENCE): Fix `asm volatile' warnings for EGCS.
+
+ * gc.c (scm_gc_sweep): Properly properly record the size of a
+ freed structure. (Thanks to Greg Harvey.)
+
+1999-02-07 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ * gc.c (scm_gc_sweep): Properly record the size of a freed
+ structure. (Thanks to Michael Livshin.)
+
+1999-02-06 Jim Blandy <jimb@savonarola.red-bean.com>
+
+ Readline paren matching from Greg Harvey, with modifications from
+ Mikael Djurfeldt:
+
+ * readline.c (in_readline, reentry_barrier_mutex): Make these
+ static.
+
+ * readline.c: #include <sys/time.h> and "iselect.h", so we can
+ control how long we're paused, and threads will run while we're
+ paused.
+ (match_paren, find_matching_paren, init_bouncing_parens): New
+ functions.
+ (scm_init_readline): Call init_bouncing_parens.
+ (scm_readline_opts): Add the bounce-parens option.
+ * readline.h (SCM_READLINE_BOUNCE_PARENS): New readline option.
+ (SCM_N_READLINE_OPTIONS): Adjust.
+
+1999-02-06 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ All the below are changes from Ken Raeburn, to get Guile to use
+ const where it can.
+
+ * chars.c (scm_lowers, scm_uppers, scm_charnames, scm_charnums),
+ eval.c (s_expression, s_test, s_body, s_bindings, s_variable,
+ s_clauses, s_formals): Variables now const.
+
+ * eval.c (promsmob): Now const.
+ * macros.c (macrosmob): Now const.
+ * smob.c (scm_newsmob): Smobfuns argument now points to const.
+ (freecell, flob, bigob): Now const.
+
+ * dynl.c (scm_make_argv_from_stringlist, scm_coerce_rostring),
+ error.c (scm_error, scm_syserror, scm_syserror_msg,
+ scm_num_overflow, scm_out_of_range, scm_wrong_type_arg,
+ scm_memory_error, scm_misc_error, scm_wta), macros.c
+ (scm_make_synt), feature.c (scm_add_feature), filesys.c
+ (scm_input_waiting_p), gc.c (scm_gc_start, scm_igc,
+ scm_must_malloc, scm_must_realloc), gsubr.c (scm_make_gsubr),
+ numbers.c (scm_num2dbl, scm_two_doubles, scm_num2long,
+ scm_num2long_long, scm_num2ulong),
+ options.c (scm_options), posix.c (scm_convert_exec_args,
+ environ_list_to_c), procs.c (scm_make_subr_opt, scm_make_subr),
+ ramap.c (scm_ramapc), read.c (scm_flush_ws), socket.c
+ (scm_sock_fd_to_port, scm_fill_sockaddr, scm_addr_vector), stime.c
+ (setzone, restorezone, bdtime2c), strop.c (scm_i_index),
+ strports.c (scm_mkstrport), symbols.c (scm_intern_obarray_soft,
+ scm_intern_obarray, scm_intern, scm_intern0,
+ scm_sysintern0_no_module_lookup, scm_sysintern, scm_sysintern0,
+ scm_symbol_value0), unif.c (scm_aind, scm_shap2ra): Argument
+ indicating calling subr, error message text, reason for error,
+ symbol name or feature name are now pointer to const.
+ * snarf.h (SCM_PROC, SCM_PROC1): String variables are now const.
+
+ * procs.c (scm_init_iprocs): iproc argument now points to const.
+ * pairs.c (cxrs): Now const.
+
+ * chars.h, error.h, feature.h, filesys.h, gc.h, gsubr.h, macros.h,
+ numbers.h, options.h, procs.h, ramap.h, read.h, smob.h,
+ strports.h, symbols.h, unif.h: Update variable declarations and
+ function prototypes for above changes.
+
+ * dynl.c, dynl-dld.c, dynl-dl.c, dynl-shl.c (sysdep_dynl_link,
+ sysdep_dynl_unlink, sysdep_dynl_func): Arguments FNAME, SUBR, and
+ SYMB now point to const.
+
+1999-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * print.c (scm_iprin1): Use scm_procedure_name instead of
+ scm_procedure_property for compiled closures.
+
+ * tags.h (scm_tc7_pws): New procedure type. Four representations
+ for procedure-with-setters were considered before selecting this
+ one:
+
+ 1. A closure where the CODE and ENV slots are used to represent
+ the getter and a new SETTER slot is used for the setter. The
+ original getter is stored as a `getter' procedure property. For
+ closure getters, the CODE and ENV slots contains a copy of the
+ getter's CODE and ENV slots. For subr getters, the CODE contains
+ a call to the subr.
+
+ 2. A compiled closure with a call to the getter in the cclo
+ procedure. The getter and setter are stored in slots 1 and 2.
+
+ 3. An entity (i.e. a struct with an associated procedure) with a
+ call to the getter in the entity procedure and the setter stored
+ in slot 0. The original getter is stored in slot 1.
+
+ 4. A new primitive procedure type supported in the evaluator. The
+ getter and setter are stored in a GETTER and SETTER slot. A call
+ to this procedure type results in a retrieval of the getter and a
+ jump back to the correct eval dispatcher.
+
+ Representation 4 was selected because of efficiency and
+ simplicity.
+
+ Rep 1 has the advantage that there is zero penalty for closure
+ getters, but primitive getters will get considerable overhead
+ because the procedure-with-getter will be a closure which calls
+ the getter.
+
+ Rep 3 has the advantage that a GOOPS accessor can be a subclass of
+ <procedure-with-setter>, but together with rep 2 it suffers from a
+ three level dispatch for non-GOOPS getters:
+
+ cclo/struct --> dispatch proc --> getter
+
+ This is because the dispatch procedure must take an extra initial
+ argument (cclo for rep 2, struct for rep 3).
+
+ Rep 4 has the single disadvantage that it uses up one tc7 type
+ code, but the plan for uniform vectors will very likely free tc7
+ codes, so this is probably no big problem. Also note that the
+ GETTER and SETTER slots can live directly on the heap, using the
+ new four-word cells.
+
+ * procs.c, procs.h (SCM_PROCEDURE_WITH_SETTER_P, SCM_GETTER,
+ SCM_SETTER): New macros.
+ (scm_procedure_with_setter_p, scm_make_procedure_with_setter,
+ scm_getter, scm_setter): New procedures.
+
+ * eval.c, print.c (scm_iprin1): Added entries for scm_tc7_pws.
+
+ * gc.c (scm_gc_mark, scm_gc_sweep): Added case labels for
+ scm_tc7_pws.
+
+ * objects.c, objects.h (scm_class_of,
+ scm_class_procedure_with_setter): Added.
+
+ * procprop.c (scm_i_procedure_arity), procs.c (scm_thunk_p): Added
+ entry for scm_tc7_pws.
+
+ * procs.c (scm_procedure_p): Added case label for scm_tc7_pws.
+
+1999-01-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * evalext.c, evalext.h (scm_m_generalized_set_x): New memoizing
+ macro.
+ (scm_init_evalext): Call scm_make_gsubr for
+ scm_m_generalized_set_x.
+
+ * eval.c, debug.c, tags.h (SCM_IM_SET_X): Renamed from SCM_IM_SET.
+
+ * eval.h: Declare scm_s_set_x, scm_sym_set_x;
+
+ * eval.c: Renamed "set" --> "set_x" in various names for
+ consistency of name correspondence between Scheme and C;
+ Renamed scm_i_set_x --> scm_sym_set_x and made global.
+ Renamed s_set_x --> scm_s_set_x and made global.
+
+1999-01-26 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * random.c (scm_i_random_bignum): Made independent of endianness.
+
+1999-01-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * eval.c (SCM_CEVAL): Added ENTER_APPLY in code for SCM_IM_APPLY.
+ (Thanks to Eric Hanchrow.)
+
+1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * objects.c, objects.h (SCM_CLASS_REDEF): Renamed from CLASS_REDEF.
+
+ * random.c: Bugfix: Retrieve and store most significant 32 bits in
+ different order if the machine is bigendian.
+ (scm_init_random): Added safety check for bignum digit size.
+
+1999-01-21 Mikael Djurfeldt <mdj@barbara.nada.kth.se>
+
+ * random.c, random.h (scm_i_make_rstate): New function: Makes
+ scm_rstate from seed.
+ (scm_copy_random_state, scm_seed_to_random_state): New functions.
+ (scm_make_random_state): Removed.
+
+ * random.c (scm_make_random_state): Use scm_i_make_rstate().
+
+1999-01-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * random.c: Bugfix: Retrieve and store most significant 32 bits in
+ different order if the machine is bigendian.
+ (scm_init_random): Added safety check for bignum digit size.
+
+1999-01-11 Roland Orre <mdj@mdj.nada.kth.se>
+
+ * sort.c (scm_merge, scm_merge_list_x): Bugfix: Place elements
+ from first arg before equal elements in second arg in result.
+ (scm_merge_list_step): Bugfix: Don't presume that arguments in a C
+ function call are executed in a well defined order.
+
+1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
+
+ * alloca.c (alloca): Cast value returned by malloc. (Thanks to
+ Christian Lynbech.)
+
+1999-01-11 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * random.c: Removed alloca includes.
+
1999-01-11 Jim Blandy <jimb@zwingli.cygnus.com>
* Makefile.in: This changed, for some reason I don't really