bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: enforce one small aspect of formatting style: space-b


From: Bruno Haible
Subject: Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("
Date: Sat, 20 Mar 2010 19:14:52 +0100
User-agent: KMail/1.9.9

> This leaves 916 occurrences, which is more reasonable (attached below).

Here's a proposal to fix those that IMO ought to be fixed.

Objections?


2010-03-20  Bruno Haible  <address@hidden>

        Minor formatting changes.
        * lib/acosl.c: Insert space before function argument list.
        * lib/argz.c: Likewise.
        * lib/asinl.c: Likewise.
        * lib/expl.c: Likewise.
        * lib/gen-uni-tables.c: Likewise.
        * lib/gettext.h: Likewise.
        * lib/glthread/lock.h: Likewise.
        * lib/tanl.c: Likewise.
        * lib/uniname/uniname.c: Likewise.
        * tests/test-idpriv-drop.c: Likewise.
        * tests/test-idpriv-droptemp.c: Likewise.
        * tests/test-lock.c: Likewise.
        * tests/test-tls.c: Likewise.
        * lib/argp-help.c: Insert space before function-like macro argument
        list.
        * lib/memcmp.c: Likewise.
        * tests/test-base64.c: Likewise.
        * lib/localename.c: Insert space before sizeof's argument list.
        * lib/safe-alloc.h: Likewise.
        * lib/file-set.h: Insert space before macro argument list.
        * tests/test-argp.c: Likewise.
        * lib/argp-namefrob.h: Insert space before function parameter list.
        * lib/getaddrinfo.c: Likewise.
        * lib/netdb.in.h: Likewise.
        * lib/parse-duration.h: Likewise.
        * lib/parse-duration.c: Likewise.
        * lib/poll.c: Likewise.
        * lib/select.c: Likewise.
        * lib/trim.h: Likewise.
        * tests/test-usleep.c: Likewise.
        * lib/ldexpl.c: Insert space before function parameter list and before
        function argument list.
        * lib/logl.c: Likewise.
        * lib/sqrtl.c: Likewise.
        * lib/trim.c: Likewise.
        * lib/cosl.c: Use GNU style indentation. Insert space before function
        argument list.
        * lib/sinl.c: Likewise.
        * lib/tsearch.c: Insert space after 'for'.
        * lib/readutmp.h (getutent): Provide ANSI C prototype.
        Reported by Jim Meyering.

--- lib/acosl.c.orig    Sat Mar 20 18:58:28 2010
+++ lib/acosl.c Sat Mar 20 17:59:36 2010
@@ -108,7 +108,7 @@
 
   if (x < 0.0L)
     {
-      t = pi - acosl(-x);
+      t = pi - acosl (- x);
       if (huge + x > one) /* return with inexact */
         return t;
     }
@@ -183,7 +183,7 @@
       return (pio2_hi - asinr5625) - (p / q - pio2_lo);
     }
   else
-    return 2 * asinl(sqrtl((1-x)/2));
+    return 2 * asinl (sqrtl ((1 - x) / 2));
 }
 
 #if 0
@@ -191,35 +191,35 @@
 main (void)
 {
   printf ("%.18Lg %.18Lg\n",
-          acosl(1.0L),
+          acosl (1.0L),
           1.5707963267948966192313216916397514420984L -
           1.5707963267948966192313216916397514420984L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(0.7071067811865475244008443621048490392848L),
+          acosl (0.7071067811865475244008443621048490392848L),
           1.5707963267948966192313216916397514420984L -
           0.7853981633974483096156608458198757210492L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(0.5L),
+          acosl (0.5L),
           1.5707963267948966192313216916397514420984L -
           0.5235987755982988730771072305465838140328L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(0.3090169943749474241022934171828190588600L),
+          acosl (0.3090169943749474241022934171828190588600L),
           1.5707963267948966192313216916397514420984L -
           0.3141592653589793238462643383279502884196L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(-1.0L),
+          acosl (-1.0L),
           1.5707963267948966192313216916397514420984L -
           -1.5707963267948966192313216916397514420984L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(-0.7071067811865475244008443621048490392848L),
+          acosl (-0.7071067811865475244008443621048490392848L),
           1.5707963267948966192313216916397514420984L -
           -0.7853981633974483096156608458198757210492L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(-0.5L),
+          acosl (-0.5L),
           1.5707963267948966192313216916397514420984L -
           -0.5235987755982988730771072305465838140328L);
   printf ("%.18Lg %.18Lg\n",
-          acosl(-0.3090169943749474241022934171828190588600L),
+          acosl (-0.3090169943749474241022934171828190588600L),
           1.5707963267948966192313216916397514420984L -
           -0.3141592653589793238462643383279502884196L);
 }
