diff options
author | Han-Wen Nienhuys <hanwen@lilypond.org> | 2004-04-06 21:48:02 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@lilypond.org> | 2004-04-06 21:48:02 +0000 |
commit | 84fad13058797789120cc27830d777f8295da5d6 (patch) | |
tree | ab80dc95e2ecd43d21f5cbd3a714de93f815da93 /libguile/chars.h | |
parent | 0b288f368a87562934879789ce02d88d6529297d (diff) | |
download | guile-84fad13058797789120cc27830d777f8295da5d6.tar.gz |
* srfi-13.c (s_scm_string_map): convert character to unsigned char
before converting to unsigned int. This prevents hi-bit ascii as
being converted large integers.
(string_upcase_x): change caller for scm_{up,down}case to
scm_c_{up,down}case
* chars.h (scm_init_chars): change scm_{upcase,downcase} to
scm_c_{up,down}case.
(SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
Diffstat (limited to 'libguile/chars.h')
-rw-r--r-- | libguile/chars.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/chars.h b/libguile/chars.h index fae3fdd4f..27722260c 100644 --- a/libguile/chars.h +++ b/libguile/chars.h @@ -29,7 +29,7 @@ */ #define SCM_CHARP(x) (SCM_ITAG8(x) == scm_tc8_char) #define SCM_CHAR(x) ((unsigned int)SCM_ITAG8_DATA(x)) -#define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8((scm_t_bits) x, scm_tc8_char) +#define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8((scm_t_bits) (unsigned char) (x), scm_tc8_char) @@ -61,8 +61,8 @@ SCM_API SCM scm_integer_to_char (SCM n); SCM_API SCM scm_char_upcase (SCM chr); SCM_API SCM scm_char_downcase (SCM chr); SCM_API void scm_tables_prehistory (void); -SCM_API int scm_upcase (unsigned int c); -SCM_API int scm_downcase (unsigned int c); +SCM_API int scm_c_upcase (unsigned int c); +SCM_API int scm_c_downcase (unsigned int c); SCM_API void scm_init_chars (void); #endif /* SCM_CHARS_H */ |