guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-1-57-g4cd


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-57-g4cd00cc
Date: Wed, 12 Aug 2009 04:28:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=4cd00cc6b2ae47f39b8470325aecb776801b57df

The branch, master has been updated
       via  4cd00cc6b2ae47f39b8470325aecb776801b57df (commit)
       via  30a6b9caa909841526bde84584173fb16f4c7e05 (commit)
      from  eb1482ac464433be51716cf9a2e0516810bda571 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4cd00cc6b2ae47f39b8470325aecb776801b57df
Author: Michael Gran <address@hidden>
Date:   Tue Aug 11 21:27:20 2009 -0700

    Revert to locale-dependent toupper and tolower
    
    To avoid leaving Guile in a broken state, the conversion
    from locale-dependent case modification to Unicode case modification
    should be an atomic commit
    
    * libguile/chars.c (scm_c_upcase): revert to locale-dependent
      toupper and tolower

commit 30a6b9caa909841526bde84584173fb16f4c7e05
Author: Michael Gran <address@hidden>
Date:   Tue Aug 11 21:12:52 2009 -0700

    Only pass ints to tolower and toupper
    
    * libguile/strings.c (unistring_escapes_to_guile_escapes): cast
      tolower's parameter to int
    
    * libguile/read.c (CHAR_DOWNCASE): cast tolower's parameter to int

-----------------------------------------------------------------------

Summary of changes:
 libguile/chars.c   |   10 ++++++++--
 libguile/read.c    |    2 +-
 libguile/strings.c |   16 ++++++++--------
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/libguile/chars.c b/libguile/chars.c
index 2103c54..56239f5 100644
--- a/libguile/chars.c
+++ b/libguile/chars.c
@@ -296,14 +296,20 @@ TODO: change name  to scm_i_.. ? --hwn
 scm_t_wchar
 scm_c_upcase (scm_t_wchar c)
 {
-  return uc_toupper (c);
+  if (c > 255)
+    return c;
+
+  return toupper ((int) c);
 }
 
 
 scm_t_wchar
 scm_c_downcase (scm_t_wchar c)
 {
-  return uc_tolower (c);
+  if (c > 255)
+    return c;
+
+  return tolower ((int) c);
 }
 
 
diff --git a/libguile/read.c b/libguile/read.c
index 577a73e..8efac67 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -179,7 +179,7 @@ static SCM *scm_read_hash_procedures;
 
 /* An inlinable version of `scm_c_downcase ()'.  */
 #define CHAR_DOWNCASE(_chr)                            \
-  (((_chr) <= UCHAR_MAX) ? tolower (_chr) : (_chr))
+  (((_chr) <= UCHAR_MAX) ? tolower ((int) (_chr)) : (_chr))
 
 
 /* Read an SCSH block comment.  */
diff --git a/libguile/strings.c b/libguile/strings.c
index c3ea8b8..437cedc 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -1427,8 +1427,8 @@ unistring_escapes_to_guile_escapes (char **bufp, size_t 
*lenp)
           /* Convert \u00NN to \xNN */
           after[j] = '\\';
           after[j + 1] = 'x';
-          after[j + 2] = tolower (before[i + 4]);
-          after[j + 3] = tolower (before[i + 5]);
+          after[j + 2] = tolower ((int) before[i + 4]);
+          after[j + 3] = tolower ((int) before[i + 5]);
           i += 6;
           j += 4;
         }
@@ -1440,12 +1440,12 @@ unistring_escapes_to_guile_escapes (char **bufp, size_t 
*lenp)
           /* Convert \U00NNNNNN to \UNNNNNN */
           after[j] = '\\';
           after[j + 1] = 'U';
-          after[j + 2] = tolower (before[i + 4]);
-          after[j + 3] = tolower (before[i + 5]);
-          after[j + 4] = tolower (before[i + 6]);
-          after[j + 5] = tolower (before[i + 7]);
-          after[j + 6] = tolower (before[i + 8]);
-          after[j + 7] = tolower (before[i + 9]);
+          after[j + 2] = tolower ((int) before[i + 4]);
+          after[j + 3] = tolower ((int) before[i + 5]);
+          after[j + 4] = tolower ((int) before[i + 6]);
+          after[j + 5] = tolower ((int) before[i + 7]);
+          after[j + 6] = tolower ((int) before[i + 8]);
+          after[j + 7] = tolower ((int) before[i + 9]);
           i += 10;
           j += 8;
         }


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]