--- lib/argp-help.c.orig        Sat Mar 20 18:58:28 2010
+++ lib/argp-help.c     Sat Mar 20 18:00:56 2010
@@ -764,7 +764,7 @@
       else
         /* Both entries are in clusters, we can just compare the clusters.  */
         return (rc = hol_cluster_cmp (entry1->cluster, entry2->cluster)) ?
-                rc : HOL_ENTRY_PTRCMP(entry1, entry2);
+               rc : HOL_ENTRY_PTRCMP (entry1, entry2);
     }
   else if (group1 == group2)
     /* The entries are both in the same cluster and group, so compare them
@@ -789,7 +789,7 @@
       else if (!short1 && !short2 && long1 && long2)
         /* Only long options.  */
         return (rc = __strcasecmp (long1, long2)) ?
-                 rc : HOL_ENTRY_PTRCMP(entry1, entry2);
+               rc : HOL_ENTRY_PTRCMP (entry1, entry2);
       else
         /* Compare short/short, long/short, short/long, using the first
            character of long options.  Entries without *any* valid
@@ -805,14 +805,14 @@
           /* Compare ignoring case, except when the options are both the
              same letter, in which case lower-case always comes first.  */
           return lower_cmp ? lower_cmp :
-                    (rc = first2 - first1) ?
-                     rc : HOL_ENTRY_PTRCMP(entry1, entry2);
+                 (rc = first2 - first1) ?
+                 rc : HOL_ENTRY_PTRCMP (entry1, entry2);
         }
     }
   else
     /* Within the same cluster, but not the same group, so just compare
        groups.  */
-    return group_cmp (group1, group2, HOL_ENTRY_PTRCMP(entry1, entry2));
+    return group_cmp (group1, group2, HOL_ENTRY_PTRCMP (entry1, entry2));
 }
 
 /* Version of hol_entry_cmp with correct signature for qsort.  */
--- lib/argp-namefrob.h.orig    Sat Mar 20 18:58:28 2010
+++ lib/argp-namefrob.h Sat Mar 20 18:01:17 2010
@@ -144,7 +144,7 @@
 #if defined GNULIB_ARGP_DISABLE_DIRNAME
 # define __argp_base_name(arg) arg
 #elif defined GNULIB_ARGP_EXTERN_BASENAME
-extern char *__argp_base_name(const char *arg);
+extern char *__argp_base_name (const char *arg);
 #else
 # include "dirname.h"
 # define __argp_base_name last_component
--- lib/argz.c.orig     Sat Mar 20 18:58:28 2010
+++ lib/argz.c  Sat Mar 20 18:01:38 2010
@@ -220,7 +220,7 @@
   size_t count = 0;
   while (len > 0)
     {
-      size_t part_len = strlen(argz);
+      size_t part_len = strlen (argz);
       argz += part_len + 1;
       len -= part_len + 1;
       count++;
--- lib/asinl.c.orig    Sat Mar 20 18:58:28 2010
+++ lib/asinl.c Sat Mar 20 18:02:34 2010
@@ -183,7 +183,7 @@
       t = asinr5625 + p / q;
     }
   else
-    t = pio2_hi + pio2_lo - 2 * asinl(sqrtl((1-y)/2));
+    t = pio2_hi + pio2_lo - 2 * asinl (sqrtl ((1 - y) / 2));
 
   return t * sign;
 }
@@ -193,28 +193,28 @@
 main (void)
 {
   printf ("%.18Lg %.18Lg\n",
-          asinl(1.0L),
+          asinl (1.0L),
           1.5707963267948966192313216916397514420984L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(0.7071067811865475244008443621048490392848L),
+          asinl (0.7071067811865475244008443621048490392848L),
           0.7853981633974483096156608458198757210492L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(0.5L),
+          asinl (0.5L),
           0.5235987755982988730771072305465838140328L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(0.3090169943749474241022934171828190588600L),
+          asinl (0.3090169943749474241022934171828190588600L),
           0.3141592653589793238462643383279502884196L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(-1.0L),
+          asinl (-1.0L),
           -1.5707963267948966192313216916397514420984L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(-0.7071067811865475244008443621048490392848L),
+          asinl (-0.7071067811865475244008443621048490392848L),
           -0.7853981633974483096156608458198757210492L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(-0.5L),
+          asinl (-0.5L),
           -0.5235987755982988730771072305465838140328L);
   printf ("%.18Lg %.18Lg\n",
-          asinl(-0.3090169943749474241022934171828190588600L),
+          asinl (-0.3090169943749474241022934171828190588600L),
           -0.3141592653589793238462643383279502884196L);
 }
 #endif
--- lib/cosl.c.orig     Sat Mar 20 18:58:28 2010
+++ lib/cosl.c  Sat Mar 20 18:05:45 2010
@@ -51,48 +51,54 @@
 
 #include "trigl.h"
 
