summaryrefslogtreecommitdiff
path: root/libguile/backtrace.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-09-29 17:40:11 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-09-29 17:40:11 +0000
commit22e47f69ae4da020c3dcefcc346b63076b2d23a3 (patch)
tree497beea04fab19f18aee6ce4e2ff1e23bfed3b6d /libguile/backtrace.c
parent818deb11583f4173a709c1de31b9f89332f12474 (diff)
downloadguile-22e47f69ae4da020c3dcefcc346b63076b2d23a3.tar.gz
(display_frame_expr): Do not remove control characters from the final
string. Print it directly using scm_display.
Diffstat (limited to 'libguile/backtrace.c')
-rw-r--r--libguile/backtrace.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index 28f7d8a45..3507b2777 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -374,7 +374,6 @@ indent (int n, SCM port)
static void
display_frame_expr (char *hdr, SCM exp, char *tlr, int indentation, SCM sport, SCM port, scm_print_state *pstate)
{
- SCM string;
int i = 0, n;
scm_t_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (sport);
do
@@ -398,28 +397,8 @@ display_frame_expr (char *hdr, SCM exp, char *tlr, int indentation, SCM sport, S
}
while (indentation + n > SCM_BACKTRACE_WIDTH && i < n_print_params);
ptob->truncate (sport, n);
- string = scm_strport_to_string (sport);
- assert (scm_is_string (string));
-
- {
- char *data = scm_i_string_writable_chars (string);
-
- /* Remove control characters */
- for (i = 0; i < n; ++i)
- if (iscntrl (data[i]))
- data[i] = ' ';
- /* Truncate */
- if (indentation + n > SCM_BACKTRACE_WIDTH)
- {
- n = SCM_BACKTRACE_WIDTH - indentation;
- data[n-1] = '$';
- }
-
- scm_i_string_stop_writing ();
- }
- scm_lfwrite (scm_i_string_chars (string), n, port);
- scm_remember_upto_here_1 (string);
+ scm_display (scm_strport_to_string (sport), port);
}
static void