+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
if (x < 0.0L)
{
- t = pi - acosl(-x);
+ t = pi - acosl (-x);
if (huge + x > one) /* return with inexact */
return t;
}
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
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);
}
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
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
/* 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. */
#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
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++;
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;
}
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
#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
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
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);
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++;
}
}
-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 ())
((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
# 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)
# 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)
# 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)
#include "fpucw.h"
long double
-ldexpl(long double x, int exp)
+ldexpl (long double x, int exp)
{
long double factor;
int bit;
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
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);
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);
ln2b = 1.4286068203094172321214581765680755001344E-6L;
long double
-logl(long double x)
+logl (long double x)
{
long double z, y, w;
long double t;
}
/* 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;
{
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);
/* 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;
/* 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
}
static time_t
-parse_non_iso8601(cch_t * pz)
+parse_non_iso8601 (cch_t * pz)
{
whats_done_t whatd_we_do = NOTHING_IS_DONE;
/* 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 */
#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
static BOOL
-IsSocketHandle(HANDLE h)
+IsSocketHandle (HANDLE h)
{
WSANETWORKEVENTS ev;
* 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:
* 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:
* 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:
* 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:
free (ptr); \
(ptr) = NULL; \
} \
- while(0)
+ while (0)
#endif /* SAFE_ALLOC_H_ */
#define IsConsoleHandle(h) (((long) (h) & 3) == 3)
static BOOL
-IsSocketHandle(HANDLE h)
+IsSocketHandle (HANDLE h)
{
WSANETWORKEVENTS ev;
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 */
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 simple Newton-Raphson method. */
long double
-sqrtl(long double x)
+sqrtl (long double x)
{
long double delta, y;
int exponent;
/* 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)
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
#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)
{
/* Removes leading whitespaces. */
#define trim_leading(s) trim2(s, TRIM_LEADING)
-char *trim2(const char *, int);
+char *trim2 (const char *, int);
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);
}
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;
#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;
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);
(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 ());
(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 ());
(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 ());
(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 ());
/* 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
static int
random_account (void)
{
- return ((unsigned int) rand() >> 3) % ACCOUNT_COUNT;
+ return ((unsigned int) rand () >> 3) % ACCOUNT_COUNT;
}
static void
i1 = random_account ();
i2 = random_account ();
- value = ((unsigned int) rand() >> 3) % 10;
+ value = ((unsigned int) rand () >> 3) % 10;
account[i1] += value;
account[i2] -= value;
i1 = random_account ();
i2 = random_account ();
- value = ((unsigned int) rand() >> 3) % 10;
+ value = ((unsigned int) rand () >> 3) % 10;
account[i1] += value;
account[i2] -= value;
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 ());
/* 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
/* 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 ();
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]);
#include "macros.h"
int
-main(void)
+main (void)
{
time_t start = time (NULL);
ASSERT (usleep (1000000) == 0);