Mercurial > hg > octave-lojdl > gnulib-hg
changeset 13051:094f6cfdb5c3
Minor formatting changes.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 25 Mar 2010 07:48:14 +0100 |
parents | db28b6647ddf |
children | 082bcf732231 |
files | ChangeLog lib/acosl.c lib/argp-help.c lib/argp-namefrob.h lib/argz.c lib/asinl.c lib/cosl.c lib/expl.c lib/file-set.h lib/gen-uni-tables.c lib/getaddrinfo.c lib/gettext.h lib/glthread/lock.h lib/ldexpl.c lib/localename.c lib/logl.c lib/memcmp.c lib/netdb.in.h lib/parse-duration.c lib/parse-duration.h lib/poll.c lib/safe-alloc.h lib/select.c lib/sinl.c lib/sqrtl.c lib/tanl.c lib/trim.c lib/trim.h lib/tsearch.c lib/uniname/uniname.c tests/test-argp.c tests/test-base64.c tests/test-idpriv-drop.c tests/test-idpriv-droptemp.c tests/test-lock.c tests/test-tls.c tests/test-usleep.c |
diffstat | 37 files changed, 206 insertions(+), 154 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,47 @@ +2010-03-25 Bruno Haible <bruno@clisp.org> + + 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'. + Reported by Jim Meyering. + 2010-03-23 Pádraig Brady <P@draigBrady.com> (tiny change) * maint.mk (sc_Wundef_boolean): Check for the presence of the
--- a/lib/acosl.c +++ b/lib/acosl.c @@ -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); }
--- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -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. */
--- a/lib/argp-namefrob.h +++ b/lib/argp-namefrob.h @@ -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
--- a/lib/argz.c +++ b/lib/argz.c @@ -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++;
--- a/lib/asinl.c +++ b/lib/asinl.c @@ -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
--- a/lib/cosl.c +++ b/lib/cosl.c @@ -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; + /* cosl(NaN) is NaN */ + if (isnanl (x)) + return x; - /* |x| ~< pi/4 */ - if(x >= -0.7853981633974483096156608458198757210492 && - x <= 0.7853981633974483096156608458198757210492) - return kernel_cosl(x, z); + /* |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 */ + /* 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); - } + /* 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
--- a/lib/expl.c +++ b/lib/expl.c @@ -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
--- a/lib/file-set.h +++ b/lib/file-set.h @@ -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);
--- a/lib/gen-uni-tables.c +++ b/lib/gen-uni-tables.c @@ -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++;
--- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -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 ())
--- a/lib/gettext.h +++ b/lib/gettext.h @@ -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
--- a/lib/glthread/lock.h +++ b/lib/glthread/lock.h @@ -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)
--- a/lib/ldexpl.c +++ b/lib/ldexpl.c @@ -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
--- a/lib/localename.c +++ b/lib/localename.c @@ -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);
--- a/lib/logl.c +++ b/lib/logl.c @@ -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;
--- a/lib/memcmp.c +++ b/lib/memcmp.c @@ -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;
--- a/lib/netdb.in.h +++ b/lib/netdb.in.h @@ -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
--- a/lib/parse-duration.c +++ b/lib/parse-duration.c @@ -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;
--- a/lib/parse-duration.h +++ b/lib/parse-duration.h @@ -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 */
--- a/lib/poll.c +++ b/lib/poll.c @@ -70,7 +70,7 @@ #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL -IsSocketHandle(HANDLE h) +IsSocketHandle (HANDLE h) { WSANETWORKEVENTS ev;
--- a/lib/safe-alloc.h +++ b/lib/safe-alloc.h @@ -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_ */
--- a/lib/select.c +++ b/lib/select.c @@ -80,7 +80,7 @@ #define IsConsoleHandle(h) (((long) (h) & 3) == 3) static BOOL -IsSocketHandle(HANDLE h) +IsSocketHandle (HANDLE h) { WSANETWORKEVENTS ev;
--- a/lib/sinl.c +++ b/lib/sinl.c @@ -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
--- a/lib/sqrtl.c +++ b/lib/sqrtl.c @@ -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)
--- a/lib/tanl.c +++ b/lib/tanl.c @@ -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
--- a/lib/trim.c +++ b/lib/trim.c @@ -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) {
--- a/lib/trim.h +++ b/lib/trim.h @@ -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);
--- a/lib/tsearch.c +++ b/lib/tsearch.c @@ -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); }
--- a/lib/uniname/uniname.c +++ b/lib/uniname/uniname.c @@ -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;
--- a/tests/test-argp.c +++ b/tests/test-argp.c @@ -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;
--- a/tests/test-base64.c +++ b/tests/test-base64.c @@ -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);
--- a/tests/test-idpriv-drop.c +++ b/tests/test-idpriv-drop.c @@ -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 ());
--- a/tests/test-idpriv-droptemp.c +++ b/tests/test-idpriv-droptemp.c @@ -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 ());
--- a/tests/test-lock.c +++ b/tests/test-lock.c @@ -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 ());
--- a/tests/test-tls.c +++ b/tests/test-tls.c @@ -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]);