displaying the expected type. Use SCM_LISTn in a couple places
instead of scm_cons-ing by hand.
* __scm.h: Added SCM_ASSERT_TYPE macro.
* validate.h, scm_validate.h: Added the former, as a renamed
version of the latter with SCM_ASSERT_TYPE used in
SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)
* Makefile.am: Rename scm_validate.h to validate.h.
* *.c, *.h: Include validate.h, not scm_validate.h (old name's
prefix was superfluous).
net_db.c, read.c, socket.c: Update error messages to use ~A for
%s, ~S for %S to work with new `simple-format' format and be
standardized better.
* print.h, print.c (scm_simple_format): Added `simple-format'
primitive. It's the old scm_display_error, with ARGS now a rest
parameter, and the destination first instead of last (and a couple
new capabilities inspired by `format' -- #t as destination means
current-output-port, #f means return the formatted text as a
string.
* gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.
* backtrace.c (scm_display_error_message): Rewrote to use
scm_simple_format() procedure.
* __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
* scm_validate.h: Added SCM_VALIDATE_THREAD.
* *.c: Remove SCM_NIMP(X) when it is an extraneous pre-test given
that SCM_FOOP macros all now include SCM_NIMP in their expansion.
This simplifies lots of code, making it far more readable.
set_print_params_x.
* guile-doc-snarf.in: Use guile-snarf.awk, not
guile-doc-snarf.awk. Pass the basename of $filename
* load.h: Added prototypes for scm_sys_library_dir,
scm_sys_site_dir.
* load.c (scm_sys_library_dir, scm_sys_site_dir): Added these
functions, and took out the old scm_library_dir, scm_site_dir,
scm_pkgdata_dir. Now the primitives are %package-data-dir
(already existed), %library-dir, and %site-dir.
* debug.c: Use SCM_MISC_ERROR when possible instead of using
s_scm_* in a scm_misc_error() call.
* Makefile.am: Use guile-snarf.awk, not guile-doc-snarf.awk. Make
using guile-doc-snarf send stdout to $@ to create the .x file like
guile-snarf does.
* guile-snarf.awk.in: Added.
* guile-doc-snarf.awk.in: Added.
* ports.c (s_scm_pt_member): Fixed validation.
* guile-doc-snarf.in (filename): Use basename in order to strip
away path.
* debug.c (scm_make_iloc, s_scm_proc_to_mem): Added missing
semicolon.
(scm_memcons, scm_memcons, mem_to_proc): Renamed function name
strings to new form.
* backtrace.c (set_print_params_x): Fixed GUILE_PROC macro.
* tags.h (SCM_UNBOUND): New iflag which is needed for some time to
mark the unboundness of a GOOPS slot. (Added now in order to
correct a oversight. Should probably be removed again and
replaced with SCM_UNDEFINED when the corresponding code in GOOPS
is rewritten.)
* print.c (scm_isymnames): Added printed representation for
SCM_UNBOUND.
* eval.c (SCM_CEVAL): Bugfix: Added check for unbound slot in
SCM_IM_SLOT_REF.
prototypes.
* eval.c: Make scm_m_mody's 3rd argument be a const char *, not a
char *. ANSI prototypes caught this.
* strorder.c: Use GUILE_PROC1 for the couple SCM_PROC1 expansions
that I missed.
* scm_validate.h: Use SCM_BOOLP for validating bools. Do not
expand macros if SCM_DOCSTRING_SNARF.
function headers and argument checking. Switched SCM_PROC,
SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names
later, but was useful to keep old versions around while migrate)
that has docstrings and argument lists embedded in the GUILE_PROC
macro invocations that expand into a function header. Use lots of
new SCM_VALIDATE_* macros to simplify error checking and reduce
tons of redundancy. This is very similar to what I did for Scwm.
Note that none of the extraction of the docstrings, nor software
engineering checks of Scwm is yet added to Guile. I'll work on
that tomorrow, I expect.
* Makefile.am: Added scm_validate.h to modinclude_HEADERS.
* chars.c: Added docstrings for the primitives defined in here.
* snarf.h: Added GUILE_PROC, GUILE_PROC1. Added
SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC
still remains for now. Changed naming convention for the s_foo
string name of the primitive to be s_scm_foo for ease of use with
the macro.
* scm_validate.h: Lots of new SCM_VALIDATE macros to simplify
argument checking through guile. Maybe some of these should be
folded into the header file for the types they check, but for now
it was easiest to just stick them all in one place.
first body form of the apply closure.
(display_error_body): Prevent the source of the first form of the
apply closure from being printed in error messages.
(was 1). (Interface changed according to suggestion by Per
Bothner.)
* backtrace.c (display_header): Add 1 to line and column numbers
when presenting them to the user.
(was 1). (Interface changed according to suggestion by Per
Bothner.)
* backtrace.c (display_header): Add 1 to line and column numbers
when presenting them to the user.
(scm_init_backtrace): Initialize `the-last-stack' to a fluid.
(scm_backtrace): `the-last-stack' is now a fluid.
* init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
after scm_init_fluids.
`display-error' and `display-backtrace' so that error reporting
won't get into infinite loops if an error occurs during displaying
of the error. This can very easily happen with user supplied
print call-back routines.
gdb_interface.h, gdbint.c, gdbint.h, gh_data.c, gh_init.c,
gh_io.c, gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c,
init.c, net_db.c, options.c, options.h, ports.c, print.c, read.c,
script.h, snarf.h, srcprop.c, srcprop.h, stacks.c, stacks.h,
throw.c: Update copyright years; these files have been worked on
significantly in 1997, but only had copyright years for 1996.
Also, change name of copyright holder on some from Mikael
Djurfeldt to Free Software Foundation; he has signed papers
assigning the changes to the FSF.
display-application; Set fancy printing parameters individually
for different types of display (backtrace, error, application).
(These should of course be customizable!)
old scm_sysintern but doesn't take a second value argument.
(scm_sysintern): Now uses scm_sysintern0.
(scm_sysintern_no_module_lookup): Renamed to
scm_sysintern0_no_module_lookup and doesn't take a second value
argument any longer.
* symbols.h (scm_sysintern0: Added declaration.
* options.c (scm_init_opts): Use scm_sysintern0 instead of
scm_sysintern when interning option keys. Otherwise we risk
destroying the values of already interned variables.
* symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
scheme-level boolean (use SCM_NFALSEP).
* backtrace.c (scm_init_backtrace): Make Scheme-level variable
`the-last-stack'.
(scm_backtrace): New function. (C version of old function from
boot-9.scm) Motivation: Make it possible to display backtraces
without depending on boot-9.scm. (I'm uncertain if this
motivation is good enough...)
* root.h (scm_root_state): Add member the_last_stack_var.
(scm_the_stack_var): Defined to scm_root->the_last_stack_var.
* root.c (mark_root): Mark scm_the_last_stack_var.
* init.c (scm_start_stack): Initialize scm_the_last_stack_var to
SCM_BOOL_F.
renamed from display_error_message.
* backtrace.h (scm_display_error_message): Added extern decl.
* throw.c (uncaught_throw): Use it to display the error message.