diff --git a/THANKS b/THANKS index 337bd168d..0c90ca398 100644 --- a/THANKS +++ b/THANKS @@ -11,3 +11,4 @@ Contributors since the last release: For fixes or providing information which led to a fix: Martin Baulig + Rob Browning diff --git a/libguile/ChangeLog b/libguile/ChangeLog index e591bc7be..7e98f15d3 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2001-09-13 Dirk Herrmann + + * backtrace.c (display_backtrace_file, + display_backtrace_file_and_line): Use SCM_EQ_P when comparing SCM + values, use SCM_FALSEP when comparing SCM values against #f. + Thanks to Rob Browning for the bug report. + 2001-09-12 Martin Baulig * strings.[ch] (scm_str2string): New function. diff --git a/libguile/backtrace.c b/libguile/backtrace.c index f391a32e8..39d7563ac 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -460,14 +460,14 @@ display_backtrace_file (frame, last_file, port, pstate) display_backtrace_get_file_line (frame, &file, &line); - if (file == *last_file) + if (SCM_EQ_P (file, *last_file)) return; *last_file = file; scm_puts ("In ", port); - if (file == SCM_BOOL_F) - if (line == SCM_BOOL_F) + if (SCM_FALSEP (file)) + if (SCM_FALSEP (line)) scm_puts ("unknown file", port); else scm_puts ("current input", port); @@ -489,9 +489,9 @@ display_backtrace_file_and_line (SCM frame, SCM port, scm_print_state *pstate) if (SCM_EQ_P (SCM_SHOW_FILE_NAME, sym_base)) { - if (file == SCM_BOOL_F) + if (SCM_FALSEP (file)) { - if (line == SCM_BOOL_F) + if (SCM_FALSEP (line)) scm_putc ('?', port); else scm_puts ("", port); @@ -506,7 +506,7 @@ display_backtrace_file_and_line (SCM frame, SCM port, scm_print_state *pstate) scm_putc (':', port); } - else if (line != SCM_BOOL_F) + else if (!SCM_FALSEP (line)) { int i, j=0; for (i = SCM_INUM (line)+1; i > 0; i = i/10, j++) @@ -514,7 +514,7 @@ display_backtrace_file_and_line (SCM frame, SCM port, scm_print_state *pstate) indent (4-j, port); } - if (line == SCM_BOOL_F) + if (SCM_FALSEP (line)) scm_puts (" ?", port); else scm_intprint (SCM_INUM (line) + 1, 10, port);