1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

131 commits

Author SHA1 Message Date
Mikael Djurfeldt
78a0461a6f * __scm.h, backtrace.c, backtrace.h, debug.c, debug.h, dynl-dld.c,
dynwind.c, dynwind.h, eval.h, evalext.c, evalext.h, feature.c,
feature.h, hashtab.c, hashtab.h, objects.c, objects.h, print.c,
procs.c, procs.h, smob.c, smob.h, srcprop.c, strorder.c, struct.c,
struct.h: Updated copyrigth notices.
1999-09-12 11:16:13 +00:00
Mikael Djurfeldt
2b407f9bff * backtrace.c: Keep backtraces within specified width by
adaptively adjusting fancy printing parameters and cut output if
necessary.
(scm_display_application): Check args.
1999-09-12 02:23:39 +00:00
Mikael Djurfeldt
3a1f844725 (display_backtrace_body): Don't print "Backtrace:".
(scm_backtrace): Print "Backtrace:" here instead.
1999-09-11 18:31:52 +00:00
Mikael Djurfeldt
1ae6af28d9 * backtrace.c (display_frame_expr): Don't print a newline.
(display_frame): Print the newline here instead.
1999-09-11 13:53:24 +00:00
Mikael Djurfeldt
7f2d92b126 * backtrace.c, backtrace.h, debug.c, debug.h, eval.c, eval.h,
gsubr.c, gsubr.h, read.c, read.h, srcprop.c, srcprop.h
(scm_i_filename, scm_i_line, scm_i_column, scm_i_copy, scm_i_name,
scm_i_lambda, scm_i_source, scm_i_more, scm_i_procname, scm_i_dot,
scm_i_arrow, scm_i_else, scm_i_unquote, scm_i_uq_splicing,
scm_i_apply, scm_i_enter_frame, scm_i_apply_frame,
scm_i_exit_frame, scm_i_trace, scm_i_quote, scm_i_begin, scm_i_if,
scm_i_and, scm_i_or, scm_i_case, scm_i_cond, scm_i_letstar,
scm_i_do, scm_i_quasiquote, scm_i_define, scm_i_letrec, scm_i_let,
scm_i_atapply, scm_i_atcall_cc, scm_i_breakpoint): Renamed:
Consequently use scm_sym_ as prefix for symbols.
1999-08-17 08:44:38 +00:00
Mikael Djurfeldt
2e9d6c6d3c * backtrace.c (display_frame): Made more robust. Doesn't throw an
error if no source properties can be found for a frame.  (Thanks
to Christian Lynbech.)
1998-12-04 11:41:03 +00:00
Mikael Djurfeldt
26e1985495 Removed last change. (Replaced by a better change.) 1998-11-10 07:58:32 +00:00
Mikael Djurfeldt
e40a5fc8ce * backtrace.c (get_applybody): Help function which lookups the
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.
1998-11-10 07:41:35 +00:00
Jim Blandy
a88a4c8a6f * backtrace.c (display_error_body): The current frame does not
always have a parent frame; consider a function called directly
from the MAIN_FUNC passed to scm_boot_guile.  (Thanks to Maciej
Stachowiak.)
1998-10-04 16:44:34 +00:00
Mikael Djurfeldt
0b2cb4ee9a * backtrace.c (scm_display_error, scm_display_backtrace): In order
to increase portability, don't use structure assignment.
(Thanks to Nicolas Neuss.)
1998-07-12 13:22:51 +00:00
Mikael Djurfeldt
0e929db3d1 * ports.c (scm_add_to_port_table): First line is now line 0
(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.
1998-03-30 19:31:52 +00:00
Mikael Djurfeldt
d0defdf3aa * ports.c (scm_add_to_port_table): First line is now line 0
(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.
1998-03-30 19:22:16 +00:00
Mikael Djurfeldt
d90ca38d06 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
1998-02-06 18:55:29 +00:00
Mikael Djurfeldt
39752bec0a * backtrace.c (display_error_body, display_backtrace_body),
coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
(invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
functions.
1998-02-02 15:00:14 +00:00
Mikael Djurfeldt
b6609fc78a * init.c (scm_start_stack): Removed initialization of
scm_the_last_stack_var.

* backtrace.h: Declare scm_the_last_stack_var.

* backtrace.c: Define scm_the_last_stack_var.

* root.c (mark_root): Don't mark the_last_stack_var.

* root.h (scm_root_state): Removed the_last_stack_var.

* throw.c: Added #include "fluids.h"
(ss_handler): `the-last-stack' is now a fluid.

* (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
--> the_last_stack_fluid.

* backtrace.c: Added #include "fluids.h"
(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.
1997-11-29 10:49:18 +00:00
Mikael Djurfeldt
a5d6d578d6 * backtrace.c: Added #include "fluids.h"
(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.
1997-11-29 01:10:21 +00:00
Marius Vollmer
7844682850 * filesys.c (scm_close, set_element, get_element, scm_chown,
scm_chmod, scm_stat, scm_truncate_file, scm_fcntl, scm_fsync): Use
SCM_COERCE_OUTPORT to cope with the printstate/port magic.
* ports.c (scm_port_revealed, scm_set_port_revealed_x,
scm_close_port, scm_port_line, scm_set_port_line_x,
scm_port_column, scm_set_port_column_x, scm_port_filename,
scm_set_port_filename_x, scm_port_mode,
scm_close_all_ports_except, scm_set_current_output_port,
scm_set_current_error_port): Likewise
* ioext.c (scm_redirect_port, scm_dup_to_fdes, scm_freopen,
scm_ftell, scm_fileno, scm_isatty_p, scm_primitive_move_to_fdes):
Likewise
* posix.c (scm_ttyname, scm_tcgetpgrp, scm_tcsetpgrp): Likewise
* backtrace.c (display_backtrace_body): Likewise
* fports (scm_setvbuf): Likewise
* socket.c (scm_getsockopt, scm_setsockopt, scm_shutdown,
scm_connect, scm_bind, scm_listen, scm_accept, scm_getsockname,
scm_getpeername, scm_send, scm_sendto): Likewise
* unif.c (scm_uniform_array_write): Likewise
1997-10-25 21:54:12 +00:00
Tom Tromey
b7f3516f99 * Makefile.in: Rebuilt.
* Makefile.am (libguile_la_SOURCES): Removed extchrs.c,
	mbstrings.c.
	(modinclude_HEADERS): Removed extchrs.h, mbstrings.h.
	* unif.c (scm_vector_set_length_x): Don't handle multibyte
	strings.
	* tag.c (scm_utag_mb_string, scm_utag_mb_substring): Removed.
	(scm_tag): Don't handle multibyte strings.
	* read.c: Don't include mbstrings.h.
	(scm_lreadr): Don't handle multibyte ports.
	* kw.c: Don't include mbstrings.h.
	* init.c: Don't include mbstrings.h.
	(scm_boot_guile_1): Don't init mbstrings module.
	* hash.c (scm_hasher): Don't handle mbstrings.
	* gscm.c (gscm_run_scm): Don't init mbstrings module.
	* gc.c (scm_gc_mark): Don't handle mbstrings.
	(scm_gc_sweep): Likewise.
	* eval.c (SCM_CEVAL): Don't handle mbstrings.
	* eq.c (scm_equal_p): Use SCM_TYP7S, not SCM_TYP7SD.
	* tags.h (SCM_TYP7SD): Removed.
	(SCM_TYP7D): Removed.
	(scm_tc7_mb_string): Removed.
	(scm_tc7_mb_substring): Removed.
	* print.c (scm_iprin1): Handle char printing directly.  Don't
	handle mbstrings.
	Don't include "mbstrings.h".
	* symbols.c (scm_intern_obarray_soft, scm_string_to_symbol,
	scm_string_to_obarray_symbol, msymbolize): Don't set symbol's
	multi-byte flag.
	Don't include "mbstrings.h".
	* symbols.h (SCM_SYMBOL_MULTI_BYTE_STRINGP): Removed.
	(SCM_SYMBOL_SLOTS): Define as 4.
	(SCM_ROSTRINGP): Use SCM_TYP7S, not SCM_TYP7SD.
	* arbiters.c, backtrace.c, debug.c, dynl.c, eval.c, fluids.c,
	gc.c, gsubr.c, ioext.c, kw.c, mallocs.c, numbers.c, ports.c,
	print.c, read.c, regex-posix.c, root.c, srcprop.c, stackchk.c,
	struct.c, threads.c, throw.c, unif.c, variable.c: Use new
	("gen"-less) I/O function names.
	* ports.c (scm_add_to_port_table): Don't set port's
	representation.
	* ports.h (scm_port_representation_type): Removed.
	(scm_string_representation_type): Removed.
	(struct scm_port_table ): Removed representation field.
	(SCM_PORT_REPRESENTATION): Removed.
	(SCM_SET_PORT_REPRESENTATION): Removed.
	* genio.h: Use new function names.
	* genio.c: Don't include "extchrs.h".
	(scm_gen_putc, scm_gen_puts, scm_gen_write, scm_get_getc):
	Removed.
	(scm_putc, scm_puts, scm_lfwrite): No longer static.
	(scm_getc): No longer static; handle line and column changes.
	(scm_ungetc): Renamed from scm_gen_ungetc.
	(scm_do_read_line): Renamed from scm_gen_read_line.
	* libguile.h: Don't include "extchrs.h" or "mbstrings.h"
	* extchrs.h, extchrs.c, mbstrings.h, mbstrings.c: Removed.
1997-10-15 17:18:32 +00:00
Mikael Djurfeldt
bdf8afffb5 * backtrace.c: Introduced exception handlers which now enclose
`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.
1997-09-24 20:18:54 +00:00
Jim Blandy
82892beda5 * Lots of files: New address for FSF. 1997-05-26 22:34:48 +00:00
Jim Blandy
1e598865e9 * backtrace.c, backtrace.h, debug.c, debug.h, eq.c,
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.
1997-05-16 09:14:28 +00:00
Jim Blandy
89958ad0ef Ensure that shared substrings are handled properly when passed to
a system call or other foreign function.  Many thanks to Tim
Pierce!
* symbols.h (SCM_COERCE_SUBSTR): new macro.
* filesys.c (scm_chmod, scm_rename, scm_delete_file, scm_mkdir,
scm_rmdir, scm_opendir, scm_chdir, scm_symlink, scm_readlink,
scm_lstat), ports.c (scm_sys_make_void_port), posix.c (scm_utime,
scm_putenv, scm_setlocale, scm_mknod), stime.c (setzone,
scm_strftime), vports.c (scm_make_soft_port), backtrace.c
(scm_display_error_message): use RO macros when strings may be RO.
* error.c (scm_error_scm), filesys.c (scm_chown, scm_chmod,
scm_rename, scm_delete_file, scm_mkdir, scm_rmdir, scm_opendir,
scm_chdir, scm_symlink, scm_readlink, scm_lstat), ioext.c
(scm_freopen, scm_duplicate_port, scm_fdopen), net_db.c
(scm_gethost, scm_getnet, scm_getproto, scm_getserv), ports.c
(scm_sys_make_void_port), posix.c (scm_getgrgid, scm_utime,
scm_setlocale, scm_mknod), stime.c (setzone, scm_strptime,
scm_strftime), vports.c (scm_make_soft_port): use
SCM_COERCE_SUBSTR to make sure shared substrings are
null-terminated.
1997-05-12 22:43:10 +00:00
Jim Blandy
23f53cd3e2 * backtrace.c (scm_backtrace): Split message string across
newlines properly.  GCC is more tolerant of this than other
compilers.
1997-04-16 22:52:47 +00:00
Mikael Djurfeldt
78f9f47bb5 * snarf.h, backtrace.c: Name change SCM_GLOBAL --> SCM_VCELL.
* snarf.h: Added new macros SCM_GLOBAL_SYMBOL and SCM_GLOBAL_VCELL
which defines C variables with global linkage.
1997-03-21 22:53:08 +00:00
Gary Houston
c37e0e559f * backtrace.c (scm_display_error_message): don't segv if message
is an immediate.

* error.h: prototype for scm_error_scm.

* error.c (scm_error_scm): new procedure, reimplements scm-error
in C and uses scm_error.
1997-03-13 00:22:20 +00:00
Mikael Djurfeldt
e3c37929e0 * * backtrace.c (scm_display_application): New procedure:
display-application; Set fancy printing parameters individually
	for different types of display (backtrace, error, application).
	(These should of course be customizable!)
1997-03-07 21:42:32 +00:00
Mikael Djurfeldt
5aab5d961c * symbols.c (scm_sysintern0): New function. Contains the core of
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.
1997-02-10 01:01:54 +00:00
Marius Vollmer
016e2ce1d0 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
a SCM boolean, not a C boolean.
1996-12-18 09:40:46 +00:00
Jim Blandy
f3acc5c15f * backtrace.c (scm_display_error_message): Made non-static, and
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.
1996-12-10 01:41:37 +00:00
Mikael Djurfeldt
841076acf4 * backtrace.c (scm_display_error): Just a safety measure: Stacks
aren't created with zero length, but should such a strange
creature suddenly turn up...
1996-10-17 23:32:47 +00:00
Mikael Djurfeldt
ab4f3efbfc * Makefile.in: Added entries for new files: backtrace.c,
backtrace.h, stacks.c and stacks.h.
1996-10-14 03:24:16 +00:00