-long double cosl(long double x)
+long double
+cosl (long double x)
 {
-        long double y[2],z=0.0L;
-        int n;
+  long double y[2],z=0.0L;
+  int n;
 
-    /* cosl(NaN) is NaN */
-        if (isnanl (x))
-          return x;
-
-    /* |x| ~< pi/4 */
-        if(x >= -0.7853981633974483096156608458198757210492 &&
-           x <= 0.7853981633974483096156608458198757210492)
-          return kernel_cosl(x, z);
-
-    /* cosl(Inf) is NaN, cosl(0) is 1 */
-        else if (x + x == x && x != 0.0)
-          return x-x;           /* NaN */
-
-    /* argument reduction needed */
-        else {
-            n = ieee754_rem_pio2l(x,y);
-            switch(n&3) {
-                case 0: return  kernel_cosl(y[0],y[1]);
-                case 1: return -kernel_sinl(y[0],y[1],1);
-                case 2: return -kernel_cosl(y[0],y[1]);
-                default:
-                        return  kernel_sinl(y[0],y[1],1);
-            }
+  /* cosl(NaN) is NaN */
+  if (isnanl (x))
+    return x;
+
+  /* |x| ~< pi/4 */
+  if (x >= -0.7853981633974483096156608458198757210492
+      && x <= 0.7853981633974483096156608458198757210492)
+    return kernel_cosl(x, z);
+
+  /* cosl(Inf) is NaN, cosl(0) is 1 */
+  else if (x + x == x && x != 0.0)
+    return x - x;           /* NaN */
+
+  /* argument reduction needed */
+  else
+    {
+      n = ieee754_rem_pio2l (x, y);
+      switch (n & 3)
+        {
+        case 0:
+          return  kernel_cosl (y[0], y[1]);
+        case 1:
+          return -kernel_sinl (y[0], y[1], 1);
+        case 2:
+          return -kernel_cosl (y[0], y[1]);
+        default:
+          return  kernel_sinl (y[0], y[1], 1);
         }
+    }
 }
 
 #if 0
 int
 main (void)
 {
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *29));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *2));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *30));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *4));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *32));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *2/3));
-  printf ("%.16Lg\n", cosl(0.7853981633974483096156608458198757210492 *4/3));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *29));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *2));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *30));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *4));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *32));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *2/3));
+  printf ("%.16Lg\n", cosl (0.7853981633974483096156608458198757210492 *4/3));
 }
 #endif
--- lib/expl.c.orig     Sat Mar 20 18:58:28 2010
+++ lib/expl.c  Sat Mar 20 18:06:03 2010
@@ -122,14 +122,14 @@
 int
 main (void)
 {
-  printf ("%.16Lg\n", expl(1.0L));
-  printf ("%.16Lg\n", expl(-1.0L));
-  printf ("%.16Lg\n", expl(2.0L));
-  printf ("%.16Lg\n", expl(4.0L));
-  printf ("%.16Lg\n", expl(-2.0L));
-  printf ("%.16Lg\n", expl(-4.0L));
-  printf ("%.16Lg\n", expl(0.0625L));
-  printf ("%.16Lg\n", expl(0.3L));
-  printf ("%.16Lg\n", expl(0.6L));
+  printf ("%.16Lg\n", expl (1.0L));
+  printf ("%.16Lg\n", expl (-1.0L));
+  printf ("%.16Lg\n", expl (2.0L));
+  printf ("%.16Lg\n", expl (4.0L));
+  printf ("%.16Lg\n", expl (-2.0L));
+  printf ("%.16Lg\n", expl (-4.0L));
+  printf ("%.16Lg\n", expl (0.0625L));
+  printf ("%.16Lg\n", expl (0.3L));
+  printf ("%.16Lg\n", expl (0.6L));
 }
 #endif
--- lib/file-set.h.orig Sat Mar 20 18:58:29 2010
+++ lib/file-set.h      Sat Mar 20 18:06:30 2010
@@ -6,7 +6,7 @@
 
 extern void record_file (Hash_table *ht, char const *file,
                          struct stat const *stats)
-  __attribute__((nonnull(2, 3)));
+  __attribute__ ((nonnull (2, 3)));
 
 extern bool seen_file (Hash_table const *ht, char const *file,
                        struct stat const *stats);
--- lib/gen-uni-tables.c.orig   Sat Mar 20 18:58:29 2010
+++ lib/gen-uni-tables.c        Sat Mar 20 18:07:04 2010
@@ -210,7 +210,7 @@
       i = strtoul (field0, NULL, 16);
       if (field1[0] == '<'
           && strlen (field1) >= 9
-          && strcmp (field1 + strlen(field1) - 8, ", First>") == 0)
+          && strcmp (field1 + strlen (field1) - 8, ", First>") == 0)
         {
           /* Deal with a range. */
           lineno++;
--- lib/getaddrinfo.c.orig      Sat Mar 20 18:58:29 2010
+++ lib/getaddrinfo.c   Sat Mar 20 18:08:13 2010
@@ -351,10 +351,11 @@
     }
 }
 
