diff options
author | Michael Gran <spk121@yahoo.com> | 2009-07-27 21:02:23 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2009-07-27 21:02:23 -0700 |
commit | 77332b21a01fac906ae4707426e00f01e62c0415 (patch) | |
tree | b9504a012ee512354b12824cb8cbbeef25b7e1e1 /libguile/print.c | |
parent | e5dc27b86d0eaa470f92cdaa9f4ed2a961338c49 (diff) | |
download | guile-77332b21a01fac906ae4707426e00f01e62c0415.tar.gz |
Replace global charnames variables with accessors
The global variables scm_charnames and scm_charnums are replaced with
the accessor functions scm_i_charname and scm_i_charname_to_num.
Also, the incomplete and broken EBCDIC support is removed.
* libguile/print.c (iprin1): use new func scm_i_charname
* libguile/read.c (scm_read_character): use new func
scm_i_charname_to_num
* libguile/chars.c (scm_i_charname): new function
(scm_i_charname_to_char): new function
(scm_charnames, scm_charnums): removed
* libguile/chars.h: new declarations
Diffstat (limited to 'libguile/print.c')
-rw-r--r-- | libguile/print.c | 10 |
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 |