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-23-g64b


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-23-g64bad3f
Date: Sat, 01 Aug 2009 15:17:44 +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=64bad3f5a8d7351a41a5b9ccb1df5c393a48b4a9

The branch, master has been updated
       via  64bad3f5a8d7351a41a5b9ccb1df5c393a48b4a9 (commit)
       via  5adcdb65192ba6e654ab2d1dd8b0840a33136a8a (commit)
      from  4b856371b3e85cd82f6d637f72bc610d0158b5de (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 64bad3f5a8d7351a41a5b9ccb1df5c393a48b4a9
Author: Michael Gran <address@hidden>
Date:   Sat Aug 1 08:12:15 2009 -0700

    Make charname declarations module-level and GCS
    
    Charname array declarations are corrected for style and
    are made module-level.  Array list length variables are
    replaced with macros.
    
            * libguile/chars.c: variable declaration fixes

commit 5adcdb65192ba6e654ab2d1dd8b0840a33136a8a
Author: Michael Gran <address@hidden>
Date:   Sat Aug 1 08:05:55 2009 -0700

    Update NEWS for charname changes
    
            * NEWS: updated

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

Summary of changes:
 NEWS             |   15 +++++++++
 libguile/chars.c |   90 +++++++++++++++++++++++++----------------------------
 2 files changed, 57 insertions(+), 48 deletions(-)

diff --git a/NEWS b/NEWS
index 445bb1c..96c3a9b 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,21 @@ Please send Guile bug reports to address@hidden
 (During the 1.9 series, we will keep an incremental NEWS for the latest
 prerelease, and a full NEWS corresponding to 1.8 -> 2.0.)
 
+Changes in 1.9.2 (since the 1.9.1 prerelease):
+
+** Global variables `scm_charnames' and `scm_charnums' are removed.
+
+These variables contained the names of control characters and were
+used when writing characters.  While these were global, they were
+never intended to be public API.  They have been replaced with private
+functions.
+
+** EBCDIC support is removed.
+
+There was an EBCDIC compile flag that altered some of the character
+processing.  It appeared that full EBCDIC support was never completed
+and was unmaintained.
+
 Changes in 1.9.1 (since the 1.9.0 prerelease):
 
 ** `scm_set_port_seek' and `scm_set_port_truncate' use the `scm_t_off' type
diff --git a/libguile/chars.c b/libguile/chars.c
index 5a53c45..2103c54 100644
--- a/libguile/chars.c
+++ b/libguile/chars.c
@@ -312,51 +312,45 @@ scm_c_downcase (scm_t_wchar c)
    extensions for control characters, and leftover Guile extensions.
    They are listed in order of precedence.  */
 
-const char *const scm_r5rs_charnames[] = 
-  {
-    "space", "newline"
-  };
+static const char *const scm_r5rs_charnames[] = {
+  "space", "newline"
+};
 
-const scm_t_uint32 const scm_r5rs_charnums[] = 
-  {
-    0x20, 0x0A
-  };
+static const scm_t_uint32 const scm_r5rs_charnums[] = {
+  0x20, 0x0A
+};
 
-const int scm_n_r5rs_charnames = sizeof (scm_r5rs_charnames) / sizeof (char *);
+#define SCM_N_R5RS_CHARNAMES (sizeof (scm_r5rs_charnames) / sizeof (char *))
 
 /* The abbreviated names for control characters.  */
-const char *const scm_C0_control_charnames[] = 
-  {
-    /* C0 controls */
-    "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
-    "bs",  "ht",  "lf",  "vt",  "ff",  "cr",  "so",  "si",
-    "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", 
-    "can", "em",  "sub", "esc", "fs",  "gs",  "rs",  "us",
-    "sp", "del"
-  };
-
-const scm_t_uint32 const scm_C0_control_charnums[] = 
-  {
-    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
-    0x20, 0x7f
-  };
-
-int scm_n_C0_control_charnames = sizeof (scm_C0_control_charnames) / sizeof 
(char *);
-
-const char *const scm_alt_charnames[] = 
-  {
-    "null", "backspace", "tab", "nl", "newline", "np", "page", "return",
-  };
-  
-const scm_t_uint32 const scm_alt_charnums[] = 
-  {
-    0x00, 0x08, 0x09, 0x0a, 0x0a, 0x0c, 0x0c, 0x0d
-  };
-
-const int scm_n_alt_charnames = sizeof (scm_alt_charnames) / sizeof (char *);
+static const char *const scm_C0_control_charnames[] = {
+  /* C0 controls */
+  "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
+  "bs",  "ht",  "lf",  "vt",  "ff",  "cr",  "so",  "si",
+  "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", 
+  "can", "em",  "sub", "esc", "fs",  "gs",  "rs",  "us",
+  "sp", "del"
+};
+
+static const scm_t_uint32 const scm_C0_control_charnums[] = {
+  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+  0x20, 0x7f
+};
+
+#define SCM_N_C0_CONTROL_CHARNAMES (sizeof (scm_C0_control_charnames) / sizeof 
(char *))
+
+static const char *const scm_alt_charnames[] = {
+  "null", "backspace", "tab", "nl", "newline", "np", "page", "return",
+};
+
+static const scm_t_uint32 const scm_alt_charnums[] = {
+  0x00, 0x08, 0x09, 0x0a, 0x0a, 0x0c, 0x0c, 0x0d
+};
+
+#define SCM_N_ALT_CHARNAMES (sizeof (scm_alt_charnames) / sizeof (char *))
 
 /* Returns the string charname for a character if it exists, or NULL
    otherwise.  */