-int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
-                char *restrict node, socklen_t nodelen,
-                char *restrict service, socklen_t servicelen,
-                int flags)
+int
+getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
+             char *restrict node, socklen_t nodelen,
+             char *restrict service, socklen_t servicelen,
+             int flags)
 {
 #ifdef WIN32_NATIVE
   if (use_win32_p ())
--- lib/gettext.h.orig  Sat Mar 20 18:58:29 2010
+++ lib/gettext.h       Sat Mar 20 18:08:40 2010
@@ -81,7 +81,7 @@
     ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
 # undef dcngettext
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+    ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
 # undef textdomain
 # define textdomain(Domainname) ((const char *) (Domainname))
 # undef bindtextdomain
--- lib/glthread/lock.h.orig    Sat Mar 20 18:58:29 2010
+++ lib/glthread/lock.h Sat Mar 20 18:09:30 2010
@@ -418,11 +418,11 @@
 # define gl_lock_initializer \
     PTH_MUTEX_INIT
 # define glthread_lock_init(LOCK) \
-    (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0)
+    (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
 # define glthread_lock_lock(LOCK) \
-    (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+    (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
 # define glthread_lock_unlock(LOCK) \
-    (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0)
+    (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
 # define glthread_lock_destroy(LOCK) \
     ((void)(LOCK), 0)
 
@@ -436,13 +436,13 @@
 #  define gl_rwlock_initializer \
      PTH_RWLOCK_INIT
 #  define glthread_rwlock_init(LOCK) \
-     (pth_in_use() && !pth_rwlock_init (LOCK) ? errno : 0)
+     (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0)
 #  define glthread_rwlock_rdlock(LOCK) \
-     (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? 
errno : 0)
+     (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? 
errno : 0)
 #  define glthread_rwlock_wrlock(LOCK) \
-     (pth_in_use() && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? 
errno : 0)
+     (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? 
errno : 0)
 #  define glthread_rwlock_unlock(LOCK) \
-     (pth_in_use() && !pth_rwlock_release (LOCK) ? errno : 0)
+     (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0)
 #  define glthread_rwlock_destroy(LOCK) \
      ((void)(LOCK), 0)
 
@@ -457,11 +457,11 @@
 #  define gl_recursive_lock_initializer \
      PTH_MUTEX_INIT
 #  define glthread_recursive_lock_init(LOCK) \
-     (pth_in_use() && !pth_mutex_init (LOCK) ? errno : 0)
+     (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0)
 #  define glthread_recursive_lock_lock(LOCK) \
-     (pth_in_use() && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
+     (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0)
 #  define glthread_recursive_lock_unlock(LOCK) \
-     (pth_in_use() && !pth_mutex_release (LOCK) ? errno : 0)
+     (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0)
 #  define glthread_recursive_lock_destroy(LOCK) \
      ((void)(LOCK), 0)
 
--- lib/ldexpl.c.orig   Sat Mar 20 18:58:29 2010
+++ lib/ldexpl.c        Sat Mar 20 18:10:05 2010
@@ -27,7 +27,7 @@
 #include "fpucw.h"
 
 long double
-ldexpl(long double x, int exp)
+ldexpl (long double x, int exp)
 {
   long double factor;
   int bit;
@@ -72,6 +72,6 @@
   long double x;
   int y;
   for (y = 0; y < 29; y++)
-    printf ("%5d %.16Lg %.16Lg\n", y, ldexpl(0.8L, y), ldexpl(0.8L, -y) * 
ldexpl(0.8L, y));
+    printf ("%5d %.16Lg %.16Lg\n", y, ldexpl (0.8L, y), ldexpl (0.8L, -y) * 
ldexpl (0.8L, y));
 }
 #endif
--- lib/localename.c.orig       Sat Mar 20 18:58:29 2010
+++ lib/localename.c    Sat Mar 20 18:14:23 2010
@@ -2866,7 +2866,7 @@
         CFLocaleRef locale = CFLocaleCopyCurrent ();
         CFStringRef name = CFLocaleGetIdentifier (locale);
 
-        if (CFStringGetCString (name, namebuf, sizeof(namebuf),
+        if (CFStringGetCString (name, namebuf, sizeof (namebuf),
                                 kCFStringEncodingASCII))
           {
             gl_locale_name_canonicalize (namebuf);
@@ -2879,7 +2879,8 @@
                                      kCFPreferencesCurrentApplication);
         if (value != NULL
             && CFGetTypeID (value) == CFStringGetTypeID ()
-            && CFStringGetCString ((CFStringRef)value, namebuf, 
sizeof(namebuf),
+            && CFStringGetCString ((CFStringRef)value,
+                                   namebuf, sizeof (namebuf),
                                    kCFStringEncodingASCII))
           {
             gl_locale_name_canonicalize (namebuf);
--- lib/logl.c.orig     Sat Mar 20 18:58:29 2010
+++ lib/logl.c  Sat Mar 20 18:15:07 2010
@@ -185,7 +185,7 @@
   ln2b = 1.4286068203094172321214581765680755001344E-6L;
 
 long double
-logl(long double x)
+logl (long double x)
 {
   long double z, y, w;
   long double t;
@@ -215,7 +215,7 @@
     }
 
   /* Extract exponent and reduce domain to 0.703125 <= u < 1.40625  */
-  x = frexpl(x, &e);
+  x = frexpl (x, &e);
   if (x < 0.703125L)
     {
       x += x;
--- lib/memcmp.c.orig   Sat Mar 20 18:58:29 2010
+++ lib/memcmp.c        Sat Mar 20 18:16:35 2010
@@ -259,28 +259,28 @@
     {
       a0 = ((op_t *) srcp1)[0];
       b0 = ((op_t *) srcp2)[0];
-      x = MERGE(a2, shl, a3, shr);
+      x = MERGE (a2, shl, a3, shr);
       if (x != b3)
         return CMP_LT_OR_GT (x, b3);
 
     do3:
       a1 = ((op_t *) srcp1)[1];
       b1 = ((op_t *) srcp2)[1];
-      x = MERGE(a3, shl, a0, shr);
+      x = MERGE (a3, shl, a0, shr);
       if (x != b0)
         return CMP_LT_OR_GT (x, b0);
 
     do2:
       a2 = ((op_t *) srcp1)[2];
       b2 = ((op_t *) srcp2)[2];
-      x = MERGE(a0, shl, a1, shr);
+      x = MERGE (a0, shl, a1, shr);
       if (x != b1)
         return CMP_LT_OR_GT (x, b1);
 
     do1:
       a3 = ((op_t *) srcp1)[3];
       b3 = ((op_t *) srcp2)[3];
-      x = MERGE(a1, shl, a2, shr);
+      x = MERGE (a1, shl, a2, shr);
       if (x != b2)
         return CMP_LT_OR_GT (x, b2);
 
@@ -293,7 +293,7 @@
   /* This is the right position for do0.  Please don't move
      it into the loop.  */
  do0:
-  x = MERGE(a2, shl, a3, shr);
+  x = MERGE (a2, shl, a3, shr);
   if (x != b3)
     return CMP_LT_OR_GT (x, b3);
   return 0;
--- lib/netdb.in.h.orig Sat Mar 20 18:58:29 2010
+++ lib/netdb.in.h      Sat Mar 20 18:17:03 2010
@@ -171,10 +171,10 @@
 /* Convert socket address to printable node and service names.
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/getnameinfo.html>.  */
-extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
-                       char *restrict node, socklen_t nodelen,
-                       char *restrict service, socklen_t servicelen,
-                       int flags)
+extern int getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
+                        char *restrict node, socklen_t nodelen,
+                        char *restrict service, socklen_t servicelen,
+                        int flags)
      _GL_ARG_NONNULL ((1));
 # endif
 
--- lib/parse-duration.c.orig   Sat Mar 20 18:58:29 2010
+++ lib/parse-duration.c        Sat Mar 20 18:17:32 2010
@@ -452,7 +452,7 @@
 }
 
 static time_t
-parse_non_iso8601(cch_t * pz)
+parse_non_iso8601 (cch_t * pz)
 {
   whats_done_t whatd_we_do = NOTHING_IS_DONE;
 
--- lib/parse-duration.h.orig   Sat Mar 20 18:58:29 2010
+++ lib/parse-duration.h        Sat Mar 20 18:17:54 2010
@@ -85,6 +85,6 @@
 /* Parses the given string.  If it has the syntax of a valid duration,
    this duration is returned.  Otherwise, the return value is BAD_TIME,
    and errno is set to either EINVAL (bad syntax) or ERANGE (out of range).  */
-extern time_t parse_duration(char const * in_pz);
+extern time_t parse_duration (char const * in_pz);
 
 #endif /* GNULIB_PARSE_DURATION_H */
--- lib/poll.c.orig     Sat Mar 20 18:58:29 2010
+++ lib/poll.c  Sat Mar 20 18:18:13 2010
@@ -70,7 +70,7 @@
 #define IsConsoleHandle(h) (((long) (h) & 3) == 3)
 
 static BOOL
-IsSocketHandle(HANDLE h)
+IsSocketHandle (HANDLE h)
 {
   WSANETWORKEVENTS ev;
 
--- lib/readutmp.h.orig Sat Mar 20 18:58:29 2010
+++ lib/readutmp.h      Sat Mar 20 18:29:43 2010
@@ -73,7 +73,7 @@
 
 #  include <utmp.h>
 #  if !HAVE_DECL_GETUTENT
-    struct utmp *getutent();
+    struct utmp *getutent (void);
 #  endif
 #  define UTMP_STRUCT_NAME utmp
 #  define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time)
--- lib/safe-alloc.h.orig       Sat Mar 20 18:58:29 2010
+++ lib/safe-alloc.h    Sat Mar 20 18:19:11 2010
@@ -59,7 +59,7 @@
  * Return -1 on failure to allocate, zero on success
  */
 # define ALLOC(ptr)                                     \
-  safe_alloc_alloc_n (&(ptr), sizeof(*(ptr)), 1, 1)
+  safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), 1, 1)
 
 /**
  * ALLOC_N:
@@ -73,7 +73,7 @@
  * Return -1 on failure, 0 on success
  */
 # define ALLOC_N(ptr, count)                                    \
-  safe_alloc_alloc_n (&(ptr), sizeof(*(ptr)), (count), 1)
+  safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), (count), 1)
 
 /**
  * ALLOC_N_UNINITIALIZED:
@@ -87,7 +87,7 @@
  * Return -1 on failure to allocate, zero on success
  */
 # define ALLOC_N_UNINITIALIZED(ptr, count)                      \
-  safe_alloc_alloc_n (&(ptr), sizeof(*(ptr)), (count), 0)
+  safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), (count), 0)
 
 /**
  * REALLOC_N:
@@ -101,7 +101,7 @@
  * Return -1 on failure to reallocate, zero on success
  */
 # define REALLOC_N(ptr, count)                                  \
-  safe_alloc_realloc_n (&(ptr), sizeof(*(ptr)), (count))
+  safe_alloc_realloc_n (&(ptr), sizeof (*(ptr)), (count))
 
 /**
  * FREE:
@@ -116,6 +116,6 @@
       free (ptr);                               \
       (ptr) = NULL;                             \
     }                                           \
-  while(0)
+  while (0)
 
 #endif /* SAFE_ALLOC_H_ */
--- lib/select.c.orig   Sat Mar 20 18:58:29 2010
+++ lib/select.c        Sat Mar 20 18:19:25 2010
@@ -80,7 +80,7 @@
 #define IsConsoleHandle(h) (((long) (h) & 3) == 3)
 
 static BOOL
-IsSocketHandle(HANDLE h)
+IsSocketHandle (HANDLE h)
 {
   WSANETWORKEVENTS ev;
 
--- lib/sinl.c.orig     Sat Mar 20 18:58:29 2010
+++ lib/sinl.c  Sat Mar 20 18:05:18 2010
@@ -62,8 +62,8 @@
     return x;
 
   /* |x| ~< pi/4 */
-  if (x >= -0.7853981633974483096156608458198757210492 &&
-      x <= 0.7853981633974483096156608458198757210492)
+  if (x >= -0.7853981633974483096156608458198757210492
+      && x <= 0.7853981633974483096156608458198757210492)
     return kernel_sinl (x, z, 0);
 
     /* sinl(Inf) is NaN, sinl(0) is 0 */
@@ -92,13 +92,13 @@
 int
 main (void)
 {
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *29));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *2));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *30));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *4));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *32));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *2/3));
-  printf ("%.16Lg\n", sinl(0.7853981633974483096156608458198757210492 *4/3));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *29));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *2));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *30));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *4));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *32));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *2/3));
+  printf ("%.16Lg\n", sinl (0.7853981633974483096156608458198757210492 *4/3));
 }
 #endif
