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-46-g484


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-1-46-g4847dc1
Date: Mon, 10 Aug 2009 00:01:13 +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=4847dc172f4086152987d5f9c353cf14db17d554

The branch, master has been updated
       via  4847dc172f4086152987d5f9c353cf14db17d554 (commit)
       via  b07992900bef24596532018d7939384f8632cd0f (commit)
      from  9af080f7206dccffb91409529fff74e6554f2385 (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 4847dc172f4086152987d5f9c353cf14db17d554
Author: Michael Gran <address@hidden>
Date:   Sun Aug 9 16:01:20 2009 -0700

    Missing parentheses in SCM_MAKE_CHAR macro
    
    * libguile/chars.h (SCM_MAKE_CHAR): missing parentheses

commit b07992900bef24596532018d7939384f8632cd0f
Author: Michael Gran <address@hidden>
Date:   Sun Aug 9 15:58:49 2009 -0700

    Port position macros shouldn't require enclosing braces
    
    The port position macros incorrectly required enclosing braces
    when used within if statements.
    
            * libguile/ports.h (SCM_INCLINE, SCM_ZEROCOL, SCM_INCCOL)
            (SCM_DECCOL, SCM_TABCOL): enclose macro in do/while
    
            * libguile/ports.c (update_port_lf): remove extra braces

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

Summary of changes:
 libguile/chars.h |    6 +++---
 libguile/ports.c |   23 ++++++-----------------
 libguile/ports.h |   10 +++++-----
 3 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/libguile/chars.h b/libguile/chars.h
index 4d1be1d..e016cb2 100644
--- a/libguile/chars.h
+++ b/libguile/chars.h
@@ -33,9 +33,9 @@
 #define SCM_CHAR(x) ((scm_t_wchar)SCM_ITAG8_DATA(x))
 
 #define SCM_MAKE_CHAR(x)                                              \
-  (x < 0                                                              \
-   ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) x, scm_tc8_char)    \
-   : SCM_MAKE_ITAG8 ((scm_t_bits) x, scm_tc8_char))
+  ((x) < 0                                                            \
+   ? SCM_MAKE_ITAG8 ((scm_t_bits) (unsigned char) (x), scm_tc8_char)  \
+   : SCM_MAKE_ITAG8 ((scm_t_bits) (x), scm_tc8_char))
 
 #define SCM_CODEPOINT_MAX (0x10ffff)
 #define SCM_IS_UNICODE_CHAR(c)                                          \
diff --git a/libguile/ports.c b/libguile/ports.c
index 2c1a389..4ed5f76 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -973,28 +973,17 @@ static void
 update_port_lf (scm_t_wchar c, SCM port)
 {
   if (c == '\a')
-    {
-    }
+    ;                           /* Do nothing. */
   else if (c == '\b')
-    {
-      SCM_DECCOL (port);
-    }
+    SCM_DECCOL (port);
   else if (c == '\n')
-    {
-      SCM_INCLINE (port);
-    }
+    SCM_INCLINE (port);
   else if (c == '\r')
-    {
-      SCM_ZEROCOL (port);
-    }
+    SCM_ZEROCOL (port);
   else if (c == '\t')
-    {
-      SCM_TABCOL (port);
-    }
+    SCM_TABCOL (port);
   else
-    {
-      SCM_INCCOL (port);
-    }
+    SCM_INCCOL (port);
 }
 
 void
diff --git a/libguile/ports.h b/libguile/ports.h
index d427fec..e5c0ffd 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -155,11 +155,11 @@ SCM_INTERNAL SCM scm_i_port_weak_hash;
 #define SCM_REVEALED(x)           (SCM_PTAB_ENTRY(x)->revealed)
 #define SCM_SETREVEALED(x, s)      (SCM_PTAB_ENTRY(x)->revealed = (s))
 
-#define SCM_INCLINE(port)      {SCM_LINUM (port) += 1; SCM_COL (port) = 0;}
-#define SCM_ZEROCOL(port)      {SCM_COL (port) = 0;}
-#define SCM_INCCOL(port)       {SCM_COL (port) += 1;}
-#define SCM_DECCOL(port)       {if (SCM_COL (port) > 0) SCM_COL (port) -= 1;}
-#define SCM_TABCOL(port)       {SCM_COL (port) += 8 - SCM_COL (port) % 8;}
+#define SCM_INCLINE(port)      do {SCM_LINUM (port) += 1; SCM_COL (port) = 0;} 
while (0)
+#define SCM_ZEROCOL(port)      do {SCM_COL (port) = 0;} while (0)
+#define SCM_INCCOL(port)       do {SCM_COL (port) += 1;} while (0)
+#define SCM_DECCOL(port)       do {if (SCM_COL (port) > 0) SCM_COL (port) -= 
1;} while (0)
+#define SCM_TABCOL(port)       do {SCM_COL (port) += 8 - SCM_COL (port) % 8;} 
while (0)
 
 /* Maximum number of port types.  */
 #define SCM_I_MAX_PORT_TYPE_COUNT  256


hooks/post-receive
-- 
GNU Guile




reply via email to

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