guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-279-g7290d


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-279-g7290de8
Date: Wed, 03 Apr 2013 17:32:15 +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=7290de89fb5bf755e2520bd01e977dc132c50c4b

The branch, stable-2.0 has been updated
       via  7290de89fb5bf755e2520bd01e977dc132c50c4b (commit)
      from  72e2b5923a15f49fd7f7706fe35dfc1157a41bb5 (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 7290de89fb5bf755e2520bd01e977dc132c50c4b
Author: Mark H Weaver <address@hidden>
Date:   Wed Apr 3 13:26:01 2013 -0400

    Use 'strcasecmp' to compare encoding names.
    
    Reported by Ludovic Courtès <address@hidden>.
    
    * libguile/ports.c (scm_new_port_table_entry,
      scm_i_set_default_port_encoding, scm_i_set_port_encoding_x):
      libguile/read.c (scm_i_scan_for_encoding): Use 'strcasecmp' to compare
      encoding names.

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

Summary of changes:
 libguile/ports.c |   10 +++++-----
 libguile/read.c  |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libguile/ports.c b/libguile/ports.c
index 51145e6..61f8006 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -633,7 +633,7 @@ scm_new_port_table_entry (scm_t_bits tag)
   encoding = scm_i_default_port_encoding ();
   entry->ilseq_handler = scm_i_default_port_conversion_handler ();
   entry->encoding = encoding ? scm_gc_strdup (encoding, "port") : NULL;
-  if (encoding && strcmp (encoding, "UTF-8") == 0)
+  if (encoding && strcasecmp (encoding, "UTF-8") == 0)
     pti->encoding_mode = SCM_PORT_ENCODING_MODE_UTF8;
   else
     pti->encoding_mode = SCM_PORT_ENCODING_MODE_ICONV;
@@ -2235,9 +2235,9 @@ scm_i_set_default_port_encoding (const char *encoding)
                    SCM_EOL);
 
   if (encoding == NULL
-      || !strcmp (encoding, "ASCII")
-      || !strcmp (encoding, "ANSI_X3.4-1968")
-      || !strcmp (encoding, "ISO-8859-1"))
+      || !strcasecmp (encoding, "ASCII")
+      || !strcasecmp (encoding, "ANSI_X3.4-1968")
+      || !strcasecmp (encoding, "ISO-8859-1"))
     scm_fluid_set_x (SCM_VARIABLE_REF (default_port_encoding_var), SCM_BOOL_F);
   else
     scm_fluid_set_x (SCM_VARIABLE_REF (default_port_encoding_var),
@@ -2383,7 +2383,7 @@ scm_i_set_port_encoding_x (SCM port, const char *encoding)
   /* If ENCODING is UTF-8, then no conversion descriptor is opened
      because we do I/O ourselves.  This saves 100+ KiB for each
      descriptor.  */
-  if (strcmp (encoding, "UTF-8") == 0)
+  if (strcasecmp (encoding, "UTF-8") == 0)
     {
       pt->encoding = "UTF-8";
       pti->encoding_mode = SCM_PORT_ENCODING_MODE_UTF8;
diff --git a/libguile/read.c b/libguile/read.c
index 6457952..3c5f0a4 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -2102,7 +2102,7 @@ scm_i_scan_for_encoding (SCM port)
     /* This wasn't in a comment */
     return NULL;
 
-  if (utf8_bom && strcmp(encoding, "UTF-8"))
+  if (utf8_bom && strcasecmp(encoding, "UTF-8"))
     scm_misc_error (NULL,
                    "the port input declares the encoding ~s but is encoded as 
UTF-8",
                    scm_list_1 (scm_from_locale_string (encoding)));


hooks/post-receive
-- 
GNU Guile



reply via email to

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