--- lib/sqrtl.c.orig    Sat Mar 20 18:58:29 2010
+++ lib/sqrtl.c Sat Mar 20 18:19:55 2010
@@ -27,7 +27,7 @@
 
 /* A simple Newton-Raphson method. */
 long double
-sqrtl(long double x)
+sqrtl (long double x)
 {
   long double delta, y;
   int exponent;
@@ -38,7 +38,7 @@
 
   /* Check for negative numbers */
   if (x < 0.0L)
-    return (long double) sqrt(-1);
+    return (long double) sqrt (-1);
 
   /* Check for zero and infinites */
   if (x + x == x)
--- lib/tanl.c.orig     Sat Mar 20 18:58:29 2010
+++ lib/tanl.c  Sat Mar 20 18:20:34 2010
@@ -212,12 +212,12 @@
 int
 main (void)
 {
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", tanl(-0.7853981633974483096156608458198757210492));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 *3));
-  printf ("%.16Lg\n", tanl(-0.7853981633974483096156608458198757210492 *31));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 / 2));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 * 3/2));
-  printf ("%.16Lg\n", tanl(0.7853981633974483096156608458198757210492 * 5/2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", tanl (-0.7853981633974483096156608458198757210492));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 *3));
+  printf ("%.16Lg\n", tanl (-0.7853981633974483096156608458198757210492 *31));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 / 2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 * 3/2));
+  printf ("%.16Lg\n", tanl (0.7853981633974483096156608458198757210492 * 5/2));
 }
 #endif
