summaryrefslogtreecommitdiff
path: root/libguile/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/print.c')
-rw-r--r--libguile/print.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 6c44d59db..604571820 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -437,16 +437,14 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
if (SCM_CHARP (exp))
{
long i = SCM_CHAR (exp);
+ const char *name;
if (SCM_WRITINGP (pstate))
{
scm_puts ("#\\", port);
- if ((i >= 0) && (i <= ' ') && scm_charnames[i])
- scm_puts (scm_charnames[i], port);
-#ifndef EBCDIC
- else if (i == '\177')
- scm_puts (scm_charnames[scm_n_charnames - 1], port);
-#endif
+ name = scm_i_charname (exp);
+ if (name != NULL)
+ scm_puts (name, port);
else if (i < 0 || i > '\177')
scm_intprint (i, 8, port);
else