@@ -366,15 +360,15 @@ scm_i_charname (SCM chr)
   int c;
   scm_t_uint32 i = SCM_CHAR (chr);
 
-  for (c = 0; c < scm_n_r5rs_charnames; c++)
+  for (c = 0; c < SCM_N_R5RS_CHARNAMES; c++)
     if (scm_r5rs_charnums[c] == i)
       return scm_r5rs_charnames[c];
 
-  for (c = 0; c < scm_n_C0_control_charnames; c++)
+  for (c = 0; c < SCM_N_C0_CONTROL_CHARNAMES; c++)
     if (scm_C0_control_charnums[c] == i)
       return scm_C0_control_charnames[c];
 
-  for (c = 0; c < scm_n_alt_charnames; c++)
+  for (c = 0; c < SCM_N_ALT_CHARNAMES; c++)
     if (scm_alt_charnums[c] == i)
       return scm_alt_charnames[i];
 
@@ -389,23 +383,23 @@ scm_i_charname_to_char (const char *charname, size_t 
charname_len)
 
   /* The R5RS charnames.  These are supposed to be case
      insensitive. */
-  for (c = 0; c < scm_n_r5rs_charnames; c++)
+  for (c = 0; c < SCM_N_R5RS_CHARNAMES; c++)
     if ((strlen (scm_r5rs_charnames[c]) == charname_len)
        && (!strncasecmp (scm_r5rs_charnames[c], charname, charname_len)))
       return SCM_MAKE_CHAR (scm_r5rs_charnums[c]);
 
   /* Then come the controls.  These are not case sensitive.  */
-  for (c = 0; c < scm_n_C0_control_charnames; c++)
+  for (c = 0; c < SCM_N_C0_CONTROL_CHARNAMES; c++)
     if ((strlen (scm_C0_control_charnames[c]) == charname_len)
        && (!strncasecmp (scm_C0_control_charnames[c], charname, charname_len)))
       return SCM_MAKE_CHAR (scm_C0_control_charnums[c]);
 
   /* Lastly are some old names carried over for compatibility.  */
-  for (c = 0; c < scm_n_alt_charnames; c++)
+  for (c = 0; c < SCM_N_ALT_CHARNAMES; c++)
     if ((strlen (scm_alt_charnames[c]) == charname_len)
        && (!strncasecmp (scm_alt_charnames[c], charname, charname_len)))
       return SCM_MAKE_CHAR (scm_alt_charnums[c]);
-  
+
   return SCM_BOOL_F;
 }
 


hooks/post-receive
-- 
GNU Guile




reply via email to

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