--- lib/trim.c.orig     Sat Mar 20 18:58:29 2010
+++ lib/trim.c  Sat Mar 20 18:20:58 2010
@@ -38,14 +38,14 @@
 #endif
 
 char *
-trim2(const char *s, int how)
+trim2 (const char *s, int how)
 {
   char *d;
 
-  d = strdup(s);
+  d = strdup (s);
 
   if (!d)
-    xalloc_die();
+    xalloc_die ();
 
   if (MB_CUR_MAX > 1)
     {
--- lib/trim.h.orig     Sat Mar 20 18:58:29 2010
+++ lib/trim.h  Sat Mar 20 18:21:14 2010
@@ -30,4 +30,4 @@
 /* Removes leading whitespaces. */
 #define trim_leading(s) trim2(s, TRIM_LEADING)
 
-char *trim2(const char *, int);
+char *trim2 (const char *, int);
--- lib/tsearch.c.orig  Sat Mar 20 18:58:29 2010
+++ lib/tsearch.c       Sat Mar 20 18:21:36 2010
@@ -162,7 +162,7 @@
   if (root == NULL)
     return;
   root->red = 0;
-  for(p = root->left; p; p = p->left)
+  for (p = root->left; p; p = p->left)
     cnt += !p->red;
   check_tree_recurse (root, 0, cnt);
 }
--- lib/uniname/uniname.c.orig  Sat Mar 20 18:58:29 2010
+++ lib/uniname/uniname.c       Sat Mar 20 18:22:33 2010
@@ -388,19 +388,19 @@
                             unsigned int index1;
 
                             for (index1 = 0; index1 < 19; index1++)
-                              if (memcmp(jamo_initial_short_name[index1], p1, 
n1) == 0
+                              if (memcmp (jamo_initial_short_name[index1], p1, 
n1) == 0
                                   && jamo_initial_short_name[index1][n1] == 
'\0')
                                 {
                                   unsigned int index2;
 
                                   for (index2 = 0; index2 < 21; index2++)
-                                    if (memcmp(jamo_medial_short_name[index2], 
p2, n2) == 0
+                                    if (memcmp 
(jamo_medial_short_name[index2], p2, n2) == 0
                                         && jamo_medial_short_name[index2][n2] 
== '\0')
                                       {
                                         unsigned int index3;
 
                                         for (index3 = 0; index3 < 28; index3++)
-                                          if 
(memcmp(jamo_final_short_name[index3], p3, n3) == 0
+                                          if (memcmp 
(jamo_final_short_name[index3], p3, n3) == 0
                                               && 
jamo_final_short_name[index3][n3] == '\0')
                                             {
                                               return 0xAC00 + (index1 * 21 + 
index2) * 28 + index3;
--- tests/test-argp.c.orig      Sat Mar 20 18:58:29 2010
+++ tests/test-argp.c   Sat Mar 20 18:23:45 2010
@@ -262,20 +262,20 @@
 #define INIT_TEST_COMMON(n)     \
  int argc = NARGS (argv);       \
  struct test_args test_args;    \
- init_args(test_args);          \
+ init_args (test_args);         \
  test_number = n;
 
 #define INIT_TEST1(n, arg1)            \
  char *argv[] = { ARGV0, arg1, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
 
 #define INIT_TEST2(n, arg1, arg2)            \
  char *argv[] = { ARGV0, arg1, arg2, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
 
 #define INIT_TEST3(n, arg1, arg2, arg3)            \
  char *argv[] = { ARGV0, arg1, arg2, arg3, NULL }; \
- INIT_TEST_COMMON(n)
+ INIT_TEST_COMMON (n)
 
 int test_number;
 unsigned failure_count = 0;
--- tests/test-base64.c.orig    Sat Mar 20 18:58:29 2010
+++ tests/test-base64.c Sat Mar 20 18:24:24 2010
@@ -39,7 +39,7 @@
 
   memset (out, 0x42, sizeof (out));
   base64_encode (in, 0, out, 0);
-  ASSERT(out[0] == '\x42');
+  ASSERT (out[0] == '\x42');
 
   memset (out, 0x42, sizeof (out));
   base64_encode (in, 1, out, 1);
--- tests/test-idpriv-drop.c.orig       Sat Mar 20 18:58:30 2010
+++ tests/test-idpriv-drop.c    Sat Mar 20 18:24:48 2010
@@ -38,7 +38,7 @@
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEUID
   printf ("uids: real=%d effective=%d",
-          (int) getuid (), (int) geteuid());
+          (int) getuid (), (int) geteuid ());
 #elif HAVE_GETUID
   printf ("uids: real=%d",
           (int) getuid ());
@@ -57,7 +57,7 @@
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEGID
   printf ("gids: real=%d effective=%d",
-          (int) getgid (), (int) getegid());
+          (int) getgid (), (int) getegid ());
 #elif HAVE_GETGID
   printf ("gids: real=%d",
           (int) getgid ());
--- tests/test-idpriv-droptemp.c.orig   Sat Mar 20 18:58:30 2010
+++ tests/test-idpriv-droptemp.c        Sat Mar 20 18:25:02 2010
@@ -38,7 +38,7 @@
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEUID
   printf ("uids: real=%d effective=%d",
-          (int) getuid (), (int) geteuid());
+          (int) getuid (), (int) geteuid ());
 #elif HAVE_GETUID
   printf ("uids: real=%d",
           (int) getuid ());
@@ -57,7 +57,7 @@
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEGID
   printf ("gids: real=%d effective=%d",
-          (int) getgid (), (int) getegid());
+          (int) getgid (), (int) getegid ());
 #elif HAVE_GETGID
   printf ("gids: real=%d",
           (int) getgid ());
--- tests/test-lock.c.orig      Sat Mar 20 18:58:30 2010
+++ tests/test-lock.c   Sat Mar 20 18:26:50 2010
@@ -1,5 +1,5 @@
 /* Test of locking in multithreaded situations.
-   Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -110,7 +110,7 @@
 static int
 random_account (void)
 {
-  return ((unsigned int) rand() >> 3) % ACCOUNT_COUNT;
+  return ((unsigned int) rand () >> 3) % ACCOUNT_COUNT;
 }
 
 static void
@@ -149,7 +149,7 @@
 
       i1 = random_account ();
       i2 = random_account ();
-      value = ((unsigned int) rand() >> 3) % 10;
+      value = ((unsigned int) rand () >> 3) % 10;
       account[i1] += value;
       account[i2] -= value;
 
@@ -239,7 +239,7 @@
 
       i1 = random_account ();
       i2 = random_account ();
-      value = ((unsigned int) rand() >> 3) % 10;
+      value = ((unsigned int) rand () >> 3) % 10;
       account[i1] += value;
       account[i2] -= value;
 
@@ -321,12 +321,12 @@
 
   i1 = random_account ();
   i2 = random_account ();
-  value = ((unsigned int) rand() >> 3) % 10;
+  value = ((unsigned int) rand () >> 3) % 10;
   account[i1] += value;
   account[i2] -= value;
 
   /* Recursive with probability 0.5.  */
-  if (((unsigned int) rand() >> 3) % 2)
+  if (((unsigned int) rand () >> 3) % 2)
     recshuffle ();
 
   dbgprintf ("Mutator %p before unlock\n", gl_thread_self ());
--- tests/test-tls.c.orig       Sat Mar 20 18:58:30 2010
+++ tests/test-tls.c    Sat Mar 20 18:27:48 2010
@@ -1,5 +1,5 @@
 /* Test of thread-local storage in multithreaded situations.
-   Copyright (C) 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -94,7 +94,7 @@
   /* Initialize the per-thread storage.  */
   for (i = 0; i < KEYS_COUNT; i++)
     {
-      values[i] = (((unsigned int) rand() >> 3) % 1000000) * THREAD_COUNT + id;
+      values[i] = (((unsigned int) rand () >> 3) % 1000000) * THREAD_COUNT + 
id;
       /* Hopefully no arithmetic overflow.  */
       if ((values[i] % THREAD_COUNT) != id)
         abort ();
@@ -124,8 +124,8 @@
   for (repeat = REPEAT_COUNT; repeat > 0; repeat--)
     {
       dbgprintf ("Worker %p doing value swapping\n", gl_thread_self ());
-      i = ((unsigned int) rand() >> 3) % KEYS_COUNT;
-      j = ((unsigned int) rand() >> 3) % KEYS_COUNT;
+      i = ((unsigned int) rand () >> 3) % KEYS_COUNT;
+      j = ((unsigned int) rand () >> 3) % KEYS_COUNT;
       if (i != j)
         {
           void *vi = gl_tls_get (mykeys[i]);
--- tests/test-usleep.c.orig    Sat Mar 20 18:58:30 2010
+++ tests/test-usleep.c Sat Mar 20 18:25:21 2010
@@ -28,7 +28,7 @@
 #include "macros.h"
 
 int
-main(void)
+main (void)
 {
   time_t start = time (NULL);
   ASSERT (usleep (1000000) == 0);




reply via email to

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